Initial commit

This commit is contained in:
danshihao
2023-11-14 15:33:22 +08:00
commit 5ef2186398
48 changed files with 22347 additions and 0 deletions
+44
View File
@@ -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')