|
|
- import Vue from 'vue'
- import App from './App'
- import util from '@/utils/utils'
- import store from './store/index.js'
- import api from '@/request/index'
- import Global from '@/utils/global.js'
- import tools from '@/utils/functions.js'
- import uView from "@/plugin/uview-ui";
- import filters from "@/utils/filters.js"
- import { storageKeys, storage } from '@/utils/storage.js'
- import { IMG_URL, upload_img } from '@/env.js'
- Vue.use(uView);
-
- Vue.config.productionTip = false
-
- /* 导入接口 xujinwei */
- // let api = require('./utils/js/api');
- // Vue.prototype.$api = api;
-
- Vue.prototype.$api = api;
- Vue.prototype.$store = store
- Vue.prototype.$util = util
- Vue.prototype.$tools = tools
- Vue.prototype.$global = new Global()
- Vue.prototype.$IMG_URL = IMG_URL
-
- Vue.prototype.$upload_img = upload_img; // 上传图片接口
- Vue.prototype.$storage = storage; // 上传图片接口
- // if (!storage.getStorage(storageKeys.TOKEN)) {
- // tools.reLaunch({
- // url: '/pages/login/login'
- // })
- // }
-
-
- Vue.prototype.$Toast = function(title) {
- return uni.showToast({
- title:title,
- icon:'none'
- })
- }
-
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key]);
- })
-
- App.mpType = 'app'
-
-
- const app = new Vue({
- store,
- ...App
- })
-
- app.$mount()
|