| | |
| | | } |
| | | } |
| | | }, |
| | | 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 |