|
@@ -36,16 +36,47 @@
|
|
|
icon: 'error'
|
|
|
});
|
|
|
} else {
|
|
|
- if (this.token) {
|
|
|
- let proof = await new WXBizDataCrypt('wx5705da8747c77cfe', this.token.session_key)
|
|
|
- let numData = await proof.decryptData(e.detail.encryptedData, e.detail.iv)
|
|
|
- this.$store.commit('m_parent/updatePhoneNumber', numData.phoneNumber);
|
|
|
- //初始化App
|
|
|
- await this.$initStart(numData.phoneNumber)
|
|
|
- uni.navigateTo({
|
|
|
- url: '/subpkg/startup/options'
|
|
|
+ try{
|
|
|
+ if (this.token) {
|
|
|
+ let proof = await new WXBizDataCrypt('wx5705da8747c77cfe', this.token.session_key)
|
|
|
+ let numData = await proof.decryptData(e.detail.encryptedData, e.detail.iv)
|
|
|
+ this.$store.commit('m_parent/updatePhoneNumber', numData.phoneNumber);
|
|
|
+ //初始化App
|
|
|
+ await this.$initStart(numData.phoneNumber)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/subpkg/startup/options'
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.updateToken()
|
|
|
+ this.updateParentInfo()
|
|
|
+ this.updatePhoneNumber()
|
|
|
+ this.updateChildrenData()
|
|
|
+ this.updateUserData()
|
|
|
+ this.updateChildInfo()
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/subpkg/startup/login'
|
|
|
+ })
|
|
|
+ return uni.showToast({
|
|
|
+ title: '获取不到您的信息请重新登录',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }catch(e){
|
|
|
+ this.updateToken()
|
|
|
+ this.updateParentInfo()
|
|
|
+ this.updatePhoneNumber()
|
|
|
+ this.updateChildrenData()
|
|
|
+ this.updateUserData()
|
|
|
+ this.updateChildInfo()
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/subpkg/startup/login'
|
|
|
})
|
|
|
+ return uni.showToast({
|
|
|
+ title: '身份验证已过期请重新登录',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
},
|