Commit 67820d3b authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 4c433a82 c6980ec7
...@@ -78,17 +78,25 @@ export default { ...@@ -78,17 +78,25 @@ export default {
}, },
// 更新机构ID // 更新机构ID
updateOrgId(options) { updateOrgId(options) {
const orgId = options?.query?.orgId || -1 const orgId = options?.query?.orgId
// 需要更新机构ID的场景,详细可参考 https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html // 需要更新机构ID的场景,详细可参考 https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html
const scene = [1005, 1006, 1011, 1012, 1013, 1026, 1035, 1047, 1048, 1049, 1053, 1058, 1067, 1091, 1145, 1135, 1183] const scene = [1005, 1006, 1011, 1012, 1013, 1026, 1035, 1047, 1048, 1049, 1053, 1058, 1067, 1091, 1145, 1135, 1183, 1017]
if (!this.orgId) { // 没有机构ID,更新
if (!this.orgId) { this.$u.vuex('orgId', orgId || -1)
this.$u.vuex('orgId', orgId)
} else { } else {
if (scene.includes(options.scene)) { if (scene.includes(options.scene)) { // 如果需要更新机构ID
if (orgId !== this.orgId) this.logout() if (!orgId) { // 针对重新载入小程序 安卓的query参数会清空
// 如果没有参数,需要重置为平台的场景
this.$u.vuex('orgId', orgId) const platformScene = [1005, 1006, 1026, 1053, 1145, 1183, 1017]
if (platformScene.includes(options.scene)) {
this.$u.vuex('orgId', -1)
}
return
}
if (orgId && orgId !== this.orgId) {
this.logout()
this.$u.vuex('orgId', orgId)
}
} }
} }
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
:border-bottom="false" :border-bottom="false"
title-bold title-bold
></u-navbar> ></u-navbar>
<view class="content" v-if="lists"> <view class="content" v-if="lists.length > 0">
<!-- <text class="title">{{ title }}</text> --> <!-- <text class="title">{{ title }}</text> -->
<my-subject <my-subject
class="subject-item" class="subject-item"
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
// if (data.length > 0) { // if (data.length > 0) {
// this.lists = data // this.lists = data
// console.log('tiku data', data) console.log('tiku data', this.lists)
// } // }
}) })
}, },
......
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