You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
import Vue from 'vue'
|
|
import App from './App'
|
|
import toast from './common/Toast.js'
|
|
import wxAuthLogin from './common/wxAuthLogin.js'
|
|
import wxSilentLogin from './common/wxSilentLogin.js'
|
|
// vuex
|
|
import store from './store'
|
|
// 引入全局uView
|
|
import uView from '@/uni_modules/uview-ui'
|
|
Vue.use(uView)
|
|
|
|
import mixin from './common/mixin'
|
|
// #ifdef MP
|
|
// 引入uView对小程序分享的mixin封装
|
|
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
|
|
Vue.mixin(mpShare)
|
|
// #endif
|
|
Vue.mixin(mixin)
|
|
|
|
|
|
import bus from './common/bus.js';
|
|
|
|
//挂载到this上
|
|
Vue.prototype.$bus = bus;
|
|
|
|
// // 在main.js中引入并挂载到vue的对象原型上
|
|
// const jweixin = require('weixin-js-sdk');
|
|
// Vue.prototype.$wechat = jweixin;
|
|
|
|
import api from '@/common/request.api.js'
|
|
Vue.prototype.$api = api
|
|
|
|
Vue.prototype.WxSilentLogin = wxSilentLogin
|
|
Vue.prototype.WxAuthLogin = wxAuthLogin
|
|
Vue.prototype.Toast = toast
|
|
Vue.config.productionTip = false
|
|
App.mpType = 'app'
|
|
|
|
const app = new Vue({
|
|
store,
|
|
...App
|
|
})
|
|
|
|
// 引入请求封装
|
|
require('./utils/request/index')(app)
|
|
|
|
app.$mount()
|
|
|