Commit e2e9ddd7 authored by Damon's avatar Damon

perf: 机构ID存储

parent 2640416a
......@@ -4,11 +4,10 @@ export default {
globalData: {
// 开发环境
uniEnv: process.uniEnv,
questionList: [],
orgId: -1
questionList: []
},
onLaunch: function(options) {
this.globalData.orgId = options?.query?.orgId || -1
this.$u.vuex('orgId', options?.query?.orgId || -1)
// 版本更新
this.updateApp()
},
......
......@@ -130,7 +130,7 @@ export default {
},
computed: {
orgIdText() {
return getApp().globalData.orgId
return this.orgId
},
title() {
return this.selected.title || '请选择题库'
......
......@@ -133,7 +133,7 @@ export default {
},
]
const data = {
instrtutionId: getApp().globalData.orgId,
instrtutionId: this.orgId,
orders: JSON.stringify(lists),
openId: this.openId,
}
......
......@@ -206,7 +206,7 @@ export default {
},
]
const data = {
instrtutionId: getApp().globalData.orgId,
instrtutionId: this.orgId,
orders: JSON.stringify(lists),
openId: this.openId,
}
......
......@@ -61,7 +61,7 @@ export default {
code: code,
avatar: userInfo.avatarUrl,
nickname: userInfo.nickName,
orgId: getApp().globalData.orgId,
orgId: this.orgId,
}
uni.showLoading({
title: '加载中',
......
......@@ -19,7 +19,8 @@ let saveStateKeys = [
'tipStatus',
'questionWarehouseId',
'relationId', // 绑卡用
'answerCount'
'answerCount',
'orgId'
]
// 保存变量到本地存储中
......@@ -51,6 +52,7 @@ const store = new Vuex.Store({
questionWarehouseId: lifeData.questionWarehouseId
? lifeData.questionWarehouseId
: '1414854649273384960', // 科目ID
orgId: lifeData.orgId ? lifeData.orgId : -1, // 机构ID
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.0',
questionList: {}, // 练习列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment