Browse Source

描红模式清空

natasha 3 years ago
parent
commit
e460d8084c

BIN
src/assets/NPC/selectYinjie-active.png


BIN
src/assets/NPC/selectYinjie-hover.png


+ 13 - 7
src/components/Adult/preview/SelectTone.vue

@@ -12,6 +12,8 @@
         :mp3="curQue.mp3_list[0].url"
         :getCurTime="getCurTime"
         :themeColor="themeColor"
+        :ed="ed"
+        type="audioLine"
         ref="audioLine"
         @handleListenRead="handleListenRead"
       />
@@ -68,6 +70,7 @@ export default {
       curTime: "",
       stopAudio: false,
       timer: null,
+      ed: null,
     };
   },
   computed: {},
@@ -87,16 +90,19 @@ export default {
     },
     handleChangeTime(time,edTime) {
       let _this = this;
+    //   if(!_this.stopAudio){
+    //       _this.timer = setInterval(() => {
+    //         if(_this.curTime >= edTime){
+    //             _this.stopAudio = false
+    //             _this.$refs.audioLine.onTimeupdateTime(_this.curTime / 1000, false);
+    //             clearInterval(_this.timer);
+    //         }
+    //     }, 200);
+    //   }
       _this.curTime = time;
       _this.stopAudio = true
       _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
-      _this.timer = setInterval(() => {
-          if(_this.curTime >= edTime){
-              _this.stopAudio = false
-              _this.$refs.audioLine.onTimeupdateTime(_this.curTime / 1000, false);
-              clearInterval(_this.timer);
-          }
-      }, 200);
+      _this.ed = edTime / 1000
     },
     getCurTime(curTime) {
       this.curTime = curTime * 1000;

+ 11 - 16
src/components/Adult/preview/SelectYinjie.vue

@@ -50,7 +50,9 @@ export default {
       if (this.userList[index].indexOf(indexs) > -1) {
         this.userList[index].splice(this.userList[index].indexOf(indexs), 1);
       } else {
+        // this.userList[index] = []
         this.userList[index].push(indexs);
+        console.log(this.userList[index])
       }
     },
     handleClear(index) {
@@ -121,9 +123,16 @@ export default {
         text-align: center;
         cursor: pointer;
         font-family: "GB-PINYINOK-B";
+        overflow: hidden;
+        &:hover{
+            background: rgba(0, 0, 0, 0.05) url('../../../assets/NPC/selectYinjie-hover.png') right bottom no-repeat;
+            background-size: 11px;
+            border: 1px solid rgba(0, 0, 0, 0.1);
+        }
         &.active {
-          background: #de4444;
-          color: #ffffff;
+          background: rgba(0, 188, 75, 0.05) url('../../../assets/NPC/selectYinjie-active.png') right bottom no-repeat;
+          background-size: 11px;
+          border: 1px solid #00BC4B;
         }
       }
     }
@@ -147,13 +156,6 @@ export default {
       b {
         background: #24b99e;
       }
-      .zijie-box {
-        p {
-          &.active {
-            background: #24b99e;
-          }
-        }
-      }
     }
   }
 }
@@ -163,13 +165,6 @@ export default {
       b {
         background: #bd8865;
       }
-      .zijie-box {
-        p {
-          &.active {
-            background: #bd8865;
-          }
-        }
-      }
     }
   }
 }

+ 2 - 2
src/components/Adult/preview/components/Practice.vue

@@ -83,7 +83,7 @@
                   <Strockred
                     :Book_text="cur.stem[0].con"
                     :hanzicolor="hanzicolor"
-                    :playStorkes="playStorkes"
+                    :playStorkes="true"
                     :targetDiv="'write-pra' + cur.stem[0].con"
                   />
                 </template>
@@ -173,7 +173,7 @@
                   <Strockred
                     :Book_text="cur.stem[0].TChinese"
                     :hanzicolor="hanzicolor"
-                    :playStorkes="playStorkes"
+                    :playStorkes="true"
                     :targetDiv="'write-praT' + cur.stem[0].TChinese"
                   />
                 </template>

+ 20 - 1
src/components/Adult/preview/components/Strockred.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="strockredBox">
     <div class="strockred">
-      <div @click="resetHanzi" class="strock-play-box" v-if="playStorkes">
+      <div @click="resetHanzi" class="strock-play-box" v-if="1==2">
         <!-- <img src="../../assets/common/strock-play.png" class="strock-play" /> -->
       </div>
       <div
@@ -10,6 +10,7 @@
         :id="targetDiv"
         class="character-target-div"
       ></div>
+      <a @click="resetHanzi" class="clean-btn" v-if="playStorkes"></a>
     </div>
   </div>
 </template>
@@ -138,4 +139,22 @@ export default {
     }
   }
 }
+.clean-btn {
+    position: absolute;
+    bottom: 8px;
+    right: 8px;
+    width: 16px;
+    height: 16px;
+    margin: 0 4px;
+    cursor: pointer;
+    background: url("../../../../assets/icon/Undo-16-disable-Black.png") center
+      no-repeat;
+    background-size: cover;
+    display: block;
+    &:hover {
+      background: url("../../../../assets/icon/Undo-16-normal-Black.png") center
+        no-repeat;
+      background-size: cover;
+    }
+  }
 </style>