[测评系统]--前端(用户答题页面)
阳洁
2024-02-01 c69c4f72ce65388f0d8387c5ab67841377f53b7a
APIFan不需要选择语言、APIFan替换指导语中的变量
2个文件已修改
18 ■■■■■ 已修改文件
src/views/demography/login.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/exam/paper/guide.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demography/login.vue
@@ -18,6 +18,7 @@
      parasInfos: [],
      parasInfoIds: {},
      formDo: {},
      reportTemplateType: null,
      statusInfo: { '2': this.$t('statusInfo2'), '3': this.$t('statusInfo3'), '4': this.$t('statusInfo4') }
    }
  },
@@ -36,6 +37,7 @@
        _this.$router.push({ path: '/exam/exception', query: { name: '', content: _this.statusInfo[re.response.status] } })
      } else {
        // _this.doUrl = re.response.doUrl
        _this.reportTemplateType = re.response.productType
        _this.setMemberTocken(_this.paraMemberToken)
        _this.setDoUrl(re.response.doUrl)
        _this.setReportTemplateId(re.response.reportTemplateId)
@@ -59,6 +61,14 @@
              return
            }
            // APIFan做特殊处理 只有中文
            if (_this.reportTemplateType === 'APIFan') {
              _this.$i18n.locale = 'zh'
              _this.setLangType('Chinese')
              _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false } })
              return
            }
            // 先选择密码
            _this.$router.push({ path: '/demography/fill/langOption', query: { langSelectValue: _this.langType } })
            _this.setMemberTocken(_this.paraMemberToken)
src/views/exam/paper/guide.vue
@@ -27,6 +27,14 @@
  created () {
  },
  mounted () {
    console.log(this.formDo)
    // 替换APIFan指导语中的变量
    if (this.formDo.productType === 'APIFan') {
      let guide = this.formDo.guide
      guide = guide.replace('%%fullName%%', this.formDo.memberName)
      guide = guide.replace('%%company%%', this.formDo.reportCompany)
      this.formDo.guide = guide
    }
  },
  beforeDestroy () {
    window.clearInterval(this.timer)