1- import Vue from 'vue'
2- import App from './App'
1+ import Vue from 'vue' ;
2+ import App from './App' ;
33
4- Vue . config . productionTip = false
4+ Vue . config . productionTip = false ;
55
6- App . mpType = 'app'
6+ App . mpType = 'app' ;
77
88// 此处为演示Vue.prototype使用,非uView的功能部分
9- Vue . prototype . vuePrototype = '枣红'
9+ Vue . prototype . vuePrototype = '枣红' ;
1010
1111// 引入全局uView
12- import uView from 'uview-ui'
13- Vue . use ( uView )
12+ import uView from 'uview-ui' ;
13+ Vue . use ( uView ) ;
1414
1515// 此处为演示vuex使用,非uView的功能部分
16- import store from '@/store'
16+ import store from '@/store' ;
1717
1818// 引入uView提供的对vuex的简写法文件
19- let vuexStore = require ( '@/store/$u.mixin.js' )
20- Vue . mixin ( vuexStore )
19+ let vuexStore = require ( '@/store/$u.mixin.js' ) ;
20+ Vue . mixin ( vuexStore ) ;
2121
2222// 引入uView对小程序分享的mixin封装
2323let mpShare = require ( 'uview-ui/libs/mixin/mpShare.js' ) ;
24- Vue . mixin ( mpShare )
24+ Vue . mixin ( mpShare ) ;
2525
2626// i18n部分的配置
2727// 引入语言包,注意路径
2828import Chinese from '@/common/locales/zh.js' ;
2929import English from '@/common/locales/en.js' ;
3030
3131// VueI18n
32- import VueI18n from '@/common/vue-i18n.min.js'
32+ import VueI18n from '@/common/vue-i18n.min.js' ;
3333
3434// VueI18n
35- Vue . use ( VueI18n )
35+ Vue . use ( VueI18n ) ;
3636
3737const i18n = new VueI18n ( {
3838 // 默认语言
@@ -42,23 +42,23 @@ const i18n = new VueI18n({
4242 'zh' : Chinese ,
4343 'en' : English ,
4444 }
45- } )
45+ } ) ;
4646
4747// 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填
48- Vue . prototype . _i18n = i18n
48+ Vue . prototype . _i18n = i18n ;
4949
5050const app = new Vue ( {
5151 i18n,
5252 store,
5353 ...App
54- } )
54+ } ) ;
5555
5656// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
57- import httpInterceptor from '@/common/http.interceptor.js'
58- Vue . use ( httpInterceptor , app )
57+ import httpInterceptor from '@/common/http.interceptor.js' ;
58+ Vue . use ( httpInterceptor , app ) ;
5959
6060// http接口API抽离,免于写url或者一些固定的参数
61- import httpApi from '@/common/http.api.js'
62- Vue . use ( httpApi , app )
61+ import httpApi from '@/common/http.api.js' ;
62+ Vue . use ( httpApi , app ) ;
6363
64- app . $mount ( )
64+ app . $mount ( ) ;
0 commit comments