gcj il y a 3 ans
Parent
commit
e33e66a2bc

+ 1 - 1
src/components/Adult/common/Upload.vue

@@ -31,7 +31,7 @@
 </template>
 
 <script>
-import { getToken } from "@/utils/auth";
+import { getToken } from "../../../utils/auth";
 export default {
   components: {},
   props: [

+ 1 - 1
src/components/Adult/common/UploadArt.vue

@@ -39,7 +39,7 @@
 
 <script>
 import Cookies from "js-cookie";
-import { getToken } from "@/utils/auth";
+import { getToken } from "../../../utils/auth";
 export default {
   components: {},
   props: [

+ 1 - 1
src/components/Adult/common/UploadVideo.vue

@@ -31,7 +31,7 @@
 </template>
 
 <script>
-import { getToken } from "@/utils/auth";
+import { getToken } from "../../../utils/auth";
 export default {
   components: {},
   props: [

+ 1 - 1
src/components/Adult/common/UploadView.vue

@@ -31,7 +31,7 @@
 </template>
 
 <script>
-import { getToken } from "@/utils/auth";
+import { getToken } from "../../../utils/auth";
 export default {
   components: {},
   props: [

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/AnswerModel.vue

@@ -372,7 +372,7 @@
 </template>
 
 <script>
-import { timeStrToSen } from "@/utils/index";
+import { timeStrToSen } from "../../../../utils/index";
 import AudioLine from "../AudioLine.vue";
 import RoleChs from "./RoleChs.vue";
 import RemarkChs from "./RemarkChs.vue";

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/NormalModelChs.vue

@@ -298,7 +298,7 @@
 </template>
 
 <script>
-import { timeStrToSen } from "@/utils/index";
+import { timeStrToSen } from "../../../../utils/index";
 import AudioLine from "../AudioLine.vue";
 import RoleChs from "./RoleChs.vue";
 import RemarkChs from "./RemarkChs.vue";

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/PhraseModelChs.vue

@@ -246,7 +246,7 @@
 </template>
 
 <script>
-import { timeStrToSen } from "@/utils/index";
+import { timeStrToSen } from "../../../../utils/index";
 import AudioLine from "../AudioLine.vue";
 import Wordcard from "../components/Wordcard.vue"; // 卡片
 import Notecard from "../components/Notecard.vue"; // 注释

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/Practicechs.vue

@@ -393,7 +393,7 @@
 </template>
 
 <script>
-import { timeStrToSen } from "@/utils/index";
+import { timeStrToSen } from "../../../../utils/index";
 import AudioLine from "../AudioLine.vue";
 import Soundrecord from "../../preview/Soundrecord.vue"; // 录音模板
 import RoleChs from "./RoleChs.vue";

+ 1 - 1
src/components/Adult/preview/DialogueArticleViewChs/WordModelChs.vue

@@ -243,7 +243,7 @@
 </template>
 
 <script>
-import { timeStrToSen } from "@/utils/index";
+import { timeStrToSen } from "../../../../utils/index";
 import AudioLine from "../AudioLine.vue";
 import Wordcard from "../components/Wordcard.vue"; // 卡片
 import Notecard from "../components/Notecard.vue"; // 注释

+ 20 - 18
src/components/Adult/preview/Soundrecord.vue

@@ -314,24 +314,26 @@ export default {
       this.$emit("sentPause", false);
     },
     handleDelete() {
-      if (this.selectIndex || this.selectIndex == 0) {
-        this.recordList.splice(this.selectIndex, 1);
-        this.selectIndex =
-          this.recordList.length > 0 ? this.recordList.length - 1 : null;
-        this.hasMicro = this.recordList.length > 0 ? "normal" : "";
-        this.recordtime =
-          this.recordList.length > 0
-            ? this.recordList[this.selectIndex].toltime
-            : 0;
-        this.audio.pause();
-        this.audio = new window.Audio();
-        this.wavblob =
-          this.recordList.length > 0
-            ? this.recordList[this.selectIndex].wavData
-            : null;
-        this.oldIndex = null;
-        this.isPlaying = false;
-        clearInterval(this.timer);
+      if(this.hasMicro){
+        if (this.selectIndex || this.selectIndex == 0) {
+          this.recordList.splice(this.selectIndex, 1);
+          this.selectIndex =
+            this.recordList.length > 0 ? this.recordList.length - 1 : null;
+          this.hasMicro = this.recordList.length > 0 ? "normal" : "";
+          this.recordtime =
+            this.recordList.length > 0
+              ? this.recordList[this.selectIndex].toltime
+              : 0;
+          this.audio.pause();
+          this.audio = new window.Audio();
+          this.wavblob =
+            this.recordList.length > 0
+              ? this.recordList[this.selectIndex].wavData
+              : null;
+          this.oldIndex = null;
+          this.isPlaying = false;
+          clearInterval(this.timer);
+        }
       }
     },
   }, // 如果页面有keep-alive缓存功能,这个函数会触发

+ 2 - 0
src/components/Adult/preview/Soundrecorddiff.vue

@@ -257,6 +257,7 @@ export default {
       this.$emit("sentPause", false);
     },
     handleDelete() {
+      if(this.hasMicro){
       if (this.selectIndex || this.selectIndex == 0) {
         this.recordList.splice(this.selectIndex, 1);
         this.selectIndex =
@@ -277,6 +278,7 @@ export default {
         clearInterval(this.timer);
       }
       this.$emit("getRerordStatus", this.recordList.length > 0);
+      }
     },
   }, // 如果页面有keep-alive缓存功能,这个函数会触发
 };

+ 37 - 34
src/components/Adult/preview/Voicefullscreen.vue

@@ -720,40 +720,43 @@ export default {
       let Bookdetail = sessionStorage.getItem("Bookdetail");
       if (Bookdetail) {
         Bookdetail = JSON.parse(Bookdetail);
-      }
-      let MethodName = "order-collection_manager-AddMyCollection";
-      let text = "";
-      this.item.forEach((item) => {
-        if (item.chs != "#") {
-          text += item.chs;
-        }
-      });
-      let sentence_json = {
-        item: JSON.stringify(this.item),
-        bg: this.bg,
-        ed: this.ed,
-        mp3: this.mp3,
-        pyPosition: this.curQue.pyPosition,
-      };
-      let data = {
-        goods_id: this.currentTreeID,
-        goods_type: 502,
-        goods_name: Bookdetail.name,
-        goods_person_name_desc: Bookdetail.description
-          ? Bookdetail.description
-          : "",
-        goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
-        goods_price: Bookdetail.price,
-        sentence: {
-          sentence_text: text,
-          sentence_json: JSON.stringify(sentence_json),
-        },
-      };
-      LearnWebSI(MethodName, data).then((res) => {
-        this.$set(this.isCollArr, this.curSentIndex, true);
-        console.log();
-        this.$message.success("收藏成功!");
-      });
+     
+        let MethodName = "order-collection_manager-AddMyCollection";
+        let text = "";
+        this.item.forEach((item) => {
+          if (item.chs != "#") {
+            text += item.chs;
+          }
+        });
+        let sentence_json = {
+          item: JSON.stringify(this.item),
+          bg: this.bg,
+          ed: this.ed,
+          mp3: this.mp3,
+          pyPosition: this.curQue.pyPosition,
+        };
+        let data = {
+          goods_id: this.currentTreeID,
+          goods_type: 502,
+          goods_name: Bookdetail.name,
+          goods_person_name_desc: Bookdetail.description
+            ? Bookdetail.description
+            : "",
+          goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
+          goods_price: Bookdetail.price,
+          sentence: {
+            sentence_text: text,
+            sentence_json: JSON.stringify(sentence_json),
+          },
+        };
+        LearnWebSI(MethodName, data).then((res) => {
+          this.$set(this.isCollArr, this.curSentIndex, true);
+          console.log();
+          this.$message.success("收藏成功!");
+        });
+       }else{
+         this.$message.warning("权限不足!");
+       }
     },
     //取消收藏
     cancleColl() {

+ 1 - 1
src/components/Adult/preview/components/FreewriteLettle.vue

@@ -48,7 +48,7 @@ import Strockred from "./Strockred.vue";
 import FreeWriteQP from "./FreeWriteQP.vue";
 // import ChinaDict from "./ChinaDict";
 // import Audio from "./AudioRed.vue";
-import { LearnWebSI } from "@/api/ajax";
+import { LearnWebSI } from "../../../../api/ajax";
 import { set } from "js-cookie";
 export default {
   components: {

+ 0 - 3
src/components/Adult/preview/components/FreewriteWord.vue

@@ -2,9 +2,6 @@
 <template>
   <div class="freewrite">
     <div class="strockred" :class="wordNum ? '' : 'strockred_single'">
-      <!-- <div class="strock-play-box" @click="handelReset">
-        <img src="@/assets/common/strock-play.png" class="strock-play" />
-            </div>-->
       <div
         :class="
           wordNum ? 'character-target-div_more' : 'character-target-div_single'

+ 1 - 1
src/components/Adult/preview/components/Intp.vue

@@ -119,7 +119,7 @@
 <script>
 import Audio from "./AudioRed.vue";
 import Strockplayredline from "./Strockplayredline.vue";
-import { getHZChineseInfo } from "@/api/ajax";
+import { getHZChineseInfo } from "../../../../api/ajax";
 
 export default {
   name: "WordIntp",

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

@@ -267,25 +267,27 @@ export default {
       let Bookdetail = sessionStorage.getItem("Bookdetail");
       if (Bookdetail) {
         Bookdetail = JSON.parse(Bookdetail);
+        let MethodName = "order-collection_manager-AddMyCollection";
+        let data = {
+          goods_id: this.currentTreeID,
+          goods_type: 501,
+          goods_name: Bookdetail.name,
+          goods_person_name_desc: Bookdetail.description
+            ? Bookdetail.description
+            : "",
+          goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
+          goods_price: Bookdetail.price,
+          new_word: {
+            new_word: this.cur.stem[0].con,
+          },
+        };
+        LearnWebSI(MethodName, data).then((res) => {
+          this.collFlag = true;
+          this.$message.success("收藏成功!");
+        });
+      }else{
+        this.$message.warning("权限不足!");
       }
-      let MethodName = "order-collection_manager-AddMyCollection";
-      let data = {
-        goods_id: this.currentTreeID,
-        goods_type: 501,
-        goods_name: Bookdetail.name,
-        goods_person_name_desc: Bookdetail.description
-          ? Bookdetail.description
-          : "",
-        goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
-        goods_price: Bookdetail.price,
-        new_word: {
-          new_word: this.cur.stem[0].con,
-        },
-      };
-      LearnWebSI(MethodName, data).then((res) => {
-        this.collFlag = true;
-        this.$message.success("收藏成功!");
-      });
     },
     //取消收藏
     cancleColl() {

+ 1 - 1
src/components/Adult/preview/components/WordPhraseDetail.vue

@@ -224,7 +224,7 @@
 import Strockplayredline from "./Strockplayredline.vue";
 import Audio from "./AudioRed.vue";
 import Intp from "./Intp.vue";
-import { getContent } from "@/api/ajax";
+import { getContent } from "../../../../api/ajax";
 
 export default {
   //import引入的组件需要注入到对象中才能使用

+ 22 - 20
src/components/Adult/preview/components/Wordcard.vue

@@ -185,8 +185,8 @@ import Audio from "./AudioRed.vue";
 import Strockplayredline from "./Strockplayredline.vue";
 import Practice from "./Practice.vue";
 import WordPhraseDetail from "./WordPhraseDetail.vue";
-import { getContentFile, LearnWebSI, getHZChineseInfo } from "@/api/ajax";
-import { isChn } from "@/utils/index";
+import { getContentFile, LearnWebSI, getHZChineseInfo } from "../../../../api/ajax";
+import { isChn } from "../../../../utils/index";
 
 export default {
   name: "Wordcard",
@@ -236,25 +236,27 @@ export default {
       let Bookdetail = sessionStorage.getItem("Bookdetail");
       if (Bookdetail) {
         Bookdetail = JSON.parse(Bookdetail);
+        let MethodName = "order-collection_manager-AddMyCollection";
+        let data = {
+          goods_id: this.currentTreeID,
+          goods_type: 501,
+          goods_name: Bookdetail.name,
+          goods_person_name_desc: Bookdetail.description
+            ? Bookdetail.description
+            : "",
+          goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
+          goods_price: Bookdetail.price,
+          new_word: {
+            new_word: this.word.detail.new_word,
+          },
+        };
+        LearnWebSI(MethodName, data).then((res) => {
+          this.collFlag = true;
+          this.$message.success("收藏成功!");
+        });
+      }else{
+        this.$message.warning("权限不足!");
       }
-      let MethodName = "order-collection_manager-AddMyCollection";
-      let data = {
-        goods_id: this.currentTreeID,
-        goods_type: 501,
-        goods_name: Bookdetail.name,
-        goods_person_name_desc: Bookdetail.description
-          ? Bookdetail.description
-          : "",
-        goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
-        goods_price: Bookdetail.price,
-        new_word: {
-          new_word: this.word.detail.new_word,
-        },
-      };
-      LearnWebSI(MethodName, data).then((res) => {
-        this.collFlag = true;
-        this.$message.success("收藏成功!");
-      });
     },
     //取消收藏
     cancleColl() {