From 0f3a72e00606a7626406fcd76f97098d99686481 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期一, 18 十一月 2024 09:32:23 +0800
Subject: [PATCH] 更新

---
 src/lang/th.js                      |    2 +-
 dist-20240801.zip                   |    0 
 src/lang/en.js                      |    2 +-
 src/views/demography/index.vue      |    9 ++++-----
 src/views/demography/langOption.vue |    3 +--
 src/views/demography/login.vue      |   15 ++++++++++-----
 dist-20241011.zip                   |    0 
 7 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/dist-20240801.zip b/dist-20240801.zip
new file mode 100644
index 0000000..f153a16
--- /dev/null
+++ b/dist-20240801.zip
Binary files differ
diff --git a/dist-20241011.zip b/dist-20241011.zip
new file mode 100644
index 0000000..e37f63a
--- /dev/null
+++ b/dist-20241011.zip
Binary files differ
diff --git a/src/lang/en.js b/src/lang/en.js
index 87d83af..f454efd 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -29,7 +29,7 @@
   finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.',
   selectData: 'Date',
   startDo: 'Next',
-  openJobDesc: '闂嵎浣滅瓟璇存槑',
+  openJobDesc: 'Job Description',
   startDo_apifan: 'Start the Test',
   second: ' second ',
   min: ' minute ',
diff --git a/src/lang/th.js b/src/lang/th.js
index 5d5a038..9b8faeb 100644
--- a/src/lang/th.js
+++ b/src/lang/th.js
@@ -29,7 +29,7 @@
   finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.',
   selectData: 'Date',
   startDo: 'Start the Test',
-  openJobDesc: '闂嵎浣滅瓟璇存槑',
+  openJobDesc: 'Job Description',
   startDo_apifan: 'Start the Test',
   second: ' second ',
   min: ' minute ',
diff --git a/src/views/demography/index.vue b/src/views/demography/index.vue
index 99fe45b..1c4ad5f 100644
--- a/src/views/demography/index.vue
+++ b/src/views/demography/index.vue
@@ -113,15 +113,14 @@
     }
   },
   created () {
-    const langType = localStorage.getItem('langType')
-    if (langType) {
+    const langType = this.$route.query.langType
+    if (langType && (langType === 'Chinese' || langType === 'English' || langType === 'Thai')) {
       this.setLangType(langType)
     } else {
-      localStorage.setItem('langType', this.langType)
+      this.setLangType('English')
     }
   },
   beforeDestroy () {
-    localStorage.removeItem('langType')
   },
   beforeUpdate () {
   },
@@ -158,7 +157,7 @@
                   _this.$router.push({ path: '/exam/' + _this.doUrl })
                   return
                 }
-                _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } });
+                _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } })
               }).catch(e => {
                 _this.$message.error(_this.$t('noquestionMsg'))
               })
diff --git a/src/views/demography/langOption.vue b/src/views/demography/langOption.vue
index 25a9f98..b65c821 100644
--- a/src/views/demography/langOption.vue
+++ b/src/views/demography/langOption.vue
@@ -78,7 +78,7 @@
     submitLangOption: function () {
       let _this = this
       _this.setLangType(_this.langSelectValue)
-      _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: _this.langType } })
       window.clearInterval(this.timer)
     },
     getLangAndRportTemplateId () {
@@ -92,7 +92,6 @@
             demographyApi.queryLangList(_this.memberToken, _this.reportTemplateId).then(function (result) {
               if (result && result.code === 1) {
                 _this.langTypes = result.response
-                console.log("longTypes", _this.langTypes)
               }
             }
             ).catch(e => {
diff --git a/src/views/demography/login.vue b/src/views/demography/login.vue
index 38b8c51..ac49970 100644
--- a/src/views/demography/login.vue
+++ b/src/views/demography/login.vue
@@ -24,7 +24,6 @@
   },
   created () {
     // 娓呴櫎鏈湴瀛樺偍鐨勮瑷�閫夐」
-    localStorage.removeItem('langType')
     let _this = this
     _this.getLangType()
     // 璁板綍鐧婚檰鏃ュ織
@@ -38,7 +37,6 @@
       } else {
         _this.setLogo(re.response.logoUrl)
       }
-      console.log(re.response)
       _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 } })
@@ -64,10 +62,10 @@
         reParam => {
           if (reParam.code !== 1) {
             // 鑱屼笟鍏磋叮鎶ュ憡鐗规畩鍖栧鐞� 鍙湁涓枃
-            if (_this.doUrl === 'career_interests' || _this.doUrl === 'job') {
+            if (_this.doUrl === 'career_interests') {
               _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
             }
 
@@ -75,7 +73,7 @@
             if (_this.reportTemplateType === 'API_Fan') {
               _this.$i18n.locale = 'zh'
               _this.setLangType('Chinese')
-              _this.$router.push({ path: '/demography/fill/logo', query: { demographyMenber: _this.memberToken, isStart: false } })
+              _this.$router.push({ path: '/demography/fill/logo', query: { demographyMenber: _this.memberToken, isStart: false, langType: 'Chinese' } })
               return
             }
 
@@ -87,6 +85,9 @@
           if (reParam.response[0].langType === 'Chinese') {
             this.$i18n.locale = 'zh'
             _this.setLangType('Chinese')
+          } else if (reParam.response[0].langType === 'Thai') {
+            _this.setLangType('Thai')
+            this.$i18n.locale = 'th'
           } else {
             _this.setLangType('English')
             this.$i18n.locale = 'en'
@@ -97,13 +98,16 @@
             let answered = re.response.examItemOrderAndContentList
             if (answered === null) {
               examPaperApi.select(_this.memberToken, _this.langType).then(re => {
+                // _this.setFormDo(re.response)
                 _this.formDo = re.response
                 _this.setDoUrl(re.response.questionTemplateId)
                 _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 => {
@@ -119,6 +123,7 @@
     ...mapMutations('user', ['setLangType']),
     ...mapMutations('user', ['getLangType']),
     ...mapMutations('user', ['setLogo']),
+    ...mapMutations('user', ['setFormDo']),
     ...mapMutations('exam', ['setProductType'])
 
   },

--
Gitblit v1.9.1