报名工具小程序初始代码

This commit is contained in:
liupopo
2024-02-06 09:36:25 +08:00
commit d7420944ba
202 changed files with 41300 additions and 0 deletions

View File

@@ -0,0 +1,164 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" @backClick="backClick" :isInterceptBack="true" text="选择城市" :useDownScroll="false"
:useUpScroll="false" pageBg="#F1F2F5">
<view style="padding-bottom: 200rpx;">
<city-select @cityClick="cityClick" :formatName="formatName" :activeCity="activeCity" :hotCity="hotCity"
:obtainCitys="obtainCitys" :isSearch="true" ref="citys"></city-select>
</view>
</RefreshView>
</template>
<script>
import citys from '@/components/city-select/citys.js'
import citySelect from '@/components/city-select/city-select.vue'
export default {
components: {
citySelect
},
data() {
return {
//需要构建索引参数的名称(注意:传递的对象里面必须要有这个名称的参数)
formatName: 'title',
//当前城市
activeCity: {
id: 1,
title: '南京市'
},
//热门城市
hotCity: [{
id: 0,
title: '南京市'
},
{
id: 1,
title: '南京市'
}
],
//显示的城市数据
obtainCitys: [{
id: 0,
title: '南京'
},
{
id: 1,
title: '北京'
},
{
id: 2,
title: '天津'
},
{
id: 3,
title: '东京'
}
],
location: {
city: "",
code: ""
}
}
},
onLoad: function(option) {
console.log(option);
this.location.city = option.city
this.location.code = option.code
//修改需要构建索引参数的名称
this.formatName = 'cityName'
//修改当前城市
this.activeCity = {
cityName: '正在定位',
cityCode: 0
}
//修改热门城市
this.hotCity = [{
cityName: '北京',
cityCode: 110000
},
{
cityName: '上海',
cityCode: 310000
}, {
cityName: '广州',
cityCode: 440100
}, {
cityName: '深圳',
cityCode: 440300
}, {
cityName: '杭州',
cityCode: 330100
},
]
//修改构建索引数据
this.obtainCitys = citys
let _this = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
let url =
"https://restapi.amap.com/v3/geocode/regeo?key=59970402d1c3f7dc1efff17d4dfcff21&location=" +
res.longitude + "," + res.latitude +
"&poitype=&radius=1000&extensions=all&batch=false&roadlevel=0";
_this.HttpOtherUrl({
url: url
}).then((res) => {
let json = JSON.stringify(res);
let info = JSON.parse(json).regeocode.addressComponent;
// 城市
let city = info.city;
// 城市编码
let code = info.adcode;
//修改需要构建索引参数的名称
_this.formatName = 'cityName'
//修改当前城市
_this.activeCity = {
cityName: city,
cityCode: code
}
})
},
fail() {
//修改当前城市
_this.activeCity = {
cityName: '定位失败',
cityCode: 0
}
}
});
},
methods: {
backClick(){
console.log("location", this.location);
this.SetResult(this.location)
},
cityClick(item) {
let json = JSON.stringify(item);
if (JSON.parse(json).cityCode == 0) {
this.Toast("当前选择无效")
} else {
console.log("city", JSON.parse(json).cityName);
console.log("code", JSON.parse(json).cityCode);
this.location.city = JSON.parse(json).cityName,
this.location.code = JSON.parse(json).cityCode
this.SetResult(this.location)
// uni.$emit('location', {
// city: JSON.parse(json).cityName,
// code: JSON.parse(json).cityCode
// });
// this.Back()
}
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,482 @@
<template>
<RefreshView ref="mescrollRef" text="活动详情" :useDownScroll="false" :useUpScroll="false"
:useTitleLeftBtn="parameter.userRoleId==1?1:0" titleLeftBtnSource=" 管理" :dropLeftList="page.manageList" @drop="selectManage">
<view class="activity-detail">
<!-- 广告 -->
<view class="image-area">
<swiper indicator-dots="true" autoplay="true">
<swiper-item v-for="(item,index) in page.activityDetails.listCoverImageUrl" :key="index">
<image class="image" :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<!-- 名称和活动类型 -->
<view class="name-category">
<h1>{{page.activityDetails.name}}</h1>
<text class="category">{{page.activityDetails.sportCategoryName}}</text>
</view>
<!-- 报名截止和整体活动时间 -->
<view class="row">
<!-- <view style="display: flex;flex-direction: row;margin-top: 15rpx;align-items: center;margin-left: 20rpx;margin-right: 30rpx;"> -->
<text class="field">报名截止</text>
<text>{{page.activityDetails.enrollEndTime}}</text>
<text style="color: #E99D42;font-size: 26rpx;flex: 1;text-align: right;">还有1天</text>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">整体活动</text>
<view style="display: flex;flex-direction: column;">
<text>{{page.activityDetails.startTime}}</text>
<text class="margin-top20">{{page.activityDetails.endTime}}</text>
</view>
</view>
<!-- 活动项目 -->
<view v-for="(item,index) in page.activityDetails.listActivityItem" :key="index" >
<view class="item-area">
<!-- 活动项目名称类型金额 -->
<view class="item-name-mold-money">
<h2>{{item.name}}</h2>
<text class="mold-money">{{item.enrollMoldName}}/{{item.enrollMoney==0?"免费":item.enrollMoney+'元'}}</text>
</view>
<!-- 活动项目介绍 -->
<view class="item-introduction">
<text>{{item.introduction}}</text>
</view>
<view class="line-thin"></view>
<!-- 日期地点 -->
<view class="row">
<text class="date">{{item.startTime}}</text>
<text class="address">{{item.address}}</text>
<image v-if="!showAddress(item.gymnasiumSid)" style="width: 30rpx;height: 30rpx;" src="../../static/img/public/more.png" @click="gymnasiumName(item.gymnasiumSid)"></image>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">报名数</text>
<text class="margin-left20 ">{{item.enrollNumbers==0?"暂无":item.enrollNumbers+'人'}}/{{item.enrollNumbersLimit==0?"不限":item.enrollNumbersLimit+'人'}}</text>
<view v-if="item.listUserHeadImageUrl.length>0" style="display:flex;flex-direction: row; margin-left:10rpx;" @click="userList(item.sid)">
<view v-for="(url,i) in item.listUserHeadImageUrl " :key="i">
<view
style="display:flex; width:100%;margin-left:2rpx;margin-right:2rpx;">
<image style="border-radius: 50%; width: 50rpx;height: 50rpx;" :src="url" mode="aspectFill"></image>
</view>
</view>
</view>
<image class="more" src="../../static/img/public/more.png" ></image>
</view>
</view>
</view>
<view class="line-thin"></view>
<!-- 活动介绍 -->
<view class="row">
<text class="field">活动介绍</text>
<view class="line"></view>
</view>
<text class="introduction">{{page.activityDetails.introduction}}</text>
<!-- 奖品奖项 -->
<view class="row">
<text class="field">奖品奖项</text>
<view class="line"></view>
</view>
<text class="introduction">{{page.activityDetails.notes}}</text>
<!-- 特别鸣谢 -->
<view class="row">
<text class="field">特别鸣谢</text>
<view class="line"></view>
</view>
<view
style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column; margin-top: 30rpx;">
<view v-for="(item,pos) in page.activityDetails.listSpecialThanks " :key="pos">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 10rpx;justify-content: center;">
<text style="color: #898989;font: size 28rpx;flex: 1;">{{item.name}}</text>
</view>
</view>
</view>
<view class="line-thin"></view>
<!-- 主办方 -->
<view class="row">
<text class="field">主办方</text>
<text style="color: #898989;font-size: 25rpx;">{{page.activityDetails.organizer}}</text>
</view>
<view class="line-thin"></view>
<!-- 联系人 -->
<view class="row">
<text class="field">联系人</text>
<view style="display: flex;flex-direction: row;">
<text style="color: #898989;font-size: 25rpx;">{{page.activityDetails.linkerName}}</text>
<view style="width: 30rpx;"></view>
<text style="color: #898989; font-size: 25rpx;">{{page.activityDetails.linkerPhone}}</text>
</view>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">报名必填</text>
<text>{{page.enrollRequiredName}}</text>
<!-- <image class = "more" src="../../static/img/public/more.png" ></image> -->
</view>
<view class="line-wide"></view>
<!-- 报名条款及按钮 -->
<view class="agreeMent">
<checkbox-group @change="checkboxChange">
<checkbox style="transform:scale(0.7)" :checked="checked1"></checkbox>
</checkbox-group>
<text class="text2">我已阅读并同意</text>
<text style="color: #007AFF;">参赛须知</text>
<text style="display: flex;text-align: center; margin-left: 20rpx; padding: 5rpx 10rpx;background: #0081D5;
color: #FFFFFF; font-size: 28rpx;" @click="enroll()"> 我要报名 </text>
</view>
<view style="height: 300rpx;"></view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
parameter:{
activitySid:"",
userRoleId:0,
userRoleName:"游客",
passRequired : false,
noPassMsg : ""
},
isCreate:0,
checked1: true,
page:{
activityDetails:{},
manageList: [{
'name': '修改活动',
'src': '../../static/game-icon/renyuanguanli.png',
'id': 0
}, {
'name': '删除活动',
'src': '../../static/game-icon/shanchu.png',
'id': 1
}],
enrollRequiredName:""
},
}
},
onLoad: function(option) {
// 为参数赋值
this.parameter.activitySid = option.activitySid
// 如果用户登陆则获取用户角色
let _this = this
if (getApp().globalData.isLogin){
_this.parameter.userRoleId =1
let sysUserSid = getApp().globalData.sysUserSid;
let activitySid = _this.parameter.activitySid;
_this.HTTP({
url: 'aos/v1/aosUser/getActivityRole',
method: 'GET',
data: {
'sysUserSid': sysUserSid,
'activitySid':activitySid
},
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
_this.parameter.userRoleId = res.data.userRoleId
_this.parameter.userRoleName = res.data.userRoleName
// } else {
// _this.Toast(res.msg)
}
});
}else{
_this.parameter.userRoleId = 0
}
},
onShow() {
let _this = this
let activitySid = _this.parameter.activitySid;
_this.HTTP({
url: 'aos/v1/activity/getActivityDetails/' + activitySid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
_this.page.activityDetails = res.data
_this.setEnrollRequiredName()
} else {
_this.Toast(res.msg)
}
});
},
methods: {
setEnrollRequiredName(){
let enrollRequiredName = ""
if (this.page.activityDetails.enrollRequired.onRealName == 1){
enrollRequiredName += "姓名"
}
if (this.page.activityDetails.enrollRequired.onSex == 1){
if (this.page.activityDetails.enrollRequired.onRealName == 1){
enrollRequiredName += " / "
}
enrollRequiredName += "性别"
}
if (this.page.activityDetails.enrollRequired.onBirthday == 1){
if (this.page.activityDetails.enrollRequired.onSex == 1 || this.page.activityDetails.enrollRequired.onRealName == 1){
enrollRequiredName += " / "
}
enrollRequiredName += "生日"
}
if (this.page.activityDetails.enrollRequired.onAdCode == 1){
if (this.page.activityDetails.enrollRequired.onSex == 1 || this.page.activityDetails.enrollRequired.onRealName == 1 || this.page.activityDetails.enrollRequired.onBirthday == 1){
enrollRequiredName += " / "
}
enrollRequiredName += "地区"
}
this.page.enrollRequiredName = enrollRequiredName
},
selectManage(index, isLeft, selectData) {
let _this = this;
let id = selectData.id
if (id == 0) {
// 修改活动
uni.navigateTo({
url: '../publish/CreateActivity?sid=' + _this.parameter.activitySid
})
} else if (id == 1) {
// 删除活动
uni.showModal({
title: '温馨提示',
content: '确定删除此赛事?',
success(res) {
if (res.confirm) {
_this.HTTP({
url: 'aos/v1/activity/delActivity/' + _this.parameter.activitySid,
method: 'DELETE',
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
uni.navigateBack({
delta: 1
});
} else {
_this.Toast(res.msg)
}
});
}
}
});
} else if (id == -1) {
// 关闭
}
},
toCreateActivity(){
let activitySid = this.parameter.activitySid
uni.navigateTo({
url: '../publish/CreateActivity?sid=' + activitySid
});
},
showAddress(s) {
console.log("..." + s);
return this.IsEmpty(s)
},
checkboxChange(e) {
this.checked1 = !this.checked1
console.log(this.checked1)
},
gymnasiumName(e) {
uni.navigateTo({
url: "ArenaDetailActivity?sid=" + e
})
console.log("gymnasiumName>>", e)
},
userList(sid) {
console.log("userList>>", sid)
uni.navigateTo({
url: "BaoMingListActivity?activitySid=" + this.parameter.activitySid + "&activityItemSid=" + sid
})
},
enroll() {
let _this = this;
// 勾选协议
if (!this.checked1) {
this.Toast("请认真阅读参赛须知,并勾选。")
return
}
// 报名菜单赋值
let listEnrollMenu = []
let listActivityItem = this.page.activityDetails.listActivityItem
for (var i = 0; i < listActivityItem.length; i++) {
let enrollMenu = listActivityItem[i].name
let enrollMold = listActivityItem[i].enrollMold
if ( enrollMold = 1){
enrollMenu += "(" + listActivityItem[i].enrollMoldName +")"
}
listEnrollMenu.push(enrollMenu)
}
// 输出报名菜单
uni.showActionSheet({
itemList: listEnrollMenu,
success: function(res) {
console.log("itemList==" + listEnrollMenu)
console.log("res==" + JSON.stringify(res))
_this.selectMenu(res.tapIndex, listEnrollMenu)
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
},
verifyEnrollRequired(){
},
selectMenu(id, info) {
// 用户如未登陆则进入授权登陆页面
if (!getApp().globalData.isLogin){
uni.navigateTo({
url: "../me/AuthLogin"
})
}
let _this = this
let activitySid = _this.page.activityDetails.sid
let sysUserSid = getApp().globalData.sysUserSid
// console.log("报名模式=============",JSON.stringify(_this.page.activityDetails))
// 校验报名必填项
let onRealName = _this.page.activityDetails.enrollRequired.onRealName
let onSex = _this.page.activityDetails.enrollRequired.onSex
let onBirthday = _this.page.activityDetails.enrollRequired.onBirthday
let onAdCode = _this.page.activityDetails.enrollRequired.onAdCode
if (onRealName == 0 || onSex == 0 || onBirthday == 0 || onAdCode == 0){
_this.HTTP({
url: 'aos/v1/activity/verifyEnrollRequired',
method: 'GET',
paramsType: "FORM",
data: {
'activitySid': activitySid,
'sysUserSid': sysUserSid
},
loading: true
}).then((res) => {
if ( res.code == "200") {
_this.parameter.passRequired = true
}else{
// _this.parameter.noPassMsg = res.msg
uni.showModal({
title: '报名需要补充如下个人信息',
content: res.msg,
success(res) {
if (res.confirm) {
uni.navigateTo({
url: '../me/RealInfo?sysUserSid=' + getApp().globalData.sysUserSid
})
}else
{
return
}
}
})
}
});
}
// 获取参数
console.log(id)
console.log(info)
let activityItemSid = _this.page.activityDetails.listActivityItem[id].sid // 活动项目SId
let enrollMold = _this.page.activityDetails.listActivityItem[id].enrollMold // 报名模式(0为个人1为团体)
console.log("用户SID",getApp().globalData.sysUserSid)
// 活动项目为个人
if (enrollMold == 0){
// 校验报名条件
let passCondition = true
let sex = _this.page.activityDetails.listActivityItem[id].activityItemCondition.sex
let minAge = _this.page.activityDetails.listActivityItem[id].activityItemCondition.minAge
let maxAge = _this.page.activityDetails.listActivityItem[id].activityItemCondition.maxAge
if (sex > 0 || minAge > 0 || maxAge > 0){
_this.HTTP({
url: 'aos/v1/activityItem/verifyPersonalEnrollCondition',
method: 'GET',
paramsType: "FORM",
data: {
'activityItemSid': activitySid,
'sysUserSid': sysUserSid
},
loading: true
}).then((res) => {
if ( res.code != "200") {
return
uni.showToast({
title: '报名条件不符',
content:res.msg,
duration:3000
})
}
})
}
this.HTTP({
url: 'aos/v1/activityItem/personalEnroll',
method: 'POST',
data: {
'activityItemSid': activityItemSid,
'sysUserSid': getApp().globalData.sysUserSid,
'paymentMemberSid': getApp().globalData.sysUserSid,
},
paramsType: "JSON",
loading: true
}).then((res) => {
if (res.code == 200) {
this.Toast("报名成功!")
} else {
this.Toast(res.msg)
}
}, (err) => {
// 错误提示
_this.Toast("出错了:" + err.data.errmsg)
})
}
return
// 活动项目为团体
if (enrollMold == 1){
// 获取我的队伍
uni.navigateTo({
url: "../find/TeamEnroll?activityItemSid="+activityItemSid
})
}
},
}
}
</script>
<style lang="scss">
@import url("../../static/columns.css");
.items {
display: flex;
flex-direction: column;
}
.agreeMent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 50rpx;
margin-left: 30rpx;
.text2 {
color: #666666;
font-size: 30rpx;
}
}
.content{
display: flex;
flex-direction: column;
background: #FFFFFF;
width: 100%;
height: 100%;
}
</style>

255
pages/find/ActivityList.vue Normal file
View File

@@ -0,0 +1,255 @@
<template>
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" @refresh="refresh" text="活动列表" :useDownScroll="true" :useUpScroll="true">
<sl-filter id="header" ref="slLilter" v-if="menuList.length!=0" :color="fd6d2a" themeColor="#000000" :menuList.sync="menuList" @result="result"></sl-filter>
<view v-for="(item,index) in page.listActivity " :key="index">
<view class="activity-area" @click="clickItem(index)">
<view class="summary">
<view class=".name-category">
<text class="name">{{item.name}}</text>
<text class="category">{{item.sportCategoryName}}</text>
</view>
<text class="enroll">报名截止{{item.enrollEndTime}}</text>
</view>
<view class="image-area">
<image class="image" mode="aspectFill" :src="item.firstCoverImage"></image>
<view class="tips">
<image class="icon" src="../../static/img/public/renqi.png"></image>
<text class="popularity">{{item.popularity}}</text>
<text :class="{'enroll-state enroll-no':item.enrollState ==1||item.enrollState ==3,'enroll-state enroll-yes':item.enrollState==2}" >{{item.enrollStateName}}</text>
</view>
</view>
<view v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view class="item-area">
<view class="item-name-mold-money">
<text class="item-name">{{info.name}}</text>
<text class="mold-money">{{info.enrollMoldName}}/{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
<view class="enroll-amount-date">
<text class="amount">报名数{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
<text class="date">{{info.startTime}}</text>
</view>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1" class="line-thin margin-top20"></view>
</view>
</view>
</view>
</RefreshView>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: [],
page: {
'sort': 0,
'city': this.ReadPreference("find_city"),
'adCode': this.ReadPreference("find_city_code").slice(0, -2),
state: "",
listActivity:[]
},
menuList: [{
'title': '当前定位城市',
'key': 'type',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': this.ReadPreference("find_city"),
'value': this.ReadPreference("find_city_code").slice(0, -2)
},
{
'title': '选择其他城市',
'value': '0'
}
]
}, {
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部活动',
'value': ""
}]
}, {
'title': '默认排序',
'key': 'sort',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '按发布时间排序',
'value': 0
},
{
'title': '按报名时间排序',
'value': 1
},
{
'title': '按人气从高到低',
'value': 2
}
]
}
]
}
},
onLoad() {
let that = this
that.HTTP({
url: 'aos/v1/activity/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": that.page.adCode
},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("that.menuList[1].detailList", that.menuList[1].detailList);
if (200 == res.code) {
// 为活动类型块查询条件赋值(直接获取活动类别接口)
let listSportCategoryArea = [];
for (var i = 0; i < res.data.listSportCategoryArea.length; i++) {
listSportCategoryArea.push({
title: res.data.listSportCategoryArea[i].sportCategoryName,
value: res.data.listSportCategoryArea[i].sid
})
}
// 必须用变量去接受
that.menuList[1].detailList = that.menuList[1].detailList.concat(listSportCategoryArea)
this.$refs.slLilter.setTitle(this.menuList)
}
});
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
if (!this.IsEmpty(backResult.code)) {
console.log("结果2>" + backResult.code)
this.page.adCode = backResult.code
this.page.city = backResult.city
this.menuList[0].detailList[0].title = backResult.city
this.menuList[0].detailList[0].value = backResult.code
console.log("qqq", this.menuList[0].detailList);
this.$refs.slLilter.setTitle(this.menuList)
this.$refs.mescrollRef.resetPageOne();
}
}
},
methods: {
result(val) {
if (!this.IsEmpty(val.sort)) {
this.page.sort = val.sort;
this.list = []
console.log("this.page.sort", this.page.sort);
}
if (!this.IsEmpty(val.type)) {
if (val.type != 0) {
this.page.game = val.type;
this.list = []
} else {
console.log("===>1" + JSON.stringify(this.page))
uni.navigateTo({
url: "../../pages/city/CitySelectActivity?city=" + this.page.city +
"&code=" + this.page.adCode
})
}
}
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
}
this.$refs.mescrollRef.resetPageOne();
},
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activity/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
adCode: _this.menuList[0].detailList[0].value,
orderBy: _this.page.sort,
sportCategorySid: _this.page.state
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.page.listActivity = []
}
// 追加数据
_this.page.listActivity = _this.page.listActivity.concat(res.data.records)
}).catch(function(err) {
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let activitySid = this.page.listActivity[index].sid
console.log(activitySid)
uni.navigateTo({
url: '../find/ActivityDetail?activitySid=' + activitySid
});
},
}
}
</script>
<style lang="scss">
@import url("../../static/columns.css");
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<view>
<RefreshView ref="mescrollRef" @refresh="refresh" :hasBack="true" text="报名列表">
<view v-for="(item,index) in data.list" :key='index' class="list-item-layout">
<image :src="item.headImage" class="list-item-img" mode="aspectFill">
</image>
<view class="list-item-right">
<view class="list-item-name">{{item.userNickName}}</view>
<view class="list-item-content">报名时间{{item.enrollTime}}</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
page: {
activitySid: '',
activityItemSid: '',
},
data: {
list: []
}
}
},
onLoad(options) {
// 赋值
this.page.activitySid = options.activitySid
this.page.activityItemSid = options.activityItemSid
},
methods: {
refresh(page) {
let _this = this;
this.HTTP({
url: 'aos/v1/participantRelation/getPageListPersonalParticipant',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
activitySid: this.page.activitySid,
activityItemSid: this.page.activityItemSid ,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.data.list = []
}
// 追加数据
_this.data.list = _this.data.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
})
},
}
}
</script>
<style lang="scss">
.list-item-layout {
display: flex;
width: 100%;
flex-direction: row;
box-sizing: border-box;
padding-top: 20rpx;
padding-bottom: 10rpx;
margin-left: 33rpx;
margin-right: 33rpx;
border-bottom: 0.1px #F1F1F1 solid;
.list-item-img {
width: 140rpx;
height: 140rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.list-item-right {
flex: 1;
margin-top: 20rpx;
display: flex;
flex-direction: column;
height: 140rpx;
.list-item-name {
width: 100%;
flex: 1;
color: #333333;
font-size: 27rpx;
}
.list-item-content {
width: 100%;
flex: 1;
color: #999999;
font-size: 24rpx;
}
.list-item-time {
width: 100%;
color: #999999;
font-size: 24rpx;
flex: 1;
}
}
}
</style>

217
pages/find/TeamEnroll.vue Normal file
View File

@@ -0,0 +1,217 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="队伍报名" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_lift">选中({{page.selectedMemberAmount}})</text>
<text class="top_right" @click="enroll()" >比赛报名</text>
</view>
<view class="line"></view>
<view>
<view v-for="(item,index) in page.listTeamMemberArea " :key="index">
<view class="item">
<view class="line" style="height: 1px;"></view>
<view class="item_content">
<checkbox-group class="item_check" @change="checkboxChange($event, index)">
<checkbox :checked="item.checked"></checkbox>
</checkbox-group>
<image class="item_img" :src="item.headImage" mode="aspectFill"></image>
<text class="item_text">{{item.realName}}</text>
</view>
</view>
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
data:{
activityItemSid:"", // 活动项目Sid
teamSid:"", // 队伍Sid
listTeamMemberSid:[], // 队伍成员Sid列表
paymentMemberSid:"" // 付费会员Sid
},
page:{
type: 1, // 队伍类型1为我创建的
listTeamMemberArea:[], // 会员块列表
selectedMemberAmount:0 // 选中成员数
}
}
},
onLoad:function(options) {
// 接收队伍Sid
this.data.activityItemSid = options.activityItemSid
// 判断是否登陆
if (!getApp().globalData.isLogin){
// 进入登陆页面
}
let sysUserSid = getApp().globalData.sysUserSid
let _teamSid =""
// 获取我的队伍,如果为一个队伍在当前页,如果多个队伍则进入选择界面
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/getMyTeamAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: 1,
size: 10,
params: {
sysUserSid: sysUserSid,
type: 1
}
},
loading: true
})
.then((res) => {
// 未找到队伍返回
if (!res.success){
return
}
let listTeamArea = res.data.records
if (listTeamArea.length > 1 ){
console.log('队伍数大于1支跳转', listTeamArea)
}
// 设置队伍Sid
_this.data.teamSid = listTeamArea[0].sid
console.log('最新的队伍Sid', _this.data.teamSid)
// 获取列表
_this.HTTP({
url: 'aos/v1/aosUser/getTeamArea',
paramsType: "FORM",
method: "GET",
data: {
teamSid: _this.data.teamSid
},
toast: true,
loading: true
})
.then((res) => {
console.log('res', res)
_this.page.listTeamMemberArea = res.data.listTeamMemberArea
});
}, (err) => {
// 错误提示
_this.Toast("出错了:" + err.data.errmsg)
})
},
methods: {
enroll() {
// 保存
let _this = this
console.log('=====', _this)
let _activityItemSid = this.data.activityItemSid
let _teamSid = _this.data.teamSid
let _listTeamMemberSid = _this.data.listTeamMemberSid
_this.HTTP({
url: 'aos/v1/activityItem/teamEnroll',
paramsType: "JSON",
method: "POST",
data: {
'activityItemSid':_activityItemSid,
'teamSid': _teamSid,
'listTeamMemberSid': _listTeamMemberSid
},
loading: true
})
.then((res) => {
uni.navigateBack({
delta: 1
})
});
},
checkboxChange(e, index) {
// 切换选择
this.page.listTeamMemberArea[index].checked = !this.page.listTeamMemberArea[index].checked
console.log("listTeamMemberArea" + JSON.stringify(this.page.listTeamMemberArea[0]))
// 勾选后添加Sid取消勾选后删除
if (this.page.listTeamMemberArea[index].checked) {
this.data.listTeamMemberSid.push(this.page.listTeamMemberArea[index].sid)
}
else {
// 删除当前的Sid
let sid = this.page.listTeamMemberArea[index].sid
let pos = this.data.listTeamMemberSid.findIndex((x) => {
return x == sid
})
this.data.listTeamMemberSid.splice(pos, 1)
}
this.page.selectedMemberAmount = this.data.listTeamMemberSid.length
}
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
.line {
height: 10rpx;
background: #eee;
width: 100%;
}
.top {
display: flex;
background: #fff;
flex-direction: row;
width: 100%;
padding-top: 26rpx;
padding-bottom: 26rpx;
.top_lift {
margin-left: 30rpx;
font-weight: 550;
font-family: sans-serif;
flex: 1;
color: #101010;
font-size: 36rpx;
}
.top_right {
margin-right: 30rpx;
background-color: #F4CE98;
color: #fff;
font-size: 24rpx;
padding: 10rpx 20rpx;
text-align: right;
}
}
.item {
display: flex;
flex-direction: column;
.item_content {
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx 32rpx;
flex-direction: row;
.item_check {
width: 32rpx;
height: 32rpx;
}
.item_img {
margin-left: 40rpx;
width: 80rpx;
height: 80rpx;
border-radius: 10rpx;
}
.item_text {
font-size: 28rpx;
color: #101010;
margin-left: 40rpx;
}
}
}
</style>

364
pages/home/AddFragment.vue Normal file
View File

@@ -0,0 +1,364 @@
<template>
<view>
<RefreshView ref="mescrollRef" text="首页" :useDownScroll="false" :useUpScroll="false" pageBg="#F1F2F5">
<view style="display: flex;flex-direction: column;align-items: center;width: 100vw;">
<view style="display: flex;flex-direction: column;width: 100vw;align-items: center;background-color: #2fa1f0;padding-top: 80rpx;
border-bottom-right-radius: 30rpx;border-bottom-left-radius: 30rpx;">
<view style="width: 100vw;text-align: center;font-size: 40px;font-weight: 700;color: #fff;" >
<!-- <view style="left: 100px;
top: 79px;
font-weight: 700;
width: 160px;
height: 58px;
color: rgba(255, 255, 255, 100);
font-size: 40px;
text-align: center;
font-family: SourceHanSansSC-bold;">-->
体育活动
</view>
<view
style="width: 100vw;text-align: center;font-size: 22px;font-weight: 600;color: #fff;margin-top: 10rpx;">
<!-- <view style="left: 114px;
top: 139px;
font-weight: 600;
width: 132px;
height: 32px;
color: rgba(255, 255, 255, 100);
font-size: 22px;
text-align: center;
font-family: SourceHanSansSC-bold;"> -->
组织报名工具
</view>
<text style="margin-top: 80rpx;color:#fff;font-size: 16px;">一分钟创建 轻松组织活动</text>
<view
style="display: flex;flex-direction: row;margin-top: 40rpx;justify-content: center;margin-bottom: 100rpx;align-items: center;">
<image src="../../static/home-icon/visits.png" style="width: 35rpx;height: 35rpx;"></image>
<text style="margin-left: 20rpx;color: #fff;font-size: 12px;">访问量{{visits}}</text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 60rpx;margin-left: 30rpx;align-items:baseline">
<text style="font-weight: 400; color: #E99D42 ;font-size: 36rpx;">发布活动类别</text>
<text style="margin-left: 20rpx;font-weight: 400; color: #E99D42;font-size: 28rpx;">(点击体育活动标签发布)</text>
</view>
<view style="display: flex; margin-left: 10rpx;margin-right: 30rpx;margin-top: 40rpx;
justify-content: center;">
<grid>
<view style="display: flex; margin-bottom: 10rpx; margin-left: 10rpx;margin-right: 10rpx;"
v-for="(item,index) in SportCategoryList">
<text class="labelLayout" @click="onClick(index)">{{item.sportCategoryName}}</text>
</view>
</grid>
</view>
<view class="line" style=" margin-top: 100rpx;margin-left: 30rpx;margin-right: 30rpx;"></view>
<view
style="display: flex;flex-direction: column;margin-top: 40rpx;margin-bottom: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="font-size: 32rpx;color: #666666;font-weight: 600">友情提示</text>
<text style="font-size: 30rpx;color: #666666;margin-top: 40rpx;font-weight: 500;">{{notices}}</text>
</view>
<view class="line" style=" margin-left: 30rpx;margin-right: 30rpx;margin-top: 40rpx;"></view>
<view style="margin-top: 30rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="font-size: 40rpx;color: #4095E5;font-weight: 600" @click="jump()">{{page.city}}</text>
<text
style="font-size: 32rpx;color: #666666;font-weight: 500;margin-left: 20rpx;">共有{{activityAmount}}场活动</text>
</view>
<view style="height: 150px;"></view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
notices: "\u3000\u3000您注册的帐号可以在宇运动主体下的子平台一号通行同时您发布的活动将会按类别发布到各子平台。点击查看宇运动子平台",
list: [],
SportCategoryList: [],
page: {
city: "正在获取...",
code: ""
},
visits: "...",
activityAmount: "..."
}
},
onLoad(options) {
this.HTTP({
url: 'aos/v1/activityManagement/add1PointOnVisits',
method: 'GET',
data: {},
paramsType: "FORM",
loading: false
}).then((res) => {
});
let that = this
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
if (this.IsEmpty(find_city_code)) {
// 首次进入
find_city_code = 0;
// 获取定位
let _this = this;
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
console.log("latitude", res.longitude);
console.log("longitude", res.latitude);
// 先写入定位
_this.location = {
latitude: locat.latitude,
longitude: locat.longitude
}
let url =
"https://restapi.amap.com/v3/geocode/regeo?key=59970402d1c3f7dc1efff17d4dfcff21&location=" +
res.longitude + "," + res.latitude +
"&poitype=&radius=1000&extensions=all&batch=false&roadlevel=0";
_this.HttpOtherUrl({
url: url
}).then((res) => {
let json = JSON.stringify(res);
let info = JSON.parse(json).regeocode.addressComponent;
// 城市
let city = info.city;
// 城市编码
let code = info.adcode;
// 获取到正确的城市编码
if (code > 0) {
console.log("find_city1", city);
console.log("find_city_code1", code);
// 保存本次定位
_this.WritePreference("find_city", city)
_this.WritePreference("find_city_code", code)
_this.page.code = code
_this.page.city = city
_this.getCode()
} else {
console.log("find_city2", city);
console.log("find_city_code2", code);
// 未获取到正确的城市编码
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
}
}, (err) => {
console.log("find_city3", "石家庄");
console.log("find_city_code3", "130104");
//获取当前城市失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
})
},
fail(err) {
console.log("find_city4", "石家庄");
console.log("find_city_code4", "130104");
// 定位失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
}
});
} else {
this.page.code = find_city_code
this.page.city = find_city
this.getCode()
}
},
onShow() {
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
if (!this.IsEmpty(find_city_code)) {
this.getCode()
}
},
methods: {
// wwww(){
// uni.navigateTo({
// url: "../team/CreateTeam"
// })
// },
getCode() {
let that = this
that.HTTP({
url: 'aos/v1/activityManagement/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": this.page.code
},
paramsType: "FORM",
loading: true
}).then((res) => {
that.SportCategoryList = res.data.listSportCategoryArea
that.activityAmount = res.data.activityAmount
that.visits = res.data.visits
});
},
onClick(index) {
uni.navigateTo({
url: "../index/activity?sportCategoryName=" + this.SportCategoryList[index].sportCategoryName +
"&sportCategorySid=" + this.SportCategoryList[index].sid + "&isCreate=0&sid="
})
},
jump() {
console.log('this.page.code', this.page.code)
uni.switchTab({
url: "../home/FindFragment"
})
}
}
}
</script>
<style lang="scss">
.line {
height: 5rpx;
background-color: #eee
}
.btn {
display: flex;
width: 80%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
}
.nav-bar {
height: 92rpx;
width: 100%;
display: flex;
justify-content: space-between;
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
.labelLayout {
flex: 1;
width: 100%;
margin-left: 20rpx;
margin-right: 20rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 8rpx;
padding-bottom: 8rpx;
padding-left: 20rpx;
padding-right: 20rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
</style>

326
pages/home/FindFragment.vue Normal file
View File

@@ -0,0 +1,326 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" @refresh="refresh" text="活动列表"
:useDownScroll="true" :useUpScroll="true">
<sl-filter id="header" ref="slLilter" v-if="menuList.length!=0" :color="fd6d2a" themeColor="#000000"
:menuList.sync="menuList" @result="result"></sl-filter>
<view>
<view v-for="(item,index) in list " :key="index">
<view
style="display: flex;flex-direction: column;margin-bottom: 30rpx; padding: 30rpx;background: #FFFFFF;"
@click="clickItem(index)">
<view style="display: flex;flex-direction: column;">
<view style="display: flex; flex-direction: row;">
<text style="color: #101010; font-size: 32rpx; display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;flex: 1;">{{item.name}}</text>
<text
style="color: #fff; font-size: 24rpx; background-color: #F2BF5C; padding: 5rpx 10rpx;">{{item.sportCategoryName}}</text>
</view>
<text
style="color: #898989 ; font-size: 28rpx; margin-top: 10rpx;">报名截止{{item.enrollEndTime}}</text>
</view>
<view style="width: 100%;height: 300rpx; margin-top: 20rpx;margin-bottom: 20rpx;">
<image style="width: 100%;height: 100%; border-radius: 30rpx;" mode="aspectFill"
:src="item.firstCoverImage"></image>
<view style="display: flex; height: 50rpx;width: 100%; margin-top: -80rpx; ">
<view style=" display: flex;align-items: center;width: 100%;">
<image style="width: 28px;height: 48rpx;margin-left: 30rpx;"
src="../../static/renqi.png"></image>
<text style="color: #fff; margin-left: 15rpx;flex: 1;">{{item.popularity}}</text>
<text
:class="{'btn1':item.enrollState ==1||item.enrollState ==3,'btn2':item.enrollState==2}"
style="display: flex;text-align: center; padding: 8rpx 15rpx;
color: #FFFFFF; font-size: 28rpx; margin-right:30rpx; border-radius: 10rpx;">{{item.enrollStateName}}</text>
</view>
</view>
</view>
<view v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view style="display: flex;flex-direction: column;">
<view
style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;">
<text style="color: #101010; font-size: 28rpx; flex: 1;">{{info.name}}</text>
<view style=" align-items: center;">
<text style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #ff0000 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 5rpx;">
<view style="flex: 1; align-items: center;">
<text style="color: #919191; font-size: 24rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
</view>
<text
style="margin-top: 10rpx; color: #919191; font-size: 24rpx;">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #efefef; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: [],
page: {
'sort': 0,
'city': this.ReadPreference("find_city"),
'adCode': this.ReadPreference("find_city_code").slice(0, -2),
state: ""
},
menuList: [{
'title': '当前定位城市',
'key': 'type',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': this.ReadPreference("find_city"),
'value': this.ReadPreference("find_city_code").slice(0, -2)
},
{
'title': '选择其他城市',
'value': '0'
}
]
}, {
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部活动',
'value': ""
}]
}, {
'title': '默认排序',
'key': 'sort',
'reflexTitle': true,
'defaultSelectedIndex': 0,
'detailList': [{
'title': '按发布时间排序',
'value': 0
},
{
'title': '按报名时间排序',
'value': 1
},
{
'title': '按人气从高到低',
'value': 2
}
]
}
]
}
},
onLoad() {
let that = this
that.HTTP({
url: 'aos/v1/activityManagement/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": that.page.adCode
},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("that.menuList[1].detailList", that.menuList[1].detailList);
if (200 == res.code) {
let list = [];
for (var i = 0; i < res.data.listSportCategoryArea.length; i++) {
list.push({
title: res.data.listSportCategoryArea[i].sportCategoryName,
value: res.data.listSportCategoryArea[i].sid
})
}
// 必须用变量去接受
that.menuList[1].detailList = that.menuList[1].detailList.concat(list)
this.$refs.slLilter.setTitle(this.menuList)
console.log("qqq", that.menuList[1].detailList);
}
});
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
console.log("结果>" + JSON.stringify(backResult))
if (!this.IsEmpty(backResult.code)) {
console.log("结果2>" + backResult.code)
this.page.adCode = backResult.code
this.page.city = backResult.city
this.menuList[0].detailList[0].title = backResult.city
this.menuList[0].detailList[0].value = backResult.code
console.log("qqq", this.menuList[0].detailList);
this.$refs.slLilter.setTitle(this.menuList)
this.$refs.mescrollRef.resetPageOne();
}
}
},
methods: {
result(val) {
if (!this.IsEmpty(val.sort)) {
this.page.sort = val.sort;
this.list = []
console.log("this.page.sort", this.page.sort);
}
if (!this.IsEmpty(val.type)) {
if (val.type != 0) {
this.page.game = val.type;
this.list = []
} else {
console.log("===>1" + JSON.stringify(this.page))
uni.navigateTo({
url: "../../pages/city/CitySelectActivity?city=" + this.page.city +
"&code=" + this.page.adCode
})
}
}
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
}
this.$refs.mescrollRef.resetPageOne();
},
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activityManagement/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
adcode: _this.menuList[0].detailList[0].value,
orderBy: _this.page.sort,
sportCategorySid: _this.page.state
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: '../index/DetailActivity?raceSid=' + raceSid
});
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
</style>

299
pages/home/UserFragment.vue Normal file
View File

@@ -0,0 +1,299 @@
<template>
<view class="content">
<RefreshView ref="mescrollRef" :pageBg="EDEDED" text="个人中心" :useUpScroll="false" :useDownScroll="false"
:useTitleLeftBtn="1" titleLeftBtnSource="管理" :dropLeftList="page.btnList" @drop="drop">
<view class="top">
<image class="touxiang" :src="page.headImage" mode="aspectFill"></image>
<view class="top-right">
<text class="name" @click="bind()">{{page.userNickName}}</text>
<view style="display: flex;align-items: center;margin-right: 30rpx; margin-top: 35rpx;"
@click="baseInfo()" v-if="!this.IsEmpty(page.loginName)">
<text class="name2" style="flex: 1;">{{page.loginName}}</text>
<image src="../../static/home-icon/more.png" style="width: 35rpx;height: 35rpx;"></image>
</view>
</view>
</view>
<view @click="click(2)" class="menu-item">
<image class = "icon" src="../../static/home-icon/game.png" ></image>
<text class="text">我的活动</text>
<text class="explain">{{page.participateInActivityExplain}}</text>
<image class = "more" src="../../static/home-icon/more.png" ></image>
</view>
<view class="line-wide"></view>
<view @click="click(3)" class="menu-item">
<image class = "icon" src="../../static/home-icon/game.png" ></image>
<text class="text">我的队伍</text>
<image class = "more" src="../../static/home-icon/more.png" ></image>
</view>
<view class="line-wide"></view>
<view @click="click(4)" class="menu-item">
<image class = "icon" src="../../static/home-icon/about.png" ></image>
<text class="text">实名信息</text>
<image class = "more" src="../../static/home-icon/more.png" ></image>
</view>
<view class="line-thin"></view>
<view @click="click(5)" class="menu-item">
<image class = "icon" src="../../static/home-icon/shezhi.png" ></image>
<text class="text">设置</text>
<image class = "more" src="../../static/home-icon/more.png" ></image>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
btnList: [{
'name': '报名管理',
'src': '../../static/game-icon/renyuanguanli.png',
'id': 0
}, {
'name': '删除活动',
'src': '../../static/game-icon/shanchu.png',
'id': 1
}, {
'name': '取消关闭',
'src': '../../static/game-icon/fanhui.png',
'id': -1
}],
userNickName: "微信登录/注册",
headImage: "http://www.ourpyw.com/upload//touxiang/default_tx.jpg",
isRealAttestation: "",
participateInActivityExplain: "",
realAttestationExplain: "认证后可发布活动。未认证",
loginName: ""
},
}
},
methods: {
drop(index, isLeft, selectData) {
let _this = this;
let id = selectData.id
if (id == 0) {
// 报名管理
uni.navigateTo({
url: './ManagerHappyGameMembersActivity?gameSid=' + this.page.gameSid
})
} else if (id == 1) {
// 删除活动
uni.showModal({
title: '温馨提示',
content: '确定删除此赛事?',
success(res) {
if (res.confirm) {
_this.confirm()
}
}
});
} else if (id == -1) {
// 关闭
}
},
baseInfo() {
// 信息中心
let _this = this
this.Login()
.then((res) => {
getApp().globalData.memberSid = res
_this.WritePreference("memberSid", res)
getApp().globalData.isLogin = true
// // 真实信息
// uni.navigateTo({
// url: '../info/RealMessageActivity'
// })
uni.navigateTo({
url: '../user/baseInfo'
})
})
},
click(id) {
let _this = this
switch (id) {
case 1:
// 信息中心
this.Login()
.then((res) => {
getApp().globalData.memberSid = res
_this.WritePreference("memberSid", res)
getApp().globalData.isLogin = true
// // 真实信息
// uni.navigateTo({
// url: '../info/RealMessageActivity'
// })
console.log("asdasdas")
uni.navigateTo({
url: '../user/baseInfo'
})
})
break;
case 2:
// 我的活动
this.Login()
.then((res) => {
getApp().globalData.memberSid = res
_this.WritePreference("memberSid", res)
getApp().globalData.isLogin = true
uni.navigateTo({
url: '../games/MyGamesActivity'
})
})
// uni.navigateTo({
// url: '../web/WebActivity?url=' + this.putWEBExtra("https://www.ourpyw.com/hide/#/")
// })
break;
case 3:
// 我的队伍
uni.navigateTo({
url: "../me/myteam/CreateTeam"
})
case 4:
uni.navigateTo({
url: '../index/UserAuthentication'
})
// // 分享
// this.$refs.popup.open()
break;
case 5:
// 设置
this.Login()
.then((res) => {
getApp().globalData.memberSid = res
_this.WritePreference("memberSid", res)
getApp().globalData.isLogin = true
uni.navigateTo({
url: '../setup/setUp'
})
})
break;
}
},
bind() {
if (!this.IsEmpty(getApp().globalData.memberSid)) {
return;
}
// 进入登录页面
uni.navigateTo({
url: '../me/Login'
})
// 绑定手机号
// uni.navigateTo({
// url: '../index/BindPhone?sysUserLoginAuthSid=' +
// getApp().globalData.sysUserLoginAuthSid
// })
},
refresh() {
let _this = this
if (this.IsEmpty(getApp().globalData.memberSid)) {
_this.page.userNickName = "微信登录/注册",
_this.page.headImage = "http://www.ourpyw.com/upload//touxiang/default_tx.jpg",
_this.page.isRealAttestation = "",
_this.page.participateInActivityExplain = "",
_this.page.realAttestationExplain = "认证后可发布活动。未认证",
_this.page.loginName = ""
return;
}
_this.HTTP({
url: 'aos/v1/aosUserManagement/getMyPage/' + getApp().globalData.memberSid,
method: 'GET',
data: {},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("我的页面初始化", res);
if (res.code == 200) {
_this.page = res.data
_this.page.loginName = "用户号:" + res.data.loginName
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
}
}, (err) => {
// 失败重置刷新状态
_this.$refs.mescrollRef.refreshError()
});;
},
},
onShow() {
this.refresh()
}
}
</script>
<style lang="scss">
@import url("../../styles/master.css");
.content {
display: flex;
flex-direction: column;
height: 100%;
background-color: #EDEDED;
box-sizing: border-box;
.top {
display: flex;
flex-direction: row;
padding-bottom: 35rpx;
padding-top: 55rpx;
width: 100%;
background-color: #FFFFFF;
box-sizing: border-box;
.touxiang {
width: 150rpx;
height: 150rpx;
border-radius: 10%;
margin-left: 35rpx;
margin-right: 35rpx;
flex-shrink: 0;
}
.top-right {
display: flex;
flex-direction: column;
flex: 1;
box-sizing: border-box;
.name {
font-family: sans-serif;
font-weight: 500;
color: #101010;
font-size: 40rpx;
}
.name2 {
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
word-break: break-all;
color: #828282;
font-size: 28rpx;
}
}
}
.user-item-bg {
background-color: #FFFFFF;
margin-top: 20rpx;
}
}
</style>

View File

@@ -0,0 +1,312 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" :useTitleLeftBtn="0" :useTitleRightBtn="0"
:text="page.title" :useUpScroll="false">
<image class="type" src="../../static/dianhua.png" @click="call"></image>
<view class="name">{{data.linkerName}}</view>
<view class="area">{{data.regionName}}</view>
<view class="address">{{page.distance}}</view>
<!-- <view class="banner">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item class="swiper-item" v-for="(item,index) in data.listTwo" :key="index">-->
<image style="width: 100%;height: 450rpx;" :src="data.logo" mode="aspectFill"></image>
<!-- </swiper-item>
</swiper>
</view>-->
<!-- <view style="margin-top: 20rpx;">
<text style="background-color: #F1F1F1;border-radius: 5rpx;margin: 15rpx;padding-left: 15rpx;
padding-right: 15rpx;padding-top: 5rpx;padding-bottom: 5rpx;color: #4c576d;font-size: 22rpx;">{{data.environmentType}}</text>
</view>
-->
<view
style="display: flex;flex-direction: row;box-sizing: border-box;margin-top: 30rpx;margin-left: 20rpx;margin-right: 20rpx;">
<text style="font-size: 24rpx;color: #FF5722;">营业时间</text>
<text style="font-size: 24rpx;color: #FF5722;">{{data.shopTime}}</text>
</view>
<view class="nav-bar">
<image class="bar-left-img" src="../../static/area_dizhi.png" mode="aspectFit"></image>
<text class="bar-text">{{data.address}}</text>
</view>
<view class="line"></view>
<text class="bar-text">球馆简介</text>
<view class="short">
<rich-text :nodes="getShort()" class="short"></rich-text>
</view>
<!-- <uni-popup ref="popupBrowser" type="top">
<uni-pop-browser></uni-pop-browser>
/uni-popup>
#ifdef H5
<view>
<drag-button :isDock="true" :existTabBar="true" @btnClick="btnClick" />
</view>
#endif
<uni-popup ref="popup" type="share">
<uni-popup-share title="分享" @select="select"></uni-popup-share>
</uni-popup> -->
</RefreshView>
</template>
<script>
export default {
data() {
return {
page: {
sid: '',
title: '球馆详情',
lat: -1,
lon: -1,
distance: ""
},
data: {}
}
},
created() {
let _this = this
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
_this.page.lat = locat.latitude
_this.page.lon = locat.longitude
if (_this.page.distance == "") {
// if (_this.data.point != undefined) {
// let split = _this.data.point.split(",")
// // 计算距离
// _this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
// split[1], split[0])
// console.log(_this.page.distance)
// }
// 计算距离
_this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
_this.data.lat, _this.data.lng)
console.log(_this.page.distance)
}
_this.refresh()
},
fail(err) {
console.log(err)
}
});
},
onLoad(options) {
this.page.sid = options.sid
},
methods: {
refresh() {
let _this = this;
this.HTTP({
url: 'gms/v1/gymnasiumsManagement/getGymnasiumDetails/'+_this.page.sid,
paramsType: "FORM",
method: "GET",
loading: true
}).then((res) => {
this.data = res.data
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
console.log("1》》》", _this.page.distance)
if (_this.page.distance == "") {
console.log("2》》》》", _this.page.lat)
if (_this.page.lat != -1) {
console.log("point》》》》",_this.data.point)
// let split = _this.data.point.split(",")
// // 计算距离
// _this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon, split[
// 1], split[0])
// console.log("3》》》》", _this.page.distance)
// 计算距离
_this.page.distance = "距您" + _this.getDistance(_this.page.lat, _this.page.lon,
_this.data.lat, _this.data.lng)
console.log(_this.page.distance)
}
}
}, (err) => {
// 关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
})
},
call() {
uni.makePhoneCall({
phoneNumber: this.data.linkerPhone,
success(res) {
console.log(res)
},
fail(err) {
console.log(err)
}
})
},
getShort() {
if (this.IsEmpty(this.data.summary)) {
return "球馆管理员未录入简介"
} else {
return this.data.summary
}
},
daoHang() {
},
},
}
</script>
<style lang="scss">
.short {
margin-left: 40rpx;
margin-right: 40rpx;
}
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.name {
font-size: 33rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 300rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
line-height: 50rpx;
}
.area {
font-size: 28rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 350rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
}
.address {
font-size: 25rpx;
border-radius: 15rpx;
color: #FFFFFF;
z-index: 9000;
top: --window-top;
margin-top: 390rpx;
padding: 10rpx 15rpx;
position: absolute;
left: 20rpx;
}
.type {
font-size: 28rpx;
border-radius: 15rpx;
color: #2C405A;
font-weight: bold;
z-index: 9000;
top: --window-top;
margin-top: 410rpx;
padding: 10rpx 15rpx;
position: absolute;
right: 20rpx;
width: 70rpx;
height: 70rpx;
}
.banner {
height: 450rpx;
width: 100%;
box-sizing: border-box;
.swiper {
height: 100%;
width: 100%;
.swiper-item {
height: 100%;
width: 100%;
.banner-image {
width: 100%;
height: 100%;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
}
}
.nav-bar {
min-height: 92rpx;
width: 100%;
display: flex;
margin-top: 30rpx;
box-sizing: border-box;
flex-direction: row;
align-items: center;
margin-bottom: 30rpx;
margin-right: 35rpx;
.bar-left-img {
width: 60rpx;
height: 60rpx;
margin-left: 20rpx;
box-sizing: border-box;
}
.bar-text {
font-size: 28rpx;
flex: 1;
box-sizing: border-box;
line-height: 40rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.line {
width: 100%;
height: 18rpx;
background-color: #f5f4f9;
}
</style>

View File

@@ -0,0 +1,136 @@
<template>
<view>
<RefreshView ref="mescrollRef" @refresh="refresh" :hasBack="true" text="报名列表">
<view v-for="(item,index) in data.list" :key='index' class="list-item-layout">
<image :src="item.headImage" class="list-item-img" mode="aspectFill">
</image>
<view class="list-item-right">
<view class="list-item-name">{{item.realName}}</view>
<view class="list-item-content">报名时间{{item.timeStr}}</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
page: {
activitySid: '',
activityItemSid: '',
},
data: {
list: []
}
}
},
onLoad(options) {
// 赋值
this.page.activitySid = options.activitySid
this.page.activityItemSid = options.activityItemSid
},
methods: {
refresh(page) {
let _this = this;
this.HTTP({
url: 'aos/v1/participantRelation/getPageListPersonalParticipant',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
activitySid: this.page.activitySid,
activityItemSid: this.page.activityItemSid ,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.data.list = []
}
// 追加数据
_this.data.list = _this.data.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
})
},
}
}
</script>
<style lang="scss">
.list-item-layout {
display: flex;
width: 100%;
flex-direction: row;
box-sizing: border-box;
padding-top: 20rpx;
padding-bottom: 10rpx;
margin-left: 33rpx;
margin-right: 33rpx;
border-bottom: 0.1px #F1F1F1 solid;
.list-item-img {
width: 140rpx;
height: 140rpx;
margin-right: 25rpx;
flex-shrink: 0;
}
.list-item-right {
flex: 1;
margin-top: 20rpx;
display: flex;
flex-direction: column;
height: 140rpx;
.list-item-name {
width: 100%;
flex: 1;
color: #333333;
font-size: 27rpx;
}
.list-item-content {
width: 100%;
flex: 1;
color: #999999;
font-size: 24rpx;
}
.list-item-time {
width: 100%;
color: #999999;
font-size: 24rpx;
flex: 1;
}
}
}
</style>

146
pages/index/BindPhone.vue Normal file
View File

@@ -0,0 +1,146 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="绑定手机号" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/img/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.phone" url="aos/v1/aosUser/sendCodeFromWxBindMobile" @click="send" ref="wxCodeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/img/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">绑定手机</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
phone: '',
sysUserWxAuthSid: '',
code: ''
}
};
},
onLoad(options) {
this.page.sysUserWxAuthSid = options.sysUserWxAuthSid
console.log('=======', options)
console.log('=======', options.sysUserWxAuthSid)
},
methods: {
next() {
var phoneLength = this.page.phone.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
let _this = this
this.HTTP({
url: 'aos/v1/aosUser/wxBindMobile',
data: {
mobile: this.page.phone,
sysUserWxAuthSid: this.page.sysUserWxAuthSid,
code: this.page.code
},
method: 'POST',
paramsType: "JSON",
loading: true
}).then((res) => {
console.log('=======', res)
if (res.code == 200) {
// 保存
_this.WritePreference("sysUserSid", res.data)
_this.WritePreference("isLogin", true)
getApp().globalData.isLogin = true
getApp().globalData.sysUserSid = res.data
console.log('=======1111111111111111111111111111111sdfasdf;kjasdfjkasdklfkasdjf;asdddddddddddddd',res)
// $emit 触发事件 主要返回给webviwew页面
// uni.$emit('login', res.data.memberSid)
uni.navigateBack({
delta: 10
});
}
});
},
phoneText(e) {
//手机号
this.page.phone = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

View File

@@ -0,0 +1,394 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" :text="data.name" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="0">
<view class="banner">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item class="swiper-item" v-for="(item,index) in data.listCoverImage" :key="index">
<image style="width: 100%;height: 450rpx;" :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<view style="display: flex;flex-direction: column;background: #FFFFFF; width: 100%;height: 100%;">
<!-- <view
style="display: flex;flex-direction: column;background: #FFFFFF;
margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx; border: 2rpx solid #666666; border-radius: 30rpx;padding: 20px;">
-->
<view>
<view style="display: flex; flex-direction: row; margin-left: 20rpx;margin-top: 20rpx;">
<text
style="color: #101010; font-size: 36rpx;font-weight: 520; white-space: nowrap;overflow: hidden;text-overflow: ellipsis">{{data.name}}</text>
<text
style=" word-break:keep-all;
white-space:nowrap;display: flex;align-items: center; margin-left: 30rpx; color: #fff; font-size: 20rpx; background-color: #F2BF5C; padding: 3rpx 15rpx;border-radius: 5rpx;">{{data.sportCategoryName}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 15rpx;align-items: center;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">报名截止</text>
<text style="color: #666666;font-size: 26rpx;">{{data.enrollEndTime}}</text>
<text style="color: #E99D42;font-size: 26rpx;flex: 1;text-align: right;">还有1天</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view style="display: flex;flex-direction: row;margin-top: 15rpx;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">整体活动</text>
<view style="display: flex;flex-direction: column;">
<text style="color: #666666; font-size: 26rpx;">{{data.startTime}}</text>
<text style="color: #666666;margin-top: 20rpx;font-size: 26rpx;">{{data.endTime}}</text>
</view>
</view>
<view style="">
<view v-for="(item,index) in data.listActivityItemsDetails " :key="index" style="margin-top: 20rpx;">
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;background-color: #F1F1F1;padding: 20rpx 30rpx;">
<text style="font-size: 30rpx;flex: 1;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;">
<text style="font-size: 25rpx; color: #E99D42; ">{{item.enrollMoldName}}</text>
<text
style="color: #E99D42; margin-left: 10rpx;margin-right: 10rpx; font-size: 25rpx;">/</text>
<text
style="color: #E99D42; font-size: 25rpx;">{{item.enrollMoney==0?"免费":item.enrollMoney+'元'}}</text>
</view>
</view>
<view
style="display: flex;flex-direction: column;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="color: #666666; margin-top: 15rpx;font-size: 28rpx;">{{item.introduction}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; ">
</view>
<!-- <view
style="display: flex;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<text style="font-size: 30rpx;">活动时间</text>
<text
style="color: #666666; font-size: 25rpx;flex: 1;">{{item.startTime+" 至 "+item.endTime}}</text>
</view>
-->
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;color: #E3A428 ;">{{item.startTime}}</text>
<text
style="color: #666666; font-size: 30rpx;text-align: right;flex: 1;">{{item.gymnasiumName}}</text>
</view>
<image v-if="!showAddress(item.gymnasiumSid)" style="width: 30rpx;height: 30rpx;"
src="../../static/home-icon/more.png" @click="gymnasiumName(item.gymnasiumSid)">
</image>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 25rpx; margin-left: 20rpx;">{{item.enrollNumbers==0?"暂无":item.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 25rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 25rpx;">{{item.enrollNumbersLimit==0?"不限":item.enrollNumbersLimit+'人'}}</text>
</view>
<view v-if="item.listUserHeadImageUrl.length>0" style="display: flex;flex-direction: row; "
@click="userList(item.sid)">
<view v-for="(url,i) in item.listUserHeadImageUrl " :key="i">
<view
style="display: flex; width: 100%; margin-left: 5rpx; margin-right: 5rpx;justify-content: center;">
<image style="border-radius: 50%; width: 50rpx;height: 50rpx;" :src="url"
mode="aspectFit"></image>
</view>
</view>
</view>
<image style="width: 30rpx;height: 30rpx;" src="../../static/home-icon/more.png"
@click="userList(item.sid)">
</image>
</view>
</view>
</view>
<view style="margin-top: 20rpx;background-color: #F1F1F1;height: 20rpx;">
</view>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">活动介绍</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.introduction}}</text>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">奖品奖项</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.notes}}</text>
<!--
<textarea style="margin: 30rpx; color: #999999 ; font-size: 25rpx;white-space: pre-wrap; "
read-only="readOnly" disabled="disabled " placeholder="无" v-model="data.notes" /> -->
<view style="display: flex;flex-direction: row;margin: 10rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">特别鸣谢</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<view
style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column; margin-top: 30rpx;">
<view v-for="(item,pos) in data.listSpecialThanks " :key="pos">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 10rpx;justify-content: center;">
<text style="color: #898989;font: size 28rpx;flex: 1;">{{item.name}}</text>
</view>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 20rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989; font-size: 28rpx;">主办方</text>
<text style="color: #898989;font-size: 25rpx;">{{data.organizer}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989;font-size: 28rpx;">联系人</text>
<view style="display: flex;flex-direction: row;">
<text style="color: #898989;font-size: 25rpx;">{{data.linkerName}}</text>
<view style="width: 30rpx;"></view>
<text style="color: #898989; font-size: 25rpx;">{{data.linkerPhone}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view class="agreeMent">
<checkbox-group @change="checkboxChange">
<checkbox style="transform:scale(0.7)" :checked="checked1"></checkbox>
</checkbox-group>
<text class="text2">我已阅读并同意</text>
<text style="color: #007AFF;">参赛须知</text>
<text style="display: flex;text-align: center; margin-left: 20rpx; padding: 5rpx 10rpx;background: #0081D5;
color: #FFFFFF; font-size: 28rpx;" @click="click()"> 我要报名 </text>
</view>
</view>
</view>
<view style="height: 300rpx;"></view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
checked1: true,
data: {
},
raceSid: ""
}
},
onLoad: function(option) {
this.raceSid = option.raceSid;
this.HTTP({
url: 'aos/v1/activityManagement/getActivityDetails/' + this.raceSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
this.data = res.data
} else {
this.Toast(res.msg)
uni.navigateBack({
delta: 1
})
}
});
},
methods: {
showAddress(s) {
console.log("..." + s);
return this.IsEmpty(s)
},
checkboxChange(e) {
this.checked1 = !this.checked1
console.log(this.checked1)
},
gymnasiumName(e) {
uni.navigateTo({
url: "ArenaDetailActivity?sid=" + e
})
console.log("gymnasiumName>>", e)
},
userList(sid) {
console.log("zazzz>>", this.data.sid)
console.log("userList>>", sid)
uni.navigateTo({
url: "BaoMingListActivity?activitySid=" + this.data.sid + "&activityItemSid=" + sid
})
},
click() {
let _this = this;
if (!this.checked1) {
this.Toast("请认真阅读参赛须知,并勾选。")
return
}
// if (this.data.listActivityItemsDetails.length == 1) {
// let evendSid = this.data.sid
// let eventsSubprojectSid = this.data.listActivityItemsDetails[0].sid
// this.HTTP({
// url: 'aos/events/v1/eventsenroll/save',
// method: 'POST',
// data: {
// 'eventsSid': evendSid,
// 'eventsSubprojectSid': eventsSubprojectSid,
// 'participantSid': getApp().globalData.memberSid,
// 'paymentMemberSid': "",
// },
// paramsType: "JSON",
// loading: true
// }).then((res) => {
// if (res.code == 200) {
// this.Toast("报名成功!")
// // 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
// uni.navigateBack({
// delta: 10
// });
// } else {
// this.Toast(res.msg)
// }
// }, (err) => {
// // 错误提示
// _this.Toast("出错了:" + err.data.errmsg)
// });
// } else {
console.log("===========" + this.data.listActivityItemsDetails.length)
let list = this.data.listActivityItemsDetails
let newList = []
for (var i = 0; i < list.length; i++) {
newList.push(list[i].name)
}
uni.showActionSheet({
itemList: newList,
success: function(res) {
console.log("itemList==" + newList)
console.log("res==" + JSON.stringify(res))
_this.listSelect(res.tapIndex, newList)
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
// }
},
listSelect(id, info) {
console.log(id)
console.log(info)
let _this = this
let evendSid = this.data.sid
let eventsSubprojectSid = this.data.listActivityItemsDetails[id].sid
console.log(eventsSubprojectSid)
this.Login()
.then((res) => {
this.HTTP({
url: 'aos/v1/activityItemManagement/enroll',
method: 'POST',
data: {
'activitySid': evendSid,
'activityItemsSid': eventsSubprojectSid,
'participantSid': res,
'paymentMemberSid': "",
},
paramsType: "JSON",
loading: true
}).then((res) => {
if (res.code == 200) {
this.Toast("报名成功!")
// 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
uni.navigateBack({
delta: 10
});
} else {
this.Toast(res.msg)
}
}, (err) => {
// 错误提示
_this.Toast("出错了:" + err.data.errmsg)
})
})
},
}
}
</script>
<style lang="scss">
.items {
display: flex;
flex-direction: column;
}
.agreeMent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 50rpx;
margin-left: 30rpx;
.text2 {
color: #666666;
font-size: 30rpx;
}
}
.banner {
height: 450rpx;
width: 100%;
box-sizing: border-box;
.swiper {
height: 100%;
width: 100%;
.swiper-item {
height: 100%;
width: 100%;
.banner-image {
width: 100%;
height: 100%;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,470 @@
<template>
<TabLayout ref='tabLayout' text="选择球馆" :tabTitleData="page.tabTitle" @tabClickItem='clickTab' @downRefresh="down">
<swiper style="min-height: 100vh;" :current="page.currentTab" @change="swiperTab">
<swiper-item v-for="(listItem,listIndex) in data.tabList" :key="listIndex" style="box-sizing: border-box;">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="lower1">
<view :style="{'width': '100%','padding-top': page.paddingTop}">
<loading v-if="page.showLoading[listIndex]" :key='listIndex'></loading>
<view class="outer" v-for="(item,index) in listItem">
<view class="Item">
<image class="Img" :src="item.logo" mode="aspectFill" @click="img(item.sid)"></image>
<view class="Right" @click="right(item.sid,item.name)">
<text class="gameTv">{{item.name}}</text>
<text class="gameTv2">{{item.address}}</text>
<!-- <text class="gameTv2">{{item.linkerName+" "+item.linkerPhone}}</text> -->
</view>
</view>
</view>
<loading v-if="page.showBottomLoading[listIndex]" :key="'bottom'+listIndex"></loading>
<noData v-if="page.showNoData[listIndex]" :key="'nodata'+listIndex"></noData>
</view>
</scroll-view>
</swiper-item>
</swiper>
</TabLayout>
</template>
<script>
const util = require('../../util/util.js');
export default {
data() {
return {
page: {
tabTitle: ['常驻球馆', '所有球馆'],
tabType: ["gms/v1/userGymnasiumsManagement/getUserGymnasiumList",
"gms/v1/gymnasiumsManagement/getGymnasiumAreaVoPagerList"
],
currentTab: 0,
pages: [1, 1], //第几个swiper的第几页
nowLoadingPages: [false, false], //是否正在加载
paddingTop: '0px',
showLoading: [false, false],
showBottomLoading: [false, false],
showNoData: [false, false],
city: "石家庄",
code: "1301"
},
data: {
tabList: [
[],
[],
[],
[]
]
},
info: {
address: "",
placeName: ''
}
};
},
onLoad(options) {
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
let _this = this
this.$nextTick()
.then(function() {
_this.page.paddingTop = _this.$refs.tabLayout.getViewPagerTop()
})
if (this.IsEmpty(find_city_code)) {
// 首次进入
find_city_code = 0;
// 获取定位
let _this = this;
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
// 先写入定位
_this.location = {
latitude: locat.latitude,
longitude: locat.longitude
}
let url =
"https://restapi.amap.com/v3/geocode/regeo?key=b564c757b4cf4fd4a5d914625ca9373f&location=" +
res.longitude +
"," + res.latitude +
"&poitype=&radius=1000&extensions=all&batch=false&roadlevel=0";
_this.HttpOtherUrl({
url: url
}).then((res) => {
let json = JSON.stringify(res);
let info = JSON.parse(json).regeocode.addressComponent;
// 城市
let city = info.city;
// 城市编码
let code = info.adcode;
// 获取到正确的城市编码
if (code > 0) {
// 保存本次定位
_this.WritePreference("find_city", city)
_this.WritePreference("find_city_code", code)
_this.page.code = code
_this.page.city = city
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
} else {
// 未获取到正确的城市编码
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
}
}, (err) => {
//获取当前城市失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
})
},
fail(err) {
// 定位失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "1301")
_this.page.code = "1301"
_this.page.city = "石家庄"
_this.page.tabTitle[1] = "所有球馆(" + _this.page.city + ")"
}
});
} else {
this.page.code = find_city_code
this.page.city = find_city
this.page.tabTitle[1] = "所有球馆(" + this.page.city + ")"
}
// 加载第一页数据
this.down(0)
},
methods: {
img(sid) {
uni.navigateTo({
url: 'ArenaDetailActivity?sid=' + sid
})
},
right(sid, name) {
this.info.sid = sid
this.info.name = name
console.log("传值>" + JSON.stringify(this.info))
this.SetResult(this.info)
},
// swiper 滑动
swiperTab: function(e) {
// 模拟tab点击
this.$refs.tabLayout.changeTab(e);
},
clickTab(index) {
this.page.currentTab = index
// 每次切换时都重新加载页面
this.down(index)
},
down(index) {
// 下拉刷新请求 并更改数据
let _this = this
this.data.tabList[index] = []
//二维数组,开启强制渲染
_this.$forceUpdate()
// 初始化当前的页数
this.page.pages[index] = 1
// 当前页数的加载状态
this.page.nowLoadingPages[index] = true
// 只要切换页面就显示
this.page.showLoading[index] = true
this.page.showNoData[index] = false
if (index == 0) {
this.Login()
.then((res) => {
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": 1,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
// 填充数据
_this.data.tabList[index] = res.data
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = res.data.length == 0
}, (err) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = false
})
})
}else{
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": 1,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
// 填充数据
_this.data.tabList[index] = res.data.records
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = res.data.records.length == 0
}, (err) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = false
})
}
},
request(index, pagerStart) {
let _this = this
let path = index == 0 ? "/" + getApp().globalData.memberSid : "";
this.HTTP({
url: _this.page.tabType[index] + path,
method: index == 0 ? 'GET' : 'POST',
paramsType: index == 0 ? 'FORM' : "JSON",
data: index == 0 ? {} : {
"current": pagerStart,
"size": 10,
"params": {
"memberSid": getApp().globalData.memberSid,
"regionId": _this.page.code
}
}
}).then((res) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
_this.page.showBottomLoading[this.page.currentTab] = false
if (res.data.records.length == 0) {
_this.Toast('没有更多数据了')
//二维数组,开启强制渲染
_this.$forceUpdate()
return
}
_this.data.tabList[index] = _this.data.tabList[index].concat(res.data.records)
//二维数组,开启强制渲染
_this.$forceUpdate()
}, (err) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
})
},
// 加载更多 util.throttle为防抖函数
lower1: util.throttle(function(e) {
if (this.page.nowLoadingPages[this.page.currentTab]) {
// 正在加载 拦截请求
return
}
this.page.showBottomLoading[this.page.currentTab] = true
//二维数组,开启强制渲染
this.$forceUpdate()
// 更改请求的页数
this.page.pages[this.page.currentTab]++
// 正在加载
this.page.nowLoadingPages[this.page.currentTab] = true
// 请求数据
this.request(this.page.currentTab, this.page.pages[this.page.currentTab])
}, 300)
}
}
</script>
<style lang="scss">
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-left: 30rpx;
margin-right: 30rpx;
margin-top: 25rpx;
padding-bottom: 20rpx;
.textLogin {
background-color: #E91E63;
border-radius: 30rpx;
padding-left: 25rpx;
padding-right: 25rpx;
padding-top: 7rpx;
padding-bottom: 7rpx;
color: #FFFFFF;
font-size: 24rpx;
}
}
.textGray3 {
color: #999999;
font-size: 26rpx;
margin-top: 5rpx;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.outer {
width: 100%;
display: flex;
flex-direction: column;
padding: 22rpx 38rpx;
box-sizing: border-box;
border-bottom: 0.1px #F1F1F1 solid;
.title {
padding-bottom: 22rpx;
flex: 1;
font-size: 28rpx;
color: #007AFF;
overflow: hidden;
box-orient: vertical;
text-overflow: ellipsis;
}
.Item {
display: flex;
flex-direction: row;
width: 100%;
height: 144rpx;
box-sizing: border-box;
.Img {
height: 100%;
width: 220rpx;
margin-right: 15rpx;
flex-shrink: 0;
}
}
.Right {
height: 100%;
display: flex;
flex-direction: column;
flex: 1;
box-sizing: border-box;
.gameTv {
font-size: 30rpx;
color: #000000;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.gameTv2 {
font-size: 25rpx;
margin-top: 10rpx;
color: #666666;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
}
</style>

View File

@@ -0,0 +1,128 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="人数限制" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="保存" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>人数限制</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="number" @input="enrollNumbersLimitText" placeholder="请输入人数限制"
:value="result.enrollNumbersLimit"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为不限制</text>
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>报名费用</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="digit" @input="enrollMoneyText" placeholder="请输入报名费用"
:value="result.enrollMoney"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为免费</text>
</view>
</view>
<!-- <radio-group v-if="!this.IsEmpty(result.enrollMoney)" style="margin-top: 50rpx; display: flex;flex-direction: row; " @change="radioChange">
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked1">线上收费</radio>
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked2">线下收费</radio>
</radio-group>
-->
</RefreshView>
</template>
<script>
export default {
data() {
return {
result: {
enrollNumbersLimit: "0",
enrollMoney: "0",
// type: "",
// checked1: "",
// checked2: "",
},
}
},
onLoad(options) {
this.result.enrollNumbersLimit = options.enrollNumbersLimit
this.result.enrollMoney = options.enrollMoney
// this.result.type = options.type
// if ("线上收费" == this.result.type) {
// this.result.checked1 = true
// this.result.checked2 = false
// } else {
// this.result.checked1 = false
// this.result.checked2 = true
// }
console.log("1===" + this.result.index)
console.log("2===" + this.result.enrollNumbersLimit)
console.log("3===" + this.result.enrollMoney)
// console.log("4===" + this.result.type)
},
methods: {
enrollNumbersLimitText(e) {
console.log("1===" + e.detail.value)
this.result.enrollNumbersLimit = e.detail.value
},
enrollMoneyText(e) {
console.log("2===" + e.detail.value)
this.result.enrollMoney = e.detail.value
},
// radioChange(e) {
// this.result.checked1 = !this.result.checked1
// this.result.checked2 = !this.result.checked2
// console.log('radio发生change事件携带value值为', this.result.checked1)
// console.log('radio发生change事件携带value值为', this.result.checked2)
// if (this.result.checked1) {
// this.result.type = "线上收费"
// } else {
// this.result.type = "线下收费"
// }
// console.log('type===》:', this.result.type)
// },
rightBtnClick() {
if (this.IsEmpty(this.result.enrollNumbersLimit)) {
this.result.enrollNumbersLimit = 0
}
let o = parseInt(this.result.enrollNumbersLimit)
if (isNaN(o)) {
this.Toast("输入的格式有误")
return
}
if (this.IsEmpty(this.result.enrollMoney)) {
this.result.enrollMoney = 0
}
let s = parseInt(this.result.enrollMoney)
if (isNaN(s)) {
this.Toast("输入的格式有误")
return
}
this.SetResult(this.result)
}
}
}
</script>
<style lang="scss">
.right {
padding: 20rpx;
flex: 1;
color: #555555;
font-size: 30rpx;
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="用户认证" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.phone" url="portal/v1/sysUserManagement/sendCodeFromAttestation" @click="send" ref="wxCodeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">验证</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
phone: '',
code: ''
}
};
},
methods: {
next() {
var phoneLength = this.page.phone.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
let _this = this
this.HTTP({
url: 'portal/v1/sysUserManagement/verifyCodeFromAttestation',
data: {
mobile: this.page.phone,
code: this.page.code
},
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
uni.navigateTo({
url: '../info/RealInfo'
})
});
},
phoneText(e) {
//手机号
this.page.phone = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

1278
pages/index/activity.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,194 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView ref="mescrollRef" :pageBg="F1F2F5" @refresh="refresh" :hasBack="true" text="活动列表"
:useDownScroll="true" :useUpScroll="true">
<view>
<view v-for="(item,index) in list " :key="index">
<view
style="display: flex;flex-direction: column;margin-bottom: 30rpx; padding: 30rpx;background: #FFFFFF;"
@click="clickItem(index)">
<view style="display: flex;flex-direction: column;">
<view style="display: flex; flex-direction: row;">
<text style="color: #101010; font-size: 32rpx; display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;flex: 1;">{{item.name}}</text>
<text
style="color: #fff; font-size: 24rpx; background-color: #F2BF5C; padding: 5rpx 10rpx;">{{item.sportCategoryName}}</text>
</view>
<text
style="color: #898989 ; font-size: 28rpx; margin-top: 10rpx;">报名截止{{item.enrollEndTime}}</text>
</view>
<view style="width: 100%;height: 300rpx; margin-top: 20rpx;margin-bottom: 20rpx;">
<image style="width: 100%;height: 100%; border-radius: 30rpx;" mode="aspectFill" :src="item.firstCoverImage"></image>
<view style="display: flex; height: 50rpx;width: 100%; margin-top: -80rpx; ">
<view style=" display: flex;align-items: center;width: 100%;">
<image style="width: 28px;height: 48rpx;margin-left: 30rpx;"
src="../../static/renqi.png"></image>
<text style="color: #fff; margin-left: 15rpx;flex: 1;">{{item.popularity}}</text>
<text
:class="{'btn1':item.enrollState ==1||item.enrollState ==3,'btn2':item.enrollState==2}"
style="display: flex;text-align: center; padding: 8rpx 15rpx;
color: #FFFFFF; font-size: 28rpx; margin-right:30rpx; border-radius: 10rpx;">{{item.enrollStateName}}</text>
</view>
</view>
</view>
<view v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view style="display: flex;flex-direction: column;">
<view
style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;">
<text style="color: #101010; font-size: 28rpx; flex: 1;">{{info.name}}</text>
<view style=" align-items: center;">
<text style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #ff0000 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 5rpx;">
<view style="flex: 1; align-items: center;">
<text style="color: #919191; font-size: 24rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
</view>
<text
style="margin-top: 10rpx; color: #919191; font-size: 24rpx;">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #efefef; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: [],
}
},
methods: {
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activityManagement/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
userSid: getApp().globalData.memberSid,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: 'DetailActivity?raceSid=' + raceSid
});
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
</style>

199
pages/index/addSponsor.vue Normal file
View File

@@ -0,0 +1,199 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="新增赞助商" :useDownScroll="false" :useUpScroll="false"
@backClick="backClick" useTitleRightBtn="1" titleRightBtnSource="保存" @rightBtn='rightBtnClick'>
<PublishItem leftText="赞助商名称" :isShowRight="false"></PublishItem>
<EditText hint="请输入赞助商名称" @onTextChange="text" :text="info.name"></EditText>
<view class=" line"></view>
<PublishItem leftText="单位地址" :isShowRight="false"></PublishItem>
<EditText hint="请输入单位地址" @onTextChange="address" :text="info.address"></EditText>
<view class=" line"></view>
<PublishItem leftText="网址" :isShowRight="false"></PublishItem>
<EditText hint="请输入网址" @onTextChange="webUrl" :text="info.webUrl"></EditText>
<view class=" line"></view>
<PublishItem leftText="联系方式" :middleText="name_mobile" rightText="编辑" :isShowRight="true"
@rightClick="clickItem('联系方式')"></PublishItem>
<view class="line"></view>
<PublishItem leftText="宣传海报" rightText="上传" :isShowRight="true" @rightClick="clickItem('宣传海报')"></PublishItem>
<!-- <scroll-view style="width: 100%;white-space: nowrap;" scroll-x="true">
<view v-for="(item,index) in info.logo" :key="index" style="display: inline-block;">
<view style="margin-left: 20rpx;margin-right: 20rpx;display: flex;">
<image :src="item" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill"
@click="showImage(item)">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem(item)">
</image>
</view>
</view>
</scroll-view> -->
<view v-if="info.logo!=''&&info.logo!=undefined" style="margin-left: 20rpx;margin-right: 20rpx;display: flex;margin-bottom: 20rpx;">
<image :src="info.logo" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem()">
</image>
</view>
<view class="line"></view>
<PublishItem leftText="单位简介" rightText="编辑" :isShowRight="true" @rightClick="clickItem('单位简介')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor" style="white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize showImgToolbar
showImgResize :read-only="true" @click="clickItem('单位简介')" @ready="onEditorReady">
</editor>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
name_mobile: "",
info: {
name: "",
address: "",
introduction: "",
linkerName: "",
linkerPhone: "",
logo: "",
webUrl: "",
userSid: ""
}
}
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
console.log("结果>" + JSON.stringify(backResult))
if (!this.IsEmpty(backResult.linkerName)) {
console.log("电话>" + JSON.stringify(this.info))
this.name_mobile = backResult.linkerName + "\u3000" + backResult.linkerPhone
this.info.linkerName = backResult.linkerName
this.info.linkerPhone = backResult.linkerPhone
console.log("电话>" + JSON.stringify(this.info))
}
if (!this.IsEmpty(backResult.introduction)) {
this.info.introduction = backResult.introduction
this.onEditorReady()
}
}
},
methods: {
rightBtnClick() {
console.log("info>" + JSON.stringify(this.info))
let _this = this
this.Login()
.then((res) => {
_this.info.userSid = res
_this.HTTP({
url: 'aos/v1/sponsorManagement/saveSponsor',
method: 'POST',
data: _this.info,
paramsType: "JSON",
loading: true
}).then((res) => {
this.SetResult("")
console.log('=======', res)
});
})
},
text(e) {
this.info.name = e
},
address(e) {
this.info.address = e
},
webUrl(e) {
this.info.webUrl = e
},
onEditorReady() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.introduction
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.introduction
})
}).exec()
// #endif
},
clickItem(e) {
let _this = this
switch (e) {
case "宣传海报":
this.chooseUpload(9)
.then((res) => {
console.log("url>>>>", res);
// _this.info.logo.push(res.data)
// let a = _this.info.logo.concat(res.urls)
// _this.info.logo = a
_this.info.logo = res.urls[0]
console.log("list", _this.info.logo)
})
break;
case "联系方式":
uni.navigateTo({
url: "mobileInfoActivity?linkerName=" + _this.info.linkerName +
"&linkerPhone=" + _this.info.linkerPhone
})
break;
case "单位简介":
uni.navigateTo({
url: "explainActivity?introduction=" + _this.info.introduction
})
break;
}
},
deleteItem(item) {
let _this = this
uni.showModal({
title: '温馨提示',
content: '确定要删除宣传图片吗?',
success(res) {
if (res.confirm) {
_this.info.logo.splice(_this.info.logo.indexOf(item), 1)
}
}
});
},
}
};
</script>
<style lang="scss">
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
</style>

View File

@@ -0,0 +1,109 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
activityBaseInfo: {
disclaimer: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
let t = option.disclaimer == "undefined" ?"":option.disclaimer;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
console.log("11111111》》》》"+e)
this.Upload({
url: 'activity/uploadGameImg',
filePath: e,
key: "file",
loading: true
}).then((res) => {
this.$refs.rich.insertUrlImage(res.data)
}, (err) => {
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '').replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.activityBaseInfo.disclaimer = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.activityBaseInfo)
},
}
};
</script>
<style lang="less">
.bottom {
display: flex;
height: 800rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
flex-direction: column;
border: 1rpx solid #C8C7CC;
padding: 30rpx 20rpx;
background: #FDFBFB;
border-radius: 8rpx;
.input {
margin-top: 10rpx;
white-space: pre-line;
font-size: 30rpx;
color: #898989;
height: 500rpx;
line-height: 50rpx;
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,640 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发布活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="isCreate==0?0:1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item">
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item" @click="topClik(2)">
<text class="topLayout_item_left2">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item" @click="topClik(3)">
<text class="topLayout_item_left2">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<PublishItem leftText="标题" :isShowRight="false"></PublishItem>
<EditText hint="请输入活动名称" @onTextChange="text" :text="info.activityBaseInfo.name"></EditText>
<view class=" line">
</view>
<PublishItem leftText="赛事简介" rightText="编辑" :isShowRight="true" @rightClick="clickItem('赛事介绍')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor1" style="height: 50rpx; white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize
showImgToolbar showImgResize :read-only="true" @click="clickItem('赛事介绍')" @ready="onEditorReady1">
</editor>
</view>
<view class="line"></view>
<view style="display: flex; flex-direction: row;margin-top: 20rpx;margin-bottom: 20rpx;">
<view
style="display: flex; justify-content: center;align-items: center;padding-left: 30rpx;padding-right: 30rpx;"
@click="clickItem('宣传海报')">
<image style="width: 130rpx;height: 130rpx;" src="../../static/upload_image.png" mode="aspectFill">
</image>
</view>
<scroll-view style="width: 100%;white-space: nowrap;" scroll-x="true">
<view v-for="(item,index) in info.activityBaseInfo.listCoverImageUrl" :key="index"
style="display: inline-block;">
<view style="margin-left: 20rpx;margin-right: 20rpx;display: flex;">
<image :src="item" style="width: 220rpx;height: 150rpx;z-index: 1;" mode="aspectFill"
@click="showImage(item)">
</image>
<image src="../../static/event-icon/delete1.png"
style="margin-left: -60rpx;margin-top: 10rpx;width: 50rpx;height: 50rpx;z-index: 2;"
@click="deleteItem(item)">
</image>
</view>
</view>
</scroll-view>
</view>
<view class="line"></view>
<biaofun-datetime-picker :start="info.activityBaseInfo.enrollStartTime" @change="dateChange1">
<PublishItem leftText="报名开始时间" :middleText="info.activityBaseInfo.enrollStartTime" rightText="修改"
:isShowRight="true"></PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<biaofun-datetime-picker :start="info.activityBaseInfo.enrollEndTime" @change="dateChange2">
<PublishItem leftText="报名截止时间" :middleText="info.activityBaseInfo.enrollEndTime" rightText="修改"
:isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<PublishItem leftText="联系方式" :middleText="name_mobile" rightText="修改" :isShowRight="true"
@rightClick="clickItem('联系方式')"></PublishItem>
<view class="line"></view>
<!--
<view class="layout1" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift">报名条件</text>
<view class="layout_right" style="flex: 1;margin-left: 50rpx;">
<radio-group @change="radioChange">
<radio :checked="info.activityBaseInfo.radioType1">认证用户</radio>
<radio :checked="info.activityBaseInfo.radioType2" style="margin-left: 50rpx;">不限制</radio>
</radio-group>
</view>
</view>
<text style="font-size: 24rpx; color:#ff0000 ; margin-left: 50rpx;">规模活动请选择认证用户便于管理及实施</text>
</view>
<view class="line"></view> -->
<PublishItem leftText="免责声明" rightText="编辑" :isShowRight="true" @rightClick="clickItem('免责声明')">
</PublishItem>
<view style="display: flex;margin-left: 30rpx; margin-right: 30rpx;">
<editor id="editor2" style="white-space: pre-wrap;" placeholder="点击进行编辑..." showImgSize showImgToolbar
showImgResize :read-only="true" @click="clickItem('免责声明')" @ready="onEditorReady2">
</editor>
</view>
<view class="line"></view>
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift" style="flex: 1;">参赛者取消报名</text>
<view style="display: flex; flex: 1;justify-content: flex-end;margin-right: 15rpx;">
<fui-dropdown-menu :size="30" selectedColor="#465CFF" :options="options" @click="typeItemClick"
@close="typeClose" ref="ddmtype">
<view class="fui-filter__item" @tap="filterTap()">
<image style="width: 22rpx;height: 22rpx; margin-left: 15rpx;"
src="../../static/event-icon/xia.png" mode="aspectFit" class="fui-filter__icon"
:class="{'fui-icon__ani':typeShow}">
</image>
<text>{{type}}</text>
</view>
</fui-dropdown-menu>
</view>
</view>
<view class="line"></view>
<view class="layout1" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png" mode="aspectFill">
</image>
<text class="layout_lift" style="flex: 1;">是否公开</text>
<view class="layout_right">
<switch class="tui-fr" :checked="switch1Checked" @change="switch1Change">
</switch>
</view>
</view>
<text style="font-size: 24rpx; color:#ff0000 ; margin-left: 50rpx;">非公开赛事在我的赛事可见分享后好友可报名</text>
</view>
<view class="line"></view>
<view style="height: 300rpx;"></view>
<text class="btn" @click="jump()">设置活动项目</text>
<cropper saveMode="ScaleTo500" ref="cropper" :aspectRatio="1.25" @complete="complete" @cancel="cancel">
</cropper>
</RefreshView>
</template>
<script>
import asyncSwitch from "@/components/helang-asyncSwitch/helang-asyncSwitch.vue";
import fuiButton from "@/components/firstui/fui-dropdown-menu/fui-dropdown-menu.vue"
export default {
components: {
"async-switch": asyncSwitch,
"fuiButton": fuiButton
},
data() {
return {
isCreate: 0,
options: [{
text: '退还报名费',
value: 1,
}, {
text: '不退报名费',
value: 0
}],
name_mobile: "",
typeShow: false,
type: "退报名费",
switch1Checked: false,
switch2Checked: false,
info: {
sid: "",
activityBaseInfo: {
enrollStartTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
enrollEndTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
listCoverImageUrl: [],
cancelEnrollRefund: 0,
inviteType: 0
},
listActivityItems: [],
activityNotesOther: {}
},
};
},
onLoad: function(option) {
console.log('option.isCreate', option.isCreate)
this.isCreate = option.isCreate
let that = this
if (this.HasCache()) {
uni.showModal({
title: '提示',
content: '是否使用草稿内容',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
console.log('---->1', that.ReadGameCahce())
that.info = that.ReadGameCahce()
console.log('---->2', that.info)
if (that.info.activityBaseInfo.linkerName != null && that.info
.activityBaseInfo.linkerPhone != null) {
that.name_mobile = that.info.activityBaseInfo.linkerName + "\u3000" +
that.info.activityBaseInfo.linkerPhone
}
that.switch1Checked = that.info.activityBaseInfo.cancelEnrollRefund == 1 ?
true :
false
that.switch2Checked = that.info.activityBaseInfo.inviteType == 1 ? true :
false
that.onEditorReady1()
that.onEditorReady2()
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
}
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
this.info.activityBaseInfo = backResult;
if (!this.IsEmpty(this.info.activityBaseInfo.linkerName) && !this.IsEmpty(this.info.activityBaseInfo
.linkerPhone)) {
this.name_mobile = this.info.activityBaseInfo.linkerName + "\u3000" + this.info.activityBaseInfo
.linkerPhone
}
console.log(backResult)
this.onEditorReady1()
this.onEditorReady2()
}
},
methods: {
text(e) {
this.info.activityBaseInfo.name = e
},
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 1
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 1
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 1
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
switch (index) {
case 2:
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
// "&activityBaseInfo=" + encodeURIComponent(JSON.stringify(this.activityBaseInfo))
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 3:
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
deleteItem(item) {
uni.showModal({
title: '温馨提示',
content: '确定要删除吗?',
success(res) {
if (res.confirm) {
this.info.activityBaseInfo.listCoverImageUrl.splice(this.info.activityBaseInfo
.listCoverImageUrl.indexOf(item), 1)
}
}
});
},
showImage(item) {
// 从相册选择6张图
uni.chooseImage({
count: 6,
sizeType: ['original', 'compressed'],
sourceType: ['album'],
success: function(res) {
// 预览图片
uni.previewImage({
urls: res.tempFilePaths,
longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data
.index + 1) + '张图片');
},
fail: function(err) {
console.log(err.errMsg);
}
}
});
}
});
},
clickItem(e) {
let _this = this
switch (e) {
case "宣传海报":
uni.chooseImage({
count: 9,
sizeType: ['compressed'],
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
for (var i = 0; i < res.tempFilePaths.length; i++) {
_this.info.activityBaseInfo.listCoverImageUrl.push(res.tempFilePaths[i])
}
}
})
break;
case "联系方式":
uni.navigateTo({
url: "mobileInfoActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
case "赛事介绍":
uni.navigateTo({
url: "explainActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
case "免责声明":
uni.navigateTo({
url: "eventActivity?activityBaseInfo=" + JSON.stringify(_this.info
.activityBaseInfo)
})
break;
}
},
radioChange(e) {
this.info.activityBaseInfo.radioType1 = !this.info.activityBaseInfo.radioType1
this.info.activityBaseInfo.radioType2 = !this.info.activityBaseInfo.radioType2
console.log('radio1发生change事件携带value值为', this.info.activityBaseInfo.radioType1)
console.log('radio2发生change事件携带value值为', this.info.activityBaseInfo.radioType2)
},
cancel() {
this.$refs.cropper.close(true);
},
complete(e) {
this.activityBaseInfo.logo = e.path
this.$refs.cropper.close(true);
},
dateChange1(e) {
this.info.activityBaseInfo.enrollStartTime = e.f1 + " " + e.hh + ":" + e.mm
console.log(e)
},
dateChange2(e) {
this.info.activityBaseInfo.enrollEndTime = e.f1 + " " + e.hh + ":" + e.mm
},
onEditorReady1() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor1').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.activityBaseInfo.introduction
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor1').context((res) => {
this.editorCtx1 = res.context
this.editorCtx1.setContents({
html: this.info.activityBaseInfo.introduction
})
}).exec()
// #endif
},
onEditorReady2() {
// #ifdef APP-PLUS
uni.createSelectorQuery().select('#editor2').context((res) => {
this.editorCtx2 = res.context
this.editorCtx2.setContents({
html: this.info.activityBaseInfo.disclaimer
})
}).exec()
// #endif
// #ifdef H5 || MP-WEIXIN
this.createSelectorQuery().select('#editor2').context((res) => {
this.editorCtx2 = res.context
this.editorCtx2.setContents({
html: this.info.activityBaseInfo.disclaimer
})
}).exec()
// #endif
},
filterTap() {
// this.$refs.ddmtype.show()
this.typeShow = true;
},
typeItemClick(e) {
this.type = e.text
this.info.activityBaseInfo.cancelEnrollRefund = e.value
console.log(this.type)
console.log(this.info.activityBaseInfo.cancelEnrollRefund)
this.typeClose()
},
typeClose() {
this.typeShow = false;
},
switch1Change: function(e) {
this.switch1Checked = !this.switch1Checked;
this.info.activityBaseInfo.cancelEnrollRefund = this.switch1Checked == true ? 0 : 1;
console.log(`switch1Change样式点击后是否选中`, this.switch1Checked)
console.log(`cancelEnrollRefund是否选中`, this.info.activityBaseInfo.cancelEnrollRefund)
},
switch2Change: function(e) {
this.switch2Checked = !this.switch2Checked;
this.info.activityBaseInfo.inviteType = this.switch2Checked == true ? 0 : 1;
console.log(`switch2Change样式点击后是否选中`, this.switch1Checked)
console.log(`inviteType是否选中`, this.info.activityBaseInfo.inviteType)
},
jump() {
if (this.IsEmpty(this.info.activityBaseInfo.name)) {
this.Toast("请输入活动名称");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.linkerName) || this.IsEmpty(this.info.activityBaseInfo
.linkerPhone)) {
this.Toast("联系方式不能为空");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.introduction)) {
this.Toast("活动介绍不能为空");
return;
}
if (this.IsEmpty(this.info.activityBaseInfo.disclaimer)) {
this.Toast("免责声明不能为空");
return;
}
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
// "&activityBaseInfo=" + encodeURIComponent(JSON.stringify(this.activityBaseInfo))
"&info=" + JSON.stringify(this.info)
})
}
}
};
</script>
<style lang="scss">
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.logo {
width: calc(100vw - 40rpx);
height: calc((100vw - 40rpx)*0.8);
margin-left: 20rpx;
}
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
justify-content: space-between;
.topLayout_item {
display: flex;
flex-direction: row;
align-items: center;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.layout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding: 30rpx 15rpx;
align-items: center;
.layout_lift {
font-size: 30rpx;
color: #101010;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
}
}
.labelLayout {
display: flex;
flex: 1;
margin-left: 10rpx;
margin-right: 10rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 5rpx;
padding-bottom: 5rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
.labelLayout2 {
background-color: #007AFF;
}
.tui-fr {
zoom: .7
}
.layout1 {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding-bottom: 20rpx;
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 30rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
.fui-filter__item {
height: auto;
width: 300rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
font-size: 30rpx;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.fui-filter__icon {
transition: all .15s linear;
}
.fui-icon__ani {
transform: rotate(180deg);
}
</style>

View File

@@ -0,0 +1,74 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
activityBaseInfo: {
introduction: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
// let t = JSON.parse(decodeURIComponent(option.introduction));
// this.htmlStr = t.html
let t = option.introduction == "undefined" ?"":option.introduction;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
this.chooseUpload(9)
.then((res) => {
console.log("url>>>>", res);
this.$refs.rich.insertUrlImage(res.urls)
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
console.log(this.getHtml())
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '')
.replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.activityBaseInfo.introduction = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.activityBaseInfo)
},
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,288 @@
<template>
<view>
<RefreshView ref="mescrollRef" @refresh="refresh" :hasBack="true" text="首页" :useDownScroll="true"
:useUpScroll="false" pageBg="#F1F2F5">
<view style="display: flex;flex-direction: column;align-items: center;width: 100vw;">
<view
style="display: flex;flex-direction: column;align-items: center;background-color: #2fa1f0;padding-top: 80rpx;">
<view style="width: 100vw;text-align: center;font-size: 60rpx;font-weight: 700;color: aliceblue;">
体育活动</view>
<view
style="width: 100vw;text-align: center;font-size: 35rpx;font-weight: 300;color: beige;margin-top: 10rpx;">
组织报名工具</view>
<view @click="jump(1)" style="width: 80%;background-color: #FFFFFF;display: flex;flex-direction: row;align-items: center;justify-content: center;
border-radius:100rpx;margin-top: 80rpx;margin-bottom: 20rpx;height: 80rpx;">
<image src="../../static/custom-icon/click.png" style="width: 60rpx;height: 60rpx;"></image>
<text>一分钟创建 轻松组织活动</text>
</view>
<view style="width: 85%;display: flex;flex-direction: row;align-items: center;
margin-top: 10rpx;margin-bottom: 20rpx;height: 80rpx;">
<image src="../../static/custom-icon/notice.png"
style="width: 40rpx;height: 40rpx;flex-shrink: 0;margin-right: 20rpx;"></image>
<text
style="font-size: 26rpx;font-weight: 200;">您注册的账号可以在宇运动旗下的子平台一号通行同时您发布的活动将会按类别同步到各子平台</text>
</view>
</view>
<view class="nav-bar" @click="jump(3)">
<view>
<text class="bar-text">最新活动</text>
<image src="../../static/custom-icon/new2.png"
style="width: 40rpx;height: 40rpx;flex-shrink: 0;margin-left: 10rpx;"></image>
</view>
<image class="bar-img" src="../../static/home-icon/more_text.png" mode="aspectFit" @tap="newGame">
</image>
</view>
<view v-for="(item,index) in list " :key="index" style="width: 100%;">
<view
style="display: flex;flex-direction: column;margin-bottom: 30rpx; padding: 30rpx;background: #FFFFFF;"
@click="clickItem(index)">
<view style="display: flex;flex-direction: column;">
<view style="display: flex; flex-direction: row;">
<text style="color: #101010; font-size: 32rpx; display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;flex: 1;">{{item.name}}</text>
<text
style="color: #fff; font-size: 24rpx; background-color: #F2BF5C; padding: 5rpx 10rpx;">{{item.sportCategoryName}}</text>
</view>
<text
style="color: #898989 ; font-size: 28rpx; margin-top: 10rpx;">报名截止{{item.enrollEndTime}}</text>
</view>
<view style="width: 100%;height: 300rpx; margin-top: 20rpx;margin-bottom: 20rpx;">
<image style="width: 100%;height: 100%; border-radius: 30rpx;" mode="aspectFill"
:src="item.firstCoverImage"></image>
<view style="display: flex; height: 50rpx;width: 100%; margin-top: -80rpx; ">
<view style=" display: flex;align-items: center;width: 100%;">
<image style="width: 28px;height: 48rpx;margin-left: 30rpx;"
src="../../static/renqi.png"></image>
<text style="color: #fff; margin-left: 15rpx;flex: 1;">{{item.popularity}}</text>
<text
:class="{'btn1':item.enrollState ==1||item.enrollState ==3,'btn2':item.enrollState==2}"
style="display: flex;text-align: center; padding: 8rpx 15rpx;
color: #FFFFFF; font-size: 28rpx; margin-right:30rpx; border-radius: 10rpx;">{{item.enrollStateName}}</text>
</view>
</view>
</view>
<view style="width: 100%;" v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view style="display: flex;flex-direction: column;">
<view
style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;">
<text style="color: #101010; font-size: 28rpx; flex: 1;">{{info.name}}</text>
<view style=" align-items: center;">
<text style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #ff0000 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #ff0000 ; font-size: 24rpx;">{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 5rpx;">
<view style="flex: 1; align-items: center;">
<text style="color: #919191; font-size: 24rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 24rpx;">{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
</view>
<text
style="margin-top: 10rpx; color: #919191; font-size: 24rpx;">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #101010; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
list: []
}
},
methods: {
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/activityManagement/getActivityAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: page.num,
size: 10,
params: {
name: "",
userSid: getApp().globalData.memberSid,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: 'DetailActivity?raceSid=' + raceSid
});
},
jump(index) {
let _this = this
switch (index) {
case 1:
// 新建活动
uni.navigateTo({
url: "activity?isCreate=0&sid="
})
break;
case 2:
// 草稿箱
uni.navigateTo({
// url: '../index/exemptionActivity?raceSid=' + res.data
})
break;
case 3:
// 活动列表
uni.navigateTo({
url: "activityList"
})
break;
}
}
}
}
</script>
<style lang="scss">
.line {
width: 100%;
height: 18rpx;
background-color: #f5f4f9;
}
.btn {
display: flex;
width: 80%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
}
.nav-bar {
height: 92rpx;
width: 100%;
display: flex;
justify-content: space-between;
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
</style>

View File

@@ -0,0 +1,89 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="联系方式" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;">
<text style=" margin-top: 50rpx; margin-left: 65rpx;">联系人</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" v-model="activityBaseInfo.linkerName" @input="nameText" placeholder="请输入联系人" />
</view>
<text style=" margin-top: 50rpx; margin-left: 65rpx; margin-top: 30rpx;">联系电话</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" type="number" v-model="activityBaseInfo.linkerPhone" maxlength="11"
@input="phoneText" placeholder="请输入联系电话" />
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
activityBaseInfo: {
linkerName: "",
linkerPhone: "",
}
};
},
onLoad: function(option) {
this.activityBaseInfo.linkerName =option.linkerName;
this.activityBaseInfo.linkerPhone = option.linkerPhone;
console.log(JSON.stringify(this.activityBaseInfo))
},
mounted() {
},
methods: {
nameText(e) {
this.activityBaseInfo.linkerName = e.detail.value;
},
phoneText(e) {
this.activityBaseInfo.linkerPhone = e.detail.value
},
rightBtnClick() {
if (this.IsEmpty(this.activityBaseInfo.linkerName)) {
this.Toast("请输入联系人姓名")
return
}
let o = parseInt(this.activityBaseInfo.linkerPhone)
if (isNaN(o) || !this.activityBaseInfo.linkerPhone.startsWith(1) || this.activityBaseInfo.linkerPhone.length !=
11) {
this.Toast("输入的电话格式有误")
} else {
this.SetResult(this.activityBaseInfo)
console.log(this.activityBaseInfo)
}
},
}
}
</script>
<style lang="scss">
.input {
margin-left: 65rpx;
margin-right: 65rpx;
height: 80rpx;
background: #F2F2F2;
border-radius: 42rpx;
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
align-items: center;
.input_text {
width: 100%;
}
}
</style>

View File

@@ -0,0 +1,337 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发起活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item" @click="topClik(1)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item" @click="topClik(2)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/unfinished.png"
mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<PublishItem leftText="奖品设置" :isShowRight="false">
</PublishItem>
<view class="line"></view>
<view class="layout">
<textarea class="explain" @input="notesText" placeholder="奖品设置(点击编辑)"
:value="info.activityNotesOther.notes" />
</view>
<view class="line"></view>
<PublishItem leftText="特别鸣谢" rightText="选择赞助商" :isShowRight="true" @rightClick="clickItem()">
</PublishItem>
<view style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column;">
<view v-for="(item,index) in info.activityNotesOther.listSponsor " :key="index">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 15rpx;justify-content: center;">
<text style="color: #898989;font: size 50rpx;flex: 1;"
@click="showDetail(item.sid)">{{item.name}}</text>
<image style="width: 30rpx;height: 30rpx;" src="../../static/event-icon/delete.png" mode="aspectFit"
@click="deleteItem(index)">
</image>
</view>
</view>
</view>
<view class="line"></view>
<PublishItem leftText="主办方" :isShowRight="false"></PublishItem>
<EditText hint="请输入主办方名称" @onTextChange="organizerText" :value="info.activityNotesOther.organizer">
</EditText>
<view class="line"></view>
<PublishItem leftText="承办方" :isShowRight="false"></PublishItem>
<EditText hint="请输入承办方名称" @onTextChange="cocosponsorrText" :value="info.activityNotesOther.cosponsor">
</EditText>
<!-- <text class="btn" @click="jump()">发布</text> -->
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isCreate: 0,
raceSid: "",
info: {
activityBaseInfo: {},
listActivityItems: [],
activityNotesOther: {
cosponsor: "",
organizer: "",
notes: "",
listSponsor: [
// {
// sid: "",
// name: "啊大大大add的方式达到",
// introduction: "",
// address: "",
// linkerName: "",
// linkerPhone: "",
// logo: "",
// webUrl: "",
// },
// {
// sid: "",
// name: "啊a士大夫士大夫大师傅是第三方士大夫达到",
// introduction: "",
// address: "",
// linkerName: "",
// linkerPhone: "",
// logo: "",
// webUrl: "",
// }
]
}
}
}
},
onLoad: function(option) {
this.isCreate = option.isCreate
console.log('option.isCreate', option.isCreate)
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
if (!this.IsEmpty(backResult)) {
this.info.activityNotesOther.listSponsor = backResult
console.log("list=====>" + JSON.stringify(backResult))
console.log("sponsorList=====>" + JSON.stringify(this.info.activityNotesOther.listSponsor))
}
}
},
methods: {
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 3
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 3
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 3
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
this.WriteGameCahce(this.info)
switch (index) {
case 1:
uni.navigateTo({
url: "exemptionActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 2:
uni.navigateTo({
url: "setEventActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
clickItem() {
uni.navigateTo({
url: "sponsorList"
})
},
notesText(e) {
this.info.activityNotesOther.notes = e.detail.value
},
cocosponsorrText(e) {
this.info.activityNotesOther.cosponsor = e
},
organizerText(e) {
this.info.activityNotesOther.organizer = e
},
showDetail() {
},
deleteItem(item) {
let _this = this
console.log("====>" + _this.info.activityNotesOther.listSponsor.length);
uni.showModal({
title: '温馨提示',
content: '确定要删除此赞助商吗?',
success(res) {
if (res.confirm) {
_this.info.activityNotesOther.listSponsor.splice(_this.info.activityNotesOther
.listSponsor.indexOf(item),
1);
console.log("====>" + _this.info.activityNotesOther.listSponsor.length);
}
}
});
},
jump() {
if (this.IsEmpty(this.info.activityNotesOther.cosponsor)) {
this.Toast("请输入承办方名称")
return
}
if (this.IsEmpty(this.info.activityNotesOther.organizer)) {
this.Toast("请输入主办方名称")
return
}
}
}
}
</script>
<style lang="scss">
.tripList_root {
top: 0px;
left: 0px;
width: 100%;
height: 100%;
overflow: hidden;
position: fixed;
z-index: 0;
}
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
flex-direction: row;
justify-content: space-between;
.topLayout_item {
display: flex;
flex-direction: row;
align-items: center;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.layout {
background: #FFFFFF;
display: flex;
margin: 15px;
height: auto;
.notes {
width: 100%;
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,645 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="发起活动" :useDownScroll="false" :useUpScroll="false"
:isInterceptBack="true" @backClick="backClick" :useTitleLeftBtn="isCreate==0?1:0" titleLeftBtnSource="存草稿"
@leftBtn='leftBtnClick' :useTitleRightBtn="isCreate==0?0:1" titleRightBtnSource="发布" @rightBtn='rightBtnClick'>
<view class="topLayout">
<view class="topLayout_item" @click="topClik(1)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">1</text>
<text style="font-size: 28rpx;color: #262626;margin-left: 10rpx;">基本信息</text>
</view>
<view class="topLayout_item">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/finished.png" mode="aspectFit">
</image> -->
<text class="topLayout_item_left1">2</text>
<text
style="font-size: 28rpx; font-family: Adobe Heiti Std;font-weight: normal;color: #262626;margin-left: 10rpx;">设置活动项目</text>
</view>
<view class="topLayout_item" @click="topClik(3)">
<!-- <image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/unfinished.png"
mode="aspectFit">
</image> -->
<text class="topLayout_item_left2">3</text>
<text style="font-size: 28rpx;color: #979797;margin-left: 10rpx;">奖项及其他</text>
</view>
</view>
<view>
<view v-for="(item,index) in info.listActivityItems " :key="index">
<view class="items">
<view class="layout1">
<text class="number">{{index+1}}</text>
<input class="name" type="text" @input="nameText($event, index)" placeholder="请输入活动项目名称"
:value="item.name" />
<view style="display: flex;padding-left: 30rpx; align-items: center;" @click="deleteItem(item)">
<image style="width: 34rpx;height: 38rpx;" src="../../static/event-icon/delete.png"
mode="aspectFit">
</image>
</view>
</view>
<view class="line"></view>
<view class="layout2">
<textarea class="explain" @input="explainText($event, index)" placeholder="活动项目说明(点击编辑)"
:value="item.introduction" />
</view>
<view class="line"></view>
<view class="tabLayout" style="flex-direction:column">
<view class="layout">
<image style="width: 45rpx;height: 45rpx;" src="../../static/custom-icon/line.png"
mode="aspectFill">
</image>
<view>
<text class="layout_lift">体育活动标签</text>
<text
style="color: #F2BF5C;font-size: 30rpx;margin-left: 5rpx;">{{item.SportCategoryName}}</text>
</view>
</view>
<view style="display: flex; flex-direction: row;margin-left: 30rpx;margin-right: 30rpx;">
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid===1}"
@click="onClick(index,1)">乒乓球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==2}"
@click="onClick(index,2)">户外运动</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==3}"
@click="onClick(index,3)">羽毛球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==4}"
@click="onClick(index,4)">足球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==5}"
@click="onClick(index,5)">篮球</text>
</view>
<view
style="display: flex; flex-direction: row;margin-left: 30rpx;margin-right: 30rpx;margin-top: 20rpx;">
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==6}"
@click="onClick(index,6)">网球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==7}"
@click="onClick(index,7)">台球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==8}"
@click="onClick(index,8)">游泳</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==9}"
@click="onClick(index,9)">保龄球</text>
<text class="labelLayout" :class="{'labelLayout2':item.SportCategorySid==10}"
@click="onClick(index,10)">滑雪</text>
</view>
</view>
<PublishItem leftText="人数费用" :middleText="getData(item)" rightText="设置" :isShowRight="true"
@rightClick="clickItem('人数费用',index)">
</PublishItem>
<view class="line"></view>
<biaofun-datetime-picker :start="item.startTime" @change="dateChange1($event, index)">
<PublishItem leftText="开始时间" :middleText="item.startTime" rightText="修改" :isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<biaofun-datetime-picker :start="item.endTime" @change="dateChange2($event, index)">
<PublishItem leftText="结束时间" :middleText="item.endTime" rightText="修改" :isShowRight="true">
</PublishItem>
</biaofun-datetime-picker>
<view class="line"></view>
<PublishItem leftText="活动地点" :middleText="item.address" rightText="选择" :isShowRight="true"
@rightClick="clickItem('活动地点',index)">
</PublishItem>
<!-- <PublishItem leftText="活动地点" :isShowRight="false"></PublishItem>
<EditText hint="请输入活动地点" @onTextChange="addressText($event, index)" :value="item.address">
</EditText> -->
<view class="line"></view>
<view class="line" style="height: 25rpx;"></view>
</view>
</view>
</view>
<view style="height: 100rpx;background: #FFFFFF;" v-if="info.listActivityItems.length<6">
<view class="addData" @click="addData()">
<image style="width: 48rpx;height: 48rpx;" src="../../static/event-icon/add.png" mode="aspectFit">
</image>
<text style="color: #898989 ; margin-left: 10rpx;">点击继续添加活动项目</text>
</view>
</view>
<view style="height: 150px;"></view>
<!-- <view style="display: flex;flex-direction: column; margin-top: 100rpx; margin: 30rpx;height: 400rpx;">
<text style="color: #ff0000; font-size: 24rpx;">提示</text>
<text style="color: #ff0000; font-size: 24rpx; margin-top: 20rpx; line-height: 40rpx;">{{str}}</text>
</view> -->
<text class="btn" @click="jump()">奖项及其他设置</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isCreate: 0,
pos: 0,
str: "\u3000\u3000为简化业余比赛中记分的繁琐我们特加了简易记分模式选择'记到场分'、'记到局分'时可以不录小分,如积分相同则随机抽签确定名次。",
price: "",
info: {
sid: "",
listActivityItems: [{
SportCategorySid: 1,
SportCategoryName: "乒乓球"
}],
}
}
},
onLoad: function(option) {
console.log('option.isCreate', option.isCreate)
this.isCreate = option.isCreate
this.info = JSON.parse(option.info)
console.log("info1===>" + option.info)
console.log("info2===>" + this.info)
if (this.info.listActivityItems.length == 0) {
console.log("2222>" + this.info.listActivityItems.length)
this.info.listActivityItems.push({
address: "",
placeSid: "",
endTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
enrollMoney: "",
enrollNumbersLimit: "",
introduction: "",
name: "",
SportCategorySid: 1,
SportCategoryName: "乒乓球",
startTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
})
}
console.log("info3===>>" + JSON.stringify(this.info.listActivityItems))
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
if (!this.IsEmpty(backResult.sid)) {
console.log("选择的球馆>" + JSON.stringify(backResult))
// 选择的球馆
this.info.listActivityItems[this.pos].gymnasiumSid = backResult.sid
this.info.listActivityItems[this.pos].address = backResult.name
console.log("选择的球馆>" + JSON.stringify(this.info.listActivityItems))
}
if (!this.IsEmpty(backResult.enrollMoney)) {
// 人数费用
console.log("enrollMoney>" + backResult.enrollMoney)
this.info.listActivityItems[this.pos].enrollMoney = backResult.enrollMoney
this.info.listActivityItems[this.pos].enrollNumbersLimit = backResult.enrollNumbersLimit
}
}
},
methods: {
backClick() {
let that = this
uni.showModal({
title: '提示',
content: '赛事未发布,是否保存草稿?',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
console.log('用户点击确定')
that.WriteGameCahce(that.info)
uni.navigateBack({
delta: 2
})
} else { //这里是点击了取消以后
console.log('用户点击取消')
uni.navigateBack({
delta: 2
})
}
}
})
},
leftBtnClick() {
this.WriteGameCahce(this.info)
uni.navigateBack({
delta: 2
})
},
rightBtnClick() {
if (this.IsEmpty(getApp().globalData.memberSid)) {
console.log('createSid', "无sid")
} else {
this.info.createSid = getApp().globalData.memberSid
console.log('createSid', JSON.stringify(this.info))
// this.HTTP({
// url: 'v1/activityManagement/saveActivity',
// method: 'POST',
// data: this.info,
// paramsType: "FORM",
// loading: true
// }).then((res) => {
// this.ClearGameCache(this.info)
// wx.navigateBack({
// delta: 3
// })
// });
}
},
topClik(index) {
this.WriteGameCahce(this.info)
switch (index) {
case 1:
uni.navigateTo({
url: "exemptionActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
case 3:
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info) // 页面 A
})
break
}
},
nameText(e, index) {
this.info.listActivityItems[index].name = e.detail.value
},
explainText(e, index) {
this.info.listActivityItems[index].introduction = e.detail.value
},
onClick(index, pos) {
console.log("index=====>" + index)
console.log("pos=====>" + pos)
switch (pos) {
case 1:
this.info.listActivityItems[index].SportCategorySid = 1,
this.info.listActivityItems[index].SportCategoryName = "乒乓球"
console.log("info3===>>" + JSON.stringify(this.info.listActivityItems))
break
case 2:
this.info.listActivityItems[index].SportCategorySid = 2,
this.info.listActivityItems[index].SportCategoryName = "户外运动"
break
case 3:
this.info.listActivityItems[index].SportCategorySid = 3,
this.info.listActivityItems[index].SportCategoryName = "羽毛球"
break
case 4:
this.info.listActivityItems[index].SportCategorySid = 4,
this.info.listActivityItems[index].SportCategoryName = "足球"
break
case 5:
this.info.listActivityItems[index].SportCategorySid = 5,
this.info.listActivityItems[index].SportCategoryName = "篮球"
break
case 6:
this.info.listActivityItems[index].SportCategorySid = 6,
this.info.listActivityItems[index].SportCategoryName = "网球"
break
case 7:
this.info.listActivityItems[index].SportCategorySid = 7,
this.info.listActivityItems[index].SportCategoryName = "台球"
break
case 8:
this.info.listActivityItems[index].SportCategorySid = 8,
this.info.listActivityItems[index].SportCategoryName = "游泳"
break
case 9:
this.info.listActivityItems[index].SportCategorySid = 9,
this.info.listActivityItems[index].SportCategoryName = "保龄球"
break
case 10:
this.info.listActivityItems[index].SportCategorySid = 10,
this.info.listActivityItems[index].SportCategoryName = "滑雪"
break
}
},
getData(info) {
let num = info.enrollNumbersLimit == 0 ? "不限制人数" : info.enrollNumbersLimit + "人"
let price = info.enrollMoney == 0 ? "免费" : info.enrollMoney + "元"
return num + " / " + price
},
dateChange1(e, index) {
console.log("eee>" + e.f3)
console.log("index>" + index)
this.info.listActivityItems[index].startTime = e.f1 + " " + e.hh + ":" + e.mm
},
dateChange2(e, index) {
this.info.listActivityItems[index].endTime = e.f1 + " " + e.hh + ":" + e.mm
},
addressText(e, index) {
this.info.listActivityItems[index].address = e
},
deleteItem(item) {
let _this = this
console.log("====>" + _this.info.listActivityItems.length);
uni.showModal({
title: '温馨提示',
content: '确定要删除这条活动项目吗?',
success(res) {
if (res.confirm) {
_this.info.listActivityItems.splice(_this.info.listActivityItems.indexOf(item),
1);
console.log("====>" + _this.info.listActivityItems.length);
}
}
});
},
clickItem(e, index) {
this.pos = index
let _this = this
console.log("index====>" + index);
console.log("this.pos====>" + this.pos);
switch (e) {
case "人数费用":
uni.navigateTo({
url: "InputHappyGameLimitActivity?enrollNumbersLimit=" +
(_this.info.listActivityItems[index].enrollNumbersLimit == undefined ? "" :
_this.info.listActivityItems[index].enrollNumbersLimit) +
"&enrollMoney=" + (_this.info.listActivityItems[index].enrollMoney ==
undefined ? "" :
_this.info.listActivityItems[index].enrollMoney) +
"&type=" + (_this.info.listActivityItems[index].type == undefined ? "" :
_this.info.listActivityItems[index].type),
})
break;
case "活动地点":
uni.navigateTo({
url: "InputHappyGameAreaActivity",
})
break;
}
},
addData() {
this.info.listActivityItems.push({
name: "",
introduction: "",
enrollNumbersLimit: "",
enrollMoney: "",
startTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
endTime: this.TimeFormat(this.CurrentMillions(), "yyyy-MM-dd HH:mm"),
address: "",
SportCategorySid: 1,
SportCategoryName: "乒乓球",
})
},
jump() {
let info = this.info.listActivityItems;
if (info.length == 0) {
this.Toast("请添加活动项目")
return
}
// 设置比赛项目
for (var i = 0; i < info.length; i++) {
if (this.IsEmpty(info[i].name)) {
this.Toast("请输入活动项目名称")
return
}
if (this.IsEmpty(info[i].introduction)) {
this.Toast("请输入活动项目说明")
return
}
if (this.IsEmpty(info[i].address)) {
this.Toast("请输入活动地点")
return
}
}
// console.log("leagth" + this.listActivityItems.length)
uni.navigateTo({
url: "prizeActivity?isCreate=" + this.isCreate +
"&info=" + JSON.stringify(this.info)
})
}
}
}
</script>
<style lang="scss">
.topLayout {
background: #F7F7F7;
display: flex;
padding: 30rpx 60rpx;
flex-direction: row;
align-items: center;
flex-direction: row;
justify-content: space-between;
.topLayout_item {
display: flex;
align-items: center;
flex-direction: row;
.topLayout_item_left1 {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.topLayout_item_left2 {
width: 48rpx;
height: 48rpx;
border: 1rpx solid #D9D9D9;
border-radius: 50%;
color: #D9D9D9;
font-size: 36rpx;
text-align: center;
}
}
}
.line {
width: 100%;
height: 5rpx;
background-color: #f5f4f9;
}
.tabLayout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding-bottom: 20rpx;
}
.layout {
background: #FFFFFF 100%;
display: flex;
flex-direction: row;
padding: 30rpx 15rpx;
align-items: center;
.layout_lift {
font-size: 30rpx;
color: #101010;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
}
}
.labelLayout {
display: flex;
flex: 1;
margin-left: 10rpx;
margin-right: 10rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 5rpx;
padding-bottom: 5rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
.labelLayout2 {
background-color: #007AFF;
}
.items {
display: flex;
flex-direction: column;
.layout1 {
padding: 32rpx;
display: flex;
flex-direction: row;
align-items: center;
background: #FFFFFF;
.number {
width: 48rpx;
height: 48rpx;
background-color: #007AFF;
border-radius: 50%;
color: #FFFFFF;
font-size: 36rpx;
text-align: center;
}
.name {
margin-left: 20rpx;
width: 80%;
}
}
.layout2 {
margin-top: 10rpx;
background: #FFFFFF;
display: flex;
padding: 32rpx;
height: auto;
.explain {
width: 100%;
}
}
.layout3 {
background: #FFFFFF;
display: flex;
margin-top: 10rpx;
flex-direction: row;
padding: 32rpx;
.layout_lift {
font-size: 28rpx;
color: #101010;
}
.layout_mobile {
display: flex;
flex: 1;
margin-left: 20rpx;
font-size: 28rpx;
color: #8F8F94;
}
.input {
flex: 1;
width: auto;
margin-left: 20rpx;
}
.layout_right {
display: flex;
right: 32rpx;
align-items: center;
.layout_right_text {
margin-right: 10rpx;
font-size: 28rpx;
color: #080808;
}
}
}
}
.addData {
display: flex;
flex-direction: row;
background: #FFFFFF;
padding: 32rpx;
align-items: center;
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,79 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="赞助商详情" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="0">
<image style="width: 100%;height: 300rpx;" :src="info.logo"
mode="scaleToFill">
</image>
<view style="background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;">
<text style="font-size: 35rpx;">{{info.name}}</text>
</view>
<view style="height: 10rpx;background-color: #eee;margin-top: 10rpx;"></view>
<view
style="background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;padding-right: 20rpx;">
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">联系方式{{info.linkerName+" "+info.linkerPhone}}</view>
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">网址{{info.webUrl}}</view>
<view style="font-size: 30rpx;padding: 5rpx;color: #666666;">地址{{info.address}}</view>
</view>
<view style="height: 10rpx;background-color: #eee;"></view>
<view
style="display: flex;flex-direction: column; background-color: #fff;padding-top:10rpx; padding-bottom: 10rpx; padding-left:20rpx ;padding-right: 20rpx;">
<text style="font-size: 30rpx;padding: 5rpx;color: #666666;">单位简介</text>
<text
style="font-size: 28rpx;padding: 5rpx;color: #666666;">{{info.introduction}}</text>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
sponsorSid: "",
info: {
name: "",
address: "",
introduction: "",
linkerName: "",
linkerPhone: "",
logo: "",
webUrl: "",
userSid: ""
}
}
},
onLoad: function(option) {
this.sponsorSid = option.sponsorSid;
},
onShow() {
let that = this
this.HTTP({
url: 'aos/v1/sponsorManagement/getSponsorDetailsBySid/' + that.sponsorSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
that.info = res.data
console.log('=======', JSON.stringify(that.info))
});
},
methods: {}
};
</script>
<style lang="scss">
</style>

198
pages/index/sponsorList.vue Normal file
View File

@@ -0,0 +1,198 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView @refresh="refresh" ref="mescrollRef" :pageBg="F1F2F5" :hasBack="true" text="赞助商"
:useDownScroll="false" :useUpScroll="false" useTitleRightBtn="1" useTitleLeftBtn="1"
titleRightBtnSource="确定" titleLeftBtnSource="新增" @rightBtn='rightBtnClick' @leftBtn='leftClick'>
<view v-if="err" style="width: 100vw;height: 100vh;line-height: 100vh;text-align: center;"
@click="refresh()">点击重试</view>
<view v-if="!err">
<view v-for="(item,index) in sponsorList " :key="index">
<view
style="display: flex;flex-direction: row; padding: 20rpx;background-color: #fff; margin: 20rpx;">
<image style="width: 150rpx;height: 150rpx;" :src="item.logo" mode="aspectFill"
@click="img(item.sid)"></image>
<view
style="display: flex;flex-direction: column;margin-left: 30rpx;flex: 1;margin-right: 30rpx;margin-top: 15rpx;">
<text style=" display:-webkit-box;-webkit-line-clamp:1;
overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;
word-break:break-all;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;margin-top: 30rpx;">
<text>{{item.linkerName}}</text>
<text style="margin-left: 20rpx;">{{item.linkerPhone}}</text>
</view>
</view>
<checkbox-group style="display: flex; align-items: center;"
@change="checkboxChange($event, index)">
<checkbox :checked="item.checked"></checkbox>
</checkbox-group>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
err: false,
sponsorList: [
],
info: {
sidList: [],
nameList: []
}
}
},
onShow() {
let backResult = this.OnActivityResult();
console.log("++++++++",backResult);
if (backResult != undefined) {
console.log("++++++++");
this.refresh()
}
},
methods: {
refresh(page) {
let _this = this
this.Login()
.then((res) => {
this.HTTP({
url: 'aos/v1/sponsorManagement/getSponsorListByUsersid/' + res,
paramsType: "FORM",
method: "GET",
data: {
},
loading: true
}).then((res) => {
// 追加数据
_this.sponsorList = res.data
this.info.sidList = []
this.info.nameList = []
console.log("初始化=====>" + JSON.stringify(_this.sponsorList))
_this.err = false
});
}).catch(function(err) {
if (page == undefined || page.num == 1)
_this.err = true
})
},
rightBtnClick() {
console.log("右=====>" + JSON.stringify(this.info.sidList))
if (this.info.sidList.length == 0) {
this.Toast("请选择赞助商")
return
}
this.SetResult(this.info)
},
leftClick() {
uni.navigateTo({
url: 'addSponsor'
})
},
img(sid) {
uni.navigateTo({
url: 'sponsorDetail?sponsorSid=' + sid
})
},
checkboxChange(e, index) {
console.log("index=====>" + index)
this.sponsorList[index].checked = !this.sponsorList[index].checked
if (this.sponsorList[index].checked) {
this.info.sidList.push(this.sponsorList[index].sid)
this.info.nameList.push(this.sponsorList[index].name)
} else {
this.info.sidList.splice(this.sponsorList.indexOf(index), 1)
this.info.nameList.splice(this.sponsorList.indexOf(index), 1)
}
console.log("sidList=====>" + JSON.stringify(this.info.sidList))
console.log("nameList=====>" + JSON.stringify(this.info.nameList))
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #CCCCCC;
}
.btn2 {
background: #09BE4F;
}
.btn3 {
background: #FF2B2B;
}
.btn4 {
background: #0081D5;
}
</style>

50
pages/me/AuthLogin.vue Normal file
View File

@@ -0,0 +1,50 @@
<template>
<RefreshView ref="mescrollRef" :pageBg="EDEDED" :hasBack="true" text="授权登陆" :useDownScroll="false" :useUpScroll="false" >
<view class="login">
<view class="name-logo">
<image class="name" src="../../static/img/login/tool_name.png"></image>
<image class="logo" src="../../static/img/login/logo.png"></image>
</view>
<view class="icons">
<image class="wx-icon" src="../../static/img/login/wx_icon.png"></image>
<image class="exchange" src="../../static/img/login/exchange.png"></image>
<image class="head-image" src="../../static/img/login/headimage.png"></image>
</view>
<view>申请获取以下权限</view>
<view class="margin-bottom-wide">您的手机号</view>
<view class="line-thin margin-top70"></view>
<button class="margin-top70 button-blue" @click="authLogin()">微信授权登录</button>
<button class="margin-top50 button-gray" @click="noLogin()">暂时不登录</button>
</view>
</RefreshView>
</template>
<script>
export default {
methods:{
authLogin(){
this.WxAuthLogin()
.then((res) => {
console.log('sysUserSid', getApp().globalData.sysUserSid)
console.log('sysUserInfoSid', getApp().globalData.sysUserInfoSid)
console.log('sysUserWxAuthSid', getApp().globalData.sysUserWxAuthSid)
console.log('isLogin', getApp().globalData.isLogin)
getApp().globalData.sysUserSid = res
getApp().globalData.isLogin = true
console.log("登陆返回:",res)
uni.navigateBack({
delta: 1
})
})
},
noLogin(){
uni.navigateBack({
delta: 1
})
}
}
}
</script>
<style>
@import url("../../static/columns.css");
</style>

104
pages/me/BaseInfo.vue Normal file
View File

@@ -0,0 +1,104 @@
<template>
<RefreshView ref="mescrollRef" :pageBg="EDEDED" :hasBack="true" text="个人信息" :useDownScroll="false" :useUpScroll="false" >
<view @click="uploadHeadImage()" class="menu-item">
<text class="text">头像</text>
<image :src="page.headImage" style="width: 70rpx;height: 70rpx;margin-right: 10rpx;"></image>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<view @click="toModiNickName()" class="menu-item">
<text class="text">昵称</text>
<text class="explain">{{page.userNickName}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<view @click="toRealInfo()" class="menu-item">
<text class="text">实名信息</text>
<text class="explain">{{page.realAttestationExplain}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
page: {
sid:"",
headImage: "http://www.ourpyw.com/upload//touxiang/default_tx.jpg",
userNickName: "",
loginName: "",
realAttestationExplain:""
},
parameter:{
sysUserSid:"",
}
}
},
onLoad(options){
this.parameter.sysUserSid = options.sysUserSid
// this.parameter.sysUserInfoSid = options.sysUserInfoSid
},
onShow() {
console.log("初始化")
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/getPersonalInfoBySysUserSid/' + _this.parameter.sysUserSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('========================================================', res.data.headImage)
_this.page = res.data
});
},
methods: {
uploadHeadImage(){
this.chooseUpload(1,"portal/file/upload","file")
.then((res) => {
console.log("url>>>>", res);
let _this = this
let url = res.urls[0].fullUrl
console.log("头像地址", url);
_this.HTTP({
url: 'aos/v1/aosUser/modifyHeadImage',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserInfoSid: _this.page.sid,
headImageUrl: url,
},
loading: true
}).then((res) => {
_this.page.headImage =url
});
})
return;
},
toModiNickName(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'ModiNickName?userNickName=' + _this.page.userNickName + "&sysUserInfoSid=" + _this.page.sid
})
}
},
toRealInfo(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: '../me/RealInfo?sysUserSid=' + _this.parameter.sysUserSid
})
}
}
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
</style>

227
pages/me/MemberManage.vue Normal file
View File

@@ -0,0 +1,227 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="成员管理" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_lift">选中({{sidListSize}})</text>
<text class="top_right" v-if="type==0" @click="agreeJoin()">同意入队</text>
<text class="top_right" v-if="type==1" @click="deleteMember()">删除队员</text>
</view>
<view class="line"></view>
<view>
<view v-for="(item,index) in list " :key="index">
<view class="item">
<view class="line" style="height: 1px;"></view>
<view class="item_content">
<checkbox-group class="item_check" @change="checkboxChange($event, index)">
<checkbox :checked="item.checked"></checkbox>
</checkbox-group>
<image class="item_img" :src="item.headImage" mode="aspectFill"></image>
<text class="item_text">{{item.realName}}</text>
</view>
</view>
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
type: 0,
// list: [{
// headImage: "https://www.keaidian.com/uploads/allimg/190424/24110307_8.jpg",
// realName: "张三",
// sid: "111",
// checked: false
// },
// {
// headImage: "https://www.keaidian.com/uploads/allimg/190424/24110307_8.jpg",
// realName: "张三",
// sid: "222",
// checked: false
// }
// ],
list:[],
sidListSize:0,
sidList: [],
sid: "",
}
},
onLoad(options) {
this.sid = options.sid
this.type = options.type
console.log('=======', options)
console.log('=======', options.sid)
console.log('=======', options.type)
// 获取列表
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/getPageListTeamMemberArea',
paramsType: "JSON",
method: "POST",
data: {
current: 1,
size: 10,
params: {
sysUserSid: _this.sid,
examineProgress: _this.type
}
},
loading: true
})
.then((res) => {
_this.list = res.data.records
});
},
methods: {
agreeJoin() {
// 保存
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/batchAgreeJoinMember',
paramsType: "JSON",
method: "POST",
data: {
teamSid: _this.sid,
listMemberSid: _this.sidList,
},
loading: true
})
.then((res) => {
uni.navigateBack({
delta: 1
})
});
},
deleteMember() {
let _this = this
// 保存
uni.showModal({
title: '提示',
content: '是否要删除选中的队员',
success: function(res) {
if (res.confirm) {
//这里是点击了确定以后
// 保存
_this.HTTP({
url: 'aos/v1/aosUser/batchDelMember',
paramsType: "JSON",
method: "POST",
data: {
teamSid: _this.sid,
listMemberSid: _this.sidList,
},
loading: true
})
.then((res) => {
uni.navigateBack({
delta: 1
})
});
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
},
checkboxChange(e, index) {
console.log("index=====>" + index)
// 切换选择
this.list[index].checked = !this.list[index].checked
if (this.list[index].checked) {
// 添加Sid
this.sidList.push(this.list[index].sid)
}
else {
// 删除当前的Sid
let sss = this.list[index].sid
console.log("sss>>>>" + sss)
let pos = this.sidList.findIndex((x) => {
console.log(">>>>" + x)
return x == sss
})
console.log("pos=====>" + pos)
this.sidList.splice(pos, 1)
}
this.sidListSize = this.sidList.length
console.log("asdfasdfasdfsad=====>" , this.listSize)
console.log("sidList=====>" + JSON.stringify(this.sidList))
},
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
.line {
height: 10rpx;
background: #eee;
width: 100%;
}
.top {
display: flex;
background: #fff;
flex-direction: row;
width: 100%;
padding-top: 26rpx;
padding-bottom: 26rpx;
.top_lift {
margin-left: 30rpx;
font-weight: 550;
font-family: sans-serif;
flex: 1;
color: #101010;
font-size: 36rpx;
}
.top_right {
margin-right: 30rpx;
background-color: #F4CE98;
color: #fff;
font-size: 24rpx;
padding: 10rpx 20rpx;
text-align: right;
}
}
.item {
display: flex;
flex-direction: column;
.item_content {
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx 32rpx;
flex-direction: row;
.item_check {
width: 32rpx;
height: 32rpx;
}
.item_img {
margin-left: 40rpx;
width: 80rpx;
height: 80rpx;
border-radius: 10rpx;
}
.item_text {
font-size: 28rpx;
color: #101010;
margin-left: 40rpx;
}
}
}
</style>

View File

@@ -0,0 +1,117 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="更换手机号" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_text">更换手机号后下次登录可使用新手机号登录</text>
<text class="top_text">当前手机号{{phoneNumber}}</text>
</view>
<view class="inputLay">
<text class="inputText">新手机号</text>
<input class="input" type="number" maxlength="11" @input="nameText" placeholder="请输入新手机号"
:value="mobile"></input>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="btn" @click="next()">下一步</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
mobile: "",
phoneNumber: ""
}
},
onLoad(options) {
console.log('=======', options)
console.log('=======', options.phoneNumber)
this.phoneNumber = options.phoneNumber
},
methods: {
nameText(e) {
this.mobile = e.detail.value
console.log(this.mobile)
},
next() {
var phoneLength = this.mobile.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (phoneLength != 11 || !this.mobile.startsWith("1")) {
this.Toast("请输入正确的手机号")
return;
}
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/verifyMobileIsExist/' + _this.mobile,
method: 'GET',
paramsType: "FORM",
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
if (200 == res.code) {
uni.navigateTo({
url: 'ModiMobileVerify?phoneNumber=' + this.mobile
})
} else {
this.Toast("手机号重复")
}
});
}
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: column;
margin-top: 32rpx;
margin-left: 36rpx;
.top_text {
margin-top: 10rpx;
font-size: 30rpx;
color: #BBBBBB;
}
}
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 32rpx;
margin-bottom: 32rpx;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

View File

@@ -0,0 +1,114 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="更换手机号" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_text">更换的手机号{{mobile}}</text>
</view>
<view class="inputLay">
<text class="inputText">验证码</text>
<input type="number" maxlength="6" @input="codeText" placeholder="请输入验证码" class="input" />
<SendCodeItem :phoneNum="mobile" url="aos/v1/aosUser/sendCodeFromWxBindMobile" @click="send"
ref="wxCodeItem"></SendCodeItem>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="btn" @click="save()">完成</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
mobile: "",
code: ""
}
},
onLoad(options) {
console.log('=======', options)
console.log('=======', options.mobile)
this.mobile = options.mobile
},
methods: {
codeText(e) {
this.code = e.detail.value
console.log(this.code)
},
save() {
var codeLength = this.code.length;
if (codeLength == 0) {
this.Toast("请输入验证码")
return;
}
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/modifyMobile',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserSid: getApp().globalData.memberSid,
mobile: _this.phoneNumber,
code: _this.code,
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 2
})
});
}
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: column;
margin-top: 32rpx;
margin-left: 36rpx;
.top_text {
margin-top: 10rpx;
font-size: 30rpx;
color: #BBBBBB;
}
}
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 32rpx;
margin-bottom: 32rpx;
align-items: center;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

94
pages/me/ModiNickName.vue Normal file
View File

@@ -0,0 +1,94 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="修改昵称" :useDownScroll="false" :useUpScroll="false">
<view class="outer">
<input class="input" type="text" @input="nameText" placeholder="请输入昵称" :value="data.userNickName"></input>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="bottom">一个好的昵称会提升您的个性表达</text>
</view>
<text class="btn" @click="save()">保存</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
data:{
userNickName: "",
sysUserInfoSid:""
}
}
},
onLoad(options) {
this.data.userNickName = options.userNickName
this.data.sysUserInfoSid = options.sysUserInfoSid
console.log('=======', options)
console.log('=======', options.userNickName)
},
methods: {
nameText(e) {
this.data.userNickName = e.detail.value
},
save(){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/modifyUserNickName',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserInfoSid: _this.data.sysUserInfoSid,
userNickName: _this.data.userNickName
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 1
})
});
}
}
}
</script>
<style lang="scss">
.outer {
display: flex;
margin-top: 20rpx;
flex-direction: column;
padding: 20rpx;
.input {
font-size: 32rpx;
color: #101010;
font-weight: 600;
font-family: sans-serif;
}
.bottom {
margin-top: 30rpx;
font-size: 28rpx;
color: #999;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 20rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

225
pages/me/ModiPassword.vue Normal file
View File

@@ -0,0 +1,225 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="密码设置" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 40rpx;display: flex;flex-direction: row;align-items: center;margin-left: 30rpx;">
<text>新密码</text>
<view class="inputRow">
<input type="text" :password="page.password1" maxlength="16" @input="psdText" placeholder="请输入密码"
class="input" />
<image :src="page.show1" mode="aspectFit" style="width: 40rpx;height: 40rpx;" @click="show(1)">
</image>
</view>
</view>
<view style="margin-top: 10rpx;display: flex;flex-direction: row;align-items: center;margin-left: 30rpx;">
<text>确认密码</text>
<view class="inputRow">
<input type="text" :password="page.password2" maxlength="16" @input="rePsdText"
placeholder="请再次输入密码" class="input" />
<image :src="page.show2" mode="aspectFit" style="width: 40rpx;height: 40rpx;" @click="show(2)">
</image>
</view>
</view>
<view class="condition">
<image class="condition_img" :src="page.img1" mode="aspectFit"></image>
<text class="condition_text" :class="{'alldata':index1===1}">密码长度为8-20个字符</text>
</view>
<view class="condition">
<image class="condition_img" :src="page.img2" mode="aspectFit"></image>
<text class="condition_text" :class="{'alldata':index2===1}">密码要包含大小写字母和数字</text>
</view>
<view class=" btn" @click="save">
<text class="btnText">保存</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
index1: 0,
index2: 0,
page: {
"psd": "", //密码
"rePsd": "", //确认密码,
password1: true,
password2: true,
show1: "../../static/hide-password.png",
show2: "../../static/hide-password.png",
"img1": "../../static/login/unfinished.png",
"img2": "../../static/login/unfinished.png",
}
}
},
methods: {
psdText(e) {
this.page.psd = e.detail.value
var psdLength = this.page.psd.length;
if (8 <= psdLength) {
this.index1 = 1;
this.page.img1 = "../../static/login/finished.png"
} else {
this.index1 = 0;
this.page.img1 = "../../static/login/unfinished.png"
}
var aaa = /[a-z]/.test(e.detail.value);
var bbb = /\d/.test(e.detail.value);
// var ccc = /[A-Z]/.test(e.detail.value);
// if (aaa == true && bbb == true && ccc == true) {
if (aaa == true && bbb == true) {
this.index2 = 1;
this.page.img2 = "../../static/login/finished.png"
} else {
this.index2 = 0;
this.page.img2 = "../../static/login/unfinished.png"
}
},
rePsdText(e) {
this.page.rePsd = e.detail.value
},
show(id) {
let _this = this
switch (id) {
case 1:
this.page.password1 = !this.page.password1
if (this.page.password1) {
this.page.show1 = "../../static/hide-password.png"
} else {
this.page.show1 = "../../static/show-password.png"
}
break;
case 2:
this.page.password2 = !this.page.password2
if (this.page.password2) {
this.page.show2 = "../../static/hide-password.png"
} else {
this.page.show2 = "../../static/show-password.png"
}
break;
}
},
save() {
var psdLength = this.page.psd.length;
var rePsdLength = this.page.rePsd.length;
if (psdLength == 0) {
this.Toast("请输入新的密码");
return;
}
if (rePsdLength == 0) {
this.Toast("请输入确认新密码")
return;
}
if (!this.index1 || !this.index2) {
this.Toast("密码不符合条件")
return;
}
if (rePsdLength == 0) {
this.Toast("请输入确认密码");
return;
}
if (this.page.psd != this.page.rePsd) {
this.Toast("两次输入的密码不一致");
return;
}
this.HTTP({
url: 'aos/v1/aosUser/setLoginPassWord',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserSid: getApp().globalData.sysUserSid,
loginPassWord: this.page.psd,// 新密码
},
loading: true
}).then((res) => {
uni.navigateBack({
delta: 2
})
this.Toast("密码修改成功")
});
}
}
}
</script>
<style lang="scss">
.inputRow {
flex: 1;
display: flex;
margin-left: 30rpx;
margin-right: 50rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
}
.condition {
display: flex;
align-items: center;
margin-left: 80rpx;
margin-top: 50rpx;
.condition_img {
width: 35rpx;
height: 35rpx;
}
.condition_text {
margin-left: 20rpx;
}
.alldata {
margin-left: 20rpx;
color: #2fa1f0;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="密码设置" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<text class="input">{{page.mobile}}</text>
<!-- <input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" /> -->
<SendCodeItem :phoneNum="page.mobile" url="aos/v1/aosUser/sendCodeFromModifyLoginPassWord"
@click="send" ref="codeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="4" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">下一步</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
mobile: '',
code: ''
}
};
},
onLoad(options) {
console.log('=======', options)
console.log('=======', options.mobile)
this.page.mobile = options.mobile
},
methods: {
next() {
var phoneLength = this.page.mobile.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
this.HTTP({
url: 'aos/v1/aosUser/verifyCodeFromModifyLoginPassWord?mobile=' + this.page.mobile +
'&code=' + this.page.code,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('=======', res)
uni.navigateTo({
url: 'ModiPassword'
});
});
},
phoneText(e) {
//手机号
this.page.mobile = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

92
pages/me/ModiRealName.vue Normal file
View File

@@ -0,0 +1,92 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="修改姓名" :useDownScroll="false" :useUpScroll="false">
<view class="outer">
<input class="input" type="text" @input="nameText" placeholder="请输入姓名" :value="data.realName"></input>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="bottom">姓名每个月只能修改一次</text>
</view>
<text class="btn" @click="save()">保存</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
data:{
realName: "",
sysUserInfoSid:""
}
}
},
onLoad(options) {
this.data.realName = options.realName
this.data.sysUserInfoSid = options.sysUserInfoSid
console.log('=======', options)
console.log('=======', options.realName)
},
methods: {
nameText(e) {
this.data.realName = e.detail.value
},
save(){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/modifyRealName',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserInfoSid: _this.data.sysUserInfoSid,
realName: _this.data.realName,
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 1
})
});
}
}
}
</script>
<style lang="scss">
.outer {
display: flex;
margin-top: 20rpx;
flex-direction: column;
padding: 20rpx;
.input {
font-size: 32rpx;
color: #101010;
font-weight: 600;
font-family: sans-serif;
}
.bottom {
margin-top: 30rpx;
font-size: 28rpx;
color: #999;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 20rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

132
pages/me/ModiUserNumber.vue Normal file
View File

@@ -0,0 +1,132 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="修改用户号" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_text">填写新的用户号</text>
<text class="top_text2">用户号长度为6-20位以内且不能重复建议避免包含涉及到个人隐私的信息</text>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 30rpx;"></view>
<view class="inputLay">
<text class="inputText">新的用户号</text>
<input class="input" type="text" @input="nameText" placeholder="请输入新的用户号" :value="loginName"></input>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="btn" @click="verify()">保存</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
loginName: ""
}
},
onLoad(options) {
this.loginName = options.loginName
console.log('=======', options)
console.log('=======', options.loginName)
},
methods: {
nameText(e) {
this.loginName = e.detail.value
console.log(this.loginName)
},
verify() {
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/verifyLoginNameIsExist/' + _this.loginName,
method: 'GET',
paramsType: "FORM",
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
if (200 == res.code)
this.save()
});
},
save() {
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/modifyLoginName',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserSid: getApp().globalData.sysUserSid,
loginName: _this.loginName,
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 1
})
});
}
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: column;
margin-top: 100rpx;
justify-items: center;
align-items: center;
.top_text {
font-size: 40rpx;
color: #101010;
font-weight: 500;
font-family: sans-serif;
}
.top_text2 {
margin-left: 90rpx;
margin-right: 90rpx;
margin-top: 28rpx;
font-size: 32rpx;
color: #101010;
}
}
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 32rpx;
margin-bottom: 32rpx;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

381
pages/me/MyActivity.vue Normal file
View File

@@ -0,0 +1,381 @@
<template>
<TabLayout ref='tabLayout' text="我的活动" :tabTitleData="page.tabTitle" @tabClickItem='clickTab' @downRefresh="down" :isShareIn="page.isShareIn">
<view class="margin-top250"></view>
<view v-for="(item,index) in page.listActivity " :key="index">
<view class="activity-area" @click="clickItem(index)">
<view class="summary">
<view class="name-category">
<text class="name">{{item.name}}</text>
<text class="category">{{item.sportCategoryName}}</text>
</view>
<text class="enroll">报名截止{{item.enrollEndTime}}</text>
</view>
<view class="image-area">
<image class="image" mode="aspectFill" :src="item.firstCoverImage"></image>
<view class="tips">
<image class="icon" src="../../static/renqi.png"></image>
<text class="popularity">{{item.popularity}}</text>
<text :class="{'enroll-state enroll-no':item.enrollState ==1||item.enrollState ==3,'enroll-state enroll-yes':item.enrollState==2}" >{{item.enrollStateName}}</text>
</view>
</view>
<view v-for="(info,pos) in item.listActivityItemsArea " :key="pos">
<view class="item-area">
<view class="item-name-mold-money">
<text class="item-name">{{info.name}}</text>
<text class="mold-money">{{info.enrollMoldName}}/{{info.enrollMoney==0?"免费":info.enrollMoney}}</text>
</view>
<view class="enroll-amount-date">
<text class="amount">报名数{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}{{info.enrollNumbersLimit==0?"不限":info.enrollNumbersLimit+'人'}}</text>
<text class="date">{{info.startTime}}</text>
</view>
<view v-if="item.listActivityItemsArea.length>pos+1" class="line-wide"></view>
</view>
</view>
</view>
</view>
</TabLayout>
<!-- <TabLayout ref='tabLayout' text="我的赛事" :tabTitleData="page.tabTitle" @tabClickItem='clickTab' @downRefresh="down" :isShareIn="page.isShareIn">
<swiper style="min-height: 100vh;" :current="page.currentTab" @change="swiperTab">
<swiper-item v-for="(listItem,listIndex) in data.tabList" :key="listIndex" style="box-sizing: border-box;">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="lower1">
<view :style="{'width': '100%','padding-top': page.paddingTop}">
<loading v-if="page.showLoading[listIndex]" :key='listIndex'></loading>
<view v-for="(item,index) in listItem">
<view v-if="index!=0"
style="width: 100%; height: 10rpx;background-color: #ccc; margin-top: 10rpx;">
</view>
<view>
<view style="display: flex; flex-direction: row; margin-left: 30rpx;margin-top: 30rpx;">
<text
style="color: #101010; font-size: 32rpx;font-weight: 530; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;flex: 1;">{{item.name}}</text>
<text
style="display: flex;align-items: center; margin-right: 30rpx; color: #fff; font-size: 20rpx; background-color: #F2BF5C; padding: 0rpx 15rpx;border-radius: 5rpx;">{{item.sportCategoryName}}</text>
</view>
</view>
<view
style="display: flex;flex-direction: row;margin-top: 15rpx;align-items: center;margin-left: 30rpx;margin-right: 30rpx;">
<text style="font-size: 26rpx;color: #666666;">报名截止</text>
<text style="color: #666666;font-size: 26rpx;">{{item.enrollEndTime}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;">
</view>
<view v-for="(info,pos) in item.listMyActivityItemsArea " :key="pos">
<view
style="display: flex;flex-direction: column;margin-left: 30rpx;margin-right: 30rpx;">
<view style="display: flex;flex-direction: row; align-items: center; margin-top: 10rpx;
padding-top: 10rpx;padding-bottom: 10rpx;">
<text style="color: #101010; font-size: 28rpx; ">{{info.name}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 25rpx;">{{info.enrollMoldName}}</text>
<text
style="color: #919191 ; font-size: 24rpx;margin-left: 15rpx;">{{info.enrollNumbers==0?"暂无":info.enrollNumbersLimit+'人'}}</text>
<image v-if="info.isJoin!=0"
style="width: 20rpx;height: 20rpx;margin-left: 15rpx;"
src="../../static/custom-icon/click.png" mode="aspectFill"></image>
<text
style="color: #919191 ; font-size: 24rpx;flex: 1;text-align: right;">{{info.startTime}}</text>
</view>
<view v-if="item.listMyActivityItemsArea.length>pos+1"
style="width: 100%; height: 2rpx;background-color: #efefef; margin-top: 10rpx;">
</view>
</view>
</view>
</view>
<loading v-if="page.showBottomLoading[listIndex]" :key="'bottom'+listIndex"></loading>
<noData v-if="page.showNoData[listIndex]" :key="'nodata'+listIndex"></noData>
</view>
</scroll-view>
</swiper-item>
</swiper>
</TabLayout> -->
</template>
<script>
const util = require('../../util/util.js');
export default {
data() {
return {
page: {
listActivity:[],
tabTitle: ['全部', '我创建的', '我加入的'],
tabType: [0, 1, 2],
currentTab: 0,
pages: [1, 1, 1, 1], //第几个swiper的第几页
nowLoadingPages: [false, false, false, false], //是否正在加载
paddingTop: '0px',
showLoading: [false, false, false, false],
showBottomLoading: [false, false, false, false],
showNoData: [false, false, false, false],
isShareIn: false,
show: false
},
data: {
tabList: [
[],
[],
[],
[]
]
}
};
},
onLoad(options) {
if (getApp().globalData.isLogin) {
this.page.show = false
} else {
this.page.show = true
}
let _this = this
this.$nextTick()
.then(function() {
_this.page.paddingTop = _this.$refs.tabLayout.getViewPagerTop()
})
let index = options.index
if (this.IsEmpty(index)) {
index = 0;
}
// 加载第一页数据
this.down(index)
this.page.currentTab = index
this.page.isShareIn = ("true" == options.isShareIn ? true : false)
},
onShow() {
// 加载第一页数据
//this.down(this.page.currentTab)
},
methods: {
refresh(page) {
let _this = this
this.HTTP({
url: "aos/v1/aosUser/getMyActivityAreaPagerList",
data: {
current: 1,
size: 10,
params: {
"sysUserSid": getApp().globalData.sysUserSid,
"type": 1,
}
},
paramsType: "JSON",
method: "POST",
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (page.num == 1) {
// 第一页 先清空集合数据
_this.page.listActivity = []
}
// 追加数据
_this.page.listActivity = _this.page.listActivity.concat(res.data.records)
}).catch(function(err) {
_this.$refs.mescrollRef.refreshError()
});
console.log("中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国")
},
clickItem(index) {
let activitySid = this.page.listActivity[index].sid
console.log(activitySid)
uni.navigateTo({
url: '../find/ActivityDetail?activitySid=' + activitySid
});
},
gamesClick(gameSid, type, messageSid, page) {
if (page == 3) {
uni.navigateTo({
url: './WarActivity?linkSid=' + gameSid + '&messageSid=' + messageSid
})
} else {
if (type == 2) {
uni.navigateTo({
url: './PkGameDetailsActivity?gameSid=' + gameSid
})
} else {
uni.navigateTo({
url: './HappyGameDetailsActivity?gameSid=' + gameSid
})
}
}
},
// swiper 滑动
swiperTab: function(e) {
// 模拟tab点击
this.$refs.tabLayout.changeTab(e);
},
getGameType(isGroups) {
if (isGroups) {
return "赛事类型:团体赛";
} else {
return "赛事类型:单打赛";
}
},
getState(startTime, endTime) {
let l = this.CurrentMillions()
let state = ''
if (startTime > l) {
state = "比赛状态:比赛未开始";
} else if (startTime < l && endTime > l) {
state = "比赛状态:比赛进行中";
} else if (endTime < l) {
state = "比赛状态:比赛结束";
}
return state;
},
getTime(time) {
return '比赛时间:' + this.TimeFormat(time, "yyyy-MM-dd HH:mm");
},
clickTab(index) {
this.page.currentTab = index
// 每次切换时都重新加载页面
this.down(index)
},
down(index) {
// 下拉刷新请求 并更改数据
let _this = this
this.data.tabList[index] = []
//二维数组,开启强制渲染
_this.$forceUpdate()
// 初始化当前的页数
this.page.pages[index] = 1
// 当前页数的加载状态
this.page.nowLoadingPages[index] = true
// 只要切换页面就显示
this.page.showLoading[index] = true
this.page.showNoData[index] = false
this.HTTP({
url: "aos/v1/aosUser/getMyActivityAreaPagerList",
data: {
current: this.page.pages[index],
size: 10,
params: {
"sysUserSid": getApp().globalData.sysUserSid,
"type": _this.page.tabType[index],
}
},
paramsType: "JSON",
method: "POST",
}).then((res) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
// 填充数据
_this.data.tabList[index] = res.data.records
_this.page.listActivity = res.data.records
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = res.data.records.length == 0
}, (err) => {
// 当前页数的加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
// 关闭loading
_this.page.showLoading[index] = false
_this.page.showNoData[index] = false
})
},
request(index, pagerStart) {
let _this = this
this.HTTP({
url: "aos/v1/activityManagement/getMyActivityAreaPagerList",
data: {
current: pagerStart,
size: 10,
params: {
"sysUserSid": getApp().globalData.memberSid,
"type": _this.page.tabType[index],
}
},
paramsType: "JSON",
method: "POST",
}).then((res) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
_this.page.showBottomLoading[this.page.currentTab] = false
if (res.data.records.length == 0) {
_this.Toast('没有更多数据了')
//二维数组,开启强制渲染
_this.$forceUpdate()
return
}
_this.data.tabList[index] = _this.data.tabList[index].concat(res.data.records)
//二维数组,开启强制渲染
_this.$forceUpdate()
}, (err) => {
// 重置加载状态
_this.page.nowLoadingPages[index] = false
_this.$refs.tabLayout.downRefresh()
//二维数组,开启强制渲染
_this.$forceUpdate()
})
},
// 加载更多 util.throttle为防抖函数
lower1: util.throttle(function(e) {
if (this.page.nowLoadingPages[this.page.currentTab]) {
// 正在加载 拦截请求
return
}
this.page.showBottomLoading[this.page.currentTab] = true
//二维数组,开启强制渲染
this.$forceUpdate()
// 更改请求的页数
this.page.pages[this.page.currentTab]++
// 正在加载
this.page.nowLoadingPages[this.page.currentTab] = true
// 请求数据
this.request(this.page.currentTab, this.page.pages[this.page.currentTab])
}, 300)
}
}
</script>
<style lang="scss">
@import url("../../static/columns.css");
.margin-top250{
margin-top:250rpx;
}
</style>

237
pages/me/MyTeam.vue Normal file
View File

@@ -0,0 +1,237 @@
<template>
<RefreshView id="mescrollRef" ref="mescrollRef" text="我的队伍" :useDownScroll="false" :useUpScroll="false">
<view class="list" v-for="(teamItem,index) in page.list " :key="index">
<view class="team">
<view class="info">
<view >
<text class="team-name">{{teamItem.name}}</text>
</view>
<view class="label-list">
<text class="label">{{teamItem.adName}}</text>
<text class="label">{{teamItem.sportCategoryName}}</text>
<text class="label">{{teamItem.memberNumber}}/{{teamItem.memberNumberLimit}}</text>
</view>
</view>
<scroll-view class="scorll" scroll-x="true">
<view v-for="(memberItem,pos) in teamItem.listTeamMemberArea" :key="pos" class="user-info-list" scroll-x="true">
<view class="user-info margin-left20">
<image class="head-image" :src="memberItem.headImage" mode="scaleToFill"></image>
<text class="real-name">{{memberItem.realName}}</text>
</view>
</view>
</scroll-view>
<view class="operation" v-if="teamItem.isAdmin == 1">
<text @click="toExamineMember(teamItem.sid)" >申请入队({{teamItem.applyNumber}})</text>
<text @click="toDeleteMember(teamItem.sid)" >成员管理</text>
<text @click="disbandTeam(teamItem.sid)" >解散队伍</text>
<!-- <text @click="invitation(item.sid)">邀请成员</text> -->
</view>
</view>
</view>
<view class="team-join-nav">
<view class="left">
<text class="font-tips">进入队伍后可报名发布的团体活动</text>
<text class="font-explain margin-top20">点击右侧按钮可进行创建及申请加入</text>
</view>
<view class="right">
<button @click="toMyTeamCreate()">创建队伍</button>
<button @click="toWaitJoin()" class="margin-top20">加入队伍</button>
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isAdmin:0,
page: {
state: "",
current:1,
menuList: [{
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部运动项目',
'value': ""
}]
}
],
list:[]
},
}
},
onShow() {
this.refresh()
},
methods: {
refresh() {
let _this = this
this.HTTP({
url: 'aos/v1/aosUser/getMyTeamAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: _this.page.current,
size: 10,
params: {
sysUserSid: getApp().globalData.sysUserSid,
type: 0,
}
},
loading: true
})
.then((res) => {
_this.page.list = res.data.records
// 追加数据.concat
console.log("我的队伍:",_this.page.list )
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: '../find/DetailActivity?raceSid=' + raceSid
});
},
result(val) {
console.log("aaa", val);
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
} else {
this.page.state = val.state;
this.list = []
}
},
isShow(sid) {
if (!this.IsEmpty(sid)) {
return true
} else {
return false
}
},
disbandTeam(teamSid){
let _this = this
uni.showModal({
title: '提示',
content: '您确定要解算队伍吗?',
success: function(res) {
if (res.confirm) {
//这里是点击了确定以后
_this.HTTP({
url: 'aos/v1/aosUser/disbandTeam',
paramsType: "FORM",
method: "PUT",
data: {
teamSid:teamSid,
sysUserSid: getApp().globalData.sysUserSid,
},
loading: true
})
.then((res) => {
console.log("res", res);
console.log("teamSid", teamSid);
console.log("sysUserSid", getApp().globalData.sysUserSid);
_this.refresh()
// uni.navigateBack({
// delta: 0
// })
});
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}})
},
toExamineMember(sid) {
// 查看申请
uni.navigateTo({
url: 'MemberManage?sid=' + sid+"&type="+0
})
},
toDeleteMember(sid) {
// 查看申请
uni.navigateTo({
url: 'MemberManage?sid=' + sid+"&type="+1
})
},
manage(sid) {
// 管理
let newList = []
newList.push("修改信息")
newList.push("删除队员")
newList.push("解散队伍")
uni.showActionSheet({
itemList: newList,
success: function(res) {
switch (res.tapIndex) {
case 0:
console.log("res==修改")
break;
case 1:
// 查看申请
uni.navigateTo({
url: 'examineMember?sid=' + sid+"&type="+1
})
break;
case 2:
uni.showModal({
title: '提示',
content: '是否要解算队伍吗',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
console.log("res==集散")
break;
}
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
},
detail(sid) {
// 活动详情
uni.navigateTo({
url: '../index/DetailActivity?raceSid=' + sid
})
},
toMyTeamCreate(){
uni.navigateTo({
url: 'MyTeamCreate'
})
},
toWaitJoin(){
uni.navigateTo({
url: '../team/WaitJoin'
})
}
}
}
</script>
<style lang="scss">
@import url("../../static/columns.css");
.show_view {
display: inline;
}
.hide_view {
display: none;
}
</style>

290
pages/me/MyTeamCreate.vue Normal file
View File

@@ -0,0 +1,290 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" pageBg="#F1F2F5" text="创建队伍" :useDownScroll="false"
:useUpScroll="false">
<view class="item">
<view class="view1">
<view class="view1_top">
<text class="view1_top_text">队伍名称</text>
<input class="view1_top_input" type="text" @input="txtName" placeholder="请输入队伍名称":value="info.name" />
</view>
<view
style="width: 100%;height: 5rpx;background-color: #f5f4f9;margin-top: 20rpx;margin-bottom: 20rpx;">
</view>
<textarea class="slogan" auto-height="true" style="min-height: 80rpx;" @input="txtWatchWord"
placeholder="请输入队伍口号(点击编辑)" :value="info.watchWord" />
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">人数限制</text>
<textarea class="slogan" auto-height="true" style="min-height: 80rpx;" @input="txtMemberNumberLimit" :value="info.memberNumberLimit" />
<text class="right_text1" ></text>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">运动项目标签</text>
<view style="display: flex; flex: 1;justify-content: flex-end;margin-right: 15rpx;">
<fui-dropdown-menu :right="1" :minWidth="300" :size="30" selectedColor="#465CFF"
:options="optSportCategory" @click="typeItemClick" @close="typeClose" ref="ddmtype">
<view class="fui-filter__item" @tap="filterTap()">
<text>{{type}}</text>
<image style="width: 22rpx;height: 22rpx; margin-left: 15rpx;"
src="../../static/event-icon/xia.png" mode="aspectFit" class="fui-filter__icon"
:class="{'fui-icon__ani':typeShow}">
</image>
</view>
</fui-dropdown-menu>
</view>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">是否公开招募队员</text>
<switch color="#007AFF" class="tui-fr" :checked="radioInviteRecruitType" @change="radioInviteRecruitTypeChange" >
</switch>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">同时兼队员</text>
<switch color="#007AFF" class="tui-fr" :checked="radioConcurrentlyMember" @change="radioConcurrentlyMemberChange" >
</switch>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">所在市</text>
<view @click="selectCity()">
<text class="right_text2">{{page.city}}</text>
<image style="width: 22rpx;height: 22rpx; margin-left: 10rpx;"
src="../../static/img/public/more.png" mode="aspectFit" class="fui-filter__icon">
</view>
</view>
</view>
<text class="btn" @click="save()">创建</text>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
info:{
sid:"",
name:"",
watchWord:"",
memberNumberLimit:6,
sportCategorySid:"b9e0fce3-2cd0-4090-8bb4-b50e4f1b23cc",
sportCategoryName:"乒乓球",
inviteRecruitType:1,
concurrentlyMember:1,
adCode:this.ReadPreference("find_city_code").slice(0, -2),
adName:this.ReadPreference("find_city"),
memberNumber:0,
sysUserSid:""
},
page: {
'adName': this.ReadPreference("find_city"),
'adCode': this.ReadPreference("find_city_code").slice(0, -2),
},
data:{},
optSportCategory: [{
text: '乒乓球',
value: 'b9e0fce3-2cd0-4090-8bb4-b50e4f1b23cc'
}, {
text: '羽毛球',
value: '5b1142c2-383f-47b9-a4bb-2eb456d826db'
}, {
text: '户外',
value: '325fb525-618c-4163-99a3-1167c4444444'
}, {
text: '骑行',
value: '325fb525-618c-4163-99a3-1167ccecd6ed'
}],
typeShow: false,
type: "乒乓球",
radioInviteRecruitType: true,
radioConcurrentlyMember:true,
userNickName:"",
}
},
onLoad(options) {
this.info.sysUserSid = getApp().globalData.sysUserSid
if (this.IsEmpty(this.sysUserSid)) {
uni.navigateTo({
url: '../user/login'
})
return
}
// 获取用户昵称
this.HTTP({
url: 'aos/v1/aosUser/getUserNickName/' + this.info.sysUserSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
// 球队名称赋默认值为“昵称”+“队”
this.info.name = res.data + "队"
});
},
methods: {
txtName(e) {
this.info.name = e.detail.value
},
txtWatchWord(e) {
this.info.watchWord = e.detail.value
},
txtMemberNumberLimit(e) {
this.info.memberNumberLimit = e.detail.value
},
radioInviteRecruitTypeChange(e){
this.radioInviteRecruitType = !this.radioInviteRecruitType
},
radioConcurrentlyMemberChange(e){
this.radioConcurrentlyMember = !this.radioConcurrentlyMember
this.info.concurrentlyMember = this.radioConcurrentlyMember == true ? 0:1
},
save(){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/saveMyTeam',
method: 'POST',
paramsType: "JSON",
data: _this.info,
toast: true,
loading: true
})
.then((res) => {
console.log('测试', res)
let teamSid = res.data
let sysUserSid = getApp().globalData.sysUserSid
console.log('是否参赛', _this.radioConcurrentlyMember)
if (_this.radioConcurrentlyMember){
_this.HTTP({
url: 'aos/v1/aosUser/teamHeaderJoinTeam',
method: 'POST',
paramsType: "JSON",
data: {
teamSid:teamSid,
memberSid:sysUserSid
},
toast: true,
loading: true
})
}
// 回退
uni.navigateBack({
delta: 1
})
});
},
filterTap() {
this.$refs.ddmtype.show()
this.typeShow = true;
},
typeItemClick(e) {
this.type = e.text
this.info.sportCategorySid = e.value
this.info.sportCategoryName = e.text
console.log(this.type)
this.typeClose()
},
typeClose() {
this.typeShow = false;
},
switch1Change: function(e) {
this.switch1Checked = !this.switch1Checked;
console.log(`switch1Change样式点击后是否选中`, this.switch1Checked)
},
selectCity() {
uni.navigateTo({
url: "../../pages/city/CitySelectActivity?city=" + this.page.city +
"&code=" + this.page.adCode
})
}
}
}
</script>
<style lang="scss">
.item {
display: flex;
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 36rpx;
}
.view1 {
display: flex;
flex-direction: column;
width: 100%;
.view1_top {
display: flex;
flex-direction: row;
.view1_top_text {
font-size: 32rpx;
color: #898989;
}
.view1_top_input {
width: 70%;
font-size: 32rpx;
color: #101010;
margin-left: 15rpx;
}
}
.slogan {
width: 100%;
padding-left: 10rpx;
padding-right: 10rpx;
}
}
.view2 {
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
.lift_text {
flex: 1;
font-size: 28rpx;
color: #898989;
}
.right_text1 {
font-size: 28rpx;
color: #BEBEBE;
}
.right_text2 {
font-size: 28rpx;
color: #101010;
}
.tui-fr {
zoom: .7
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 30rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

206
pages/me/PersonalCenter.vue Normal file
View File

@@ -0,0 +1,206 @@
<template>
<view>
<RefreshView ref="mescrollRef" :pageBg="EDEDED" text="" :useUpScroll="false" :useDownScroll="false" text="个人中心">
<view class="top" @click="toBaseInfo()">
<image class="touxiang" :src="page.headImage" mode="aspectFill"></image>
<view class="top-right">
<text class="name" >{{page.userNickName}}</text>
<view style="display: flex;align-items: center;margin-right: 30rpx; margin-top: 35rpx;"
v-if="!this.IsEmpty(page.loginName)">
<text class="name2" style="flex: 1;">{{page.loginName}}</text>
<image src="../../static/img/public/more.png" style="width: 35rpx;height: 35rpx;"></image>
</view>
</view>
</view>
<view class="line-wide"></view>
<view @click="toMyGamesActivity()" class="menu-item">
<image class = "icon" src="../../static/img/personal/game.png" ></image>
<text class="text">我的活动</text>
<text class="explain">{{page.participateInActivityExplain}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-wide"></view>
<view @click="toMyTeam()" class="menu-item">
<image class = "icon" src="../../static/img/personal/game.png" ></image>
<text class="text">我的队伍</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-wide"></view>
<view @click="toRealInfo()" class="menu-item">
<image class = "icon" src="../../static/img/personal/about.png" ></image>
<text class="text">实名信息</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<view @click="toSetup()" class="menu-item">
<image class = "icon" src="../../static/img/personal/shezhi.png" ></image>
<text class="text">设置</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
userNickName: "微信登录/注册",
headImage: "http://www.ourpyw.com/upload//touxiang/default_tx.jpg",
isRealAttestation: "",
participateInActivityExplain: "",
realAttestationExplain: "认证后可发布活动。未认证",
loginName: ""
},
parameter:{
sysUserInfoSid:""
}
}
},
methods: {
toBaseInfo(options) {
// 信息中心
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'BaseInfo?sysUserSid=' + getApp().globalData.sysUserSid
})
}
else{
// 调用登陆后刷新当前页,参见麦当劳小程序
uni.navigateTo({
url: 'AuthLogin',
})
}
return;
},
toMyGamesActivity(){
// 我的活动
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: '../me/MyActivity'
})
}
},
toMyTeam(){
// 我的队伍
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: "MyTeam"
})
}
},
toRealInfo(){
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'RealInfo?sysUserSid=' + getApp().globalData.sysUserSid
})
}
},
toSetup(){
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'Setup'
})
}
},
refresh() {
if (getApp().globalData.isDebug) {
console.log('用户Sid', getApp().globalData.sysUserSid)
console.log('用户是否登陆', getApp().globalData.isLogin)
}
let _this = this
if (!getApp().globalData.isLogin) {
_this.page.userNickName = "微信登录/注册",
_this.page.headImage = "http://www.ourpyw.com/upload//touxiang/default_tx.jpg",
_this.page.isRealAttestation = "",
_this.page.participateInActivityExplain = "",
_this.page.realAttestationExplain = "认证后可发布活动。未认证",
_this.page.loginName = ""
return;
}
_this.HTTP({
url: 'aos/v1/aosUser/getMyPage/' + getApp().globalData.sysUserSid,
method: 'GET',
data: {},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("我的页面初始化", res);
if (res.code == 200) {
_this.page = res.data
_this.page.loginName = "用户号:" + res.data.loginName
_this.parameter.sysUserInfoSid = res.data.sysUserInfoSid
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished()
}
}, (err) => {
// 失败重置刷新状态
_this.$refs.mescrollRef.refreshError()
});;
},
},
onShow() {
this.refresh()
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
.top {
display: flex;
flex-direction: row;
padding-bottom: 35rpx;
padding-top: 55rpx;
width: 100%;
background-color: #FFFFFF;
box-sizing: border-box;
.touxiang {
width: 150rpx;
height: 150rpx;
border-radius: 10%;
margin-left: 35rpx;
margin-right: 35rpx;
flex-shrink: 0;
}
.top-right {
display: flex;
flex-direction: column;
flex: 1;
box-sizing: border-box;
.name {
font-family: sans-serif;
font-weight: 500;
color: #101010;
font-size: 40rpx;
}
.name2 {
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
word-break: break-all;
color: #828282;
font-size: 28rpx;
}
}
}
.user-item-bg {
background-color: #FFFFFF;
margin-top: 20rpx;
}
</style>

226
pages/me/RealInfo.vue Normal file
View File

@@ -0,0 +1,226 @@
<template>
<RefreshView ref="mescrollRef" :pageBg="EDEDED" :hasBack="true" text="实名信息" :useDownScroll="false" :useUpScroll="false" >
<view @click="toModiRealName()" class="menu-item">
<text class="text">姓名</text>
<text class="explain">{{page.realName}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<view @click="clickSex()" class="menu-item">
<text class="text">性别</text>
<text class="explain">{{page.sex}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<uni-datetime-picker style="flex: 1;" type="date" :value="page.birthday" :start="startDate" :end="endData"
@change="modiBirthday()">
<view class="menu-item">
<text class="text">生日</text>
<text class="explain">{{this.IsEmpty(page.birthday) ?"请选择生日":page.birthday}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
</uni-datetime-picker>
<view class="line-thin"></view>
<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion">
<view class="menu-item">
<text class="text">地区</text>
<text class="explain">{{this.IsEmpty(page.adName) ?"请选择地区":page.adName}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
</pick-regions>
</RefreshView>
</template>
<script>
import pickRegions from '@/components/pick-regions/pick-regions.vue'
export default {
components: {
pickRegions
},
created() {
this.startDate = this.TimeFormat(this.CurrentMillions() - 100 * 365 * 24 * 60 * 60 * 1000);
this.endData = this.TimeFormat(this.CurrentMillions() );
},
data() {
return {
region: [],
defaultRegion: ['北京市', '市辖区', '东城区'],
defaultRegionCode: '110101',
region_sid_path: "",
address_path: "北京市/市辖区/东城区",
startDate: "1921-01-01",
endData: "",
pickerDate: "",
page: {
sid:"",
realName:"",
sex:"男",
birthday:"",
mobile:"",
adCode:"110101",
adName:"北京市/市辖区/东城区"
},
contorl:{
listSex:["男","女"]
},
}
},
onLoad(options){
this.page.sysUserSid = options.sysUserSid
},
onShow() {
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/getRealInfoBySysUserSid/' + getApp().globalData.sysUserSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('=======', res)
_this.page = res.data
});
},
methods: {
clickSex() {
let _this = this;
uni.showActionSheet({
itemList: this.contorl.listSex,
success: function(res) {
_this.selectSex(res.tapIndex + 1)
}
});
},
selectSex(id) {
let _this = this
switch (id) {
case 1:
this.page.sex = '男'
_this.HTTP({
url: 'aos/v1/aosUser/realInfoAttestation',
method: 'POST',
paramsType: "JSON",
data: {
sid: _this.page.sid,
sex: 1
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
break;
case 2:
this.page.sex = '女'
_this.HTTP({
url: 'aos/v1/aosUser/realInfoAttestation',
method: 'POST',
paramsType: "JSON",
data: {
sid: _this.page.sid,
sex: 2
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
break;
case 3:
break
}
},
modiBirthday(e) {
let _this = this
_this.page.birthday = e
_this.HTTP({
url: 'aos/v1/aosUser/realInfoAttestation',
method: 'POST',
paramsType: "JSON",
data: {
sid: _this.page.sid,
birthday: _this.page.birthday
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
console.log("生日", _this.page.birthday);
return;
},
toModiRealName(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'ModiRealName?realName=' + _this.page.realName + '&sysUserInfoSid=' + _this.page.sid
})
}
},
realInfoAttestation(data){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUserManagement/attestation',
method: 'POST',
paramsType: "JSON",
data: data,
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
},
modiSex(){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/realInfoAttestation',
method: 'POST',
paramsType: "JSON",
data: {
sid: _this.page.sid,
sex: _this.page.sex == "女" ? "2" : "1"
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
},
// 获取选择的地区
handleGetRegion(region) {
let _this = this
_this.region = region
let code = _this.region.map(item => item.code)
let name = _this.region.map(item => item.name)
console.log('地区代码', code)
console.log('地区名称', name)
_this.page.adCode = code[2]
_this.page.adName = name[0] + " " + name[1] + " " + name[2]
_this.HTTP({
url: 'aos/v1/aosUser/realInfoAttestation',
method: 'POST',
paramsType: "JSON",
data: {
sid: _this.page.sid,
adCode: _this.page.adCode,
adName: _this.page.adName
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
});
return
}
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
</style>

150
pages/me/Setup.vue Normal file
View File

@@ -0,0 +1,150 @@
<template>
<view >
<RefreshView ref="mescrollRef" :pageBg="EDEDED" :hasBack="true" text="设置" :useDownScroll="false"
:useUpScroll="false">
<view class="menu-item" @click="toModiUserNumber()">
<text class="text">用户号</text>
<text class="explain">{{page.loginName}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-thin"></view>
<view class="menu-item" @click="toModiMobileInputNew()">
<text class="text">手机号</text>
<text class="explain">{{page.mobile}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<view class="line-wide"></view>
<view class="menu-item" @click="toModiPasswordVerify()">
<text class="text">密码设置</text>
<image class = "more" src="../../static/img/public/more.png"></image>
</view>
<view class="line-wide"></view>
<view class="menu-item" @click="clearCache()">
<text class="text">清除缓存</text>
<text class="explain">{{size}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
<button class="margin-top70" @click="exitLogin()">退出登录</button>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
mobile: "",
loginName: "",
},
size: ""
}
},
onLoad() {
try {
const res = wx.getStorageInfoSync()
console.log("11110",res)
console.log(res.keys)
console.log(res.currentSize)
console.log(res.limitSize)
this.size = res.currentSize + "K"
} catch (e) {
//Do something when catch error
}
},
methods: {
// 修改用户号
toModiUserNumber(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'ModiUserNumber?loginName=' + _this.page.loginName
})
}
},
toModiMobileInputNew(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'ModiMobileInputNew'
})
}
},
toModiPasswordVerify(){
let _this = this
if (getApp().globalData.isLogin ) {
uni.navigateTo({
url: 'ModiPasswordVerify?mobile=' + _this.page.mobile
})
}
},
clearCache()
{
// 清除缓存
let _this = this
uni.showModal({
title: '提示',
content: '是否清除全部缓存',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
wx.clearStorage()
_this.size = ""
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
},
exitLogin() {
// 退出登录
let _this = this
uni.showModal({
title: '提示',
content: '是否退出登录',
success: function(res) {
if (res.confirm) {
_this.HTTP({
url: 'aos/v1/aosUser/exitLogin',
method: 'GET',
data:{
"sysUserSid": getApp().globalData.sysUserSid,
},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('=======', res)
});
// 接口退出登陆isLogin设置为0
getApp().globalData.isLogin = false
getApp().globalData.sysUserSid = null
uni.setStorageSync("isLogin", false);
uni.setStorageSync("sysUserSid", null);
_this.Back()
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
}
},
onShow() {
console.log("初始化")
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/getSetup/' + getApp().globalData.sysUserSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('=======', res)
_this.page = res.data
});
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
activityBaseInfo: {
disclaimer: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
let t = option.disclaimer == "undefined" ?"":option.disclaimer;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
console.log("11111111》》》》"+e)
this.Upload({
url: 'activity/uploadGameImg',
filePath: e,
key: "file",
loading: true
}).then((res) => {
this.$refs.rich.insertUrlImage(res.data)
}, (err) => {
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '').replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.activityBaseInfo.disclaimer = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.activityBaseInfo)
},
}
};
</script>
<style lang="less">
.bottom {
display: flex;
height: 800rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
flex-direction: column;
border: 1rpx solid #C8C7CC;
padding: 30rpx 20rpx;
background: #FDFBFB;
border-radius: 8rpx;
.input {
margin-top: 10rpx;
white-space: pre-line;
font-size: 30rpx;
color: #898989;
height: 500rpx;
line-height: 50rpx;
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="编辑内容" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<RichTextEditor ref="rich" placeholder="请输入...." :html="htmlStr" :removeHeight="topBarHeight"
@insertPic="insert">
</RichTextEditor>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
topBarHeight: '0px',
htmlStr: "",
data: {
introduction: "",
}
};
},
onLoad: function(option) {
// this.activityBaseInfo.introduction = option.introduction;
console.log("options>>>", option)
// let t = JSON.parse(decodeURIComponent(option.introduction));
// this.htmlStr = t.html
let t = option.introduction == "undefined" ?"":option.introduction;
this.htmlStr = t
},
created() {
this.topBarHeight = getApp().globalData.totalHeightPx
},
mounted() {
},
methods: {
insert(e) {
this.chooseUpload(9)
.then((res) => {
console.log("url>>>>", res);
this.$refs.rich.insertUrlImage(res.urls)
})
},
getHtml() {
return this.$refs.rich.getHtml();
},
rightBtnClick() {
console.log(this.getHtml())
let reg1 = new RegExp('<p>', 'g') //g代表全部
let reg2 = new RegExp('</p>', 'g') //g代表全部
let reg3 = new RegExp('<br>', 'g') //g代表全部
let reg4 = new RegExp('"', 'g') //g代表全部
let newMsg = JSON.stringify(this.getHtml()).replace(reg1, '').replace(reg2, '\n').replace(reg3, '')
.replace(reg4, '');
// let articleData = this.getHtml().replace('</p>*$<p>', /\n/g)
console.log(newMsg)
this.data.introduction = newMsg
// this.data.activityBaseInfo.introduction = this.getHtml()
this.SetResult(this.data)
},
}
};
</script>
<style>
</style>

View File

@@ -0,0 +1,95 @@
<template>
<RefreshView ref="mescrollRef" text="报名条件" :useDownScroll="false" :useUpScroll="false" :useTitleLeftBtn="1" titleLeftBtnSource="设置" @leftBtn='setup'>
<view class="row">
<text class="field">性别限制</text>
<radio-group @change="radioSexChange($event)">
<radio :checked="data.activityItemCondition.sex==0" :value="0" >不限</radio>
<radio :checked="data.activityItemCondition.sex==1" :value="1" style="margin-left: 80rpx;"></radio>
<radio :checked="data.activityItemCondition.sex==2" :value="2" style="margin-left: 80rpx;"></radio>
</radio-group>
</view>
<view class="line-thin"></view>
<picker mode="multiSelector" :range="page.age" @change="bindAgeChange($event,index)">
<view class="row">
<text class="field">年龄段</text>
<text class="explain">{{page.ageRangeText}}</text>
<image class = "more" src="../../static/img/public/more.png" ></image>
</view>
</picker>
</RefreshView>
</template>
<script>
export default {
data() {
return {
data:{
activityItemCondition:{
sex:0,
minAge:0,
maxAge:0
}
},
page:{
age:[
[],
[]
]
},
ageRangeText:""
}
},
onLoad(options){
let activityItemCondition = JSON.parse(options.activityItemCondition)
let _this = this
if (activityItemCondition != undefined){
_this.data.activityItemCondition.sex = activityItemCondition.sex == undefined ?0 :activityItemCondition.sex;
_this.data.activityItemCondition.minAge = activityItemCondition.minAge == undefined ?0:activityItemCondition.minAge;
_this.data.activityItemCondition.maxAge = activityItemCondition.maxAge == undefined ?0:activityItemCondition.maxAge;
}
// 设置10岁到100岁的数组
_this.page.age[0].push("不限")
_this.page.age[1].push("不限")
for(let i =10; i<=100; i++){
_this.page.age[0].push(i + "岁");
_this.page.age[1].push(i + "岁");
}
// 年龄段范围文字赋值
this.page.ageRangeText = this.convertAgeRangeText(this.data.activityItemCondition.minAge,this.data.activityItemCondition.maxAge)
},
methods:{
radioSexChange(e) {
let _this = this
_this.data.activityItemCondition.sex = e.detail.value
},
bindAgeChange(e,index){
console.log("--------------------------",JSON.stringify(e.detail.value[0]))
if (e.detail.value[0] == 0){this.data.activityItemCondition.minAge = 0}else{this.data.activityItemCondition.minAge = e.detail.value[0] + 9}
if (e.detail.value[1] == 0){this.data.activityItemCondition.maxAge = 0}else{this.data.activityItemCondition.maxAge = e.detail.value[1] + 9}
// this.page.ageRange = this.page.age[0][e.detail.value[0]] + " 到 " + this.page.age[1][e.detail.value[1]]
this.page.ageRangeText = this.convertAgeRangeText(this.data.activityItemCondition.minAge,this.data.activityItemCondition.maxAge)
},
setup(){
this.data.activityItemCondition = JSON.stringify(this.data.activityItemCondition)
this.SetResult(this.data)
},
convertAgeRangeText(minAge,maxAge){
if(minAge == 0 && maxAge == 0 ){
return "不限年龄"
}
if(minAge == 0 && maxAge > 0 ){
return maxAge + "岁以下"
}
if(minAge > 0 && maxAge == 0 ){
return minAge + "岁以上"
}
if(minAge > 0 && maxAge > 0 ){
return minAge + "岁 至 " + maxAge +"岁"
}
}
}
}
</script>
<style>
@import url("../../static/master.css");
</style>

View File

@@ -0,0 +1,89 @@
<template>
<RefreshView ref="mescrollRef" text="报名必填项" :useDownScroll="false" :useUpScroll="false" :useTitleLeftBtn="1" titleLeftBtnSource="保存" @leftBtn='save'>
<view class="row">
<text class="field">真实姓名</text>
<checkbox class="checkbox" :checked="data.onRealName" @click="checkboxChange('onRealName')"> </checkbox>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">性别</text>
<checkbox-group class="item_check" >
<checkbox class="checkbox" :checked="data.onSex" @click="checkboxChange('onSex')"></checkbox>
</checkbox-group>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">生日</text>
<checkbox class="checkbox" :checked="data.onBirthday" @click="checkboxChange('onBirthday')"></checkbox>
</view>
<view class="line-thin"></view>
<view class="row">
<text class="field">地区</text>
<checkbox class="checkbox" :checked="data.onAdCode" @click="checkboxChange('onAdCode')"></checkbox>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
data:{
onRealName:true,
onSex:true,
onBirthday:true,
onAdCode:false
}
}
},
onLoad(options){
this.data.onRealName = options.onRealName == 1?true:false
this.data.onSex = options.onSex == 1?true:false
this.data.onBirthday = options.onBirthday == 1?true:false
this.data.onAdCode = options.onAdCode == 1?true:false
},
methods: {
checkboxChange(index) {
let _this = this
if ( index == "onRealName" ){
this.data.onRealName = !this.data.onRealName
}
if ( index == "onSex"){
this.data.onSex = !this.data.onSex
}
if ( index == "onBirthday"){
this.data.onBirthday = !this.data.onBirthday
}
if ( index == "onAdCode"){
this.data.onAdCode = !this.data.onAdCode
}
},
save(){
console.log("报名必填项",this.data)
this.data.onRealName = this.data.onRealName == true?1:0
this.data.onSex = this.data.onSex == true?1:0
this.data.onBirthday = this.data.onBirthday == true?1:0
this.data.onAdCode = this.data.onAdCode == true?1:0
this.SetResult(this.data)
// let _this = this
// _this.HTTP({
// url: 'aos/v1/enrollRequired/saveEnrollRequired',
// method: 'POST',
// data: _this.data,
// paramsType: "JSON",
// loading: true
// })
// .then((res) => {
// uni.navigateBack({
// delta: 1
// })
// });
}
}
}
</script>
<style lang="scss">
@import url("../../static/master.css");
</style>

View File

@@ -0,0 +1,128 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="人数限制" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="保存" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>人数限制</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="number" @input="enrollNumbersLimitText" placeholder="请输入人数限制"
:value="result.enrollNumbersLimit"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为不限制</text>
</view>
</view>
<view style="display: flex;flex-direction: column;margin-top: 50rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text>报名费用</text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20rpx;">
<view style="border: 2px #F1F1F1 solid;display: flex; ">
<input class="right" type="digit" @input="enrollMoneyText" placeholder="请输入报名费用"
:value="result.enrollMoney"></input>
</view>
<text
style="display: flex;flex: 1; justify-content: flex-end; font-size: 30rpx;color: #FF0000;">0为免费</text>
</view>
</view>
<!-- <radio-group v-if="!this.IsEmpty(result.enrollMoney)" style="margin-top: 50rpx; display: flex;flex-direction: row; " @change="radioChange">
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked1">线上收费</radio>
<radio style="display: flex;flex: 1;justify-content: center;" :checked="result.checked2">线下收费</radio>
</radio-group>
-->
</RefreshView>
</template>
<script>
export default {
data() {
return {
result: {
enrollNumbersLimit: "0",
enrollMoney: "0",
// type: "",
// checked1: "",
// checked2: "",
},
}
},
onLoad(options) {
this.result.enrollNumbersLimit = options.enrollNumbersLimit
this.result.enrollMoney = options.enrollMoney
// this.result.type = options.type
// if ("线上收费" == this.result.type) {
// this.result.checked1 = true
// this.result.checked2 = false
// } else {
// this.result.checked1 = false
// this.result.checked2 = true
// }
console.log("1===" + this.result.index)
console.log("2===" + this.result.enrollNumbersLimit)
console.log("3===" + this.result.enrollMoney)
// console.log("4===" + this.result.type)
},
methods: {
enrollNumbersLimitText(e) {
console.log("1===" + e.detail.value)
this.result.enrollNumbersLimit = e.detail.value
},
enrollMoneyText(e) {
console.log("2===" + e.detail.value)
this.result.enrollMoney = e.detail.value
},
// radioChange(e) {
// this.result.checked1 = !this.result.checked1
// this.result.checked2 = !this.result.checked2
// console.log('radio发生change事件携带value值为', this.result.checked1)
// console.log('radio发生change事件携带value值为', this.result.checked2)
// if (this.result.checked1) {
// this.result.type = "线上收费"
// } else {
// this.result.type = "线下收费"
// }
// console.log('type===》:', this.result.type)
// },
rightBtnClick() {
if (this.IsEmpty(this.result.enrollNumbersLimit)) {
this.result.enrollNumbersLimit = 0
}
let o = parseInt(this.result.enrollNumbersLimit)
if (isNaN(o)) {
this.Toast("输入的格式有误")
return
}
if (this.IsEmpty(this.result.enrollMoney)) {
this.result.enrollMoney = 0
}
let s = parseInt(this.result.enrollMoney)
if (isNaN(s)) {
this.Toast("输入的格式有误")
return
}
this.SetResult(this.result)
}
}
}
</script>
<style lang="scss">
.right {
padding: 20rpx;
flex: 1;
color: #555555;
font-size: 30rpx;
}
</style>

324
pages/publish/Publish.vue Normal file
View File

@@ -0,0 +1,324 @@
<template>
<view>
<RefreshView ref="mescrollRef" text="首页" :useDownScroll="false" :useUpScroll="false" pageBg="#F1F2F5">
<view style="display: flex;flex-direction: column;align-items: center;width: 100vw;">
<view style="display: flex;flex-direction: column;width: 100vw;align-items: center;background-color: #2fa1f0;padding-top: 80rpx;
border-bottom-right-radius: 30rpx;border-bottom-left-radius: 30rpx;">
<view style="width: 100vw;text-align: center;font-size: 40px;font-weight: 700;color: #fff;" >
体育活动
</view>
<view style="width: 100vw;text-align: center;font-size: 22px;font-weight: 600;color: #fff;margin-top: 10rpx;">
组织报名工具
</view>
<text style="margin-top: 80rpx;color:#fff;font-size: 16px;">一分钟创建 轻松组织活动</text>
<view style="display: flex;flex-direction: row;margin-top: 40rpx;justify-content: center;margin-bottom: 100rpx;align-items: center;">
<image src="../../static/img/public/visits.png" style="width: 35rpx;height: 35rpx;"></image>
<text style="margin-left: 20rpx;color: #fff;font-size: 12px;">访问量{{visits}}</text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: row;margin-top: 60rpx;margin-left: 30rpx;align-items:baseline">
<text style="font-weight: 400; color: #E99D42 ;font-size: 36rpx;">发布活动类别</text>
<text style="margin-left: 20rpx;font-weight: 400; color: #E99D42;font-size: 28rpx;">(点击体育活动标签发布)</text>
</view>
<view style="display: flex; margin-left: 10rpx;margin-right: 30rpx;margin-top: 40rpx;justify-content: center;">
<grid>
<view style="display: flex; margin-bottom: 10rpx; margin-left: 10rpx;margin-right: 10rpx;" v-for="(item,index) in SportCategoryList">
<text class="labelLayout" @click="onClick(index)">{{item.sportCategoryName}}</text>
</view>
</grid>
</view>
<view class="line" style=" margin-top: 100rpx;margin-left: 30rpx;margin-right: 30rpx;"></view>
<view
style="display: flex;flex-direction: column;margin-top: 40rpx;margin-bottom: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="font-size: 32rpx;color: #666666;font-weight: 600">友情提示</text>
<text style="font-size: 30rpx;color: #666666;margin-top: 40rpx;font-weight: 500;">{{notices}}</text>
</view>
<view class="line" style=" margin-left: 30rpx;margin-right: 30rpx;margin-top: 40rpx;"></view>
<view style="margin-top: 30rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="font-size: 40rpx;color: #4095E5;font-weight: 600" @click="jump()">{{page.city}}</text>
<text style="font-size: 32rpx;color: #666666;font-weight: 500;margin-left: 20rpx;">共有{{activityAmount}}场活动</text>
</view>
<view style="height: 150px;"></view>
</RefreshView>
</view>
</template>
<script>
// 必须
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
export default {
// 使用mixin (在main.js注册全局组件) 必须
mixins: [MescrollMixin],
data() {
return {
index: 0,
notices: "\u3000\u3000您注册的帐号可以在宇运动主体下的子平台一号通行同时您发布的活动将会按类别发布到各子平台。点击查看宇运动子平台",
list: [],
SportCategoryList: [],
page: {
city: "正在获取...",
code: ""
},
visits: "...",
activityAmount: "..."
}
},
onLoad(options) {
this.HTTP({
url: 'aos/v1/activity/add1PointOnVisits',
method: 'GET',
data: {},
paramsType: "FORM",
loading: false
}).then((res) => {
});
let that = this
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
if (this.IsEmpty(find_city_code)) {
// 首次进入
find_city_code = 0;
// 获取定位
let _this = this;
// 获取定位
uni.getLocation({
type: 'gcj02',
success: function(res) {
let locat = res
console.log("latitude", res.longitude);
console.log("longitude", res.latitude);
// 先写入定位
_this.location = {
latitude: locat.latitude,
longitude: locat.longitude
}
let url =
"https://restapi.amap.com/v3/geocode/regeo?key=59970402d1c3f7dc1efff17d4dfcff21&location=" +
res.longitude + "," + res.latitude +
"&poitype=&radius=1000&extensions=all&batch=false&roadlevel=0";
_this.HttpOtherUrl({
url: url
}).then((res) => {
let json = JSON.stringify(res);
let info = JSON.parse(json).regeocode.addressComponent;
// 城市
let city = info.city;
// 城市编码
let code = info.adcode;
// 获取到正确的城市编码
if (code > 0) {
console.log("find_city1", city);
console.log("find_city_code1", code);
// 保存本次定位
_this.WritePreference("find_city", city)
_this.WritePreference("find_city_code", code)
_this.page.code = code
_this.page.city = city
_this.getCode()
} else {
console.log("find_city2", city);
console.log("find_city_code2", code);
// 未获取到正确的城市编码
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
}
}, (err) => {
console.log("find_city3", "石家庄");
console.log("find_city_code3", "130104");
//获取当前城市失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
})
},
fail(err) {
console.log("find_city4", "石家庄");
console.log("find_city_code4", "130104");
// 定位失败
_this.WritePreference("find_city", "石家庄")
_this.WritePreference("find_city_code", "130104")
_this.page.code = "130104"
_this.page.city = "石家庄"
_this.getCode()
}
});
} else {
this.page.code = find_city_code
this.page.city = find_city
this.getCode()
}
},
onShow() {
let find_city_code = this.ReadPreference("find_city_code")
let find_city = this.ReadPreference("find_city")
if (!this.IsEmpty(find_city_code)) {
this.getCode()
}
},
methods: {
// wwww(){
// uni.navigateTo({
// url: "../team/CreateTeam"
// })
// },
getCode() {
let that = this
that.HTTP({
url: 'aos/v1/activity/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": this.page.code
},
paramsType: "FORM",
loading: true
}).then((res) => {
that.SportCategoryList = res.data.listSportCategoryArea
that.activityAmount = res.data.activityAmount
that.visits = res.data.visits
});
},
onClick(index) {
this.WxSilentLogin()
uni.navigateTo({
url: "../publish/CreateActivity?sportCategoryName=" + this.SportCategoryList[index].sportCategoryName +
"&sportCategorySid=" + this.SportCategoryList[index].sid
})
},
jump() {
console.log('this.page.code', this.page.code)
uni.switchTab({
url: "../home/FindFragment"
})
}
}
}
</script>
<style lang="scss">
.line {
height: 5rpx;
background-color: #eee
}
.btn {
display: flex;
width: 80%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
}
.nav-bar {
height: 92rpx;
width: 100%;
display: flex;
justify-content: space-between;
.bar-text {
font-size: 32rpx;
height: 100%;
line-height: 92rpx;
padding-left: 28rpx;
}
.bar-img {
width: 90rpx;
height: 92rpx;
padding-right: 28rpx;
}
}
.top {
display: flex;
flex-direction: row;
height: 100rpx;
background: #FFFFFF;
opacity: 0.8;
align-items: center;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.unselected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #191919;
line-height: 40rpx;
}
.selected {
text-align: center;
font-size: 28rpx;
font-family: Adobe Heiti Std;
font-weight: normal;
color: #2CAB69;
line-height: 40rpx;
border-bottom: 2rpx #2CAB69 solid;
padding-bottom: 10rpx;
}
}
.btn1 {
background: #BBBBBB;
}
.btn2 {
background: #0081D5;
}
.labelLayout {
flex: 1;
width: 100%;
margin-left: 20rpx;
margin-right: 20rpx;
background-color: #F2BF5C;
color: #FFFFFF;
padding-top: 8rpx;
padding-bottom: 8rpx;
padding-left: 20rpx;
padding-right: 20rpx;
justify-content: center;
text-align: center;
font-size: 30rpx;
}
</style>

View File

@@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

View File

@@ -0,0 +1,89 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="联系方式" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="1" titleRightBtnSource="确定" @rightBtn='rightBtnClick'>
<view style="display: flex;flex-direction: column;">
<text style=" margin-top: 50rpx; margin-left: 65rpx;">联系人</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" v-model="activityBaseInfo.linkerName" @input="nameText" placeholder="请输入联系人" />
</view>
<text style=" margin-top: 50rpx; margin-left: 65rpx; margin-top: 30rpx;">联系电话</text>
<view class="input" style="margin-top: 20rpx;">
<input class="input_text" type="number" v-model="activityBaseInfo.linkerPhone" maxlength="11"
@input="phoneText" placeholder="请输入联系电话" />
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
activityBaseInfo: {
linkerName: "",
linkerPhone: "",
}
};
},
onLoad: function(option) {
this.activityBaseInfo.linkerName =option.linkerName;
this.activityBaseInfo.linkerPhone = option.linkerPhone;
console.log(JSON.stringify(this.activityBaseInfo))
},
mounted() {
},
methods: {
nameText(e) {
this.activityBaseInfo.linkerName = e.detail.value;
},
phoneText(e) {
this.activityBaseInfo.linkerPhone = e.detail.value
},
rightBtnClick() {
if (this.IsEmpty(this.activityBaseInfo.linkerName)) {
this.Toast("请输入联系人姓名")
return
}
let o = parseInt(this.activityBaseInfo.linkerPhone)
if (isNaN(o) || !this.activityBaseInfo.linkerPhone.startsWith(1) || this.activityBaseInfo.linkerPhone.length !=
11) {
this.Toast("输入的电话格式有误")
} else {
this.SetResult(this.activityBaseInfo)
console.log(this.activityBaseInfo)
}
},
}
}
</script>
<style lang="scss">
.input {
margin-left: 65rpx;
margin-right: 65rpx;
height: 80rpx;
background: #F2F2F2;
border-radius: 42rpx;
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
align-items: center;
.input_text {
width: 100%;
}
}
</style>

View File

@@ -0,0 +1,225 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="密码设置" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 40rpx;display: flex;flex-direction: row;align-items: center;margin-left: 30rpx;">
<text>新密码</text>
<view class="inputRow">
<input type="text" :password="page.password1" maxlength="16" @input="psdText" placeholder="请输入密码"
class="input" />
<image :src="page.show1" mode="aspectFit" style="width: 40rpx;height: 40rpx;" @click="show(1)">
</image>
</view>
</view>
<view style="margin-top: 10rpx;display: flex;flex-direction: row;align-items: center;margin-left: 30rpx;">
<text>确认密码</text>
<view class="inputRow">
<input type="text" :password="page.password2" maxlength="16" @input="rePsdText"
placeholder="请再次输入密码" class="input" />
<image :src="page.show2" mode="aspectFit" style="width: 40rpx;height: 40rpx;" @click="show(2)">
</image>
</view>
</view>
<view class="condition">
<image class="condition_img" :src="page.img1" mode="aspectFit"></image>
<text class="condition_text" :class="{'alldata':index1===1}">密码长度为8-20个字符</text>
</view>
<view class="condition">
<image class="condition_img" :src="page.img2" mode="aspectFit"></image>
<text class="condition_text" :class="{'alldata':index2===1}">密码要包含大小写字母和数字</text>
</view>
<view class=" btn" @click="save">
<text class="btnText">保存</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
index1: 0,
index2: 0,
page: {
"psd": "", //密码
"rePsd": "", //确认密码,
password1: true,
password2: true,
show1: "../../static/hide-password.png",
show2: "../../static/hide-password.png",
"img1": "../../static/login/unfinished.png",
"img2": "../../static/login/unfinished.png",
}
}
},
methods: {
psdText(e) {
this.page.psd = e.detail.value
var psdLength = this.page.psd.length;
if (8 <= psdLength) {
this.index1 = 1;
this.page.img1 = "../../static/login/finished.png"
} else {
this.index1 = 0;
this.page.img1 = "../../static/login/unfinished.png"
}
var aaa = /[a-z]/.test(e.detail.value);
var bbb = /\d/.test(e.detail.value);
var ccc = /[A-Z]/.test(e.detail.value);
if (aaa == true && bbb == true && ccc == true) {
this.index2 = 1;
this.page.img2 = "../../static/login/finished.png"
} else {
this.index2 = 0;
this.page.img2 = "../../static/login/unfinished.png"
}
},
rePsdText(e) {
this.page.rePsd = e.detail.value
},
show(id) {
let _this = this
switch (id) {
case 1:
this.page.password1 = !this.page.password1
if (this.page.password1) {
this.page.show1 = "../../static/hide-password.png"
} else {
this.page.show1 = "../../static/show-password.png"
}
break;
case 2:
this.page.password2 = !this.page.password2
if (this.page.password2) {
this.page.show2 = "../../static/hide-password.png"
} else {
this.page.show2 = "../../static/show-password.png"
}
break;
}
},
save() {
var psdLength = this.page.psd.length;
var rePsdLength = this.page.rePsd.length;
if (psdLength == 0) {
this.Toast("请输入新的密码");
return;
}
if (rePsdLength == 0) {
this.Toast("请输入确认新密码")
return;
}
if (!this.index1 || !this.index2) {
this.Toast("密码不符合条件")
return;
}
if (rePsdLength == 0) {
this.Toast("请输入确认密码");
return;
}
if (this.page.psd != this.page.rePsd) {
this.Toast("两次输入的密码不一致");
return;
}
this.HTTP({
url: 'aos/v1/aosUserManagement/setLoginPassWord',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserSid: getApp().globalData.memberSid,
loginPassWord: this.page.psd,// 新密码
},
loading: true
}).then((res) => {
uni.navigateBack({
delta: 2
})
this.Toast("密码修改成功")
});
}
}
}
</script>
<style lang="scss">
.inputRow {
flex: 1;
display: flex;
margin-left: 30rpx;
margin-right: 50rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
}
.condition {
display: flex;
align-items: center;
margin-left: 80rpx;
margin-top: 50rpx;
.condition_img {
width: 35rpx;
height: 35rpx;
}
.condition_text {
margin-left: 20rpx;
}
.alldata {
margin-left: 20rpx;
color: #2fa1f0;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<view>
<RefreshView ref="mescrollRef" :hasBack="true" text="密码设置" :useDownScroll="false" :useUpScroll="false">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/login/username.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="11" @input="phoneText" placeholder="请输入手机号" class="input" />
<SendCodeItem :phoneNum="page.phone" url="aos/v1/aosUserManagement/sendCodeFromModifyLoginPassWord"
@click="send" ref="codeItem"></SendCodeItem>
</view>
</view>
<view class="inputRow">
<image src="../../static/login/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" @input="codeText" maxlength="4" placeholder="请输入验证码" class="input" />
</view>
<view class="btn" @click="next">
<text class="btnText">下一步</text>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
phone: '',
code: ''
}
};
},
methods: {
next() {
var phoneLength = this.page.phone.length;
var codeLength = this.page.code.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (codeLength == 0) {
this.Toast("验证码不能为空")
return;
}
this.HTTP({
url: 'aos/v1/aosUserManagement/verifyCodeFromModifyLoginPassWord?mobile=' + this.page.phone +
'&code=' + this.page.code,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
console.log('=======', res)
uni.navigateTo({
url: 'NewPasswordActivity'
});
});
},
phoneText(e) {
//手机号
this.page.phone = e.detail.value;
},
send(e) { //发送验证码
console.log(e);
},
codeText(e) {
//验证码
this.page.code = e.detail.value;
}
}
};
</script>
<style lang="scss">
.inputRow {
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: $uni-base-color;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
</style>

117
pages/setup/upMobile.vue Normal file
View File

@@ -0,0 +1,117 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="更换手机号" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_text">更换手机号后下次登录可使用新手机号登录</text>
<text class="top_text">当前手机号{{phoneNumber}}</text>
</view>
<view class="inputLay">
<text class="inputText">新手机号</text>
<input class="input" type="number" maxlength="11" @input="nameText" placeholder="请输入新手机号"
:value="mobile"></input>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="btn" @click="next()">下一步</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
mobile: "",
phoneNumber: ""
}
},
onLoad(options) {
console.log('=======', options)
console.log('=======', options.phoneNumber)
this.phoneNumber = options.phoneNumber
},
methods: {
nameText(e) {
this.mobile = e.detail.value
console.log(this.mobile)
},
next() {
var phoneLength = this.mobile.length;
if (phoneLength == 0) {
this.Toast("请输入手机号")
return;
}
if (phoneLength != 11 || !this.mobile.startsWith("1")) {
this.Toast("请输入正确的手机号")
return;
}
let _this = this
_this.HTTP({
url: 'aos/v1/aosUserManagement/verifyMobileIsExist/' + _this.mobile,
method: 'GET',
paramsType: "FORM",
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
if (200 == res.code) {
uni.navigateTo({
url: 'upMobile2?phoneNumber=' + this.mobile
})
} else {
this.Toast("手机号重复")
}
});
}
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: column;
margin-top: 32rpx;
margin-left: 36rpx;
.top_text {
margin-top: 10rpx;
font-size: 30rpx;
color: #BBBBBB;
}
}
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 32rpx;
margin-bottom: 32rpx;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

115
pages/setup/upMobile2.vue Normal file
View File

@@ -0,0 +1,115 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="更换手机号" :useDownScroll="false" :useUpScroll="false">
<view class="top">
<text class="top_text">更换的手机号{{phoneNumber}}</text>
</view>
<view class="inputLay">
<text class="inputText">验证码</text>
<input type="number" maxlength="6" @input="codeText" placeholder="请输入验证码" class="input" />
<SendCodeItem :phoneNum="phoneNumber" url="aos/v1/aosUserManagement/sendCodeFromWxBindMobile" @click="send"
ref="wxCodeItem"></SendCodeItem>
</view>
<view style="height: 5rpx;width: 100%;background-color: #eee;margin-top: 28rpx;"></view>
<text class="btn" @click="save()">完成</text>
</RefreshView>
</template>
<script>
export default {
data() {
return {
phoneNumber: "",
code: ""
}
},
onLoad(options) {
console.log('=======', options)
console.log('=======', options.phoneNumber)
this.phoneNumber = options.phoneNumber
},
methods: {
codeText(e) {
this.code = e.detail.value
console.log(this.code)
},
save() {
var codeLength = this.code.length;
if (codeLength == 0) {
this.Toast("请输入验证码")
return;
}
let _this = this
_this.HTTP({
url: 'aos/v1/aosUserManagement/modifyMobile',
method: 'PUT',
paramsType: "FORM",
data: {
sysUserSid: getApp().globalData.memberSid,
mobile: _this.phoneNumber,
code: _this.code,
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 2
})
});
}
}
}
</script>
<style lang="scss">
.top {
display: flex;
flex-direction: column;
margin-top: 32rpx;
margin-left: 36rpx;
.top_text {
margin-top: 10rpx;
font-size: 30rpx;
color: #BBBBBB;
}
}
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 32rpx;
margin-bottom: 32rpx;
align-items: center;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

223
pages/team/CreateTeam.vue Normal file
View File

@@ -0,0 +1,223 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" text="创建队伍" :useDownScroll="false"
:useUpScroll="false">
<view class="item">
<view class="view1">
<view class="view1_top">
<text class="view1_top_text">队伍名称</text>
<input class="view1_top_input" type="text" @input="nameText()" placeholder="请输入队伍名称"
:value="name" />
</view>
<view
style="width: 100%;height: 5rpx;background-color: #f5f4f9;margin-top: 20rpx;margin-bottom: 20rpx;">
</view>
<textarea class="slogan" auto-height="true" style="min-height: 80rpx;" @input="sloganText()"
placeholder="请输入队伍口号(点击编辑)" :value="slogan" />
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">人数限制</text>
<text class="right_text1">5 </text>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">运动项目标签</text>
<view style="display: flex; flex: 1;justify-content: flex-end;margin-right: 15rpx;">
<fui-dropdown-menu :right="1" :minWidth="300" :size="30" selectedColor="#465CFF"
:options="options" @click="typeItemClick" @close="typeClose" ref="ddmtype">
<view class="fui-filter__item" @tap="filterTap()">
<text>{{type}}</text>
<image style="width: 22rpx;height: 22rpx; margin-left: 15rpx;"
src="../../static/event-icon/xia.png" mode="aspectFit" class="fui-filter__icon"
:class="{'fui-icon__ani':typeShow}">
</image>
</view>
</fui-dropdown-menu>
</view>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">是否公开招募队员</text>
<switch color="#007AFF" class="tui-fr" :checked="switch1Checked" @change="switch1Change">
</switch>
</view>
</view>
<view class="item">
<view class="view2">
<text class="lift_text">所在市</text>
<view @click="selectCity()">
<text class="right_text2">{{page.city}}</text>
<image style="width: 22rpx;height: 22rpx; margin-left: 10rpx;"
src="../../static/home-icon/more.png" mode="aspectFit" class="fui-filter__icon">
</view>
</view>
</view>
<text class="btn" @click="save()">创建</text>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
'city': this.ReadPreference("find_city"),
'adCode': this.ReadPreference("find_city_code").slice(0, -2),
},
options: [{
text: '乒乓球',
value: 0,
}, {
text: '羽毛球',
value: 1
}, {
text: '户外',
value: 2
}, {
text: '骑行',
value: 3
}],
typeShow: false,
type: "乒乓球",
switch1Checked: true,
}
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
console.log("结果>" + JSON.stringify(backResult))
if (!this.IsEmpty(backResult.code)) {
console.log("结果2>" + backResult.code)
this.page.adCode = backResult.code
this.page.city = backResult.city
}
}
},
methods: {
filterTap() {
this.$refs.ddmtype.show()
this.typeShow = true;
},
typeItemClick(e) {
this.type = e.text
console.log(this.type)
this.typeClose()
},
typeClose() {
this.typeShow = false;
},
switch1Change: function(e) {
this.switch1Checked = !this.switch1Checked;
console.log(`switch1Change样式点击后是否选中`, this.switch1Checked)
},
selectCity() {
uni.navigateTo({
url: "../../pages/city/CitySelectActivity?city=" + this.page.city +
"&code=" + this.page.adCode
})
}
}
}
</script>
<style lang="scss">
.item {
display: flex;
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 36rpx;
}
.view1 {
display: flex;
flex-direction: column;
width: 100%;
.view1_top {
display: flex;
flex-direction: row;
.view1_top_text {
font-size: 32rpx;
color: #898989;
}
.view1_top_input {
width: 70%;
font-size: 32rpx;
color: #101010;
margin-left: 15rpx;
}
}
.slogan {
width: 100%;
padding-left: 10rpx;
padding-right: 10rpx;
}
}
.view2 {
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
.lift_text {
flex: 1;
font-size: 28rpx;
color: #898989;
}
.right_text1 {
font-size: 28rpx;
color: #BEBEBE;
}
.right_text2 {
font-size: 28rpx;
color: #101010;
}
.tui-fr {
zoom: .7
}
}
.btn {
justify-content: center;
width: 100%;
margin-top: 100rpx;
padding: 30rpx;
font-size: 30rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
flex: 1;
position: absolute;
bottom: 0;
}
</style>

76
pages/team/JoinTeam.vue Normal file
View File

@@ -0,0 +1,76 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" text="加入临时球队" :useDownScroll="false" :useUpScroll="false">
</RefreshView>
</template>
<script>
export default {
data() {
return {
list:[
{
logo:"https://www.keaidian.com/uploads/allimg/190424/24110307_8.jpg",
teamName:"撒大苏打阿萨的骄傲四京东爱睡觉ask就打算殴打送i的1",
name:"张三",
number:"100",
},
{
logo:"https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
teamName:"临时球队1",
name:"张三",
number:"100",
},
{
logo:"https://www.keaidian.com/uploads/allimg/190424/24110307_35.jpg",
teamName:"临时球队2",
name:"张三",
number:"100",
}
]
}
},
methods: {
nameText(e) {
this.teamName = e.detail.value
console.log(this.teamName)
},
save() {
}
}
}
</script>
<style lang="scss">
.inputLay {
display: flex;
flex-direction: row;
margin-left: 40rpx;
margin-right: 40rpx;
margin-top: 40rpx;
margin-bottom: 28rpx;
.input {
margin-left: 40rpx;
flex: 1;
}
}
.btn {
justify-content: center;
width: 100%;
display: flex;
margin-top: 100rpx;
padding: 30rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #007AFF;
text-align: center;
}
</style>

555
pages/team/MyTeam.vue Normal file
View File

@@ -0,0 +1,555 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" text="我的队伍" :useDownScroll="false"
:useUpScroll="false">
<view class="top">
<view style="flex: 1;">
<sl-filter id="header" ref="slLilter" v-if="menuList.length!=0" :color="fd6d2a" themeColor="#000000"
:menuList.sync="menuList" @result="result"></sl-filter>
</view>
<text class="top_text">共加入2个队伍</text>
</view>
<view>
<view v-for="(item,index) in list " :key="index">
<view class="itemLay">
<view class="itemLay_top">
<text class="itemLay_top_name">{{item.teamName}}</text>
<view class="itemLay_top_label">
<text class="itemLay_top_label_item">{{item.city}}</text>
<text class="itemLay_top_label_item">{{item.table}}</text>
<text class="itemLay_top_label_item">{{item.number}}</text>
</view>
</view>
<view class="line"></view>
<view class="itemLay_list">
<scroll-view class="itemLay_list_scroll_view" scroll-x="true">
<view v-for="(memberItem,pos) in item.member" :key="pos"
class="itemLay_list_scroll_view_for">
<view class="itemLay_list_scroll_view_item">
<image :src="memberItem.headImage" class="itemLay_list_scroll_view_item_image"
mode="scaleToFill">
</image>
<text class="itemLay_list_scroll_view_item_text">{{memberItem.name}}</text>
</view>
</view>
</scroll-view>
</view>
<view class="itemLay_bom">
<view class="itemLay_bom_right">
<text class="itemLay_bom_right1"
@click="apply(item.sid)">申请中({{item.applyNumber}})</text>
<text class="itemLay_bom_right2" @click="invitation(item.sid)">邀请队员</text>
<text class="itemLay_bom_right3" @click="manage(item.sid)">管理</text>
</view>
<view class="itemLay_bom_notice" v-if="isShow(item.noticeSid)">
<view class="line"></view>
<view class="itemLay_bom_notice_content">
<text class="itemLay_bom_notice_content_text">本队报名了</text>
<text class="itemLay_bom_notice_content_text2"
@click="detail(item.noticeSid)">{{item.notice}}</text>
<text class="itemLay_bom_notice_content_text">组队成功后即可报名</text>
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
state: ""
},
menuList: [{
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部运动项目',
'value': ""
}]
}
],
list: [{
showDialog: false,
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "1",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "阿萨苏打水就激动四季豆i阿萨按时递交四栋i阿萨大四的1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "",
}, {
showDialog: false,
teamName: "asdsdfg士大夫是非得失的阿大撒大撒的地方dads发的阿风飒飒大大发生的1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "2",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}, {
showDialog: false,
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
sid: "3",
number: "2/5",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}, {
showDialog: false,
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "4",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}
]
}
},
onLoad() {
let that = this
that.HTTP({
url: 'aos/v1/activityManagement/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": that.page.adCode
},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("that.menuList[0].detailList", that.menuList[0].detailList);
let list = [];
for (var i = 0; i < res.data.listSportCategoryArea.length; i++) {
list.push({
title: res.data.listSportCategoryArea[i].sportCategoryName,
value: res.data.listSportCategoryArea[i].sid
})
}
// 必须用变量去接受
that.menuList[0].detailList = that.menuList[0].detailList.concat(list)
console.log("qqq", that.menuList[0].detailList);
});
},
methods: {
result(val) {
console.log("aaa", val);
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
} else {
this.page.state = val.state;
this.list = []
}
},
isShow(sid) {
if (!this.IsEmpty(sid)) {
return true
} else {
return false
}
},
apply(sid) {
// 查看申请
uni.navigateTo({
url: 'examineMember?sid=' + sid+"&type="+0
})
},
invitation(sid) {
// 邀请
},
manage(sid) {
// 管理
let newList = []
newList.push("修改信息")
newList.push("删除队员")
newList.push("解散队伍")
uni.showActionSheet({
itemList: newList,
success: function(res) {
switch (res.tapIndex) {
case 0:
console.log("res==修改")
break;
case 1:
// 查看申请
uni.navigateTo({
url: 'examineMember?sid=' + sid+"&type="+1
})
break;
case 2:
uni.showModal({
title: '提示',
content: '是否要解算队伍吗',
success: function(res) {
if (res.confirm) { //这里是点击了确定以后
} else { //这里是点击了取消以后
console.log('用户点击取消')
}
}
})
console.log("res==集散")
break;
}
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
},
detail(sid) {
// 活动详情
uni.navigateTo({
url: '../index/DetailActivity?raceSid=' + sid
})
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
width: 100%;
flex-direction: row;
background-color: #fff;
align-items: center;
.top_text {
text-align: end;
margin-right: 30rpx;
}
}
.line {
height: 5rpx;
margin-top: 20rpx;
background: #eee;
width: 100%;
}
.itemLay {
background-color: #fff;
margin-bottom: 24rpx;
display: flex;
flex-direction: column;
padding: 32rpx;
.itemLay_top {
display: flex;
flex-direction: row;
.itemLay_top_name {
max-width: 350rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 36rpx;
color: #101010;
}
.itemLay_top_label {
flex: 1;
display: flex;
flex-direction: row;
.itemLay_top_label_item {
background-color: #F4CE98;
color: #fff;
font-size: 24rpx;
padding: 5rpx 10rpx;
text-align: center;
align-items: center;
margin-left: 24rpx;
}
}
}
.itemLay_list {
z-index: 100;
.itemLay_list_scroll_view {
width: 100%;
white-space: nowrap;
.itemLay_list_scroll_view_for {
display: inline-block;
padding-top: 32rpx;
padding-bottom: 32rpx;
.itemLay_list_scroll_view_item {
margin-left: 20rpx;
margin-right: 20rpx;
display: flex;
flex-direction: column;
.itemLay_list_scroll_view_item_image {
width: 110rpx;
height: 110rpx;
border-radius: 12rpx;
}
.itemLay_list_scroll_view_item_text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100rpx;
margin-top: 15rpx;
font-size: 24rpx;
text-align: center;
color: #4D4A4A;
}
}
}
}
}
.itemLay_bom {
display: flex;
flex-direction: column;
.itemLay_bom_right {
align-items: center;
text-align: right;
.itemLay_bom_right1 {
margin-right: 24rpx;
font-size: 30rpx;
color: #FF5006;
}
.itemLay_bom_right2 {
margin-right: 36rpx;
font-size: 32rpx;
text-decoration-line: underline;
color: #E99D42;
}
.itemLay_bom_right3 {
font-size: 32rpx;
color: #E99D42;
text-decoration-line: underline;
}
}
.itemLay_bom_notice {
display: flex;
flex-direction: column;
.itemLay_bom_notice_content {
display: flex;
margin-top: 20rpx;
align-items: baseline;
.itemLay_bom_notice_content_text {
font-size: 28rpx;
color: #898989;
}
.itemLay_bom_notice_content_text2 {
font-size: 40rpx;
margin-left: 10rpx;
margin-right: 10rpx;
text-decoration-line: underline;
color: #E99D42;
}
}
}
}
}
/*下三角*/
.tip-bottom {
z-index: 1000;
margin: 20px;
padding: 5px;
width: 300px;
height: 60px;
border: 2px solid #f99;
position: relative;
background-color: #0FF;
/*设置圆角*/
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.tip-bottom:before,
.tip-bottom:after {
z-index: 1000;
content: "";
display: block;
border-width: 15px;
position: absolute;
bottom: -30px;
left: 200px;
border-style: solid dashed dashed solid;
border-color: #f99 transparent transparent transparent;
font-size: 0;
line-height: 0;
}
.tip-bottom:after {
z-index: 1000;
bottom: -27px;
border-color: #0FF transparent transparent transparent;
}
</style>

126
pages/team/MyTeam2.vue Normal file
View File

@@ -0,0 +1,126 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" text="我的队伍" :useDownScroll="false"
:useUpScroll="false">
<view class="top">
<view class="top_lift">
<text class="top_lift_text1">对不起您没有在任何队伍里</text>
<text class="top_lift_text2">您可以创建和管理自己队伍参加任何活动</text>
</view>
<text class="btn" @click="onClick(1)">创建队伍</text>
</view>
<view class="bom">
<text class="bom_text1">您可以申请加入招募队员的队伍</text>
<text class="bom_text2">通过申请后您将与队伍共同参与活动如遇队伍解散或未被任何队伍通过您可以选择其他队伍</text>
<view class="bom_bom">
<text class="bom_bom_text">{{number}}</text>
<text class="btn" @click="onClick(2)">查看列表</text>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
number: "石家庄市共有10个队伍在公开招募队员。"
}
},
methods: {
onClick(id) {
switch (id) {
case 1:
// 新建
uni.navigateTo({
url: 'CreateTeam'
})
break;
case 2:
// 加入
break;
}
}
}
}
</script>
<style lang="scss">
.btn {
background-color: #F4CE98;
color: #fff;
font-size: 26rpx;
padding: 5rpx 10rpx;
display: flex;
align-items: center;
}
.top {
display: flex;
margin-top: 20rpx;
background-color: #fff;
padding: 36rpx;
flex-direction: row;
align-items: center;
.top_lift {
flex: 1;
display: flex;
flex-direction: column;
.top_lift_text1 {
font-size: 28rpx;
color: #E99D42;
}
.top_lift_text2 {
margin-top: 15rpx;
font-size: 26rpx;
color: #E99D42;
}
}
}
.bom {
display: flex;
margin-top: 20rpx;
background-color: #fff;
padding: 36rpx;
flex-direction: column;
.bom_text1 {
font-size: 28rpx;
color: #898989;
}
.bom_text2 {
margin-top: 20rpx;
font-size: 26rpx;
color: #BEBEBE;
}
.bom_bom {
margin-top: 24rpx;
display: flex;
flex-direction: row;
.bom_bom_text {
flex: 1;
font-size: 28rpx;
color: #E99D42;
}
}
}
</style>

194
pages/team/WaitJoin.vue Normal file
View File

@@ -0,0 +1,194 @@
<template>
<RefreshView id="mescrollRef" ref="mescrollRef" text="等待成员加入的队员" :useDownScroll="false" :useUpScroll="false">
<view class="list" v-for="(teamItem,index) in page.list " :key="index">
<view class="team">
<view class="info">
<view >
<text class="team-name">{{teamItem.name}}</text>
<text class="link" @click="applyJoinTeam(teamItem.sid)">申请加入</text>
</view>
<view class="label-list">
<text class="label">{{teamItem.adName}}</text>
<text class="label">{{teamItem.sportCategoryName}}</text>
<text class="label">{{teamItem.memberNumber}}/{{teamItem.memberNumberLimit}}</text>
</view>
</view>
<scroll-view class="scorll" scroll-x="true">
<view v-for="(memberItem,pos) in teamItem.listTeamMemberArea" :key="pos" class="user-info-list" scroll-x="true">
<view class="user-info margin-left20">
<image class="head-image" :src="memberItem.headImage" mode="scaleToFill"></image>
<text class="real-name">{{memberItem.realName}}</text>
</view>
</view>
</scroll-view>
</view>
</view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
isAdmin:0,
page: {
state: "",
current:1,
menuList: [{
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部运动项目',
'value': ""
}]
}
],
list:[]
},
}
},
onShow() {
let _this = this
this.HTTP({
url: 'aos/v1/aosUser/getMyTeamAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: _this.page.current,
size: 10,
params: {
sysUserSid: getApp().globalData.sysUserSid,
type: 0,
}
},
loading: true
})
.then((res) => {
_this.page.list = res.data.records
// 追加数据.concat
console.log("我的队伍:",_this.page.list )
});
},
methods: {
applyJoinTeam(teamSid){
let _this = this
_this.HTTP({
url: 'aos/v1/aosUser/applyJoinTeam',
method: 'POST',
paramsType: "JSON",
data: {
memberSid: getApp().globalData.sysUserSid,
teamSid: teamSid,
},
toast: true,
loading: true
}).then((res) => {
console.log('=======', res)
// 保存
uni.navigateBack({
delta: 1
})
});
},
refresh(page) {
let _this = this
this.HTTP({
url: 'aos/v1/aosUser/getMyTeamAreaPagerList',
paramsType: "JSON",
method: "POST",
data: {
current: _this.page.current,
size: 10,
params: {
sysUserSid: getApp().globalData.sysUserSid,
type: 0,
}
},
loading: true
}).then((res) => {
// 成功关闭刷新状态
_this.$refs.mescrollRef.refreshFinished(res.data.records.length)
if (_this.page.current == 1) {
// 第一页 先清空集合数据
_this.list = []
}
// 追加数据
//_this.list = _this.list.concat(res.data.records)
}).catch(function(err) {
console.log("11111");
_this.$refs.mescrollRef.refreshError()
});
},
clickItem(index) {
let raceSid = this.list[index].sid
console.log(raceSid)
uni.navigateTo({
url: '../find/DetailActivity?raceSid=' + raceSid
});
},
result(val) {
console.log("aaa", val);
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
} else {
this.page.state = val.state;
this.list = []
}
},
isShow(sid) {
if (!this.IsEmpty(sid)) {
return true
} else {
return false
}
},
toExamineMember(sid) {
// 查看申请
uni.navigateTo({
url: 'MemberManage?sid=' + sid+"&type="+0
})
},
toDeleteMember(sid) {
// 查看申请
uni.navigateTo({
url: 'MemberManage?sid=' + sid+"&type="+1
})
},
invitation(sid) {
// 邀请
},
toMyTeamCreate(){
uni.navigateTo({
url: 'MyTeamCreate'
})
},
toWaitJoin(){
uni.navigateTo({
url: '../team/WaitJoin'
})
}
}
}
</script>
<style lang="scss">
@import url("../../static/columns.css");
.show_view {
display: inline;
}
.hide_view {
display: none;
}
</style>

498
pages/team/recruitList.vue Normal file
View File

@@ -0,0 +1,498 @@
<template>
<view style="background: #F1F2F5;">
<RefreshView id="mescrollRef" ref="mescrollRef" :pageBg="F1F2F5" text="招募队员的队伍列表" :useDownScroll="false"
:useUpScroll="false">
<view class="top">
<view style="flex: 1;">
<sl-filter id="header" ref="slLilter" v-if="menuList.length!=0" :color="fd6d2a" themeColor="#000000"
:menuList.sync="menuList" @result="result"></sl-filter>
</view>
<text class="top_text">共10个队伍</text>
</view>
<view style="margin-top: 20rpx;">
<view v-for="(item,index) in list " :key="index">
<view class="itemLay">
<view class="itemLay_top">
<text class="itemLay_top_name">{{item.teamName}}</text>
<view class="itemLay_top_label">
<text class="itemLay_top_label_item">{{item.city}}</text>
<text class="itemLay_top_label_item">{{item.table}}</text>
<text class="itemLay_top_label_item">{{item.number}}</text>
</view>
</view>
<view class="line"></view>
<view class="itemLay_list">
<scroll-view class="itemLay_list_scroll_view" scroll-x="true">
<view v-for="(memberItem,pos) in item.member" :key="pos"
class="itemLay_list_scroll_view_for">
<view class="itemLay_list_scroll_view_item">
<image :src="memberItem.headImage" class="itemLay_list_scroll_view_item_image"
mode="scaleToFill">
</image>
<text class="itemLay_list_scroll_view_item_text">{{memberItem.name}}</text>
</view>
</view>
</scroll-view>
</view>
<view class="itemLay_bom">
<view class="itemLay_bom_right">
<text class="itemLay_bom_right3" @click="join(item.sid)">申请加入</text>
</view>
<view class="itemLay_bom_notice" v-if="isShow(item.noticeSid)">
<view class="line"></view>
<view class="itemLay_bom_notice_content">
<text class="itemLay_bom_notice_content_text">本队报名了</text>
<text class="itemLay_bom_notice_content_text2"
@click="detail(item.noticeSid)">{{item.notice}}</text>
<text class="itemLay_bom_notice_content_text">组队成功后即可报名</text>
</view>
</view>
</view>
</view>
</view>
</view>
</RefreshView>
</view>
</template>
<script>
export default {
data() {
return {
page: {
'city': this.ReadPreference("find_city"),
'adCode': this.ReadPreference("find_city_code").slice(0, -2),
state: "",
type: "",
},
menuList: [{
'title': '当前定位城市',
'key': 'type',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': this.ReadPreference("find_city"),
'value': this.ReadPreference("find_city_code").slice(0, -2)
},
{
'title': '选择其他城市',
'value': '0'
}
]
}, {
'title': '默认活动类型',
'key': 'state',
'reflexTitle': true,
'defaultSelectedIndex': 0,
detailList: [{
'title': '全部活动',
'value': ""
}]
}
],
list: [{
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "1516589",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "阿萨苏打水就激动四季豆i阿萨按时递交四栋i阿萨大四的1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "",
}, {
teamName: "asdsdfg士大夫是非得失的阿大撒大撒的地方dads发的阿风飒飒大大发生的1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "1516589",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}, {
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
sid: "1516589",
number: "2/5",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}, {
teamName: "我的队伍名称1",
city: "石家庄1",
table: "乒乓球1",
number: "2/5",
sid: "1516589",
member: [{
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三1",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三2",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三3",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三4",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三5",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三6",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三7",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三8",
}, {
headImage: "https://tse1-mm.cn.bing.net/th/id/OIP-C.n0_p3rYRuofABd3XudbZnAHaEo?w=298&h=186&c=7&r=0&o=5&pid=1.7",
name: "张三9",
}],
applyNumber: "5",
notice: "梧桐居周赛",
noticeSid: "12561651651",
}
]
}
},
onLoad() {
let that = this
that.HTTP({
url: 'aos/v1/activityManagement/getActivityCreatePageParameter',
method: 'GET',
data: {
"adcode": that.page.adCode
},
paramsType: "FORM",
loading: true
}).then((res) => {
console.log("that.menuList[1].detailList", that.menuList[1].detailList);
let list = [];
for (var i = 0; i < res.data.listSportCategoryArea.length; i++) {
list.push({
title: res.data.listSportCategoryArea[i].sportCategoryName,
value: res.data.listSportCategoryArea[i].sid
})
}
// 必须用变量去接受
that.menuList[1].detailList = that.menuList[1].detailList.concat(list)
console.log("qqq", that.menuList[1].detailList);
});
},
onShow() {
let backResult = this.OnActivityResult();
if (backResult != undefined) {
console.log("结果>" + JSON.stringify(backResult))
if (!this.IsEmpty(backResult.code)) {
console.log("结果2>" + backResult.code)
this.page.adCode = backResult.code
this.page.city = backResult.city
this.menuList[0].detailList[0].title = backResult.city
this.menuList[0].detailList[0].value = backResult.code
console.log("qqq", this.menuList[0].detailList);
this.$refs.slLilter.setTitle(this.menuList)
}
}
},
methods: {
result(val) {
console.log("aaa", val);
if (!this.IsEmpty(val.type)) {
console.log("===>1" + JSON.stringify(this.page))
if (val.type != "0") {
this.page.type = val.type;
this.list = []
} else {
console.log("===>2" + JSON.stringify(this.page))
uni.navigateTo({
url: "../../pages/city/CitySelectActivity?city=" + this.page.city +
"&code=" + this.page.adCode
})
}
}
if (!this.IsEmpty(val.state)) {
this.page.state = val.state;
this.list = []
console.log("this.page.state", this.page.state);
} else {
this.page.state = val.state;
this.list = []
}
},
isShow(sid) {
if (!this.IsEmpty(sid)) {
return true
} else {
return false
}
},
join(sid) {
// 申请加入
},
detail(sid) {
// 活动详情
uni.navigateTo({
url: '../index/DetailActivity?raceSid=' + sid
})
},
}
}
</script>
<style lang="scss">
.top {
display: flex;
width: 100%;
flex-direction: row;
background-color: #fff;
align-items: center;
.top_text {
text-align: end;
margin-right: 30rpx;
}
}
.line {
height: 5rpx;
margin-top: 20rpx;
background: #eee;
width: 100%;
}
.itemLay {
background-color: #fff;
margin-bottom: 24rpx;
display: flex;
flex-direction: column;
padding: 32rpx;
.itemLay_top {
display: flex;
flex-direction: row;
.itemLay_top_name {
max-width: 350rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 36rpx;
color: #101010;
}
.itemLay_top_label {
flex: 1;
display: flex;
flex-direction: row;
.itemLay_top_label_item {
background-color: #F4CE98;
color: #fff;
font-size: 24rpx;
padding: 5rpx 10rpx;
text-align: center;
align-items: center;
margin-left: 24rpx;
}
}
}
.itemLay_list {
.itemLay_list_scroll_view {
width: 100%;
white-space: nowrap;
.itemLay_list_scroll_view_for {
display: inline-block;
padding-top: 32rpx;
padding-bottom: 32rpx;
.itemLay_list_scroll_view_item {
margin-left: 20rpx;
margin-right: 20rpx;
display: flex;
flex-direction: column;
.itemLay_list_scroll_view_item_image {
width: 110rpx;
height: 110rpx;
border-radius: 12rpx;
}
.itemLay_list_scroll_view_item_text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100rpx;
margin-top: 15rpx;
font-size: 24rpx;
text-align: center;
color: #4D4A4A;
}
}
}
}
}
.itemLay_bom {
display: flex;
flex-direction: column;
.itemLay_bom_right {
align-items: center;
text-align: right;
.itemLay_bom_right3 {
font-size: 32rpx;
color: #E99D42;
text-decoration-line: underline;
}
}
.itemLay_bom_notice {
display: flex;
flex-direction: column;
.itemLay_bom_notice_content {
display: flex;
margin-top: 20rpx;
align-items: baseline;
.itemLay_bom_notice_content_text {
font-size: 28rpx;
color: #898989;
}
.itemLay_bom_notice_content_text2 {
font-size: 40rpx;
margin-left: 10rpx;
margin-right: 10rpx;
text-decoration-line: underline;
color: #E99D42;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,391 @@
<template>
<RefreshView ref="mescrollRef" :hasBack="true" :text="data.name" :useDownScroll="false" :useUpScroll="false"
useTitleRightBtn="0">
<view class="banner">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item class="swiper-item" v-for="(item,index) in data.listCoverImage" :key="index">
<image style="width: 100%;height: 450rpx;" :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<view style="display: flex;flex-direction: column;background: #FFFFFF; width: 100%;height: 100%;">
<view>
<view style="display: flex; flex-direction: row; margin-left: 20rpx;margin-top: 20rpx;">
<text
style="color: #101010; font-size: 36rpx;font-weight: 520; white-space: nowrap;overflow: hidden;text-overflow: ellipsis">{{data.name}}</text>
<text
style=" word-break:keep-all;
white-space:nowrap;display: flex;align-items: center; margin-left: 30rpx; color: #fff; font-size: 20rpx; background-color: #F2BF5C; padding: 3rpx 15rpx;border-radius: 5rpx;">{{data.sportCategoryName}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 15rpx;align-items: center;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">报名截止</text>
<text style="color: #666666;font-size: 26rpx;">{{data.enrollEndTime}}</text>
<text style="color: #E99D42;font-size: 26rpx;flex: 1;text-align: right;">还有1天</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view style="display: flex;flex-direction: row;margin-top: 15rpx;margin-left: 20rpx;margin-right: 30rpx;">
<text style="font-size: 30rpx;color: #080808;">整体活动</text>
<view style="display: flex;flex-direction: column;">
<text style="color: #666666; font-size: 26rpx;">{{data.startTime}}</text>
<text style="color: #666666;margin-top: 20rpx;font-size: 26rpx;">{{data.endTime}}</text>
</view>
</view>
<view style="">
<view v-for="(item,index) in data.listActivityItemsDetails " :key="index" style="margin-top: 20rpx;">
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;background-color: #F1F1F1;padding: 20rpx 30rpx;">
<text style="font-size: 30rpx;flex: 1;">{{item.name}}</text>
<view style="display: flex;flex-direction: row;">
<text style="font-size: 25rpx; color: #E99D42; ">{{item.enrollMoldName}}</text>
<text
style="color: #E99D42; margin-left: 10rpx;margin-right: 10rpx; font-size: 25rpx;">/</text>
<text
style="color: #E99D42; font-size: 25rpx;">{{item.enrollMoney==0?"免费":item.enrollMoney+'元'}}</text>
</view>
</view>
<view
style="display: flex;flex-direction: column;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;">
<text style="color: #666666; margin-top: 15rpx;font-size: 28rpx;">{{item.introduction}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; ">
</view>
<!-- <view
style="display: flex;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<text style="font-size: 30rpx;">活动时间</text>
<text
style="color: #666666; font-size: 25rpx;flex: 1;">{{item.startTime+" 至 "+item.endTime}}</text>
</view>
-->
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;color: #E3A428 ;">{{item.startTime}}</text>
<text
style="color: #666666; font-size: 30rpx;text-align: right;flex: 1;">{{item.gymnasiumName}}</text>
</view>
<image v-if="!showAddress(item.gymnasiumSid)" style="width: 30rpx;height: 30rpx;"
src="../../static/home-icon/more.png" @click="gymnasiumName(item.gymnasiumSid)">
</image>
<!-- <image v-if="showAddress(item.gymnasiumSid)" style="width: 30rpx;height: 30rpx;" src="../../static/home-icon/more.png">
</image> -->
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 15rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx;margin-right: 30rpx;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;flex: 1;">
<text style="font-size: 30rpx;">报名数</text>
<text
style="color: #919191 ; font-size: 25rpx; margin-left: 20rpx;">{{item.enrollNumbers==0?"暂无":item.enrollNumbersLimit+'人'}}</text>
<text
style="color: #919191 ; font-size: 25rpx;margin-left: 10rpx;margin-right: 10rpx;">/</text>
<text
style="color: #919191 ; font-size: 25rpx;">{{item.enrollNumbersLimit==0?"不限":item.enrollNumbersLimit+'人'}}</text>
</view>
<view v-if="item.listUserHeadImageUrl.length>0" style="display: flex;flex-direction: row; "
@click="userList(item.sid)">
<view v-for="(url,i) in item.listUserHeadImageUrl " :key="i">
<view
style="display: flex; width: 100%; margin-left: 5rpx; margin-right: 5rpx;justify-content: center;">
<image style="border-radius: 50%; width: 50rpx;height: 50rpx;" :src="url"
mode="aspectFit"></image>
</view>
</view>
</view>
<image style="width: 30rpx;height: 30rpx;" src="../../static/home-icon/more.png"
@click="userList(item.sid)">
</image>
</view>
</view>
</view>
<view style="margin-top: 20rpx;background-color: #F1F1F1;height: 20rpx;">
</view>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">活动介绍</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.introduction}}</text>
<view style="display: flex;flex-direction: row;margin: 20rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">奖品奖项</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<text style="margin: 30rpx; color: #999999;font-size: 28rpx; ">{{data.notes}}</text>
<!--
<textarea style="margin: 30rpx; color: #999999 ; font-size: 25rpx;white-space: pre-wrap; "
read-only="readOnly" disabled="disabled " placeholder="无" v-model="data.notes" /> -->
<view style="display: flex;flex-direction: row;margin: 10rpx 30rpx 0rpx 30rpx; align-items: center;">
<text style="font-size: 30rpx;">特别鸣谢</text>
<view style="background-color: #F1F1F1; height: 10rpx; flex: 1;margin-left: 20rpx; "></view>
</view>
<view
style="display: flex;margin-left: 40rpx;margin-right: 40rpx;flex-direction: column; margin-top: 30rpx;">
<view v-for="(item,pos) in data.listSpecialThanks " :key="pos">
<view
style="display: flex; width: 100%; padding-top: 10rpx;padding-bottom: 10rpx;justify-content: center;">
<text style="color: #898989;font: size 28rpx;flex: 1;">{{item.name}}</text>
</view>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%;margin-top: 20rpx; "></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989; font-size: 28rpx;">主办方</text>
<text style="color: #898989;font-size: 25rpx;">{{data.organizer}}</text>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view
style="display: flex;flex-direction: row;margin-top: 20rpx;margin-left: 30rpx; margin-right: 30rpx; align-items: center;">
<text style="color: #898989;font-size: 28rpx;">联系人</text>
<view style="display: flex;flex-direction: row;">
<text style="color: #898989;font-size: 25rpx;">{{data.linkerName}}</text>
<view style="width: 30rpx;"></view>
<text style="color: #898989; font-size: 25rpx;">{{data.linkerPhone}}</text>
</view>
</view>
<view style="background-color: #F1F1F1; height: 5rpx; width: 100%; margin-top: 20rpx;"></view>
<view class="agreeMent">
<checkbox-group @change="checkboxChange">
<checkbox style="transform:scale(0.7)" :checked="checked1"></checkbox>
</checkbox-group>
<text class="text2">我已阅读并同意</text>
<text style="color: #007AFF;">参赛须知</text>
<text style="display: flex;text-align: center; margin-left: 20rpx; padding: 5rpx 10rpx;background: #0081D5;
color: #FFFFFF; font-size: 28rpx;" @click="click()"> 我要报名 </text>
</view>
</view>
</view>
<view style="height: 300rpx;"></view>
</RefreshView>
</template>
<script>
export default {
data() {
return {
checked1: true,
data: {
},
raceSid: ""
}
},
onLoad: function(option) {
this.raceSid = option.raceSid;
this.HTTP({
url: 'aos/v1/activityManagement/getActivityDetails/' + this.raceSid,
method: 'GET',
paramsType: "FORM",
loading: true
}).then((res) => {
if (200 == res.code) {
this.data = res.data
} else {
this.Toast(res.msg)
uni.navigateBack({
delta: 1
})
}
});
},
methods: {
showAddress(s) {
console.log("..." + s);
return this.IsEmpty(s)
},
checkboxChange(e) {
this.checked1 = !this.checked1
console.log(this.checked1)
},
gymnasiumName(e) {
uni.navigateTo({
url: "ArenaDetailActivity?sid=" + e
})
console.log("gymnasiumName>>", e)
},
userList(sid) {
console.log("zazzz>>", this.data.sid)
console.log("userList>>", sid)
uni.navigateTo({
url: "BaoMingListActivity?activitySid=" + this.data.sid + "&activityItemSid=" + sid
})
},
click() {
let _this = this;
if (!this.checked1) {
this.Toast("请认真阅读参赛须知,并勾选。")
return
}
// if (this.data.listActivityItemsDetails.length == 1) {
// let evendSid = this.data.sid
// let eventsSubprojectSid = this.data.listActivityItemsDetails[0].sid
// this.HTTP({
// url: 'aos/events/v1/eventsenroll/save',
// method: 'POST',
// data: {
// 'eventsSid': evendSid,
// 'eventsSubprojectSid': eventsSubprojectSid,
// 'participantSid': getApp().globalData.memberSid,
// 'paymentMemberSid': "",
// },
// paramsType: "JSON",
// loading: true
// }).then((res) => {
// if (res.code == 200) {
// this.Toast("报名成功!")
// // 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
// uni.navigateBack({
// delta: 10
// });
// } else {
// this.Toast(res.msg)
// }
// }, (err) => {
// // 错误提示
// _this.Toast("出错了:" + err.data.errmsg)
// });
// } else {
console.log("===========" + this.data.listActivityItemsDetails.length)
let list = this.data.listActivityItemsDetails
let newList = []
for (var i = 0; i < list.length; i++) {
newList.push(list[i].name)
}
uni.showActionSheet({
itemList: newList,
success: function(res) {
console.log("itemList==" + newList)
console.log("res==" + JSON.stringify(res))
_this.listSelect(res.tapIndex, newList)
},
fail(e) {
console.log("reeees==" + JSON.stringify(e))
}
});
// }
},
listSelect(id, info) {
console.log(id)
console.log(info)
let _this = this
let evendSid = this.data.sid
let eventsSubprojectSid = this.data.listActivityItemsDetails[id].sid
console.log(eventsSubprojectSid)
if (getApp().globalData.isLogin){
this.HTTP({
url: 'aos/v1/activityItemManagement/enroll',
method: 'POST',
data: {
'activitySid': evendSid,
'activityItemSid': eventsSubprojectSid,
'participantSid': getApp().globalData.sysUserSid,
'paymentMemberSid': getApp().globalData.sysUserSid,
},
paramsType: "JSON",
loading: true
}).then((res) => {
if (res.code == 200) {
this.Toast("报名成功!")
// 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
uni.navigateBack({
delta: 10
});
} else {
this.Toast(res.msg)
}
}, (err) => {
// 错误提示
_this.Toast("出错了:" + err.data.errmsg)
})
}
else{
uni.navigateTo({
url: "../me/AuthLogin"
})
}
},
}
}
</script>
<style lang="scss">
.items {
display: flex;
flex-direction: column;
}
.agreeMent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 50rpx;
margin-left: 30rpx;
.text2 {
color: #666666;
font-size: 30rpx;
}
}
.banner {
height: 450rpx;
width: 100%;
box-sizing: border-box;
.swiper {
height: 100%;
width: 100%;
.swiper-item {
height: 100%;
width: 100%;
.banner-image {
width: 100%;
height: 100%;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
}
}
</style>

153
pages/test/test.vue Normal file
View File

@@ -0,0 +1,153 @@
<template>
<!-- <view class="tip-top">我是提示框1</view>
<view class="tip-bottom"> 我是提示框2</view>
<view class="tip-left">我是提示框3</view>
<view class="tip-right">我是提示框4</view> -->
<view class="tip-bottom" style="margin-top: 100rpx;">我是提示框</view>
</template>
<script>
</script>
<style lang="scss">
body {
margin: 0;
padding: 0;
background: grey;
}
/*提示框容器-上三角形*/
.tip-top {
margin: 20px;
padding: 5px;
width: 300px;
height: 60px;
border: 2px solid #f99;
position: relative;
background-color: #FFF;
/*设置圆角*/
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/*生成2个叠加的三角形*/
.tip-top:before, .tip-top:after {
content: "";
display: block;
border-width: 15px;
position: absolute;
top: -30px;
left: 100px;
border-style: solid dashed dashed solid;
border-color: transparent transparent #f99 transparent;
font-size: 0;
line-height: 0;
}
/*将上面的三角形颜色设置和容器背景色相同*/
.tip-top:after {
top: -27px;
border-color: transparent transparent #FFF transparent;
}
/*下三角*/
.tip-bottom {
margin: 20px;
padding: 5px;
width: 300px;
height: 60px;
border: 2px solid #f99;
position: relative;
background-color: #0FF;
/*设置圆角*/
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.tip-bottom:before, .tip-bottom:after {
content: "";
display: block;
border-width: 15px;
position: absolute;
bottom: -30px;
left: 100px;
border-style: solid dashed dashed solid;
border-color: #f99 transparent transparent transparent;
font-size: 0;
line-height: 0;
}
.tip-bottom:after {
bottom: -27px;
border-color: #0FF transparent transparent transparent;
}
/*左三角*/
.tip-left {
margin: 20px;
padding: 5px;
width: 300px;
height: 60px;
border: 2px solid #f99;
position: relative;
background-color: #FFF;
/*设置圆角*/
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.tip-left:before, .tip-left:after {
content: "";
display: block;
border-width: 15px;
position: absolute;
left: -30px;
top: 20px;
border-style: dashed solid solid dashed;
border-color: transparent #f99 transparent transparent;
font-size: 0;
line-height: 0;
}
.tip-left:after {
left: -27px;
border-color: transparent #FFF transparent transparent;
}
/*右三角*/
.tip-right {
margin: 20px;
padding: 5px;
width: 300px;
height: 60px;
border: 2px solid #f99;
position: relative;
background-color: #FFF;
/*设置圆角*/
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.tip-right:before, .tip-right:after {
content: "";
display: block;
border-width: 15px;
position: absolute;
right: -30px;
top: 20px;
border-style: dashed solid solid dashed;
border-color: transparent transparent transparent #f99;
font-size: 0;
line-height: 0;
}
.tip-right:after {
right: -27px;
border-color: transparent transparent transparent #FFF;
}
</style>

47
pages/web/WebActivity.vue Normal file
View File

@@ -0,0 +1,47 @@
<template>
<web-view :src="url"></web-view>
</template>
<script>
export default {
data() {
return {
url: ""
}
},
methods: {
},
onLoad(e) {
// 获取传递的网址
this.url = this.getWEBExtra(e)
if (this.url.indexOf("?") != -1) {
// 代表有拼接,传递登录的sid给网页,让网页去保存sid
this.url += ("&loginSid=" + getApp().globalData.memberSid)
this.url += ("&writeLogin=" + true)
} else {
// 代表无拼接,传递登录的sid给网页,让网页去保存sid
this.url += ("?loginSid=" + getApp().globalData.memberSid)
this.url += ("&writeLogin=" + true)
}
let _this = this
// $on 监听事件
uni.$on('login', (data) => {
// 这里加载登录状态保存的页面
_this.url = "https://www.ourpyw.com/hide/#/pages/login/LoginState?loginSid=" + getApp().globalData
.memberSid + "&writeLogin=" + true + "&refresh=" + true
})
},
onUnload() {
// 移除监听事件
uni.$off('login');
}
// 不能支持分享,否则可能把登录状态页分享出去
}
</script>
<style>
</style>