12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import Vue from 'vue'
- import App from './App'
- import store from './store'
- import {
- dayjs
- } from '@/uni_modules/iRainna-dayjs/js_sdk/dayjs.min.js'
- import VueCompositionAPI from '@vue/composition-api'
- Vue.use(VueCompositionAPI)
- 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') && url != '/pages/login/login') {
- uni.showToast({
- title: '您暂未登录,请先登录~',
- icon: "none"
- });
- url = '/pages/login/login'
- setTimeout(() => {
- uni.navigateTo({
- url: url
- })
- }, 400)
- } else {
- uni.navigateTo({
- url: url
- })
- }
- }
- Vue.prototype.$navigateBack = uni.navigateBack;
- import field from './config/field.js'
- Vue.prototype.$field = field;
- import chat from './uitls/chat.js'
- chat.init();
- Vue.prototype.$chat = chat;
- Vue.config.productionTip = false;
- App.mpType = 'app';
- const app = new Vue({
- store,
- ...App
- })
- app.$mount()
|