37 lines
944 B
JavaScript
37 lines
944 B
JavaScript
|
|
import Vue from 'vue'
|
|||
|
|
import App from './App'
|
|||
|
|
import store from './store'
|
|||
|
|
import tool from "./common/utils/tool.js"
|
|||
|
|
import { sendRequest, sendRequestJson } from "./common/http/api.js"
|
|||
|
|
import { staticUrl } from "./common/http/index.js"
|
|||
|
|
|
|||
|
|
import { toast } from '@/utils/common.js'
|
|||
|
|
import plugins from './plugins' // plugins
|
|||
|
|
// import './permission' // permission
|
|||
|
|
Vue.use(plugins)
|
|||
|
|
Vue.prototype.$toast = toast
|
|||
|
|
|
|||
|
|
import '@/TIM/tim.js'
|
|||
|
|
import uView from '@/uni_modules/uview-ui'
|
|||
|
|
Vue.use(uView)
|
|||
|
|
Vue.use(tool)
|
|||
|
|
|
|||
|
|
// 全局mixins,用于实现setData等功能';
|
|||
|
|
import Mixin from './polyfill/mixins';
|
|||
|
|
Vue.mixin(Mixin);
|
|||
|
|
|
|||
|
|
// 引入uView
|
|||
|
|
Vue.config.productionTip = false
|
|||
|
|
Vue.prototype.$http = sendRequest
|
|||
|
|
Vue.prototype.$httpJson = sendRequestJson
|
|||
|
|
// 注意:在nvue模式下无法使用vue.prototype定义的全局变量,则在app.vue中定义
|
|||
|
|
Vue.prototype.$staticUrl = staticUrl
|
|||
|
|
|
|||
|
|
App.mpType = 'app'
|
|||
|
|
|
|||
|
|
const app = new Vue({
|
|||
|
|
store,
|
|||
|
|
...App
|
|||
|
|
})
|
|||
|
|
app.$mount()
|