[测评系统]--前端(用户答题页面)
yj
2024-05-09 325a5fb0c4a83b20849578c22dc49c0453c01dec
src/views/demography/login.vue
@@ -31,6 +31,13 @@
    })
    // 已经答完了不能答题
    examPaperApi.selectTokenId(_this.paraMemberToken).then(re => {
      if (re.response.logoUrl === null || re.response.logoUrl === '') {
        _this.setLogo('none')
      } 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 } })
      } else if (re.response.status !== '1') {
@@ -38,8 +45,7 @@
      } else {
        // _this.doUrl = re.response.doUrl
        _this.reportTemplateType = re.response.productType
        console.log("response")
        console.log(re.response)
        _this.setProductType(re.response.productType)
        _this.setMemberTocken(_this.paraMemberToken)
        _this.setDoUrl(re.response.doUrl)
        _this.setReportTemplateId(re.response.reportTemplateId)
@@ -63,10 +69,8 @@
              return
            }
            console.log("产品")
            // APIFan做特殊处理 只有中文
            if (_this.reportTemplateType === 'APIFan') {
            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 } })
@@ -111,14 +115,18 @@
    ...mapMutations('exam', ['setDoUrl']),
    ...mapMutations('exam', ['setReportTemplateId']),
    ...mapMutations('user', ['setLangType']),
    ...mapMutations('user', ['getLangType'])
    ...mapMutations('user', ['getLangType']),
    ...mapMutations('user', ['setLogo']),
    ...mapMutations('exam', ['setProductType'])
  },
  computed: {
    ...mapState('user', { memberToken: state => state.memberToken }),
    ...mapState('user', { memberId: state => state.memberId }),
    ...mapState('exam', { doUrl: state => state.doUrl }),
    ...mapState('exam', { reportTemplateId: state => state.reportTemplateId }),
    ...mapState('user', { langType: state => state.langType })
    ...mapState('user', { langType: state => state.langType }),
    ...mapState('exam', { productType: state => state.productType })
  }
}
</script>