Browse Source

限制文本分析的展示

qinpeng 2 years ago
parent
commit
041a7b23c2
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/components/Adult/preview/DialogueArticleViewChs/index.vue

+ 7 - 1
src/components/Adult/preview/DialogueArticleViewChs/index.vue

@@ -13,6 +13,7 @@
         class="left"
         @click="submit"
         :style="{ marginLeft: showPractice ? '97px' : '' }"
+        v-if="tokenData.indexOf(2000001) != -1"
       >
         <img src="../../../../assets/NPC/wbfx-icon.png" alt="" />
         文本分析
@@ -138,6 +139,7 @@ import NormalModelChs from "./NormalModelChs.vue";
 import Practice from "./Practicechs.vue"; // 语音练习模式
 import WordModel from "./WordModelChs.vue"; // 语音练习模式
 import { analysSubmit } from "@/api/ajax";
+import { getToken } from "@/utils/auth";
 export default {
   name: "DialogueArticleViewChs",
   props: [
@@ -179,6 +181,7 @@ export default {
           recordList: [],
         },
       },
+      tokenData: null,
     };
   },
   computed: {
@@ -269,7 +272,10 @@ export default {
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+    let data = JSON.parse(getToken());
+    this.tokenData = data;
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     let _this = this;