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.prototype.locale = 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; } import VueClipboard from 'vue-clipboard2' //引入插件 Vue.use(VueClipboard) //安装插件 const app = new Vue({ ...App }) app.$mount()