Initial commit
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import Storage from 'vue-ls'
|
||||
|
||||
import Vant from 'vant'
|
||||
import 'vant/lib/index.css'
|
||||
import 'vant/lib/index.less'
|
||||
|
||||
import VueI18n from 'vue-i18n'
|
||||
import LangENUS from './common/lang/en-us'
|
||||
import LangZHCN from './common/lang/zh-cn'
|
||||
import { ACCESS_TOKEN, USER_INFO } from '@/store/mutation-types'
|
||||
import './permission'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(Vant)
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: 'zh-CN',
|
||||
messages: {
|
||||
'en-US': LangENUS,
|
||||
'zh-CN': LangZHCN
|
||||
}
|
||||
})
|
||||
|
||||
Vue.use(Storage, {
|
||||
namespace: 'pro__', // key prefix
|
||||
name: 'ls', // name variable Vue.[ls] or this.[$ls],
|
||||
storage: 'local' // storage name session, local, memory
|
||||
})
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
mounted () {
|
||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||
store.commit('SET_INFO', Vue.ls.get(USER_INFO))
|
||||
},
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
Reference in New Issue
Block a user