Browse Source

修改测试完成后未显示测试记录未读条数

plg 3 months ago
parent
commit
78aec67043
2 changed files with 4 additions and 2 deletions
  1. 1 1
      src/views/Login.vue
  2. 3 1
      src/views/shapeIntuition_random.vue

+ 1 - 1
src/views/Login.vue

@@ -77,7 +77,7 @@ const loginFun = async () => {
     }
     const res: any = await userLoginApi(params)
     if (res.code == 200) {
-        if (res.data.type == '1') {
+        if (res.data.type == '1' || res.data.type == '2') {
             userInfo.saveToken(res.data.token)
             userInfo.saveUserInfo(res.data.user)
             ElMessage({ message: `${res.msg}`, type: 'success' })

+ 3 - 1
src/views/shapeIntuition_random.vue

@@ -57,7 +57,7 @@ import { preloader } from "@/utils/utils";
 // import screenfull from "screenfull";
 import { userInfoStore } from '@/stores';
 import { saveEggRecordApi } from '@/api/record'
-import { planNumGet } from '../utils/test'
+import { planNumGet, getUnread } from '../utils/test'
 import { format as myFormat } from 'date-fns';
 import { userPlanDetailApi } from '@/api/home';
 import CpdmMessage from '@/components/CpdmMessage.vue';
@@ -113,6 +113,7 @@ export default {
       getCurrentTimeApi: getCurrentTimeApi,
       userPlanDetailApi: userPlanDetailApi,
       planNumGet: planNumGet,
+      getUnread: getUnread,
       correctTxt: '正确',
       showCorrectTxt: false,
       showMouseLeft: false,
@@ -376,6 +377,7 @@ export default {
 
             this.$refs.cpdmMe.open()
             planNumGet()
+            getUnread()
             // this.$router.push({ name: 'testRecord' })
           }
           //如果后边没有--则测试跳转到报告页