| | |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | console.log(options) |
| | | if(options.code) { |
| | | this.form.userType = options.code |
| | | } |
| | | if(options.companyId) { |
| | | this.form.companyId = options.companyId |
| | | } |
| | | }, |
| | | onUnload() { |
| | |
| | | } |
| | | updatePhone(this.form).then(val => { |
| | | if(val.data.code == 200) { |
| | | uni.showToast({ |
| | | title: '修改成功', |
| | | icon: 'none' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 500) |
| | | |
| | | if(val.data.data == 1) { |
| | | uni.showToast({ |
| | | title: '修改成功,请重新登录', |
| | | icon: 'none' |
| | | }) |
| | | uni.clearStorage() |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/pages/companyLogin/companyLogin?code=02' |
| | | }) |
| | | }, 500) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '修改成功', |
| | | icon: 'none' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.navigateBack() |
| | | }, 500) |
| | | } |
| | | } |
| | | |
| | | }) |