|
@@ -1,7 +1,13 @@
|
|
|
import Vue from 'vue'
|
|
|
import Vuex from 'vuex'
|
|
|
-import { login, queryFloor, queryfmapID } from '@/api/login.js'
|
|
|
-import { queryBrand } from '@/api/public.js'
|
|
|
+import {
|
|
|
+ login,
|
|
|
+ queryFloor,
|
|
|
+ queryfmapID
|
|
|
+} from '@/api/login.js'
|
|
|
+import {
|
|
|
+ queryBrand
|
|
|
+} from '@/api/public.js'
|
|
|
import axios from 'axios'
|
|
|
import router from '../router'
|
|
|
|
|
@@ -161,10 +167,12 @@ export default new Vuex.Store({
|
|
|
},
|
|
|
actions: {
|
|
|
// 获取项目列表、userId
|
|
|
- async getUserInfo({ commit }, palyload) {
|
|
|
+ async getUserInfo({
|
|
|
+ commit
|
|
|
+ }, palyload) {
|
|
|
await login({
|
|
|
- returnTree: true,
|
|
|
- })
|
|
|
+ returnTree: true,
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
// 获取用户当前权限
|
|
|
console.log(res.result)
|
|
@@ -191,7 +199,9 @@ export default new Vuex.Store({
|
|
|
}
|
|
|
router.push({
|
|
|
path: './home/overview',
|
|
|
- query: { plazaId: res.treeData[0].ccode },
|
|
|
+ query: {
|
|
|
+ plazaId: res.treeData[0].ccode
|
|
|
+ },
|
|
|
})
|
|
|
} else {
|
|
|
router.push({
|
|
@@ -199,8 +209,13 @@ export default new Vuex.Store({
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- // commit('SETISREQUESTtAUTH', false)
|
|
|
- // commit('SETISREQUESTtAUTH', false)
|
|
|
+ // 给oA头添加名称
|
|
|
+ // 指定条问题
|
|
|
+ window.wd_fm_info = {
|
|
|
+ profile: {
|
|
|
+ username: encodeURIComponent(res.username)
|
|
|
+ }
|
|
|
+ };
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -211,17 +226,21 @@ export default new Vuex.Store({
|
|
|
// commit('SETISREQUESTtAUTH', err)
|
|
|
})
|
|
|
},
|
|
|
- async getUserInfoNoPath({ commit }, palyload) {
|
|
|
+ async getUserInfoNoPath({
|
|
|
+ commit
|
|
|
+ }, palyload) {
|
|
|
await login({
|
|
|
- returnTree: true,
|
|
|
- })
|
|
|
+ returnTree: true,
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
if (res.result === 'success') {
|
|
|
// commit('STOREACCESSLEVEL', res.level)
|
|
|
commit('SETAUTHMSG', res)
|
|
|
- // localStorage.setItem('PLAZAID', res.treeData[0].ccode)
|
|
|
- // commit('STOREPLAZAID', res.treeData[0].ccode)
|
|
|
- // commit('SETPLAZENAME', res.treeData[0].cname)
|
|
|
+ window.wd_fm_info = {
|
|
|
+ profile: {
|
|
|
+ username: encodeURIComponent(res.username)
|
|
|
+ }
|
|
|
+ };
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -267,4 +286,4 @@ export default new Vuex.Store({
|
|
|
},
|
|
|
},
|
|
|
modules: {},
|
|
|
-})
|
|
|
+})
|