1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import Vue from 'vue'
- import App from './App'
- import store from './store'
- import uView from "uview-ui"
- Vue.use(uView)
- Vue.config.productionTip = false
- let vuexStore = require("@/store/$u.mixin.js")
- Vue.mixin(vuexStore)
- App.mpType = 'mini'
- /**
- * 权限检查
- */
- Vue.prototype.$hasPermissions = function (value) {
- let isExist = false;
- if(!store.state.hasLogin){
- return true
- }
- let permissionsStr = uni.getStorageSync('permCodes');
- if (permissionsStr == undefined || permissionsStr == null || !permissionsStr) {
- return false;
- }
- let has = permissionsStr.find(item => {
- return item == value
- })
- if (has) {
- isExist = true;
- }
- return isExist;
- }
- /*
- * 打电话
- */
- Vue.prototype.callPhone = function (phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- });
- }
- const app = new Vue({
- store,
- ...App
- })
- app.$mount()
|