From 83b6d61b9e8d0360bb3aa363610a38e680c7b1c9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 23 八月 2024 11:10:31 +0800 Subject: [PATCH] feat:一键登录loading问题 --- pages/login/resetPassword/resetPassword.vue | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/pages/login/resetPassword/resetPassword.vue b/pages/login/resetPassword/resetPassword.vue index a29cf20..4ab6b80 100644 --- a/pages/login/resetPassword/resetPassword.vue +++ b/pages/login/resetPassword/resetPassword.vue @@ -14,12 +14,12 @@ <u-input v-if='inputType==="password"' v-model="modelForm.originalPassword" border="surround" - placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="瀵嗙爜搴旂敱8-16浣嶆暟瀛椼�佸瓧姣嶃�佺鍙风粍鎴愩��" :type='inputType' /> <u-input v-else v-model="modelForm.originalPassword" border="surround" - placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="瀵嗙爜搴旂敱8-16浣嶆暟瀛椼�佸瓧姣嶃�佺鍙风粍鎴愩��" :type='inputType' /> </u-form-item> </template> @@ -30,12 +30,12 @@ <u-input v-if='inputType==="password"' v-model="modelForm.password" border="surround" - placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="瀵嗙爜搴旂敱8-16浣嶆暟瀛椼�佸瓧姣嶃�佺鍙风粍鎴愩��" :type='inputType' /> <u-input v-else v-model="modelForm.password" border="surround" - placeholder="璇疯緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="瀵嗙爜搴旂敱8-16浣嶆暟瀛椼�佸瓧姣嶃�佺鍙风粍鎴愩��" :type='inputType' /> </u-form-item> <view class="intensity"> @@ -60,12 +60,12 @@ <u-input v-if='inputType==="password"' v-model="modelForm.secondPassword" border="surround" - placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�" type='password' /> <u-input v-else v-model="modelForm.secondPassword" border="surround" - placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�(浠呮敮鎸佹暟瀛楀瓧姣嶄笅鍒掔嚎)" + placeholder="璇峰啀娆¤緭鍏ュ瘑鐮�" type='text' /> </u-form-item> <u-form-item> @@ -181,7 +181,8 @@ originalPassword:'', //鍘熷瀵嗙爜 password: '', //鏂板瘑鐮� secondPassword: '', //浜屾纭瀵嗙爜 - username:'' + username:'', + userId:'' }, processLoading: false, rules: { @@ -210,6 +211,9 @@ return uni.getStorageSync('roleType') }, userId() { + if(uni.getStorageSync('userId')) { + this.modelForm.userId = uni.getStorageSync('userId') + } return uni.getStorageSync('userId') } }, @@ -217,11 +221,14 @@ if (this.roleType === 3) { this.userInfo = JSON.parse(params.userInfo) } else { - this.getUserInfo(params.phone, params.idCard) + if(params.phone && params.idCard){ + this.getUserInfo(params.phone, params.idCard) + } } if(params.userInfo) { console.log(JSON.parse(params.userInfo),'userInfo====') this.modelForm.username = JSON.parse(params.userInfo).username + this.modelForm.userId = JSON.parse(params.userInfo).userId.toString() //userId if(JSON.parse(params.userInfo).isShowPassword) { this.isShowPassword = false }else { @@ -264,9 +271,7 @@ } this.$refs.uForm.validate().then(res => { this.processLoading = true; - let params = Object.assign({},this.modelForm, {userId:this.userId.toString()}) - console.log(params,'params=====') - this.$reqAllJson('appUpdateById', params, { method: 'PUT', 'Content-type': 'application/json' }).then(res => { + this.$reqAllJson('appUpdateById', this.modelForm, { method: 'PUT', 'Content-type': 'application/json' }).then(res => { this.processLoading = false; if (res.code === 0) { this.$u.toast('淇敼鎴愬姛,鍗冲皢鍥炲埌棣栭〉') -- Gitblit v1.9.1