Parcourir la source

检测字词和句子收藏状态

gcj il y a 3 ans
Parent
commit
4e7e5fca87

+ 1 - 1
src/components/Adult/inputModules/Neword.vue

@@ -74,7 +74,7 @@
           class="distribution"
           @click="parseLrcFile"
         >
-          分配lrc
+          分配时间
         </el-button>
       </div>
 

+ 20 - 0
src/components/Adult/preview/Voicefullscreen.vue

@@ -778,6 +778,25 @@ export default {
         this.$message.success("取消成功!");
       });
     },
+    //检查收藏状态
+    checkCollStatus() {
+      let text = "";
+      this.item.forEach((item) => {
+        if (item.chs != "#") {
+          text += item.chs;
+        }
+      });
+      let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
+      let data = {
+        goods_type: 502,
+        goods_id: this.currentTreeID, //课件的id
+        sentence_text: text,
+      };
+      LearnWebSI(MethodName, data).then((res) => {
+        let collFlag = res.is_collection == "true" ? true : false;
+        this.$set(this.isCollArr, this.curSentIndex, collFlag);
+      });
+    },
     showPrevNext(bool, key) {
       this[key] = bool;
     },
@@ -908,6 +927,7 @@ export default {
       } else {
         _this.maxTime = maxTime;
       }
+      _this.checkCollStatus();
     },
     pauseAudio() {
       let audio = document.getElementsByTagName("audio");

+ 20 - 7
src/components/Adult/preview/components/Practice.vue

@@ -153,11 +153,11 @@
                     :src="
                       themeColor
                         ? themeColor == 'green'
-                          ? require('../../../../assets/icon/starline-16-normal-Green.png')
+                          ? require('../../../../assets/icon/starfill-16-normal-Green.png')
                           : themeColor == 'brown'
-                          ? require('../../../../assets/icon/starline-16-normal-Brown.png')
-                          : require('../../../../assets/icon/starline-16-normal-red.png')
-                        : require('../../../../assets/icon/starline-16-normal-red.png')
+                          ? require('../../../../assets/icon/starfill-16-normal-Brown.png')
+                          : require('../../../../assets/icon/starfill-16-normal-red.png')
+                        : require('../../../../assets/icon/starfill-16-normal-red.png')
                     "
                     class="practice-icon"
                   />
@@ -279,7 +279,7 @@ export default {
         goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
         goods_price: Bookdetail.price,
         new_word: {
-          new_word: this.word.detail.new_word,
+          new_word: this.cur.stem[0].con,
         },
       };
       LearnWebSI(MethodName, data).then((res) => {
@@ -295,7 +295,7 @@ export default {
         goods_list: [
           {
             goods_id: this.currentTreeID, //课件的id
-            new_word: this.word.detail.new_word,
+            new_word: this.cur.stem[0].con,
           },
         ],
       };
@@ -304,6 +304,18 @@ export default {
         this.$message.success("取消成功!");
       });
     },
+    //检查收藏状态
+    checkCollStatus() {
+      let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
+      let data = {
+        goods_type: 501,
+        goods_id: this.currentTreeID, //课件的id
+        new_word: this.cur.stem[0].con,
+      };
+      LearnWebSI(MethodName, data).then((res) => {
+        this.collFlag = res.is_collection == "true" ? true : false;
+      });
+    },
     changeNav(index) {
       let _this = this;
       _this.navIndex = index;
@@ -351,6 +363,7 @@ export default {
     let color = _this.colorsList[_this.colorIndex];
     _this.hanzicolor = color;
     _this.hanziweight = 6;
+    _this.checkCollStatus();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
@@ -576,7 +589,7 @@ export default {
   align-items: center;
   cursor: pointer;
   .bg-box {
-    width: 76px;
+    min-width: 76px;
     height: 32px;
     text-align: center;
     padding: 4px 8px;

+ 13 - 0
src/components/Adult/preview/components/Wordcard.vue

@@ -273,6 +273,18 @@ export default {
         this.$message.success("取消成功!");
       });
     },
+    //检查收藏状态
+    checkCollStatus() {
+      let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
+      let data = {
+        goods_type: 501,
+        goods_id: this.currentTreeID, //课件的id
+        new_word: this.word.detail.new_word,
+      };
+      LearnWebSI(MethodName, data).then((res) => {
+        this.collFlag = res.is_collection == "true" ? true : false;
+      });
+    },
     async writeWord(words, pinyin) {
       let _this = this;
       const MethodName = "tool-ChineseSCConvert";
@@ -374,6 +386,7 @@ export default {
           }
         });
       }
+      _this.checkCollStatus();
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)