From ffc2eddb1c4f534075fdc5787cbca06e847c576c Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 25 四月 2024 08:34:33 +0800 Subject: [PATCH] feat:小程序增加客户注册页面,修改页面若干bug --- pages/login/resetPassword/resetPassword.vue | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/pages/login/resetPassword/resetPassword.vue b/pages/login/resetPassword/resetPassword.vue index ffd1ac8..a9ef8a2 100644 --- a/pages/login/resetPassword/resetPassword.vue +++ b/pages/login/resetPassword/resetPassword.vue @@ -107,13 +107,34 @@ } } }, + computed: { + roleType() { + return uni.getStorageSync('roleType') + } + }, onLoad(params) { - this.userInfo = JSON.parse(params.userInfo) + if (this.roleType === 3) { + this.userInfo = JSON.parse(params.userInfo) + } else { + const query = JSON.parse(params.userInfo) + this.getUserInfo( query.phone, query.idCard) + } + }, onReady() { this.$refs.uForm.setRules(this.rules) }, methods: { + getUserInfo(phone, idCard) { + this.$reqGet('phoneAndCard', { phone, idCard }).then(res => { + if (res.code === 0) { + this.userInfo = res.data + } else { + uni.$u.toast('鍔犺浇澶辫触') + } + }) + + }, checkChange(name) { this.inputType = name.length === 0 ? 'password' : '' this.isFocus = true -- Gitblit v1.9.1