|
@@ -154,23 +154,34 @@ export default new Vuex.Store({
|
|
|
if (res.result === 'success') {
|
|
|
commit('STOREACCESSLEVEL', res.level)
|
|
|
let level = res.level
|
|
|
- if (level === 0) {
|
|
|
- if (res.treeData[0].ccode) {
|
|
|
- localStorage.setItem('PLAZAID', res.treeData[0].ccode)
|
|
|
- commit('STOREPLAZAID', res.treeData[0].ccode)
|
|
|
- commit('SETPLAZENAME', res.treeData[0].cname)
|
|
|
- }
|
|
|
+ if (window.opener) {
|
|
|
+ let data = window.opener.__fromGroupPage
|
|
|
+ level = data.level
|
|
|
+ commit('SETPLAZENAME', data.plazaName)
|
|
|
+ localStorage.setItem('PLAZAID', data.plazaId)
|
|
|
+ commit('STOREPLAZAID', data.plazaId)
|
|
|
router.push({ path: './home/homepage' })
|
|
|
} else {
|
|
|
- router.push({ path: './group' })
|
|
|
+ if (level === 0) {
|
|
|
+ if (res.treeData[0].ccode) {
|
|
|
+ localStorage.setItem('PLAZAID', res.treeData[0].ccode)
|
|
|
+ commit('STOREPLAZAID', res.treeData[0].ccode)
|
|
|
+ commit('SETPLAZENAME', res.treeData[0].cname)
|
|
|
+ }
|
|
|
+ router.push({ path: './home/homepage' })
|
|
|
+ } else {
|
|
|
+ router.push({ path: './group' })
|
|
|
+ }
|
|
|
}
|
|
|
// commit('SETISREQUESTtAUTH', false)
|
|
|
+
|
|
|
+ // commit('SETISREQUESTtAUTH', false)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getFloors(context) {
|
|
|
queryFloor({
|
|
|
- plazaId: context.state.plazaId || localStorage.getItem('PLAZAID'),
|
|
|
+ plazaId: localStorage.getItem('PLAZAID') || context.state.plazaId,
|
|
|
}).then((res) => {
|
|
|
if (res.result == 'success') {
|
|
|
context.commit('SETFLOORS', res.data)
|
|
@@ -179,14 +190,14 @@ export default new Vuex.Store({
|
|
|
},
|
|
|
async getfmapID(context) {
|
|
|
await queryfmapID({
|
|
|
- mapId: context.state.plazaId,
|
|
|
+ mapId: localStorage.getItem('PLAZAID') || context.state.plazaId,
|
|
|
}).then((res) => {
|
|
|
- context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
|
|
|
+ context.commit('SETMAPID', `${localStorage.getItem('PLAZAID') || context.state.plazaId}_${res.mapVersion}`)
|
|
|
})
|
|
|
},
|
|
|
async getBrand(context) {
|
|
|
let data = {
|
|
|
- plazaId: context.state.plazaId,
|
|
|
+ plazaId: `${localStorage.getItem('PLAZAID') || context.state.plazaId}`,
|
|
|
}
|
|
|
await queryBrand({
|
|
|
data,
|