import Vue from 'vue' import App from './App' import store from './store' import { dayjs } from '@/uni_modules/iRainna-dayjs/js_sdk/dayjs.min.js' Vue.prototype.$store = store; Vue.prototype.$dayjs = dayjs; Vue.prototype.$toast = msg => { uni.showToast({ title: msg, icon: "none" }) }; Vue.prototype.$navigateTo = (url) => { if (!uni.getStorageSync('token')) { uni.showToast({ title: '您暂未登录,请先登录~', icon: "none" }); url = '/pages/login/login' } uni.navigateTo({ url: url }) } import field from './config/field.js' Vue.prototype.$field = field; Vue.config.productionTip = false; App.mpType = 'app'; const app = new Vue({ store, ...App }) app.$mount()