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

---
 src/views/demography/index.vue |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/views/demography/index.vue b/src/views/demography/index.vue
index 997ece0..1c4ad5f 100644
--- a/src/views/demography/index.vue
+++ b/src/views/demography/index.vue
@@ -113,12 +113,23 @@
     }
   },
   created () {
+    const langType = this.$route.query.langType
+    if (langType && (langType === 'Chinese' || langType === 'English' || langType === 'Thai')) {
+      this.setLangType(langType)
+    } else {
+      this.setLangType('English')
+    }
+  },
+  beforeDestroy () {
+  },
+  beforeUpdate () {
+  },
+  updated () {
   },
   methods: {
     submitDemography: function () {
       let _this = this
       _this.submitDisable = true
-      console.log( this.$refs.demographyMenber)
       this.$refs.demographyMenber.validate(vaild => {
         if (vaild) {
           _this.parasInfos = []
@@ -132,7 +143,7 @@
             _paramsInfo.paramId = _this.demographyMenber.data[i].paramId
             _paramsInfo.paramName = _this.demographyMenber.data[i].paramName
             _paramsInfo.paramValue = _this.demographyMenber.data[i].paramValue
-            if (_paramsInfo.paramValue.trim() === '') {
+            if (!_paramsInfo.paramValue) {
               continue
             }
             _this.parasInfos.push(_paramsInfo)
@@ -146,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'))
               })
@@ -192,7 +203,8 @@
       })
     },
     ...mapMutations('user', ['setMemberTocken']),
-    ...mapMutations('exam', ['setDoUrl'])
+    ...mapMutations('exam', ['setDoUrl']),
+    ...mapMutations('user', ['setLangType'])
   },
   computed: {
     ...mapState('user', { memberToken: state => state.memberToken }),

--
Gitblit v1.9.1