|
@@ -8,6 +8,7 @@
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import { getGlobalInterface } from '@/api/data.js'
|
|
|
import { getUserInfo } from '@/api/user.js'
|
|
|
+import { settingUserGetBiz } from '@/api/projectIndex'
|
|
|
// omega埋点工具包
|
|
|
import OmegaTracker from '@didi/omega-tracker/lib/index.esm'
|
|
|
const config = { appKey: 'omega6b172861f4' }
|
|
@@ -33,8 +34,17 @@ export default {
|
|
|
created() {
|
|
|
this.initRoutes()
|
|
|
this.initOmegaTracker()
|
|
|
+ this.settingUserGetBiz()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async settingUserGetBiz() { // 刷新页面
|
|
|
+ if (this.$store.state.global.bizId === -1) {
|
|
|
+ const res = await settingUserGetBiz()
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$store.state.global.bizId = res.data.bizId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
initOmegaTracker() {
|
|
|
try {
|
|
|
window.log = OmegaTracker.getTracker(config)
|