mo 1 年間 前
コミット
0a10d6ed06

+ 1 - 0
src/router/router-guards.ts

@@ -28,6 +28,7 @@ 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 (!isChrome()) {
       return;
     }

+ 5 - 1
src/router/routes/index.ts

@@ -19,7 +19,11 @@ export const constantRoutes: RouteRecordRaw[] = [
         //默认 显示home组件
         path: '',
         name: 'Home',
-        component: () => import('@/views/home/index')
+        component: () => import('@/views/home/index'),
+        meta: {
+          title: '首页',
+          singleLayout: 'blank'
+        }
       },
       {
         name: 'prepare-lessons',

+ 3 - 2
src/views/setting/modal/forgotPassword.tsx

@@ -15,7 +15,8 @@ import { useRoute, useRouter } from 'vue-router';
 import { PageEnum } from '/src/enums/pageEnum';
 import { storage } from '@/utils/storage';
 import { useUserStore } from '/src/store/modules/users';
-import { sendSms, updatePassword } from '../../login/api';
+import { sendSms  } from '../../login/api';
+import { updatePassword } from '@/views/home/api'
 interface FormState {
   mobile: string;
   password: string;
@@ -44,7 +45,7 @@ export default defineComponent({
       mobile: props.phone,
       password: '',
       code: '',
-      isCaptcha: true
+      // isCaptcha: true
     });
     const isDisabledCode = ref(false);
     const starTimer = ref(60);