diff --git a/src/api/index.ts b/src/api/index.ts index 5d0f71d..fc0b879 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -85,11 +85,18 @@ export async function getMajor(code) { return response; } //检查用户身份 -export async function checkUser(code) { - const response = await http.post('/h5/cees/ceesUser/checkUser', { - userId: code, - }); - return response; +export async function checkUser(code, openid, unionid) { + try { + const response = await http.post('/h5/cees/ceesUser/checkUser', { + userId: code, + openId: openid, + unionId: unionid, + }); + return response; + } catch (err) { + // 抛出错误,让外层 catch 拿到详细信息 + throw err; + } } //检查用户身份 export async function checkUserByEmployeeCode(employeeCode,code) { diff --git a/src/router/routes.ts b/src/router/routes.ts index 4b36d9a..f215dc4 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -2,7 +2,12 @@ export const routes = [ { path: '/', redirect: '/home', - component: () => import('@/layout/basic/index.vue'), + //component: () => import('@/layout/basic/index.vue'), + meta: { + title: '哈尔滨师范大学评卷报名系统', + keepAlive: true, + showHeader: false, + }, children: [ { path: 'home', @@ -95,6 +100,11 @@ export const routes = [ // 找不到路由重定向到404页面 path: '/:pathMatch(.*)', redirect: '/home', + meta: { + title: '哈尔滨师范大学评卷报名系统', + keepAlive: true, + showHeader: false, + }, }, ]; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 2b83ce8..ed96791 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -30,10 +30,11 @@