From 07c0f76a80262cf48da3438dffd3ad3c04f9cf44 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 21 六月 2024 17:13:28 +0800 Subject: [PATCH] fix:库管首页点击装卸 弹窗问题 --- pages/login/resetPassword/resetPassword.vue | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/pages/login/resetPassword/resetPassword.vue b/pages/login/resetPassword/resetPassword.vue index ffd1ac8..b862f88 100644 --- a/pages/login/resetPassword/resetPassword.vue +++ b/pages/login/resetPassword/resetPassword.vue @@ -107,13 +107,33 @@ } } }, + 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 { + this.getUserInfo(params.phone, params.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