简单的视频通讯

This commit is contained in:
2022-01-27 15:23:05 +08:00
parent 1caaab3492
commit 35bd9bf283
12 changed files with 485 additions and 388 deletions

View File

@@ -1,24 +1,36 @@
import { RouterMount, createRouter } from 'uni-simple-router';
import store from '@/store/index'
import {
RouterMount,
createRouter
} from 'uni-simple-router';
import store from '@/store/index'
// #ifdef APP-NVUE
// CALL 页面必须是nvue但是NVUE 不支持webpack的 ROUTES 注入
// https://github.com/SilurianYang/uni-read-pages/issues/20
const ROUTES = [{
'path': '/pages/im/private/call',
'name': 'imPrivateCall'
}]
// #endif
const router = createRouter({
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
});
// console.log(...ROUTES)
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
});
// console.log(...ROUTES)
//全局路由前置守卫
router.beforeEach((to, from, next) => {
next();
});
router.beforeEach((to, from, next) => {
next();
});
// 全局路由后置守卫
router.afterEach((to, from) => {
// console.log('跳转结束')
})
// console.log('跳转结束')
})
export {
router,
RouterMount
router,
RouterMount
}