main.js
964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import Vue from 'vue'
import App from './App'
import echarts from 'echarts/'
import MiniRefreshTools from 'module/minirefresh';
import 'module/minirefresh/dist/debug/minirefresh.css'
import AwesomePicker from 'module/vue-awesome-picker';
import VueI18n from 'module/vue-i18n'
import storezh from 'i18n/langs/storeCN'
import mallzh from 'i18n/langs/mallCN'
Vue.use(VueI18n)
Vue.use(AwesomePicker);
Vue.config.productionTip = false
Vue.prototype.echarts=echarts;
App.mpType = 'app'
console.log(window.url)
window.aa=function(a){
alert(a)
}
var locale=''
if(window.pageType=="store"){
locale='zh-store'
}else if(window.pageType=="mall"){
locale='zh-mall'
}
// var src='./i18n/langs/mallCN'
var src='./i18n/langs/storeCN'
console.log(window.pageType)
const i18n=new VueI18n({
locale:locale,
messages:{
// 'en':{...require(src)},
'zh-store':storezh,
'zh-mall':mallzh
}
})
Vue.prototype._i18n=i18n;
const app = new Vue({
i18n,
...App
})
app.$mount()