import App from './App' // #ifndef VUE3 import Vue from 'vue' Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$mount() // #endif import uView from '@/uni_modules/uview-ui' Vue.use(uView) //自定义导航栏 import cuCustom from './colorui/components/cu-custom.vue' Vue.component('cu-custom',cuCustom) import { http } from '@/api/requestConfig.js'; // 全局挂载引入,配置相关在该index.js文件里修改 Vue.prototype.$http = http // 路由守卫 // import UniRouteGuards from 'uniapp-route-guards'; // Vue.use(UniRouteGuards); // const guard = new UniRouteGuards(); // // 自定义路由拦截白名单 // const WHILE_LIST = ['']; // // 跳过路由白名单拦截 // guard.beforeEach((to, from, next) => { // if (WHILE_LIST.includes(from.url)) { // return next(to.url); // } // next(); // }); // // 拦截 调用 uni.switchTab 页面C并跳转到 页面D // guard.beforeEach((to, from, next) => { // console.log('\n'); // console.log('================='); // console.log('guard.beforeEach'); // console.log('to: ', to); // console.log('from: ', from); // console.log('================='); // console.log('\n'); // if (to.action === 'switchTab' && to.url === '/src/pages/c') { // return next({ // url: '/src/pages/d', // action: 'navigateTo' // }); // } // next(); // }); // import dayjs from 'dayjs'; var dayjs = require('dayjs'); Vue.prototype.$dayjs = dayjs; // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif