|
@@ -12,13 +12,13 @@
|
|
|
/> -->
|
|
|
<img
|
|
|
style="margin-right: 8px"
|
|
|
- src="../../../../assets/icon/Left-16-normal-Black.png"
|
|
|
+ src="@/assets/word_detail/Left-16-normal-Black.png"
|
|
|
alt=""
|
|
|
@click="lastDetail"
|
|
|
v-if="!notshowNext"
|
|
|
/>
|
|
|
<img
|
|
|
- src="../../../../assets/icon/Right-16-normal-Black.png"
|
|
|
+ src="@/assets/word_detail/Right-16-normal-Black.png"
|
|
|
alt=""
|
|
|
@click="nextDetail"
|
|
|
v-if="!notshowNext"
|
|
@@ -27,12 +27,12 @@
|
|
|
<img
|
|
|
style="margin-right: 0"
|
|
|
@click="closeWordShow"
|
|
|
- src="../../../../assets/icon/Cross-16-normal-Black.png"
|
|
|
+ src="@/assets/word_detail/Cross-16-normal-Black.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="wordDetail">
|
|
|
+ <div class="wordDetail" v-if="data.new_word_str">
|
|
|
<div
|
|
|
:class="[
|
|
|
'bwc-Strockplay',
|
|
@@ -45,7 +45,7 @@
|
|
|
:key="conItem + detailIndex + conindex"
|
|
|
:Book_text="conItem"
|
|
|
:playStorkes="true"
|
|
|
- :targetDiv="'bwcHanziIntp' + conItem + detailIndex + conindex"
|
|
|
+ :targetDiv="'bwcHanziIntp' + conItem + conindex"
|
|
|
:wordNum="data.new_word_str.length"
|
|
|
:themeColor="themeColor"
|
|
|
/>
|
|
@@ -66,7 +66,7 @@
|
|
|
</p>
|
|
|
<div class="wordInfor">
|
|
|
<div class="yinpin">
|
|
|
- <span class="pinyintext"> {{ data.pinyin.toLowerCase() }}</span>
|
|
|
+ <span class="pinyintext" v-html="data.pinyin.toLowerCase()"></span>
|
|
|
<template v-if="data.newWordMp3">
|
|
|
<Audio :mp3="data.newWordMp3" :themeColor="themeColor" :bg="bg" :ed="ed" />
|
|
|
</template>
|
|
@@ -77,7 +77,7 @@
|
|
|
<Audio :mp3="data.mp3Url" :themeColor="themeColor" :bg="bg" :ed="ed" />
|
|
|
</template>
|
|
|
</div>
|
|
|
- <p class="jieshu" v-for="(fy, i) in data.definition_list" :key="i" v-html="fy"></p>
|
|
|
+ <p class="jieshu" v-html="data.definition_list"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="zhedie-white">
|
|
@@ -155,9 +155,8 @@
|
|
|
|
|
|
<script>
|
|
|
import Strockplayredline from './Strockplayredline.vue';
|
|
|
-import Audio from './AudioRed.vue';
|
|
|
-import { getContent, getHZChineseInfo, getContentFile } from '../../../../api/ajax';
|
|
|
-import html2canvas from 'html2canvas';
|
|
|
+import Audio from '../../voice_matrix/components/AudioRed.vue';
|
|
|
+import { GetBookWebSIContent } from '@/api/app';
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
@@ -215,9 +214,9 @@ export default {
|
|
|
const _this = this;
|
|
|
if (val) {
|
|
|
_this.initData();
|
|
|
- if (_this.type == 'newWordDetail') {
|
|
|
- _this.getChineseInfo();
|
|
|
- }
|
|
|
+ // if (_this.type == 'newWordDetail') {
|
|
|
+ // _this.getChineseInfo();
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
// 深度观察监听
|
|
@@ -226,50 +225,6 @@ export default {
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- downloadImage() {
|
|
|
- var cutArea = $('.cut-area');
|
|
|
- let dom = $('.liju_main');
|
|
|
- let dataURL = '';
|
|
|
- html2canvas(dom[0]).then((canvas) => {
|
|
|
- {
|
|
|
- // 将生成的 canvas 放入到 dom 中, 这里可以做画布操作
|
|
|
- cutArea.append(canvas);
|
|
|
- // 将操作完成的画布转化为 base64 编码的文件
|
|
|
- dataURL = canvas.toDataURL('image/png');
|
|
|
- // 将文件设置到下载区, 点击就能下载了
|
|
|
- const a = document.createElement('a');
|
|
|
- a.download = '例句.png';
|
|
|
- a.href = dataURL;
|
|
|
- a.click();
|
|
|
- window.URL.revokeObjectURL(dataURL);
|
|
|
- a.remove();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- sortEvent(index, key) {
|
|
|
- this.sortIndex = index;
|
|
|
- if (this.lijuIndex == 0) {
|
|
|
- this.CurrentList = JSON.parse(JSON.stringify(this.allList[key]));
|
|
|
- } else if (this.lijuIndex == 1) {
|
|
|
- this.CurrentList = JSON.parse(JSON.stringify(this.list1[key]));
|
|
|
- } else if (this.lijuIndex == 2) {
|
|
|
- this.CurrentList = JSON.parse(JSON.stringify(this.list2[key]));
|
|
|
- } else if (this.lijuIndex == 3) {
|
|
|
- this.CurrentList = JSON.parse(JSON.stringify(this.list3[key]));
|
|
|
- }
|
|
|
- },
|
|
|
- // 切换模式
|
|
|
- cutPattern(index) {
|
|
|
- if (index == this.lijuPatternIndex) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.lijuPatternIndex = index;
|
|
|
- if (this.lijuPatternIndex == 1) {
|
|
|
- this.sortEvent(0, 'sentence_list_sort_left');
|
|
|
- } else {
|
|
|
- this.cutLiju(this.lijuIndex, true);
|
|
|
- }
|
|
|
- },
|
|
|
// 切换 例句
|
|
|
cutLiju(index, type) {
|
|
|
if (index == this.lijuIndex && !type) {
|
|
@@ -324,6 +279,7 @@ export default {
|
|
|
// 下一个单词详情
|
|
|
nextDetail() {
|
|
|
let _this = this;
|
|
|
+
|
|
|
if (_this.detailIndex == _this.optionRes.length - 1) {
|
|
|
this.$message.warning('当前已经是最后一个了 ');
|
|
|
return;
|
|
@@ -336,7 +292,7 @@ export default {
|
|
|
this.loading3 = true;
|
|
|
let Mname = 'book-courseware_manager-GetCoursewareWordExampleSentenceList_Sort';
|
|
|
// 获取本课的 本教材的 本套的 的例句
|
|
|
- getContent(Mname, {
|
|
|
+ GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
word: this.data.new_word, //生词
|
|
|
search_scope: 0, //检索范围0 本课件 1本教材 2本套
|
|
@@ -387,7 +343,7 @@ export default {
|
|
|
// this.list1.sentence_list_sort_right
|
|
|
// );
|
|
|
}
|
|
|
- getContent(Mname, {
|
|
|
+ GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
word: this.data.new_word, //生词
|
|
|
search_scope: 1, //检索范围0 本课件 1本教材 2本套
|
|
@@ -431,7 +387,7 @@ export default {
|
|
|
// );
|
|
|
}
|
|
|
|
|
|
- getContent(Mname, {
|
|
|
+ GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
word: this.data.new_word, //生词
|
|
|
search_scope: 2, //检索范围0 本课件 1本教材 2本套
|
|
@@ -670,6 +626,14 @@ export default {
|
|
|
// }</span>`;
|
|
|
},
|
|
|
initData() {
|
|
|
+ // 去掉生词里的标点
|
|
|
+ let new_word_str = '';
|
|
|
+ for (let i = 0; i < this.data.new_word.length; i++) {
|
|
|
+ if (/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(this.data.new_word[i])) {
|
|
|
+ new_word_str += this.data.new_word[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.data.new_word_str = new_word_str;
|
|
|
this.viewIntp();
|
|
|
},
|
|
|
handleChangeTab(flag) {
|
|
@@ -680,10 +644,10 @@ export default {
|
|
|
let data = {
|
|
|
query: _this.data.new_word,
|
|
|
};
|
|
|
- getHZChineseInfo(data).then((res) => {
|
|
|
- _this.dataDetail = res.data.result;
|
|
|
- _this.handleChineseDetail();
|
|
|
- });
|
|
|
+ // getHZChineseInfo(data).then((res) => {
|
|
|
+ // _this.dataDetail = res.data.result;
|
|
|
+ // _this.handleChineseDetail();
|
|
|
+ // });
|
|
|
},
|
|
|
// 处理数据
|
|
|
handleChineseDetail() {
|
|
@@ -697,11 +661,11 @@ export default {
|
|
|
if (itemss.key == 'pronunciation') {
|
|
|
// 音频
|
|
|
let Mname = 'tool-TextToVoiceFile';
|
|
|
- getContentFile(Mname, {
|
|
|
- text: this.word.detail.new_word,
|
|
|
- }).then((res) => {
|
|
|
- _this.mp3Url = res.file_url;
|
|
|
- });
|
|
|
+ // getContentFile(Mname, {
|
|
|
+ // text: this.word.detail.new_word,
|
|
|
+ // }).then((res) => {
|
|
|
+ // _this.mp3Url = res.file_url;
|
|
|
+ // });
|
|
|
// _this.data.mp3Url = itemss.objects[0]["@value"]
|
|
|
// ? itemss.objects[0]["@value"]
|
|
|
// : "";
|
|
@@ -714,16 +678,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() {
|
|
|
- // 去掉生词里的标点
|
|
|
- let new_word_str = '';
|
|
|
- for (let i = 0; i < this.data.new_word.length; i++) {
|
|
|
- if (/[\u4E00-\u9FA5\uF900-\uFA2D]/.test(this.data.new_word[i])) {
|
|
|
- new_word_str += this.data.new_word[i];
|
|
|
- }
|
|
|
- }
|
|
|
- this.data.new_word_str = new_word_str;
|
|
|
- },
|
|
|
+ created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
let _this = this;
|
|
@@ -860,7 +815,7 @@ export default {
|
|
|
.bwc-tolength {
|
|
|
padding: 40px 0;
|
|
|
margin: 0 37px 16px 0;
|
|
|
- font-family: "FZJCGFKTK";
|
|
|
+ font-family: '楷体';
|
|
|
font-size: 30px;
|
|
|
line-height: 1.5;
|
|
|
color: #404040;
|
|
@@ -992,14 +947,14 @@ export default {
|
|
|
|
|
|
> :nth-child(1) {
|
|
|
margin-right: 6px;
|
|
|
- font-family: 'FZJCGFKTK';
|
|
|
+ font-family: '楷体';
|
|
|
line-height: 24px;
|
|
|
text-align: right;
|
|
|
}
|
|
|
|
|
|
p {
|
|
|
margin: 0;
|
|
|
- font-family: 'FZJCGFKTK';
|
|
|
+ font-family: '楷体';
|
|
|
font-size: 16px;
|
|
|
line-height: 24px;
|
|
|
color: rgba(0, 0, 0, 85%);
|
|
@@ -1153,7 +1108,7 @@ export default {
|
|
|
height: 22px;
|
|
|
margin-left: 16px;
|
|
|
overflow: hidden;
|
|
|
- font-family: 'FZJCGFKTK';
|
|
|
+ font-family: '楷体';
|
|
|
font-size: 14px;
|
|
|
font-weight: 400;
|
|
|
line-height: 22px;
|
|
@@ -1286,7 +1241,6 @@ export default {
|
|
|
.zhedie-white {
|
|
|
.topTitle {
|
|
|
box-sizing: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
height: 40px;
|
|
|
background: #fff !important;
|
|
|
border: 1px solid rgba(0, 0, 0, 10%);
|
|
@@ -1301,7 +1255,6 @@ export default {
|
|
|
.zhedie-white {
|
|
|
.topTitle {
|
|
|
box-sizing: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
height: 40px;
|
|
|
background: #fff !important;
|
|
|
border: 1px solid rgba(0, 0, 0, 10%);
|
|
@@ -1316,7 +1269,6 @@ export default {
|
|
|
.zhedie-white {
|
|
|
.topTitle {
|
|
|
box-sizing: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
height: 40px;
|
|
|
background: #fff !important;
|
|
|
border: 1px solid rgba(0, 0, 0, 10%);
|