import Vue from 'vue' import App from './App' import http from './common/http.js' import verify from './common/graceChecker.js' //数据验证 import store from './store' Vue.config.productionTip = false Vue.prototype.$http = http; Vue.prototype.$verify = verify; // 引入全局uView import uView from 'uview-ui' Vue.use(uView) Vue.prototype.$store = store /** * 获取用户信息 */ Vue.prototype.$getUser = function() { return uni.getStorageSync('user'); } /** * 判断是否登陆 */ Vue.prototype.$hasLogin = () => { if (uni.getStorageSync('user') === '' || uni.getStorageSync('user') === null) { return false } else { return true } } App.mpType = 'app' const app = new Vue({ store, ...App }) app.$mount()