|
|
@@ -25,6 +25,7 @@
|
|
|
import { ref, computed } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
import { myRequest } from '@/utils/api.js'
|
|
|
+import { decryptDes } from '@/utils/des.js'
|
|
|
|
|
|
// 手机号码
|
|
|
const phone = ref('')
|
|
|
@@ -113,10 +114,12 @@ const getBind = async (wxcode) => {
|
|
|
}
|
|
|
})
|
|
|
// console.log(res)
|
|
|
+ const result = JSON.parse(decryptDes(res.data))
|
|
|
|
|
|
// 1 代表家长 2 代表学生 3 代表老师
|
|
|
- uni.setStorageSync('token', res.data.token)
|
|
|
- uni.setStorageSync('userInfo', res.data.user)
|
|
|
+ uni.setStorageSync('token', result.token)
|
|
|
+ uni.setStorageSync('userInfo', result.user)
|
|
|
+ uni.setStorageSync('userhead', result.userhead)
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/home/home'
|
|
|
})
|