|
@@ -105,10 +105,10 @@ export const userStore = defineStore('user', {
|
|
checkPersonBaseInfoFun(data) {
|
|
checkPersonBaseInfoFun(data) {
|
|
data = data || {}
|
|
data = data || {}
|
|
// 待门墩儿测试后开放
|
|
// 待门墩儿测试后开放
|
|
- // if (!data || !Object.keys(data).length || data.type === undefined || data.type === null) {
|
|
|
|
- // showAuthModal('selectUserType')
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
|
|
+ if (!data || !Object.keys(data).length || data.type === undefined || data.type === null) {
|
|
|
|
+ showAuthModal('selectUserType')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
const necessaryInfoReady = checkPersonBaseInfo(data)
|
|
const necessaryInfoReady = checkPersonBaseInfo(data)
|
|
data.necessaryInfoReady = necessaryInfoReady
|
|
data.necessaryInfoReady = necessaryInfoReady
|
|
if (necessaryInfoReady) closeAuthModal()
|
|
if (necessaryInfoReady) closeAuthModal()
|
|
@@ -127,6 +127,14 @@ export const userStore = defineStore('user', {
|
|
if (!data) return
|
|
if (!data) return
|
|
const _data = await this.getFieldText(data)
|
|
const _data = await this.getFieldText(data)
|
|
this.baseInfo = _data
|
|
this.baseInfo = _data
|
|
|
|
+
|
|
|
|
+ // 是学生则跳转学生专区
|
|
|
|
+ if (data && data?.type === '1') {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pagesA/student/index'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
return Promise.resolve(data);
|
|
return Promise.resolve(data);
|
|
},
|
|
},
|
|
// 获取用户信息
|
|
// 获取用户信息
|
|
@@ -228,12 +236,6 @@ export const userStore = defineStore('user', {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
persist: {
|
|
persist: {
|
|
- // enabled: true,
|
|
|
|
- // strategies: [
|
|
|
|
- // {
|
|
|
|
- // key: 'user-store'
|
|
|
|
- // }
|
|
|
|
- // ]
|
|
|
|
storage: {
|
|
storage: {
|
|
setItem(key, value) {
|
|
setItem(key, value) {
|
|
uni.setStorageSync(key, value)
|
|
uni.setStorageSync(key, value)
|