| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import Vue from 'vue'
- import App from './App.vue'
- import {
- gotoPage,
- playMusic,
- openUrl,
- } from './common/util.js'
- import {
- getSycCache
- } from './config/cache'
- import {
- baseUrl
- } from './config/setting'
- Vue.config.productionTip = false
- Vue.prototype.$request = request
- Vue.prototype.gotoPage = gotoPage
- Vue.prototype.playMusic = playMusic
- Vue.prototype.openUrl = openUrl
- Vue.prototype.baseUrl = baseUrl
- import request from './config/request.js'
- // 引入全局uView2.0
- import uView from 'uview-ui'
- Vue.use(uView);
- // 如此配置即可
- uni.$u.config.unit = 'rpx'
- import VueClipboard from 'vue-clipboard2' //引入插件
- Vue.use(VueClipboard) //安装插件
- // i18n部分的配置
- // 引入语言包,注意路径
- import Chinese from '@/common/locales/zh-cn.js';
- // 英语
- import English from '@/common/locales/en.js';
- // 日语
- import Japanese from '@/common/locales/jap.js';
- // 马来西亚
- import Malaysia from '@/common/locales/mal.js';
- // 印度尼西亚
- import Indonesia from '@/common/locales/ind.js';
- // 泰语
- import Thailand from '@/common/locales/tha.js';
- // 越南语
- import Vietnam from '@/common/locales/vie.js';
- // 韩语
- import SouthKorea from '@/common/locales/sk.js';
- // 香港
- import HongKong from '@/common/locales/hk.js';
- // 法语
- import French from '@/common/locales/fr.js';
- // VueI18n
- import VueI18n from 'vue-i18n'
- Vue.use(VueI18n);
- const lang = getSycCache('lang')
- const langs = {
- 'zh-cn': Chinese,
- 'en': English,
- 'jap': Japanese,
- 'mal': Malaysia,
- 'ind': Indonesia,
- 'tha': Thailand,
- 'vie': Vietnam,
- 'sk': SouthKorea,
- }
- Vue.prototype.langs = langs
- const i18n = new VueI18n({
- // 默认语言
- locale: lang ? lang : 'zh-cn',
- // 引入语言文件
- messages: langs,
- fallbackLocale: 'zh-cn',
- });
- Vue.prototype._i18n = i18n
- // window.Languages = i18n;
- // VueI18n
- App.mpType = 'app'
- const app = new Vue({
- ...App,
- i18n
- })
- app.$mount()
|