报名工具小程序初始代码
This commit is contained in:
50
pages/me/AuthLogin.vue
Normal file
50
pages/me/AuthLogin.vue
Normal 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
104
pages/me/BaseInfo.vue
Normal 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
227
pages/me/MemberManage.vue
Normal 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>
|
||||
117
pages/me/ModiMobileInputNew.vue
Normal file
117
pages/me/ModiMobileInputNew.vue
Normal 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>
|
||||
114
pages/me/ModiMobileVerify.vue
Normal file
114
pages/me/ModiMobileVerify.vue
Normal 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
94
pages/me/ModiNickName.vue
Normal 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
225
pages/me/ModiPassword.vue
Normal 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>
|
||||
130
pages/me/ModiPasswordVerify.vue
Normal file
130
pages/me/ModiPasswordVerify.vue
Normal 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
92
pages/me/ModiRealName.vue
Normal 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
132
pages/me/ModiUserNumber.vue
Normal 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
381
pages/me/MyActivity.vue
Normal 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
237
pages/me/MyTeam.vue
Normal 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
290
pages/me/MyTeamCreate.vue
Normal 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
206
pages/me/PersonalCenter.vue
Normal 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
226
pages/me/RealInfo.vue
Normal 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
150
pages/me/Setup.vue
Normal 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>
|
||||
Reference in New Issue
Block a user