wzp
2022-03-08 1f478b4b033d518f6de21f931d828d2a175b2a3e
assetMgtH5/main.js
@@ -12,9 +12,58 @@
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,apiBaseUrl } from '@/api/requestConfig.js'; // 全局挂载引入,配置相关在该index.js文件里修改
Vue.prototype.$http = http;
Vue.prototype.$ApiUrl = apiBaseUrl;
// 路由守卫
// 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();
// });
var dayjs = require('dayjs');
Vue.prototype.$dayjs = dayjs;
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {