|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="wordDetailModule wordDetailChs">
|
|
|
<div class="module-inner">
|
|
|
- <div class="top" v-if="data">
|
|
|
+ <div v-if="data" class="top">
|
|
|
<div class="operation">
|
|
|
<div>
|
|
|
<template v-if="optionRes && optionRes.length > 0">
|
|
@@ -11,47 +11,47 @@
|
|
|
v-if="!notshowNext"
|
|
|
/> -->
|
|
|
<img
|
|
|
+ v-if="!notshowNext"
|
|
|
style="margin-right: 8px"
|
|
|
src="@/assets/word_detail/Left-16-normal-Black.png"
|
|
|
alt=""
|
|
|
@click="lastDetail"
|
|
|
- v-if="!notshowNext"
|
|
|
/>
|
|
|
<img
|
|
|
+ v-if="!notshowNext"
|
|
|
src="@/assets/word_detail/Right-16-normal-Black.png"
|
|
|
alt=""
|
|
|
@click="nextDetail"
|
|
|
- v-if="!notshowNext"
|
|
|
/>
|
|
|
</template>
|
|
|
<img
|
|
|
style="margin-right: 0"
|
|
|
- @click="closeWordShow"
|
|
|
src="@/assets/word_detail/Cross-16-normal-Black.png"
|
|
|
alt=""
|
|
|
+ @click="closeWordShow"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="wordDetail" v-if="data.new_word_str">
|
|
|
+ <div v-if="data.new_word_str" class="wordDetail">
|
|
|
<div
|
|
|
+ v-if="data.new_word_str.length <= 4"
|
|
|
:class="[
|
|
|
'bwc-Strockplay',
|
|
|
themeColor == 'green' ? 'green-border' : themeColor == 'red' ? 'red-border' : 'brown-border',
|
|
|
]"
|
|
|
- v-if="data.new_word_str.length <= 4"
|
|
|
>
|
|
|
- <div class="strockplay" v-for="(conItem, conindex) in data.new_word_str" :key="'new_word_' + conindex">
|
|
|
+ <div v-for="(conItem, conindex) in data.new_word_str" :key="'new_word_' + conindex" class="strockplay">
|
|
|
<Strockplayredline
|
|
|
:key="conItem + detailIndex + conindex"
|
|
|
:Book_text="conItem"
|
|
|
- :playStorkes="true"
|
|
|
- :targetDiv="'bwcHanziIntp' + conItem + conindex"
|
|
|
- :wordNum="data.new_word_str.length"
|
|
|
- :themeColor="themeColor"
|
|
|
+ :play-storkes="true"
|
|
|
+ :target-div="'bwcHanziIntp' + conItem + conindex"
|
|
|
+ :word-num="data.new_word_str.length"
|
|
|
+ :theme-color="themeColor"
|
|
|
/>
|
|
|
<div
|
|
|
- :class="['bwc-line', themeColor == 'green' ? 'green-bg' : themeColor == 'red' ? 'red-bg' : 'brown-bg']"
|
|
|
v-if="conindex < data.new_word_str.length - 1"
|
|
|
+ :class="['bwc-line', themeColor == 'green' ? 'green-bg' : themeColor == 'red' ? 'red-bg' : 'brown-bg']"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -68,20 +68,20 @@
|
|
|
<div class="yinpin">
|
|
|
<span class="pinyintext" v-html="data.pinyin.toLowerCase()"></span>
|
|
|
<template v-if="data.newWordMp3">
|
|
|
- <Audio :mp3="data.newWordMp3" :themeColor="themeColor" :bg="bg" :ed="ed" />
|
|
|
+ <Audio :mp3="data.newWordMp3" :theme-color="themeColor" :bg="bg" :ed="ed" />
|
|
|
</template>
|
|
|
<template v-else-if="data.mp3_list && data.mp3_list[0] && data.mp3_list[0].id">
|
|
|
- <Audio :mp3="data.mp3_list[0].id" :themeColor="themeColor" />
|
|
|
+ <Audio :mp3="data.mp3_list[0].id" :theme-color="themeColor" />
|
|
|
</template>
|
|
|
<template v-else-if="data.mp3Url">
|
|
|
- <Audio :mp3="data.mp3Url" :themeColor="themeColor" :bg="bg" :ed="ed" />
|
|
|
+ <Audio :mp3="data.mp3Url" :theme-color="themeColor" :bg="bg" :ed="ed" />
|
|
|
</template>
|
|
|
</div>
|
|
|
<p class="jieshu" v-html="data.definition_list"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="zhedie-white">
|
|
|
- <div class="merge" v-loading="loading3">
|
|
|
+ <div v-loading="loading3" class="merge">
|
|
|
<div class="topTitle">
|
|
|
<div class="left">
|
|
|
<!-- <div
|
|
@@ -104,17 +104,17 @@
|
|
|
</span>
|
|
|
</div> -->
|
|
|
<div
|
|
|
- @click="cutLiju(1)"
|
|
|
v-if="list1.sentence_list && list1.sentence_list.length > 0"
|
|
|
:class="[lijuIndex == 1 ? 'sele' : '']"
|
|
|
+ @click="cutLiju(1)"
|
|
|
>
|
|
|
<span> 本课例句 </span>
|
|
|
<span>{{ list1.sentence_list.length }} </span>
|
|
|
</div>
|
|
|
<div
|
|
|
- @click="cutLiju(2)"
|
|
|
v-if="list2.sentence_list && list2.sentence_list.length > 0"
|
|
|
:class="[lijuIndex == 2 ? 'sele' : '']"
|
|
|
+ @click="cutLiju(2)"
|
|
|
>
|
|
|
<span> 本书例句 </span>
|
|
|
<span>
|
|
@@ -122,9 +122,9 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div
|
|
|
- @click="cutLiju(3)"
|
|
|
v-if="list3.sentence_list && list3.sentence_list.length > 0"
|
|
|
:class="[lijuIndex == 3 ? 'sele' : '']"
|
|
|
+ @click="cutLiju(3)"
|
|
|
>
|
|
|
<span>本套例句</span>
|
|
|
<span>{{ list3.sentence_list.length }}</span>
|
|
@@ -159,7 +159,7 @@ import Audio from '../../voice_matrix/components/AudioRed.vue';
|
|
|
import { GetBookWebSIContent } from '@/api/app';
|
|
|
|
|
|
export default {
|
|
|
- //import引入的组件需要注入到对象中才能使用
|
|
|
+ // import引入的组件需要注入到对象中才能使用
|
|
|
components: {
|
|
|
Strockplayredline,
|
|
|
Audio,
|
|
@@ -180,7 +180,7 @@ export default {
|
|
|
'ed',
|
|
|
],
|
|
|
data() {
|
|
|
- //这里存放数据
|
|
|
+ // 这里存放数据
|
|
|
return {
|
|
|
height: '',
|
|
|
margintop: '',
|
|
@@ -205,12 +205,12 @@ export default {
|
|
|
punctuationList: ['(', ')', '……', '(', ')', '…', '/'], // 标点数组
|
|
|
};
|
|
|
},
|
|
|
- //计算属性 类似于data概念
|
|
|
+ // 计算属性 类似于data概念
|
|
|
computed: {},
|
|
|
- //监控data中数据变化
|
|
|
+ // 监控data中数据变化
|
|
|
watch: {
|
|
|
data: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler(val, oldVal) {
|
|
|
const _this = this;
|
|
|
if (val) {
|
|
|
_this.initData();
|
|
@@ -223,7 +223,23 @@ export default {
|
|
|
deep: true,
|
|
|
},
|
|
|
},
|
|
|
- //方法集合
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ let _this = this;
|
|
|
+ _this.initData();
|
|
|
+ if (_this.type == 'newWordDetail') {
|
|
|
+ // _this.getChineseInfo();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 生命周期-挂载之前
|
|
|
+ beforeMount() {},
|
|
|
+ // 生命周期-更新之后
|
|
|
+ updated() {},
|
|
|
+ // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ activated() {},
|
|
|
+ // 方法集合
|
|
|
methods: {
|
|
|
// 切换 例句
|
|
|
cutLiju(index, type) {
|
|
@@ -294,8 +310,8 @@ export default {
|
|
|
// 获取本课的 本教材的 本套的 的例句
|
|
|
GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
- word: this.data.new_word, //生词
|
|
|
- search_scope: 0, //检索范围0 本课件 1本教材 2本套
|
|
|
+ word: this.data.new_word, // 生词
|
|
|
+ search_scope: 0, // 检索范围0 本课件 1本教材 2本套
|
|
|
is_contain_word_variants: false,
|
|
|
is_filter_repetitive_sentence: 'true',
|
|
|
book_publish_status: 1,
|
|
@@ -345,8 +361,8 @@ export default {
|
|
|
}
|
|
|
GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
- word: this.data.new_word, //生词
|
|
|
- search_scope: 1, //检索范围0 本课件 1本教材 2本套
|
|
|
+ word: this.data.new_word, // 生词
|
|
|
+ search_scope: 1, // 检索范围0 本课件 1本教材 2本套
|
|
|
is_contain_word_variants: false,
|
|
|
is_filter_repetitive_sentence: 'true',
|
|
|
book_publish_status: 1,
|
|
@@ -389,8 +405,8 @@ export default {
|
|
|
|
|
|
GetBookWebSIContent(Mname, {
|
|
|
courseware_id: this.currentTreeID, // 课件id
|
|
|
- word: this.data.new_word, //生词
|
|
|
- search_scope: 2, //检索范围0 本课件 1本教材 2本套
|
|
|
+ word: this.data.new_word, // 生词
|
|
|
+ search_scope: 2, // 检索范围0 本课件 1本教材 2本套
|
|
|
is_contain_word_variants: false,
|
|
|
is_filter_repetitive_sentence: 'true',
|
|
|
book_publish_status: 1,
|
|
@@ -501,7 +517,7 @@ export default {
|
|
|
if (list.length > 0) {
|
|
|
list = list.map((item, index) => {
|
|
|
let str = item.source_courseware_name_path;
|
|
|
- item.show_source_courseware_name_path = str.slice(0, 8) + '...';
|
|
|
+ item.show_source_courseware_name_path = `${str.slice(0, 8)}...`;
|
|
|
if (type == 'left') {
|
|
|
let sentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
let arr = JSON.parse(JSON.stringify(item.sentence_fc_list));
|
|
@@ -556,16 +572,15 @@ export default {
|
|
|
part2 = newsentence.substring(item.position_list[i].begin, item.position_list[i].end);
|
|
|
part3 = newsentence.substring(item.position_list[i].end);
|
|
|
}
|
|
|
- res += part1 + '<span style="color:#DE4444;">' + part2 + '</span>' + part3;
|
|
|
+ res += `${part1}<span style="color:#DE4444;">${part2}</span>${part3}`;
|
|
|
}
|
|
|
item.res = res;
|
|
|
}
|
|
|
return item;
|
|
|
});
|
|
|
return list;
|
|
|
- } else {
|
|
|
- return [];
|
|
|
}
|
|
|
+ return [];
|
|
|
},
|
|
|
changefiveword(arr, index, type) {
|
|
|
let num = 6;
|
|
@@ -677,30 +692,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
- //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() {},
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {
|
|
|
- let _this = this;
|
|
|
- _this.initData();
|
|
|
- if (_this.type == 'newWordDetail') {
|
|
|
- // _this.getChineseInfo();
|
|
|
- }
|
|
|
- },
|
|
|
- //生命周期-创建之前
|
|
|
+ // 生命周期-创建之前
|
|
|
beforeCreated() {},
|
|
|
- //生命周期-挂载之前
|
|
|
- beforeMount() {},
|
|
|
- //生命周期-更新之前
|
|
|
+ // 生命周期-更新之前
|
|
|
beforUpdate() {},
|
|
|
- //生命周期-更新之后
|
|
|
- updated() {},
|
|
|
- //生命周期-销毁之前
|
|
|
+ // 生命周期-销毁之前
|
|
|
beforeDestory() {},
|
|
|
- //生命周期-销毁完成
|
|
|
+ // 生命周期-销毁完成
|
|
|
destoryed() {},
|
|
|
- //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
- activated() {},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|