yurong/main.js

43 lines
957 B
JavaScript

import Vue from 'vue'
import App from './App'
import {mixin} from '@/common/mixin.js'
import tools from 'common/tools.js'
import amapwx from './common/AMapWX_SDK_V1.3.0/amap-wx.130.js'
import uView from 'uview-ui';
const inter = require('common/interceptor.js')
import interceptor from '@/common/interceptor.js'
import common from '@/common/common.js'
Vue.prototype.$tools = tools ;//工具类
Vue.prototype.$amapwx = amapwx;//高德地图类
Vue.prototype.$estimateCoupon = function(tkmoney = 0, percentage = 0.3) {
const amount = Number(tkmoney || 0) * Number(percentage || 0)
return amount.toFixed(2)
}
Vue.prototype.$store = Vue.prototype.$store || {
state: {
isThirdParty: false
},
getters: {
currentUid: '',
relationId: '',
pid: '',
isThirdParty: false
}
}
// 混入代码
Vue.mixin(mixin)
Vue.mixin(inter)
Vue.use(uView)
// 工具类
App.mpType = 'app'
const app = new Vue({
...App,
})
app.$mount()