From 5e4bed2d67b26eeb7eab4d176bfabe3f527836e4 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期五, 19 七月 2024 13:48:29 +0800
Subject: [PATCH] 修复答题刷新与CAQ分片2从第2题开始bug

---
 src/views/demography/login.vue |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/views/demography/login.vue b/src/views/demography/login.vue
index 33851d6..f5d909d 100644
--- a/src/views/demography/login.vue
+++ b/src/views/demography/login.vue
@@ -17,12 +17,13 @@
       paramsInfo: {},
       parasInfos: [],
       parasInfoIds: {},
-      formDo: {},
+      // formDo: {},
       reportTemplateType: null,
       statusInfo: { '2': this.$t('statusInfo2'), '3': this.$t('statusInfo3'), '4': this.$t('statusInfo4') }
     }
   },
   created () {
+    // 娓呴櫎鏈湴瀛樺偍鐨勮瑷�閫夐」
     let _this = this
     _this.getLangType()
     // 璁板綍鐧婚檰鏃ュ織
@@ -31,6 +32,11 @@
     })
     // 宸茬粡绛斿畬浜嗕笉鑳界瓟棰�
     examPaperApi.selectTokenId(_this.paraMemberToken).then(re => {
+      if (re.response.logoUrl === null || re.response.logoUrl === '') {
+        _this.setLogo('none')
+      } else {
+        _this.setLogo(re.response.logoUrl)
+      }
       _this.setProductType(re.response.productType)
       if (re.response.finish === 1) {
         _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.paraMemberToken } })
@@ -56,10 +62,10 @@
         reParam => {
           if (reParam.code !== 1) {
             // 鑱屼笟鍏磋叮鎶ュ憡鐗规畩鍖栧鐞� 鍙湁涓枃
-            if (_this.doUrl === 'career_interests') {
+            if (_this.doUrl === 'career_interests' || _this.doUrl === 'job') {
               _this.$i18n.locale = 'zh'
               _this.setLangType('Chinese')
-              _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false } })
+              _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false, langType: 'Chinese' } })
               return
             }
 
@@ -72,7 +78,7 @@
             }
 
             // 鍏堥�夋嫨瀵嗙爜
-            _this.$router.push({ path: '/demography/fill/langOption', query: { langSelectValue: _this.langType } })
+            _this.$router.push({ path: '/demography/fill/langOption', query: { langSelectValue: _this.langType, fromDo: _this.fromDo } })
             _this.setMemberTocken(_this.paraMemberToken)
             return
           }
@@ -89,13 +95,15 @@
             let answered = re.response.examItemOrderAndContentList
             if (answered === null) {
               examPaperApi.select(_this.memberToken, _this.langType).then(re => {
-                _this.formDo = re.response
+                _this.setFormDo(re.response)
                 _this.setDoUrl(re.response.questionTemplateId)
-                _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } })
+                // _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } })
+                _this.$router.push({ path: '/guide/index' })
               }).catch(e => {
                 _this.$message.error(_this.$t('noquestionMsg'))
               })
             } else {
+              // 鍚﹀垯娓呴櫎fromDo
               _this.$router.push({ path: '/exam/' + _this.doUrl })
             }
           }).catch(e => {
@@ -110,6 +118,8 @@
     ...mapMutations('exam', ['setReportTemplateId']),
     ...mapMutations('user', ['setLangType']),
     ...mapMutations('user', ['getLangType']),
+    ...mapMutations('user', ['setLogo']),
+    ...mapMutations('user', ['setFormDo']),
     ...mapMutations('exam', ['setProductType'])
 
   },

--
Gitblit v1.9.1