Commit 3660b6d0 by golton_gao

update: 优化初次进入页面时的身份获取

parent 960fbbe5
Showing with 8 additions and 4 deletions
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
created() { created() {
// 初始化 token // 初始化 token
Api.setToken(this) // await Api.setToken(this)
// 修改导航条颜色 // 修改导航条颜色
this.$nativeApi.system.statusBarColor([255, 255, 255, 1]) this.$nativeApi.system.statusBarColor([255, 255, 255, 1])
......
...@@ -7,6 +7,7 @@ import App from './app.vue' ...@@ -7,6 +7,7 @@ import App from './app.vue'
import store from './store' import store from './store'
import plugin from './plugin' import plugin from './plugin'
import routerStore from '../libraries/plugins/RouterStore' import routerStore from '../libraries/plugins/RouterStore'
import * as Api from '@/api/index'
// import VConsole from 'vconsole' // import VConsole from 'vconsole'
// let vconsole = new VConsole() // let vconsole = new VConsole()
...@@ -14,12 +15,15 @@ Vue.use(routerStore, store, router) ...@@ -14,12 +15,15 @@ Vue.use(routerStore, store, router)
Vue.config.debug = process.env.NODE_ENV !== 'production' Vue.config.debug = process.env.NODE_ENV !== 'production'
Vue.config.productionTip = false Vue.config.productionTip = false
/* eslint-disable no-new */ const vm = new Vue({
new Vue({
el: '#app',
store, store,
router, router,
plugin, plugin,
template: '<App/>', template: '<App/>',
components: { App } components: { App }
}) })
window.qing.ready(async () => {
// 初始化 token
await Api.setToken(vm)
vm.$mount('#app')
})
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 sign in to comment