| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import Vue from 'vue'
- import App from './App'
- import api from './common/api.js'
- import {
- gotoPage
- } from './common/utils.js'
- import langs from './common/lang.js'
- Vue.prototype.$request = api
- Vue.prototype.gotoPage = gotoPage
- let locale = uni.getStorageSync('locale')
- locale = typeof(locale) != 'undefined' && locale ? locale : 'zh_cn'
- Vue.prototype.langs = langs.langs
- Vue.prototype.lang = langs.langs[locale]
- Vue.config.productionTip = false
- App.mpType = 'app'
- // 引入全局uView
- import uView from 'uview-ui'
- Vue.use(uView);
- //封装登录检查
- Vue.prototype.checkLogin = function() {
- var TOKEN = uni.getStorageSync('tokens');
- if (TOKEN == '') {
- return false;
- }
- return true;
- }
- const app = new Vue({
- ...App
- })
- app.$mount()
|