|
@@ -28,7 +28,18 @@ export function createRouterGuards(router: Router) {
|
|
|
router.beforeEach(async (to, from, next) => {
|
|
|
// console.log(to, '修改标题');
|
|
|
// console.log('access token');
|
|
|
- document.title = to.meta.title ? to.meta.title : ('音乐数字课堂' as string);
|
|
|
+ if (to.path === '/attend-class') {
|
|
|
+ let title = to.meta.title;
|
|
|
+ if (to.query.type === 'preview') {
|
|
|
+ title = '预览';
|
|
|
+ }
|
|
|
+ document.title = title ? title : ('音乐数字课堂' as string);
|
|
|
+ } else {
|
|
|
+ document.title = to.meta.title
|
|
|
+ ? to.meta.title
|
|
|
+ : ('音乐数字课堂' as string);
|
|
|
+ }
|
|
|
+
|
|
|
if ('serviceWorker' in navigator) {
|
|
|
console.log(caches.keys(), 'caches.keys()');
|
|
|
caches.keys().then(function (cacheNames) {
|