12345678910111213141516171819202122232425262728293031323334353637 |
- import App from './App'
- import http from './common/http.js'
- import verify from './common/graceChecker.js' //数据验证
- import util from './common/util.js' //工具类
- import Vue from 'vue'
- Vue.config.productionTip = false
- Vue.prototype.http = http;
- Vue.prototype.verify = verify;
- Vue.prototype.util = util;
- import uView from '@/uni_modules/uview-ui'
- Vue.use(uView)
- App.mpType = 'app'
- Vue.prototype.getUser = function() {
- return uni.getStorageSync('user');
- }
- Vue.prototype.getLocation = function() {
- return uni.getStorageSync('location');
- }
- Vue.prototype.hasPermi = util.hasPermi;
- Vue.prototype.hasLogin = () => {
- if (uni.getStorageSync('user') === '' || uni.getStorageSync('user') === null) {
- return false
- } else {
- return true
- }
- }
- const app = new Vue({
- ...App
- })
- app.$mount()
|