Pārlūkot izejas kodu

生成环境隐藏个人画像和个性化错题

吴朋磊 3 mēneši atpakaļ
vecāks
revīzija
da567801c8
1 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 7 3
      src/views/analysisReport/studentPage/mainPage.vue

+ 7 - 3
src/views/analysisReport/studentPage/mainPage.vue

@@ -34,9 +34,9 @@
                                 <button class="mm_btn mb_10" :class="{ active: activeBtn === pathOne }"
                                     @click="toPage(pathOne)">成绩分析</button>
 
-                                <!-- <button class="mm_btn" :class="{ active: activeBtn === pathTwo }"
-                                    @click="toPage(pathTwo)">个性化错题</button> -->
-                                <button class="mm_btn" :class="{ active: activeBtn === pathThree }"
+                                <button v-if="isShowKnowledgeButtons" class="mm_btn" :class="{ active: activeBtn === pathTwo }"
+                                    @click="toPage(pathTwo)">个性化错题</button>
+                                <button v-if="isShowKnowledgeButtons" class="mm_btn" :class="{ active: activeBtn === pathThree }"
                                     @click="toPage(pathThree)">个人画像</button>
                             </div>
 
@@ -76,6 +76,10 @@ export default {
         updateScrollTop() {
             return this.$store.state.report.updateScrollTop;//监听改变滚动条参数 
         },
+        isShowKnowledgeButtons() {
+            // 从环境变量中获取基础URL,判断是否显示按钮
+            return process.env.VUE_APP_BASE !== 'https://www.k12100.com';
+        }
     },
     data() {
         return {