diff --git a/teamwork/pages/my/my-modify.vue b/teamwork/pages/my/my-modify.vue index c9ca6e92dc452186001982c8085bab3ef958aca7..68b592eb5c45ad98a41e98713615fda9c18ff08c 100644 --- a/teamwork/pages/my/my-modify.vue +++ b/teamwork/pages/my/my-modify.vue @@ -45,7 +45,10 @@ - + + + @@ -112,41 +115,70 @@ complete() {} }); }, - // avatarChoose() { - // let that = this; - // uni.chooseImage({ - // count: 1, - // sizeType: ['original', 'compressed'], - // sourceType: ['album', 'camera'], - // success: function(res) { - // var tempFilePaths = res.tempFilePaths; - // pathToBase64(tempFilePaths[0]) //图像转base64工具 - // .then(base64 => { - - // that.avatar = base64; - // //将文件转化为base64并显示 - // // that.avatarUpload(base64); //同时将头像上传至数据库进行存储 - // }).catch(error => { - // console.error(error) - // }) - // } - // }); - - // }, - - getUserInfo() { - uni.getUserProfile({ - desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 - success: (res) => { - console.log(res); - uni.showToast({ - title: '已授权', - icon: 'none', - duration: 2000 - }) - } + dialogConfirm() { + + let that = this; + let gender = that.selectSex[that.index1].name; + let school = that.school[that.index2].name; + let nickname = that.nickName; + let mobile = that.mobile; + let headimg = that.avatar; + let updata = {}; + if (!nickname) { + uni.showToast({ + title: '请填写昵称', + icon: 'none', + duration: 2000 + }); + return; + } + updata.nickname = nickname; + if (!headimg) { + headimg = that.avater; + } + updata.headimg = headimg; + updata.gender = gender; + updata.school = school; + if (that.isPoneAvailable(mobile)) { + updata.mobile = mobile; + } else { + uni.showToast({ + title: '手机号码有误,请重填', + icon: 'none', + duration: 2000 + }); + return; + } + this.Upload(updata); + getApp().globalData.icon=updata.headimg; + getApp().globalData.name=updata.nickname; + getApp().globalData.moblie=updata.mobile; + getApp().globalData.gender=updata.gender; + getApp().globalData.school=updata.school; + uni.navigateBack({ + delta: 1, //返回层数,2则上上页 }) + this.$refs.alertDialog.close(); }, + + dialogClose() { + //console.log('点击关闭') + this.$refsalertDialog.close(); + }, + + // getUserInfo() { + // uni.getUserProfile({ + // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + // success: (res) => { + // console.log(res); + // uni.showToast({ + // title: '已授权', + // icon: 'none', + // duration: 2000 + // }) + // } + // }) + // }, // getphonenumber(e) { // if (e.detail.iv) { // console.log(e.detail.iv) //传后台解密换取手机号 @@ -158,59 +190,60 @@ // } // }, savaInfo() { - uni.showModal({ - title: '温馨提示', //提示标题 - content: '确认修改你的个人信息吗', //提示内容 - showCancel: true, //是否显示取消按钮 - success: res => { - if (res.confirm) { //confirm为ture,代表用户点击确定 - let that = this; - let gender = that.selectSex[that.index1].name; - let school = that.school[that.index2].name; - let nickname = that.nickName; - let mobile = that.mobile; - let headimg = that.avatar; - let updata = {}; - if (!nickname) { - uni.showToast({ - title: '请填写昵称', - icon: 'none', - duration: 2000 - }); - return; - } - updata.nickname = nickname; - if (!headimg) { - headimg = that.avater; - } - updata.headimg = headimg; - updata.gender = gender; - updata.school = school; - if (that.isPoneAvailable(mobile)) { - updata.mobile = mobile; - } else { - uni.showToast({ - title: '手机号码有误,请重填', - icon: 'none', - duration: 2000 - }); - return; - } - this.Upload(updata); - getApp().globalData.icon=updata.headimg; - getApp().globalData.name=updata.nickname; - getApp().globalData.moblie=updata.mobile; - getApp().globalData.gender=updata.gender; - getApp().globalData.school=updata.school; - uni.navigateBack({ - delta: 1, //返回层数,2则上上页 - }) - // that.updata(updata); - } else if (res.cancel) { //cancel为ture,代表用户点击取消 - console.log('点击了取消按钮'); - } - } - }) + this.$refs.alertDialog.open(); + // uni.showModal({ + // title: '温馨提示', //提示标题 + // content: '确认修改你的个人信息吗', //提示内容 + // showCancel: true, //是否显示取消按钮 + // success: res => { + // if (res.confirm) { //confirm为ture,代表用户点击确定 + // let that = this; + // let gender = that.selectSex[that.index1].name; + // let school = that.school[that.index2].name; + // let nickname = that.nickName; + // let mobile = that.mobile; + // let headimg = that.avatar; + // let updata = {}; + // if (!nickname) { + // uni.showToast({ + // title: '请填写昵称', + // icon: 'none', + // duration: 2000 + // }); + // return; + // } + // updata.nickname = nickname; + // if (!headimg) { + // headimg = that.avater; + // } + // updata.headimg = headimg; + // updata.gender = gender; + // updata.school = school; + // if (that.isPoneAvailable(mobile)) { + // updata.mobile = mobile; + // } else { + // uni.showToast({ + // title: '手机号码有误,请重填', + // icon: 'none', + // duration: 2000 + // }); + // return; + // } + // this.Upload(updata); + // getApp().globalData.icon=updata.headimg; + // getApp().globalData.name=updata.nickname; + // getApp().globalData.moblie=updata.mobile; + // getApp().globalData.gender=updata.gender; + // getApp().globalData.school=updata.school; + // uni.navigateBack({ + // delta: 1, //返回层数,2则上上页 + // }) + // // that.updata(updata); + // } else if (res.cancel) { //cancel为ture,代表用户点击取消 + // console.log('点击了取消按钮'); + // } + // } + // }) }, diff --git a/teamwork/pages/my/my-resetpassword.vue b/teamwork/pages/my/my-resetpassword.vue index 9c1bf956e77ba8884088aa677face45c9bd4c01b..704736045899ae776a214f53db1bb8cabb8d7c21 100644 --- a/teamwork/pages/my/my-resetpassword.vue +++ b/teamwork/pages/my/my-resetpassword.vue @@ -30,6 +30,10 @@ + + + @@ -53,46 +57,75 @@ bindConfirmPassword(e) { this.confirmPassword = e.detail.value; }, - // showPwd: function() { - // this.showPassword = !this.showPassword; - // }, + dialogConfirm() { + let that = this; + let password = that.password; + let newPassword = that.newPassword; + let confirmPassword = that.confirmPassword; + let updata = {}; + if (!that.isPasswordAvailable(newPassword)) { + uni.showToast({ + title: '密码长度在8-20位!', + icon: 'none', + duration: 2000 + }); + return; + } else if (!that.isConfirmPasswordAvailable(newPassword, confirmPassword)) { + uni.showToast({ + title: '两次密码不一致', + icon: 'none', + duration: 2000 + }); + return; + } else { + updata.password = password; + updata.newPassword = newPassword; + } + this.Upload(updata); + this.$refs.alertDialog.close(); + }, + + dialogClose() { + //console.log('点击关闭') + this.$refsalertDialog.close(); + }, confirmModification() { - - uni.showModal({ - title: '温馨提示', //提示标题 - content: '确认修改密码吗', //提示内容 - showCancel: true, //是否显示取消按钮 - success: res => { - if (res.confirm) { //confirm为ture,代表用户点击确定 - let that = this; - let password = that.password; - let newPassword = that.newPassword; - let confirmPassword = that.confirmPassword; - let updata = {}; - if (!that.isPasswordAvailable(newPassword)) { - uni.showToast({ - title: '密码长度在8-20位!', - icon: 'none', - duration: 2000 - }); - return; - } else if (!that.isConfirmPasswordAvailable(newPassword, confirmPassword)) { - uni.showToast({ - title: '两次密码不一致', - icon: 'none', - duration: 2000 - }); - return; - } else { - updata.password = password; - updata.newPassword = newPassword; - } - this.Upload(updata); - } else if (res.cancel) { //cancel为ture,代表用户点击取消 - console.log('点击了取消按钮'); - } - } - }) + this.$refs.alertDialog.open(); + // uni.showModal({ + // title: '温馨提示', //提示标题 + // content: '确认修改密码吗', //提示内容 + // showCancel: true, //是否显示取消按钮 + // success: res => { + // if (res.confirm) { //confirm为ture,代表用户点击确定 + // let that = this; + // let password = that.password; + // let newPassword = that.newPassword; + // let confirmPassword = that.confirmPassword; + // let updata = {}; + // if (!that.isPasswordAvailable(newPassword)) { + // uni.showToast({ + // title: '密码长度在8-20位!', + // icon: 'none', + // duration: 2000 + // }); + // return; + // } else if (!that.isConfirmPasswordAvailable(newPassword, confirmPassword)) { + // uni.showToast({ + // title: '两次密码不一致', + // icon: 'none', + // duration: 2000 + // }); + // return; + // } else { + // updata.password = password; + // updata.newPassword = newPassword; + // } + // this.Upload(updata); + // } else if (res.cancel) { //cancel为ture,代表用户点击取消 + // console.log('点击了取消按钮'); + // } + // } + // }) }, isPasswordAvailable(newPassword) { diff --git a/teamwork/pages/my/my-running-record.vue b/teamwork/pages/my/my-running-record.vue index 29c3dcb9745f5052eee3c32889bc105c6a69b149..bf033522491d22e632e60adbe927871aec37b3a0 100644 --- a/teamwork/pages/my/my-running-record.vue +++ b/teamwork/pages/my/my-running-record.vue @@ -24,7 +24,6 @@ {{parseInt(item.pace/60).toString().padStart(2,0)}}'{{parseInt(item.pace%60).toString().padStart(2,0)}}'' - @@ -134,7 +133,7 @@ onLoad() { //console.log(this.formatSeconds(10)); - plus.navigator.setStatusBarBackground('#EDEEF0'); + //plus.navigator.setStatusBarBackground('#EDEEF0'); this.getData(); } } @@ -197,9 +196,9 @@ height: 150rpx; margin-top: 20rpx; margin-left: 30rpx; - /* background-size:100% 100%; - background-image:url("/static/my/my-record/run.png"); - background-repeat:no-repeat; */ + background-size:100% 100%; + background-image:url("/static/my/my-record/run.png/"); + background-repeat:no-repeat; float: left; } diff --git a/teamwork/pages/my/my-setting.vue b/teamwork/pages/my/my-setting.vue index ca37dba7301d35d51e533d652b1f89ca3897154c..e9c08841d4de5e5c4d6e55bb2fae3c87ac1ca576 100644 --- a/teamwork/pages/my/my-setting.vue +++ b/teamwork/pages/my/my-setting.vue @@ -25,6 +25,10 @@ + + + @@ -37,26 +41,40 @@ } }, methods:{ + dialogConfirm() { + uni.reLaunch({ + url: '/pages/login/login', + animationType: 'pop-in', + animationDuration: 300 + }) + this.$refs.alertDialog.close(); + }, + + dialogClose() { + //console.log('点击关闭') + this.$refsalertDialog.close(); + }, confirmExit(){ - uni.showModal({ - title: '温馨提示', //提示标题 - content: '确认退出你的账号吗', //提示内容 - showCancel: true, //是否显示取消按钮 - success: function (res) { - if (res.confirm) { //confirm为ture,代表用户点击确定 - // uni.navigateTo({ - // url: '/pages/login/login' - // }) - uni.reLaunch({ - url: '/pages/login/login', - animationType: 'pop-in', - animationDuration: 300 - }) - } else if (res.cancel) { //cancel为ture,代表用户点击取消 + this.$refs.alertDialog.open(); + // uni.showModal({ + // title: '温馨提示', //提示标题 + // content: '确认退出你的账号吗', //提示内容 + // showCancel: true, //是否显示取消按钮 + // success: function (res) { + // if (res.confirm) { //confirm为ture,代表用户点击确定 + // // uni.navigateTo({ + // // url: '/pages/login/login' + // // }) + // uni.reLaunch({ + // url: '/pages/login/login', + // animationType: 'pop-in', + // animationDuration: 300 + // }) + // } else if (res.cancel) { //cancel为ture,代表用户点击取消 - } - } - }) + // } + // } + // }) }, goBack(){ uni.navigateBack({ diff --git a/teamwork/pages/my/my-walking-record.vue b/teamwork/pages/my/my-walking-record.vue index a042da440eae5b36fdf856799a4b3ef7643b0cab..b08922944469df2150d048c639bac60c3c7121dd 100644 --- a/teamwork/pages/my/my-walking-record.vue +++ b/teamwork/pages/my/my-walking-record.vue @@ -121,7 +121,7 @@ }, onLoad() { - plus.navigator.setStatusBarBackground('#EDEEF0'); + //plus.navigator.setStatusBarBackground('#EDEEF0'); this.getData(); } } @@ -184,6 +184,9 @@ height: 150rpx; margin-top: 20rpx; margin-left: 30rpx; + background-size:100% 100%; + background-image:url("/static/my/my-record/walk.png/"); + background-repeat:no-repeat; float: left; } diff --git a/teamwork/static/my/my-record/run.png b/teamwork/static/my/my-record/run.png index 6e8ace386fe83dd3876aa5319fc5f6af735d9df2..79fcf343ea65e3b55049b7a80911306ccd51c450 100644 Binary files a/teamwork/static/my/my-record/run.png and b/teamwork/static/my/my-record/run.png differ diff --git a/teamwork/static/my/my-record/walk.png b/teamwork/static/my/my-record/walk.png index 8a0b12cb8fc44ab7dbe2037f3cbac33ae362a232..379849c92e19f4ff0e6219a6100a02fa919c10dc 100644 Binary files a/teamwork/static/my/my-record/walk.png and b/teamwork/static/my/my-record/walk.png differ diff --git a/teamwork/static/my/my-record/walking.png b/teamwork/static/my/my-record/walking.png index 8adf6d30a323e339cd1e3ba01c143239cf910902..c34878652761d89ee32ed3f988d158db3e63d689 100644 Binary files a/teamwork/static/my/my-record/walking.png and b/teamwork/static/my/my-record/walking.png differ