[测评系统]--前端(用户答题页面)
阳洁
2024-03-05 abff99332f01964f43859b6cc88d22dcac12c343
根据产品显示不同logo图片
5个文件已修改
30 ■■■■■ 已修改文件
src/assets/logo-apifan.png 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/exam.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demography/login.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demography/logo.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/logo-apifan.png

src/layout/index.vue
@@ -1,15 +1,16 @@
<template>
  <el-container>
    <el-header height="60" class="student-header header" style="background-color: #409eff">
    <el-header height="60" class="student-header header" :style="{'background-color': productType==='API_Fan'?'#fff':'#409eff'}">
      <div class="head-language" v-if="langFlag">
        <!--<lang-select class="right-menu-item" />-->
        <!--国际化的语言选择-->
        <!--<component :is="langSelect"></component>-->
      </div>
      <div class="head-user">
      <div class="head-user" style="float:left;margin-bottom:10px">
        <el-dropdown trigger="click" placement="bottom">
          <el-badge style="height: 50px;">
            <!-- <el-avatar  class="el-dropdown-avatar" size="medium"  :src="userInfo.imagePath === null ? require('@/assets/logo-t.jpg') : userInfo.imagePath"></el-avatar> -->
          <el-image v-if="productType==='API_Fan'" style="width: 150px;margin-top:10px;" :src="require('@/assets/logo-apifan.png')" fit="fill"></el-image>
          <el-badge v-else style="height: 50px;">
            <el-avatar  class="el-dropdown-avatar" size="medium"  :src="userInfo.imagePath === null ? require('@/assets/logo-t.jpg') : userInfo.imagePath"></el-avatar>
          </el-badge>
          <el-dropdown-menu slot="dropdown">
<!--            <el-dropdown-item divided>保存退出</el-dropdown-item>-->
@@ -51,7 +52,8 @@
    'langSelect': LangSelect
  },
  computed: {
    ...mapState('user', { langFlag: state => state.langFlag })
    ...mapState('user', { langFlag: state => state.langFlag }),
    ...mapState('exam', { productType: state => state.productType })
  }
}
</script>
src/store/modules/exam.js
@@ -3,7 +3,8 @@
const state = {
  subjects: [],
  doUrl: 'job',
  reportTemplateId: ''
  reportTemplateId: '',
  productType: ''
}
const getters = {
@@ -36,6 +37,9 @@
  },
  setReportTemplateId: (state, reportTemplateId) => {
    state.reportTemplateId = reportTemplateId
  },
  setProductType: (state, productType) => {
    state.productType = productType
  }
}
src/views/demography/login.vue
@@ -38,6 +38,7 @@
      } else {
        // _this.doUrl = re.response.doUrl
        _this.reportTemplateType = re.response.productType
        _this.setProductType(re.response.productType)
        _this.setMemberTocken(_this.paraMemberToken)
        _this.setDoUrl(re.response.doUrl)
        _this.setReportTemplateId(re.response.reportTemplateId)
@@ -107,14 +108,17 @@
    ...mapMutations('exam', ['setDoUrl']),
    ...mapMutations('exam', ['setReportTemplateId']),
    ...mapMutations('user', ['setLangType']),
    ...mapMutations('user', ['getLangType'])
    ...mapMutations('user', ['getLangType']),
    ...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>
src/views/demography/logo.vue
@@ -1,10 +1,10 @@
<template>
  <div class="demography">
    <el-row style="display: flex;justify-content: center;">
      <el-image :src="require('@/assets/logo-apifan.png')" fit="fill"></el-image>
      <el-image style="margin-top:30px" :src="require('@/assets/logo-apifan.png')" fit="fill"></el-image>
    </el-row>
    <el-row style="display: flex;justify-content: center;">
      <el-button @click="next" type="primary">开始测试</el-button>
      <el-button style="margin-top:20px" @click="next" type="primary">开始测试</el-button>
    </el-row>
  </div>
</template>