|
@@ -9,6 +9,8 @@ import { getQueryString } from '@/util/getParams.js'
|
|
|
|
|
|
|
|
import { myRequest } from '@/util/api.js'
|
|
import { myRequest } from '@/util/api.js'
|
|
|
|
|
|
|
|
|
|
+import { decryptDes } from '@/util/des.js'
|
|
|
|
|
+
|
|
|
const APPKEY = '4AA7B3944BDF3739'
|
|
const APPKEY = '4AA7B3944BDF3739'
|
|
|
const ocode = '1015730314'
|
|
const ocode = '1015730314'
|
|
|
|
|
|
|
@@ -28,7 +30,8 @@ onLoad(() => {
|
|
|
// 获取用户card_number
|
|
// 获取用户card_number
|
|
|
const loginFilter = () => {
|
|
const loginFilter = () => {
|
|
|
const card_number = getQueryString('card_number')
|
|
const card_number = getQueryString('card_number')
|
|
|
- if (!card_number) {
|
|
|
|
|
|
|
+ const token = getQueryString('token')
|
|
|
|
|
+ if (!card_number || !token) {
|
|
|
// 判断是否是从小程序进入
|
|
// 判断是否是从小程序进入
|
|
|
const type = getQueryString('type')
|
|
const type = getQueryString('type')
|
|
|
if (type === 'weixin') {
|
|
if (type === 'weixin') {
|
|
@@ -39,6 +42,7 @@ const loginFilter = () => {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
uni.setStorageSync('bus_card_number', card_number)
|
|
uni.setStorageSync('bus_card_number', card_number)
|
|
|
|
|
+ uni.setStorageSync('bus_token', token)
|
|
|
getUserInfo()
|
|
getUserInfo()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -53,6 +57,12 @@ const getUserInfo = async () => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
|
|
+
|
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
|
+ // const result = JSON.parse(decryptDes(res.data))
|
|
|
|
|
+ // console.log(result);
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
uni.setStorageSync('bus-userInfo', JSON.stringify(res.data))
|
|
uni.setStorageSync('bus-userInfo', JSON.stringify(res.data))
|
|
|
// 判断用户权限
|
|
// 判断用户权限
|
|
|
if (res.data.user_zz === '教师' || res.data.user_zz === '临时人员') {
|
|
if (res.data.user_zz === '教师' || res.data.user_zz === '临时人员') {
|