gcj 3 年之前
父節點
當前提交
0a8df19322

+ 16 - 0
src/api/ajax.js

@@ -61,6 +61,22 @@ export function getLearnWebContent(MethodName, data) {
   })
 }
 
+export function getBookWebContent(MethodName, data) {
+  let userInfor = getToken();
+  let UserCode = '', UserType = '', SessionID = ''
+  if (userInfor) {
+    let user = JSON.parse(getToken());
+    UserCode = user.user_code;
+    UserType = user.user_type;
+    SessionID = user.session_id;
+  }
+  return request({
+    url: `/GCLSBookWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
+    method: 'post',
+    data
+  })
+}
+
 
 
 

+ 6 - 6
src/components/Personalcenter/AccountSet.vue

@@ -170,7 +170,7 @@
             placeholder="Email"
             :disabled="true"
           />
-          <el-button class="btn" @click="editEmail">修改邮箱</el-button>
+          <el-button @click="editEmail">修改邮箱</el-button>
         </el-form-item>
         <el-form-item prop="phone">
           <span slot="label" class="lable">
@@ -182,7 +182,7 @@
             placeholder="phone"
             :disabled="true"
           />
-          <el-button class="btn" @click="editPhone">修改手机号</el-button>
+          <el-button @click="editPhone">修改手机号</el-button>
         </el-form-item>
         <el-form-item prop="password">
           <span slot="label" class="lable">
@@ -195,7 +195,7 @@
             placeholder="请输入密码"
             :disabled="true"
           />
-          <el-button class="btn" @click="editPassword">修改密码</el-button>
+          <el-button @click="editPassword">修改密码</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -537,9 +537,9 @@ export default {
           margin-right: 10px;
         }
       }
-      // .btn {
-      //   margin-left: 0px;
-      // }
+      .btn {
+        margin-left: 0px;
+      }
     }
   }
   .approved_org_list {

+ 129 - 92
src/components/common/Enword.vue

@@ -2,23 +2,39 @@
 <template>
   <div class="enword">
     <div class="enword-left">
-        <span class="word">{{ item.new_word.new_word }}</span>
-        <div class="enword-main" v-if="item.new_word.pinyin||item.new_word.audio_file_url">
-            <span class="pron" v-if="item.new_word.pinyin">/{{ item.new_word.pinyin }}/</span>
-            <Audio :mp3="item.new_word.audio_file_url" class="enword-voice" />
-        </div>
-        <div class="enword-inpt" v-for="(fy, i) in item.new_word.definition_list" :key="i">
-            <i v-if="fy.indexOf('. ')>-1">
-              {{ fy.substring(0, fy.indexOf(". ")>-1?fy.indexOf(". ") + 2:0) }}
-            </i>
-            <div>
-              {{ fy.substring(fy.indexOf(". ")>-1?fy.indexOf(". ") + 2:0, fy.length) }}
-            </div>
-        </div>
-        <div class="resource" v-if="item.resource">{{ item.resource }}</div>
-        <div class="create_time" v-if="item.create_time">
-            {{ item.create_time }}
+      <span class="word">{{ item.new_word.new_word }}</span>
+      <div
+        class="enword-main"
+        v-if="item.new_word.pinyin || item.new_word.audio_file_url"
+      >
+        <span class="pron" v-if="item.new_word.pinyin"
+          >/{{ item.new_word.pinyin }}/</span
+        >
+        <Audio :mp3="item.new_word.audio_file_url" class="enword-voice" />
+      </div>
+      <div
+        class="enword-inpt"
+        v-for="(fy, i) in item.new_word.definition_list"
+        :key="i"
+      >
+        <i v-if="fy.indexOf('. ') > -1">
+          {{
+            fy.substring(0, fy.indexOf(". ") > -1 ? fy.indexOf(". ") + 2 : 0)
+          }}
+        </i>
+        <div>
+          {{
+            fy.substring(
+              fy.indexOf(". ") > -1 ? fy.indexOf(". ") + 2 : 0,
+              fy.length
+            )
+          }}
         </div>
+      </div>
+      <div class="resource" v-if="item.resource">{{ item.resource }}</div>
+      <div class="create_time" v-if="item.create_time">
+        {{ item.create_time }}
+      </div>
     </div>
     <div class="enword-top">
       <div class="cancle-coll" @click="cancleColl">
@@ -29,9 +45,9 @@
     </div>
     <div class="practiceBox" v-if="isIntpShow">
       <WordPhraseDetailEn
-        :currentTreeID="currentTreeID"
+        :currentTreeID="item.goods_id"
+        :collId="item.id"
         :closeWord="changeIntpShow"
-        :data="item"
       />
     </div>
   </div>
@@ -46,7 +62,7 @@ export default {
   props: ["item", "themeColor"],
   data() {
     return {
-        isIntpShow: false,
+      isIntpShow: false,
     };
   },
   computed: {},
@@ -85,89 +101,110 @@ export default {
 </script>
 <style lang='scss' scoped>
 //@import url(); 引入公共css类
-.enword{
+.enword {
+  width: 100%;
+  display: flex;
+  .practiceBox {
+    position: fixed;
     width: 100%;
-    display: flex;
+    height: 100vh;
+    left: 0;
+    top: 0px;
+    z-index: 9999;
+    background: rgba(0, 0, 0, 0.19);
+    box-sizing: border-box;
+    overflow-y: auto;
+    padding-bottom: 50px;
+    &.practiceBoxStrock {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      padding-top: 0px;
+    }
+  }
 }
-.enword-left{
-    flex: 1;
-    .word{
-        font-weight: bold;
-        font-size: 24px;
-        line-height: 32px;
-        color: rgba(0, 0, 0, 0.85);
-        margin-bottom: 8px;
-        display: block;
+.enword-left {
+  flex: 1;
+  .word {
+    font-weight: bold;
+    font-size: 24px;
+    line-height: 32px;
+    color: rgba(0, 0, 0, 0.85);
+    margin-bottom: 8px;
+    display: block;
+  }
+  .enword-main {
+    display: flex;
+    margin-bottom: 8px;
+    .pron {
+      font-size: 16px;
+      line-height: 24px;
+      color: rgba(0, 0, 0, 0.85);
+      margin-right: 12px;
     }
-    .enword-main{
-        display: flex;
-        margin-bottom: 8px;
-        .pron{
-            font-size: 16px;
-            line-height: 24px;
-            color: rgba(0, 0, 0, 0.85);
-            margin-right: 12px;
-        }
-        .enword-voice{
-            width: 16px;
-        }
+    .enword-voice {
+      width: 16px;
     }
-    .enword-inpt{
-        margin-bottom: 8px;
-        font-size: 16px;
-        line-height: 24px;
-        color: rgba(0, 0, 0, 0.85);
-        display: flex;
-        i{
-            margin-right: 12px;
-        }
-        div{
-            flex: 1;
-        }
+  }
+  .enword-inpt {
+    margin-bottom: 8px;
+    font-size: 16px;
+    line-height: 24px;
+    color: rgba(0, 0, 0, 0.85);
+    display: flex;
+    i {
+      margin-right: 12px;
     }
-    .resource,.create_time{
-        color: #2C2C2C;
-        opacity: 0.5;
-        font-size: 14px;
-        line-height: 22px;
-        margin-bottom: 8px;
+    div {
+      flex: 1;
     }
+  }
+  .resource,
+  .create_time {
+    color: #2c2c2c;
+    opacity: 0.5;
+    font-size: 14px;
+    line-height: 22px;
+    margin-bottom: 8px;
+  }
 }
-.enword-top{
-    width: 102px;
-    text-align: center;
+.enword-top {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  text-align: center;
 }
 .cancle-coll {
-    float: right;
-    padding: 0 12px;
-    height: 32px;
-    display: flex;
-    justify-content: flex-start;
-    align-items: center;
-    cursor: pointer;
-    border: 1px solid rgba(0, 0, 0, 0.1);
-    box-sizing: border-box;
-    border-radius: 4px;
-    margin-bottom: 38px;
-    > .coll-icon {
-        width: 16px;
-        height: 16px;
-        background: url("../../assets/starfill-16-normal-red.png") no-repeat
-            left top;
-        background-size: 100% 100%;
-        margin-right: 4px;
-    }
-    > .coll-text {
-        font-size: 14px;
-        line-height: 22px;
-        color: #000000;
-    }
-}
-.look-more {
+  float: right;
+  padding: 0 12px;
+  height: 32px;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  cursor: pointer;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  box-sizing: border-box;
+  border-radius: 4px;
+  margin-bottom: 38px;
+  > .coll-icon {
+    width: 16px;
+    height: 16px;
+    background: url("../../assets/starfill-16-normal-red.png") no-repeat left
+      top;
+    background-size: 100% 100%;
+    margin-right: 4px;
+  }
+  > .coll-text {
     font-size: 14px;
     line-height: 22px;
-    color: rgba(0, 0, 0, 0.85);
-    opacity: 0.5;
-    cursor: pointer;
+    color: #000000;
+  }
+}
+.look-more {
+  font-size: 14px;
+  line-height: 22px;
+  color: rgba(0, 0, 0, 0.85);
+  opacity: 0.5;
+  cursor: pointer;
 }
 </style>

+ 11 - 6
src/components/common/Hanzi.vue

@@ -68,10 +68,12 @@
     </div>
     <div class="practiceBox" v-if="isIntpShow">
       <WordPhraseDetail
-        :currentTreeID="currentTreeID"
+        :collId="item.id"
         :closeWord="changeIntpShow"
-        :data="item"
         :themeColor="themeColor"
+        :currentTreeID="item.goods_id"
+        :word="item.new_word.new_word"
+        :detailIndex="index"
       />
     </div>
   </div>
@@ -135,15 +137,15 @@ export default {
   align-items: center;
   .practiceBox {
     position: fixed;
-    left: 0;
-    top: 0px;
-    z-index: 999;
     width: 100%;
     height: 100vh;
+    left: 0;
+    top: 0px;
+    z-index: 9999;
     background: rgba(0, 0, 0, 0.19);
     box-sizing: border-box;
-    overflow: hidden;
     overflow-y: auto;
+    padding-bottom: 50px;
     &.practiceBoxStrock {
       display: flex;
       justify-content: center;
@@ -172,6 +174,9 @@ export default {
     overflow: hidden;
   }
   .strockplay {
+    width: 64px;
+    height: 64px;
+    box-sizing: border-box;
     &.borderRight {
       border-right: 2px #de4444 solid;
     }

+ 97 - 140
src/components/common/Intp.vue

@@ -16,54 +16,54 @@
       <div class="bwc-intp">
         <!-- 基本释义 -->
         <h1>基本释义</h1>
-        <span v-if="word.pinyin" class="pinyin">{{ word.pinyin }}</span>
-        <template v-if="isHasValue2=='definitionWithSpell'">
-            <div
-                v-for="(itemss, indexss) in paraphrase"
-                :key="indexss"
-                class="paraphrase"
-                >
-                <div
-                    v-for="(vItems, key, vIndexs) in itemss['@definitionWithSpell']"
-                    :key="vIndexs"
-                    class="para"
-                    >
-                    <span class="para-key">{{
-                        key.replace("[", "").replace("]", "")
-                    }}</span>
-                    <ul
-                        v-for="(pItems, pIndexs) in vItems"
-                        :key="pIndexs"
-                        class="para-value"
-                    >
-                        <li>{{ pItems }}</li>
-                    </ul>
-                </div>
-            </div>
-        </template>
-        <template v-else-if="isHasValue2=='definitions'">
+        <span v-if="pinyin" class="pinyin">{{ pinyin }}</span>
+        <template v-if="isHasValue2 == 'definitionWithSpell'">
+          <div
+            v-for="(itemss, indexss) in paraphrase"
+            :key="indexss"
+            class="paraphrase"
+          >
             <div
-                v-for="(itemss, indexss) in paraphrase"
-                :key="indexss"
-                class="paraphrase"
-                >
-                <ul
-                    v-for="(vItems, key, vIndexs) in itemss['@definitions']"
-                    :key="vIndexs"
-                    class="para"
-                    >
-                    <li>{{ vItems }}</li>
-                </ul>
+              v-for="(vItems, key, vIndexs) in itemss['@definitionWithSpell']"
+              :key="vIndexs"
+              class="para"
+            >
+              <span class="para-key">{{
+                key.replace("[", "").replace("]", "")
+              }}</span>
+              <ul
+                v-for="(pItems, pIndexs) in vItems"
+                :key="pIndexs"
+                class="para-value"
+              >
+                <li>{{ pItems }}</li>
+              </ul>
             </div>
+          </div>
         </template>
-        <template v-else>
+        <template v-else-if="isHasValue2 == 'definitions'">
+          <div
+            v-for="(itemss, indexss) in paraphrase"
+            :key="indexss"
+            class="paraphrase"
+          >
             <ul
-                v-for="(itemss, indexss) in paraphrase"
-                :key="indexss"
-                class="paraphrase"
-                >
-                <li>{{ itemss['@value'] }}</li>
+              v-for="(vItems, key, vIndexs) in itemss['@definitions']"
+              :key="vIndexs"
+              class="para"
+            >
+              <li>{{ vItems }}</li>
             </ul>
+          </div>
+        </template>
+        <template v-else>
+          <ul
+            v-for="(itemss, indexss) in paraphrase"
+            :key="indexss"
+            class="paraphrase"
+          >
+            <li>{{ itemss["@value"] }}</li>
+          </ul>
         </template>
         <hr />
       </div>
@@ -111,7 +111,6 @@
 <script>
 import Audio from "./AudioRed.vue";
 import Strockplayredline from "./Strockplayredline.vue";
-import { getHZChineseInfo } from "@/api/ajax";
 
 export default {
   name: "WordIntp",
@@ -119,7 +118,7 @@ export default {
     Strockplayredline,
     Audio,
   },
-  props: ["word", "changeIntpShow", "themeColor", "show", "type"],
+  props: ["dict", "themeColor", "show", "pinyin"],
   data() {
     return {
       isPraShow: false,
@@ -131,39 +130,28 @@ export default {
       antonymList: [], // 反义词
       termsList: [], // 组词
       dataDetail: [],
-      isHasValue2: '', // 释义里是否含有value2
+      isHasValue2: "", // 释义里是否含有value2
     };
   },
   computed: {
     flag() {
       let _this = this;
       let flag = false;
-      if (_this.word) {
-        if (_this.paraphrase && _this.paraphrase.length > 0) {
-          flag = true;
-        } else if (_this.synonymList && _this.synonymList.length > 0) {
-          flag = true;
-        } else if (_this.antonymList && _this.antonymList.length > 0) {
-          flag = true;
-        } else if (_this.termsList && _this.termsList.length > 0) {
-          flag = true;
-        }
+
+      if (_this.paraphrase && _this.paraphrase.length > 0) {
+        flag = true;
+      } else if (_this.synonymList && _this.synonymList.length > 0) {
+        flag = true;
+      } else if (_this.antonymList && _this.antonymList.length > 0) {
+        flag = true;
+      } else if (_this.termsList && _this.termsList.length > 0) {
+        flag = true;
       }
+
       return flag;
     },
   },
-  watch: {
-    word: {
-      handler: function (val, oldVal) {
-        let _this = this;
-        if (_this.type == "newWordDetail") {
-          _this.getChineseInfo();
-        }
-      },
-      // 深度观察监听
-      deep: true,
-    },
-  },
+  watch: {},
   //方法集合
   methods: {
     writeWord() {
@@ -175,17 +163,6 @@ export default {
     handleSelect(val) {
       this.activeIndex = val;
     },
-    getChineseInfo() {
-      let _this = this;
-
-      let data = {
-        query: this.word.new_word,
-      };
-      getHZChineseInfo(data).then((res) => {
-        _this.dataDetail = res.data.result;
-        _this.handleChineseDetail();
-      });
-    },
     // 处理数据
     handleChineseDetail() {
       let _this = this;
@@ -193,7 +170,7 @@ export default {
       _this.synonymList = [];
       _this.antonymList = [];
       _this.termsList = [];
-      _this.isHasValue2 = ''
+      _this.isHasValue2 = "";
       _this.dataDetail.forEach((item) => {
         if (item.request.queryType == "entity") {
           // 读音
@@ -202,19 +179,19 @@ export default {
               if (itemss.key == "pronunciation") {
                 // 音频
 
-                _this.word.mp3Url = itemss.objects[0]["@value"]
+                _this.mp3Url = itemss.objects[0]["@value"]
                   ? itemss.objects[0]["@value"]
                   : "";
               } else if (itemss.key == "definition") {
                 // 释义
                 _this.paraphrase = itemss.objects;
-                for(let i = 0; i< _this.paraphrase.length; i++){
-                    if(_this.paraphrase[i]['@definitionWithSpell']){
-                        _this.isHasValue2 = 'definitionWithSpell'
-                        return false
-                    }else if(_this.paraphrase[i]['@definitions']){
-                        _this.isHasValue2 = 'definitions'
-                    }
+                for (let i = 0; i < _this.paraphrase.length; i++) {
+                  if (_this.paraphrase[i]["@definitionWithSpell"]) {
+                    _this.isHasValue2 = "definitionWithSpell";
+                    return false;
+                  } else if (_this.paraphrase[i]["@definitions"]) {
+                    _this.isHasValue2 = "definitions";
+                  }
                 }
               } else if (itemss.key == "synonym") {
                 // 近义词
@@ -237,33 +214,10 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     let _this = this;
-    if (_this.type == "newWordDetail") {
-      _this.getChineseInfo();
-    } else {
-      if (_this.word) {
-        _this.isHasValue2 = ''
-        _this.mp3Url = _this.word.mp3Url ? _this.word.mp3Url : "";
-        _this.paraphrase = _this.word.paraphrase
-          ? JSON.parse(JSON.stringify(_this.word.paraphrase))
-          : [];
-        for(let i = 0; i< _this.paraphrase.length; i++){
-            if(_this.paraphrase[i]['@definitionWithSpell']){
-                _this.isHasValue2 = 'definitionWithSpell'
-                return false
-            }else if(_this.paraphrase[i]['@definitions']){
-                _this.isHasValue2 = 'definitions'
-            }
-        }
-        _this.synonymList = _this.word.synonymList
-          ? JSON.parse(JSON.stringify(_this.word.synonymList))
-          : [];
-        _this.antonymList = _this.word.antonymList
-          ? JSON.parse(JSON.stringify(_this.word.antonymList))
-          : [];
-        _this.termsList = _this.word.termsList
-          ? JSON.parse(JSON.stringify(_this.word.termsList))
-          : [];
-      }
+    if (_this.dict) {
+      let dict = JSON.parse(_this.dict);
+      _this.dataDetail = dict.data.result;
+      _this.handleChineseDetail();
     }
   },
   beforeCreate() {}, //生命周期 - 创建之前
@@ -526,35 +480,38 @@ export default {
 }
 </style>
 <style lang="scss">
-.wordIntp {
-  .el-menu--horizontal > .el-menu-item {
-    width: 33.33%;
-    text-align: center;
-    color: #000000;
-    font-size: 18px;
-  }
-  .el-menu.el-menu--horizontal {
-    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-  }
-  .el-menu--horizontal > .el-menu-item.is-active {
-    color: #de4444;
-    font-weight: bold;
-    border-bottom: 2px solid #de4444;
-  }
-}
-.NPC-Big-Book-preview-green {
+.OrderManage {
   .wordIntp {
+    .el-menu--horizontal > .el-menu-item {
+      width: 33.33%;
+      text-align: center;
+      color: #000000;
+      font-size: 18px;
+      margin: 0;
+    }
+    .el-menu.el-menu--horizontal {
+      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+    }
     .el-menu--horizontal > .el-menu-item.is-active {
-      color: #24b99e;
-      border-bottom: 2px solid #24b99e;
+      color: #de4444;
+      font-weight: bold;
+      border-bottom: 2px solid #de4444;
     }
   }
-}
-.NPC-Big-Book-preview-brown {
-  .wordIntp {
-    .el-menu--horizontal > .el-menu-item.is-active {
-      color: #bd8865;
-      border-bottom: 2px solid #bd8865;
+  .NPC-Big-Book-preview-green {
+    .wordIntp {
+      .el-menu--horizontal > .el-menu-item.is-active {
+        color: #24b99e;
+        border-bottom: 2px solid #24b99e;
+      }
+    }
+  }
+  .NPC-Big-Book-preview-brown {
+    .wordIntp {
+      .el-menu--horizontal > .el-menu-item.is-active {
+        color: #bd8865;
+        border-bottom: 2px solid #bd8865;
+      }
     }
   }
 }

+ 2 - 2
src/components/common/Strockplayredline.vue

@@ -97,8 +97,8 @@ export default {
 .strockplayRedInner {
   position: relative;
 
-  width: 60px; //444px
-  height: 60px; //480px
+  width: 100%; //444px
+  height: 100%; //480px
 }
 
 .character-target-div {

+ 71 - 47
src/components/common/WordPhraseDetail.vue

@@ -1,15 +1,10 @@
 <template>
-  <div class="wordDetailModule wordDetailChs">
+  <div class="wordDetailModule wordDetailChs" v-if="detail" v-loading="loading">
     <div class="module-inner">
-      <div class="top" v-if="data">
+      <div class="top">
         <div class="operation">
           <div>
-            <template v-if="optionRes && optionRes.length > 0">
-              <!-- <img
-                src="../../../../assets/icon/starline-16-normal-Black.png"
-                alt=""
-                v-if="!notshowNext"
-              /> -->
+            <!-- <template v-if="optionRes && optionRes.length > 0">
               <img
                 style="margin-right: 8px"
                 src="../../assets/Left-16-normal-Black.png"
@@ -23,7 +18,7 @@
                 @click="nextDetail"
                 v-if="!notshowNext"
               />
-            </template>
+            </template> -->
             <img
               style="margin-right: 0px"
               @click="closeWordShow"
@@ -45,15 +40,15 @@
           >
             <div
               class="strockplay"
-              v-for="(conItem, conindex) in data.new_word"
+              v-for="(conItem, conindex) in detail.new_word.new_word"
               :key="'new_word_' + conindex"
             >
               <Strockplayredline
                 :key="conItem + detailIndex + conindex"
                 :Book_text="conItem"
                 :playStorkes="true"
-                :targetDiv="'bwcHanziIntp' + conItem + detailIndex + conindex"
-                :wordNum="data.new_word.length"
+                :targetDiv="'wordDetail' + conItem + detailIndex + conindex"
+                :wordNum="detail.new_word.new_word.length"
                 :themeColor="themeColor"
               />
               <div
@@ -65,25 +60,34 @@
                     ? 'red-bg'
                     : 'brown-bg',
                 ]"
-                v-if="conindex < data.new_word.length - 1"
+                v-if="conindex < detail.new_word.new_word.length - 1"
               ></div>
             </div>
           </div>
           <div class="wordInfor">
             <div class="yinpin">
-              <span class="pinyintext"> {{ data.pinyin.toLowerCase() }}</span>
+              <span class="pinyintext">
+                {{ detail.new_word.pinyin.toLowerCase() }}</span
+              >
               <template
-                v-if="data.mp3_list && data.mp3_list[0] && data.mp3_list[0].id"
+                v-if="
+                  detail.new_word.mp3_list &&
+                  detail.new_word.mp3_list[0] &&
+                  detail.new_word.mp3_list[0].id
+                "
               >
-                <Audio :mp3="data.mp3_list[0].id" :themeColor="themeColor" />
+                <Audio
+                  :mp3="detail.new_word.mp3_list[0].id"
+                  :themeColor="themeColor"
+                />
               </template>
-              <template v-else-if="data.mp3Url">
-                <Audio :mp3="data.mp3Url" :themeColor="themeColor" />
+              <template v-else-if="detail.new_word.mp3Url">
+                <Audio :mp3="detail.new_word.mp3Url" :themeColor="themeColor" />
               </template>
             </div>
             <p
               class="jieshu"
-              v-for="(fy, i) in data.definition_list"
+              v-for="(fy, i) in detail.new_word.definition_list"
               :key="i"
               v-html="fy"
             ></p>
@@ -165,7 +169,11 @@
           </div>
         </div>
       </div>
-      <Intp :word="data" :themeColor="themeColor" :type="type" />
+      <Intp
+        :dict="detail.new_word.definition_dictionary_json"
+        :pinyin="detail.new_word.pinyin"
+        :themeColor="themeColor"
+      />
     </div>
   </div>
 </template>
@@ -174,7 +182,7 @@
 import Strockplayredline from "./Strockplayredline.vue";
 import Audio from "./AudioRed.vue";
 import Intp from "./Intp.vue";
-import { getContent } from "@/api/ajax";
+import { getBookWebContent, getLearnWebContent } from "@/api/ajax";
 
 export default {
   //import引入的组件需要注入到对象中才能使用
@@ -184,17 +192,12 @@ export default {
     Intp,
   },
   props: [
-    "data",
-    "changeDetailIndex",
     "closeWord",
-    "detailIndex",
-    "notshowNext",
-    "getWordLiju",
-    "optionRes",
+    "collId",
     "themeColor",
-    "isSuccess",
     "currentTreeID",
-    "type",
+    "word",
+    "detailIndex",
   ],
   data() {
     //这里存放数据
@@ -209,16 +212,18 @@ export default {
       list3: [],
       isShow: false,
       old_word: "",
+      loading: false,
       loading1: false,
       loading2: false,
       loading3: false,
+      detail: null,
     };
   },
   //计算属性 类似于data概念
   computed: {},
   //监控data中数据变化
   watch: {
-    data: {
+    collId: {
       handler: function (val, oldVal) {
         const _this = this;
         if (val) {
@@ -260,9 +265,9 @@ export default {
       let Mname =
         "book-courseware_manager-GetCoursewareWordExampleSentenceList";
       // 获取本课的 本教材的 本套的 的例句
-      getContent(Mname, {
+      getBookWebContent(Mname, {
         courseware_id: this.currentTreeID, // 课件id
-        word: this.data.new_word, //生词
+        word: this.word, //生词
         search_scope: 0, //检索范围0 本课件  1本教材 2本套
         is_contain_word_variants: false,
       })
@@ -270,18 +275,18 @@ export default {
           this.loading1 = false;
           this.list1 = this.handleExample(res.sentence_list);
           console.log(this.list1);
-          getContent(Mname, {
+          getBookWebContent(Mname, {
             courseware_id: this.currentTreeID, // 课件id
-            word: this.data.new_word, //生词
+            word: this.word, //生词
             search_scope: 1, //检索范围0 本课件  1本教材 2本套
             is_contain_word_variants: false,
           })
             .then((res) => {
               this.loading2 = false;
               this.list2 = this.handleExample(res.sentence_list);
-              getContent(Mname, {
+              getBookWebContent(Mname, {
                 courseware_id: this.currentTreeID, // 课件id
-                word: this.data.new_word, //生词
+                word: this.new_word, //生词
                 search_scope: 2, //检索范围0 本课件  1本教材 2本套
                 is_contain_word_variants: false,
               })
@@ -344,18 +349,20 @@ export default {
       });
       return list;
     },
-
+    getMyCollection() {
+      this.loading = true;
+      let Mname = "order-collection_manager-GetMyCollection";
+      let data = {
+        id: this.collId,
+      };
+      getLearnWebContent(Mname, data).then((res) => {
+        this.loading = false;
+        this.detail = res;
+        this.viewIntp();
+      });
+    },
     initData() {
-      console.log(this.data);
-      this.viewIntp();
-      // let Fathernode = document.getElementsByClassName(
-      //   "NPC-Big-Book-preview"
-      // )[0];
-      // if (Fathernode) {
-      //   //   this.height = Fathernode.clientHeight + "px";
-      //   this.height = window.innerHeight + "px";
-      //   this.margintop = "-" + window.innerHeight / 2 + "px";
-      // }
+      this.getMyCollection();
     },
     handleChangeTab(flag) {
       this[flag] = !this[flag];
@@ -453,6 +460,9 @@ export default {
           justify-content: center;
           align-items: center;
           position: relative;
+          width: 130px;
+          height: 130px;
+          box-sizing: border-box;
           .collect-icon {
             width: 16px;
             position: absolute;
@@ -669,6 +679,20 @@ export default {
       }
     }
   }
+  .topTitle {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    padding: 0 12px;
+    align-items: center;
+    background: #fff !important;
+    height: 40px;
+    background: #fff !important;
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    border-radius: 8px 8px 0px 0px;
+  }
 }
 </style>
 <style lang="scss">

+ 132 - 114
src/components/common/WordPhraseDetailEn.vue

@@ -1,17 +1,10 @@
 <template>
-  <div
-    v-if="height"
-    class="Module"
-    :style="{
-      height: height,
-      maxHeight: height,
-    }"
-  >
+  <div class="Module">
     <div class="module-inner">
-      <div class="top" v-if="data">
+      <div class="top" v-if="detail">
         <div class="operation">
           <div>
-            <img
+            <!-- <img
               style="margin-right: 8px"
               src="../../assets/Left-16-normal-Black.png"
               alt=""
@@ -23,7 +16,7 @@
               alt=""
               @click="nextDetail"
               v-if="!notshowNext"
-            />
+            /> -->
             <img
               @click="closeWordShow"
               src="../../assets/Cross-16-normal-Black.png"
@@ -32,16 +25,16 @@
           </div>
         </div>
         <div class="wordDetail">
-          <p class="word">{{ data.new_word }}</p>
-          <div class="yinpin" v-if="data.pinyin">
-            <span> /{{ data.pinyin }}/</span>
+          <p class="word">{{ detail.new_word.new_word }}</p>
+          <div class="yinpin" v-if="detail.new_word.pinyin">
+            <span> /{{ detail.new_word.pinyin }}/</span>
             <img
               @click="palyAudio('deafult')"
               :src="playBtn == 'deafult' ? voicePlaySrc : voicePauseSrc"
               alt=""
               v-if="
-                data.mp3_list &&
-                data.mp3_list.length > 0 &&
+                detail.new_word.mp3_list &&
+                detail.new_word.mp3_list.length > 0 &&
                 playWord == 'deafult' &&
                 voiceSrc
               "
@@ -50,27 +43,35 @@
               @click="palyAudio('deafult')"
               :src="voicePauseSrc"
               alt=""
-              v-else-if="data.mp3_list && data.mp3_list.length > 0"
+              v-else-if="
+                detail.new_word.mp3_list && detail.new_word.mp3_list.length > 0
+              "
             />
             <audio
-              v-if="data.mp3_list && data.mp3_list.length > 0"
+              v-if="
+                detail.new_word.mp3_list && detail.new_word.mp3_list.length > 0
+              "
               id="deafult"
-              :src="data.mp3_list[0].id"
+              :src="detail.new_word.mp3_list[0].id"
             ></audio>
           </div>
-          <p class="jieshu" v-for="(fy, i) in data.definition_list" :key="i">
+          <p
+            class="jieshu"
+            v-for="(fy, i) in detail.new_word.definition_list"
+            :key="i"
+          >
             <template v-if="fy.indexOf('. ') > -1">
               <i>{{ fy.substring(0, fy.indexOf(". ") + 2) }}</i>
               <span
                 >{{ fy.substring(fy.indexOf(". ") + 2, fy.length)
                 }}{{
-                  i == data.definition_list.length - 1 ? "" : ";"
+                  i == detail.new_word.definition_list.length - 1 ? "" : ";"
                 }}</span
               >
             </template>
             <template v-else>
               <span>{{
-                i == data.definition_list.length - 1 ? fy : fy + ";"
+                i == detail.new_word.definition_list.length - 1 ? fy : fy + ";"
               }}</span>
             </template>
           </p>
@@ -78,14 +79,10 @@
         <div class="zhedie">
           <div v-if="list1 && list1.length > 0">
             <div class="topTitle">
-              <span>本课例句({{list1.length}})</span>
+              <span>本课例句({{ list1.length }})</span>
               <span @click="handleChangeTab('wordShow')"
                 >{{ wordShow ? "收起" : "展开" }}
-                <img
-                  v-if="wordShow"
-                  src="../../assets/down-black.png"
-                  alt=""
-                />
+                <img v-if="wordShow" src="../../assets/down-black.png" alt="" />
                 <img
                   v-else
                   class="rotate"
@@ -99,8 +96,7 @@
                 <div v-for="(item, i) in list1" :key="i">
                   <div>{{ i + 1 }}.</div>
                   <div style="flex: 1">
-                    <p v-html="item.res">
-                    </p>
+                    <p v-html="item.res"></p>
                     <p class="p2">
                       来源:{{ item.source_courseware_name_path }}
                     </p>
@@ -111,7 +107,7 @@
           </div>
           <div v-if="list2 && list2.length > 0">
             <div class="topTitle">
-              <span>本书例句({{list2.length}})</span>
+              <span>本书例句({{ list2.length }})</span>
               <span @click="handleChangeTab('wordShow2')"
                 >{{ wordShow2 ? "收起" : "展开" }}
                 <img
@@ -132,7 +128,7 @@
                 <div v-for="(item, i) in list2" :key="i">
                   <div>{{ i + 1 }}.</div>
                   <div style="flex: 1">
-                    <p v-html="item.res">
+                    <p v-html="item.res"></p>
                     <p class="p2">
                       来源:{{ item.source_courseware_name_path }}
                     </p>
@@ -143,7 +139,7 @@
           </div>
           <div v-if="list3 && list3.length > 0">
             <div class="topTitle">
-              <span>本套教材例句({{list3.length}})</span>
+              <span>本套教材例句({{ list3.length }})</span>
               <span @click="handleChangeTab('wordShow3')"
                 >{{ wordShow3 ? "收起" : "展开" }}
                 <img
@@ -164,7 +160,7 @@
                 <div v-for="(item, i) in list3" :key="i">
                   <div>{{ list3.length + i + 1 }}.</div>
                   <div style="flex: 1">
-                    <p v-html="item.res">
+                    <p v-html="item.res"></p>
                     <p class="p2">
                       来源:{{ item.source_courseware_name_path }}
                     </p>
@@ -175,34 +171,32 @@
           </div>
         </div>
       </div>
-      <div class="bottom" v-if="data && data.endata">
+      <div class="bottom" v-if="dictDetail">
         <div class="from">
           来自网易有道<img
             @click="closeWordShow"
             src="../../assets/Cross-16-normal-Black.png"
             alt=""
-            v-if="!data"
+            v-if="!dictDetail"
           />
         </div>
         <div class="wordDetail">
           <p class="word">
-            {{
-              data.endata && data.endata["query"]
-                ? data.endata["query"]
-                : data.new_word
-            }}
+            {{ dictDetail["query"] }}
           </p>
           <div class="yinpin">
             <div class="yinpin-box">
               <span>英 </span>
-              <span v-if='data.endata["uk-phonetic"]'> /{{ data.endata["uk-phonetic"] }}/</span>
+              <span v-if="dictDetail['uk-phonetic']">
+                /{{ dictDetail["uk-phonetic"] }}/</span
+              >
               <img
                 @click="palyAudio('Y')"
                 :src="playBtn == 'Y' ? voicePlaySrc : voicePauseSrc"
                 alt=""
                 v-if="
-                  data.endata &&
-                  data.endata['uk-sound'] &&
+                  dictDetail &&
+                  dictDetail['uk-sound'] &&
                   playWord == 'Y' &&
                   voiceSrc
                 "
@@ -211,20 +205,22 @@
                 @click="palyAudio('Y')"
                 :src="voicePauseSrc"
                 alt=""
-                v-else-if="data.endata && data.endata['uk-sound']"
+                v-else-if="dictDetail"
               />
-              <audio id="Y" :src="data.endata['uk-sound']"></audio>
+              <audio id="Y" :src="dictDetail['uk-sound']"></audio>
             </div>
             <div>
               <span>美 </span>
-              <span v-if='data.endata["us-phonetic"]'> /{{ data.endata["us-phonetic"] }}/</span>
+              <span v-if="dictDetail['us-phonetic']">
+                /{{ dictDetail["us-phonetic"] }}/</span
+              >
               <img
                 @click="palyAudio('M')"
                 :src="playBtn == 'M' ? voicePlaySrc : voicePauseSrc"
                 alt=""
                 v-if="
-                  data.endata &&
-                  data.endata['us-sound'] &&
+                  dictDetail &&
+                  dictDetail['us-sound'] &&
                   playWord == 'M' &&
                   voiceSrc
                 "
@@ -233,12 +229,12 @@
                 @click="palyAudio('M')"
                 :src="voicePauseSrc"
                 alt=""
-                v-else-if="data.endata && data.endata['us-sound']"
+                v-else-if="dictDetail && dictDetail['us-sound']"
               />
-              <audio id="M" :src="data.endata['us-sound']"></audio>
+              <audio id="M" :src="dictDetail['us-sound']"></audio>
             </div>
           </div>
-          <div class="jieshu" v-for="(fy, i) in data.endata.part" :key="i">
+          <div class="jieshu" v-for="(fy, i) in dictDetail.part" :key="i">
             <i>
               {{ fy.part }}
             </i>
@@ -255,19 +251,11 @@
 <script>
 //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》from ‘《组件路径》';
-import { LearnWebSI, getContent } from "@/api/ajax";
+import { getBookWebContent, getLearnWebContent } from "@/api/ajax";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
-  props: [
-    "data",
-    "curQue",
-    "changeDetailIndex",
-    "closeWord",
-    "detailIndex",
-    "notshowNext",
-    "currentTreeID"
-  ],
+  props: ["closeWord", "collId", "currentTreeID"],
   data() {
     //这里存放数据
     return {
@@ -285,6 +273,9 @@ export default {
       voicePauseSrc: require("../../assets/play-red.png"),
       voicePlaySrc: require("../../assets/icon-voice-play-red.png"),
       collFlag: false,
+      loading: false,
+      detail: null,
+      dictDetail: null,
     };
   },
   // 计算属性 类似于data概念
@@ -347,28 +338,27 @@ export default {
       let Mname =
         "book-courseware_manager-GetCoursewareWordExampleSentenceList";
       // 获取本课的 本教材的 本套的 的例句
-      getContent(Mname, {
+      getBookWebContent(Mname, {
         courseware_id: this.currentTreeID, // 课件id
-        word: this.data.new_word, //生词
+        word: this.detail.new_word.new_word, //生词
         search_scope: 0, //检索范围0 本课件  1本教材 2本套
         is_contain_word_variants: false,
       })
         .then((res) => {
           this.loading1 = false;
           this.list1 = this.handleExample(res.sentence_list);
-          console.log(this.list1);
-          getContent(Mname, {
+          getBookWebContent(Mname, {
             courseware_id: this.currentTreeID, // 课件id
-            word: this.data.new_word, //生词
+            word: this.detail.new_word.new_word, //生词
             search_scope: 1, //检索范围0 本课件  1本教材 2本套
             is_contain_word_variants: false,
           })
             .then((res) => {
               this.loading2 = false;
               this.list2 = this.handleExample(res.sentence_list);
-              getContent(Mname, {
+              getBookWebContent(Mname, {
                 courseware_id: this.currentTreeID, // 课件id
-                word: this.data.new_word, //生词
+                word: this.detail.new_word.new_word, //生词
                 search_scope: 2, //检索范围0 本课件  1本教材 2本套
                 is_contain_word_variants: false,
               })
@@ -390,46 +380,82 @@ export default {
     },
     // 处理例句高亮数据
     handleExample(list) {
-        let _this = this;
-        // let list1Ora = JSON.parse(JSON.stringify(_this.data.list1))
-        list = list.map((item,index) =>{
-            let position_str = []
-            let sentence = JSON.parse(JSON.stringify(item.sentence))
-            let res = ""
-            for(let i=0;i<item.position_list.length;i++){
-                let part1 = "";
-                let part2 = "";
-                let part3 = "";
-                if(item.position_list.length>1){
-                    if(i==0){
-                        part1 = sentence.substring(0, item.position_list[i].begin);
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end,item.position_list[i+1].begin)
-                    }else if(i==item.position_list.length-1){
-                        part1 = "";
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end)
-                    }else{
-                        part1 = "";
-                        part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                        part3 = sentence.substring(item.position_list[i].end,item.position_list[i+1].begin)
-                    }
-                }else{
-                    part1 = sentence.substring(0, item.position_list[i].begin);
-                    part2 = sentence.substring(item.position_list[i].begin,item.position_list[i].end);
-                    part3 = sentence.substring(item.position_list[i].end)
-                }
-                res +=  part1 + '<span style="color:#DE4444;">' + part2 + "</span>" + part3;
+      let _this = this;
+      // let list1Ora = JSON.parse(JSON.stringify(_this.data.list1))
+      list = list.map((item, index) => {
+        let position_str = [];
+        let sentence = JSON.parse(JSON.stringify(item.sentence));
+        let res = "";
+        for (let i = 0; i < item.position_list.length; i++) {
+          let part1 = "";
+          let part2 = "";
+          let part3 = "";
+          if (item.position_list.length > 1) {
+            if (i == 0) {
+              part1 = sentence.substring(0, item.position_list[i].begin);
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(
+                item.position_list[i].end,
+                item.position_list[i + 1].begin
+              );
+            } else if (i == item.position_list.length - 1) {
+              part1 = "";
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(item.position_list[i].end);
+            } else {
+              part1 = "";
+              part2 = sentence.substring(
+                item.position_list[i].begin,
+                item.position_list[i].end
+              );
+              part3 = sentence.substring(
+                item.position_list[i].end,
+                item.position_list[i + 1].begin
+              );
             }
-            item.res = res;
-            return item
-        })
-        return list;
+          } else {
+            part1 = sentence.substring(0, item.position_list[i].begin);
+            part2 = sentence.substring(
+              item.position_list[i].begin,
+              item.position_list[i].end
+            );
+            part3 = sentence.substring(item.position_list[i].end);
+          }
+          res +=
+            part1 + '<span style="color:#DE4444;">' + part2 + "</span>" + part3;
+        }
+        item.res = res;
+        return item;
+      });
+      return list;
+    },
+    getMyCollection() {
+      this.loading = true;
+      let Mname = "order-collection_manager-GetMyCollection";
+      let data = {
+        id: this.collId,
+      };
+      getLearnWebContent(Mname, data).then((res) => {
+        this.loading = false;
+        this.detail = res;
+        if (res.new_word.definition_dictionary_json) {
+          let dictDetail = JSON.parse(res.new_word.definition_dictionary_json);
+          this.dictDetail = dictDetail.data;
+          console.log(this.dictDetail);
+        }
+        this.viewIntp();
+      });
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-      this.viewIntp();
+    this.getMyCollection();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
@@ -461,14 +487,6 @@ export default {
 <style lang="scss" scoped>
 /* @import url(); 引入css类 */
 .Module {
-  position: fixed;
-  width: 100%;
-  max-height: 100% !important;
-  left: 0;
-  top: 0;
-  z-index: 999;
-  background: rgba(0, 0, 0, 0.33);
-  overflow-y: scroll;
   .module-inner {
     // position: fixed;
     // top: 0%;
@@ -497,8 +515,8 @@ export default {
           > :nth-child(3) {
             margin-right: 16px;
           }
-          > :last-child{
-              margin-right: 0;
+          > :last-child {
+            margin-right: 0;
           }
         }
 

+ 2 - 2
vue.config.js

@@ -42,8 +42,8 @@ module.exports = {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        //target: `http://gcls.utschool.cn/`,
-        target: `http://gcls.helxsoft.cn/`,
+        target: `http://gcls.utschool.cn/`,
+        //target: `http://gcls.helxsoft.cn/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''