|
|
@@ -0,0 +1,998 @@
|
|
|
+<!-- -->
|
|
|
+<template>
|
|
|
+ <div :class="['voicefull', bgIndex == 0 ? 'bg1' : 'bg2']" v-if="sentList">
|
|
|
+ <div class="voicefull-top">
|
|
|
+ <div :class="['select-bg', bgIndex == 1 ? 'select-bg-blue' : '']">
|
|
|
+ <div :class="['bg-white-box', bgIndex == 0 ? 'active' : '']">
|
|
|
+ <span
|
|
|
+ :class="['bg-white', bgIndex == 0 ? 'active' : '']"
|
|
|
+ @click="changeBg(0)"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ <div :class="['bg-green-box', bgIndex == 1 ? 'active' : '']">
|
|
|
+ <span
|
|
|
+ :class="['bg-green', bgIndex == 1 ? 'active' : '']"
|
|
|
+ @click="changeBg(1)"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="top-middle">
|
|
|
+ <div :class="['audio-box', bgIndex == 1 ? 'audio-box-green' : '']">
|
|
|
+ <AudioLineSentence
|
|
|
+ :key="'sent' + curSentIndex"
|
|
|
+ :mp3="mp3"
|
|
|
+ :getCurTime="getCurTime"
|
|
|
+ ref="audioLineSent"
|
|
|
+ :audioId="'artPraAudioId' + curSentIndex"
|
|
|
+ :stopAudio="stopAudio"
|
|
|
+ :width="120"
|
|
|
+ :hideSlider="false"
|
|
|
+ :bg="bg"
|
|
|
+ :ed="ed"
|
|
|
+ :maxTime="maxTime"
|
|
|
+ :bgIndex="bgIndex"
|
|
|
+ :isRepeat="isRepeat"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeStatus('isRepeat')"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'repeat-icon',
|
|
|
+ !isRepeat ? 'disabled' : '',
|
|
|
+ isRepeat && bgIndex == 1 ? 'repeat-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeStatus('isShowPY')"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'pinyin-icon',
|
|
|
+ !isShowPY ? 'disabled' : '',
|
|
|
+ isShowPY && bgIndex == 1 ? 'pinyin-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="changeStatus('isShowEN')"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'en-icon',
|
|
|
+ !isShowEN ? 'disabled' : '',
|
|
|
+ isShowEN && bgIndex == 1 ? 'en-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="addColl('isColl')"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ 'coll-icon',
|
|
|
+ !isColl ? 'disabled' : '',
|
|
|
+ isColl && bgIndex == 1 ? 'coll-icon-yellow' : '',
|
|
|
+ ]"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
|
|
|
+ @click="exitFullScreen"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="['close-icon', bgIndex == 1 ? 'close-icon-yellow' : '']"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="voicefull-content"
|
|
|
+ v-if="item"
|
|
|
+ @mousemove="showPrevNext(true)"
|
|
|
+ @mouseleave="showPrevNext(false)"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'vc-left vc-left-grey',
|
|
|
+ isShow && bgIndex == 0 ? 'vc-left-black' : '',
|
|
|
+ isShow && bgIndex == 1 ? 'vc-left-white' : '',
|
|
|
+ ]"
|
|
|
+ @click="prevSentence"
|
|
|
+ ></div>
|
|
|
+ <div class="vc-main">
|
|
|
+ <div class="NNPE-words-box">
|
|
|
+ <div
|
|
|
+ class="NNPE-words"
|
|
|
+ v-for="(pItem, pIndex) in item.sentArr"
|
|
|
+ :key="'wordsList' + pIndex"
|
|
|
+ :class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
|
|
|
+ >
|
|
|
+ <template v-if="!pItem.width">
|
|
|
+ <template v-if="pItem.isShow">
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ item.sentArr[pIndex + 1] &&
|
|
|
+ item.sentArr[pIndex + 1].chs &&
|
|
|
+ chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span class="NNPE-words-box">
|
|
|
+ <template v-if="curQue.pyPosition == 'top'">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ class="NNPE-pinyin"
|
|
|
+ :class="[
|
|
|
+ pItem.className ? pItem.className : '',
|
|
|
+ noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <span
|
|
|
+ class="NNPE-chs"
|
|
|
+ :class="[pItem.padding && isShowPY ? 'padding' : '']"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <span
|
|
|
+ v-for="(wItem, wIndex) in pItem.leg"
|
|
|
+ :key="'ci' + wIndex + pIndex"
|
|
|
+ :class="[
|
|
|
+ isPlaying &&
|
|
|
+ pItem.timeList &&
|
|
|
+ pItem.timeList[wIndex] &&
|
|
|
+ curTime >= pItem.timeList[wIndex].wordBg &&
|
|
|
+ curQue.wordTime &&
|
|
|
+ curQue.wordTime[curSentIndex] &&
|
|
|
+ curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
+ ? 'active'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.chs[wIndex] }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ <template v-if="curQue.pyPosition == 'bottom'">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ class="NNPE-pinyin"
|
|
|
+ :class="[
|
|
|
+ pItem.className ? pItem.className : '',
|
|
|
+ noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ <span class="NNPE-words-box">
|
|
|
+ <template v-if="curQue.pyPosition == 'top'">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ :class="[
|
|
|
+ 'NNPE-pinyin',
|
|
|
+ noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1
|
|
|
+ ? 'noFont'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ style="text-align: left"
|
|
|
+ >{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <span class="NNPE-chs" style="text-align: left">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ isPlaying &&
|
|
|
+ pItem.timeList[pItem.leg - 1] &&
|
|
|
+ curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
|
|
|
+ curQue.wordTime &&
|
|
|
+ curQue.wordTime[curSentIndex] &&
|
|
|
+ curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
+ ? 'active'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ {{ item.sentArr[pIndex + 1].chs }}</span
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ <template v-if="curQue.pyPosition == 'bottom'">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ :class="[
|
|
|
+ 'NNPE-pinyin',
|
|
|
+ noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1
|
|
|
+ ? 'noFont'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ style="text-align: left"
|
|
|
+ >{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <template v-if="curQue.pyPosition == 'top'">
|
|
|
+ <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ class="NNPE-pinyin"
|
|
|
+ :class="[
|
|
|
+ pItem.padding ? 'padding' : '',
|
|
|
+ pItem.className ? pItem.className : '',
|
|
|
+ noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <span
|
|
|
+ v-if="pItem.chs != '#'"
|
|
|
+ class="NNPE-chs"
|
|
|
+ :class="[pItem.padding && isShowPY ? 'padding' : '']"
|
|
|
+ >
|
|
|
+ <template>
|
|
|
+ <span
|
|
|
+ v-for="(wItem, wIndex) in pItem.leg"
|
|
|
+ :key="'ci' + wIndex + pIndex + curSentIndex"
|
|
|
+ :class="[
|
|
|
+ isPlaying &&
|
|
|
+ pItem.timeList &&
|
|
|
+ pItem.timeList[wIndex] &&
|
|
|
+ curTime >= pItem.timeList[wIndex].wordBg &&
|
|
|
+ curQue.wordTime &&
|
|
|
+ curQue.wordTime[curSentIndex] &&
|
|
|
+ curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
+ ? 'active'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.chs[wIndex] }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ <template v-if="curQue.pyPosition == 'bottom'">
|
|
|
+ <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
|
|
|
+ <span
|
|
|
+ v-if="isShowPY"
|
|
|
+ class="NNPE-pinyin"
|
|
|
+ :class="[
|
|
|
+ pItem.padding ? 'padding' : '',
|
|
|
+ pItem.className ? pItem.className : '',
|
|
|
+ bgIndex == 1 ? 'font-white' : '',
|
|
|
+ ]"
|
|
|
+ >{{ pItem.pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ height: pItem.height + 'px',
|
|
|
+ width: pItem.width + 'px',
|
|
|
+ }"
|
|
|
+ ></span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="clear: both; overflow: hidden"></div>
|
|
|
+ <div
|
|
|
+ v-if="item.enwords && isShowEN"
|
|
|
+ :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
|
|
|
+ >
|
|
|
+ {{ item.enwords }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'vc-left vc-right-grey',
|
|
|
+ isShow && bgIndex == 0 ? 'vc-right-black' : '',
|
|
|
+ isShow && bgIndex == 1 ? 'vc-right-white' : '',
|
|
|
+ ]"
|
|
|
+ @click="nextSentence"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
+ <div class="voicefull-bottom">
|
|
|
+ <div class="bottom-left">
|
|
|
+ <Soundrecorddiff
|
|
|
+ @handleWav="handleWav"
|
|
|
+ @getWavblob="getWavblob"
|
|
|
+ @handleParentPlay="handleParentPlay"
|
|
|
+ @sentPause="sentPause"
|
|
|
+ @getRerordStatus="getRerordStatus"
|
|
|
+ :bgIndex="bgIndex"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ :class="['compare-box', bgIndex == 1 ? 'compare-box-white' : '']"
|
|
|
+ v-if="isShowCompare"
|
|
|
+ >
|
|
|
+ <Audio-compare
|
|
|
+ :bgIndex="bgIndex"
|
|
|
+ type="full"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ :index="curSentIndex"
|
|
|
+ :curSentIndex="curSentIndex"
|
|
|
+ :url="curQue.mp3_list[0].id"
|
|
|
+ :bg="bg"
|
|
|
+ :ed="ed"
|
|
|
+ :wavblob="wavblob"
|
|
|
+ :getCurTime="getCurTime"
|
|
|
+ :sentPause="sentPause"
|
|
|
+ :isRecord="isRecord"
|
|
|
+ :handleChangeStopAudio="handleChangeStopAudio"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'page-count',
|
|
|
+ bgIndex == 0 ? 'page-count-white' : 'page-count-green',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ {{ curSentIndex + 1 }}/{{ sentList.length }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import AudioLineSentence from "./AudioLineSentence.vue";
|
|
|
+import Soundrecorddiff from "./Soundrecorddiff.vue";
|
|
|
+import AudioCompare from "./AudioCompare.vue";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ AudioLineSentence,
|
|
|
+ Soundrecorddiff,
|
|
|
+ AudioCompare,
|
|
|
+ },
|
|
|
+ props: [
|
|
|
+ "sentList",
|
|
|
+ "sentIndex",
|
|
|
+ "mp3",
|
|
|
+ "wordTimeList",
|
|
|
+ "curQue",
|
|
|
+ "noFont",
|
|
|
+ "themeColor",
|
|
|
+ ],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ bgIndex: 0,
|
|
|
+ maxTime: 0,
|
|
|
+ item: null,
|
|
|
+ bg: 0,
|
|
|
+ ed: 0,
|
|
|
+ isShowPY: true,
|
|
|
+ isRepeat: false,
|
|
|
+ isShowEN: true,
|
|
|
+ isColl: false,
|
|
|
+ NumberList: [
|
|
|
+ "①",
|
|
|
+ "②",
|
|
|
+ "③",
|
|
|
+ "④",
|
|
|
+ "⑤",
|
|
|
+ "⑥",
|
|
|
+ "⑦",
|
|
|
+ "⑧",
|
|
|
+ "⑨",
|
|
|
+ "⑩",
|
|
|
+ "⑪",
|
|
|
+ "⑫",
|
|
|
+ "⑬",
|
|
|
+ "⑭",
|
|
|
+ "⑮",
|
|
|
+ "⑯",
|
|
|
+ "⑰",
|
|
|
+ "⑱",
|
|
|
+ "⑲",
|
|
|
+ "⑳",
|
|
|
+ ],
|
|
|
+ chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
|
|
|
+ enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
|
|
|
+ curTime: 0,
|
|
|
+ wavblob: null,
|
|
|
+ stopAudio: false,
|
|
|
+ isRecord: false,
|
|
|
+ isShowCompare: false,
|
|
|
+ isShow: false,
|
|
|
+ curSentIndex: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ isPlaying: function () {
|
|
|
+ let playing = false;
|
|
|
+ if (this.$refs.audioLineSent) {
|
|
|
+ playing = this.$refs.audioLineSent.audio.isPlaying;
|
|
|
+ }
|
|
|
+ return playing;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ sentIndex: {
|
|
|
+ handler: function (newVal, oldVal) {
|
|
|
+ this.curSentIndex = newVal;
|
|
|
+ this.getSentence();
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ //方法集合
|
|
|
+ methods: {
|
|
|
+ //添加收藏
|
|
|
+ addColl() {
|
|
|
+ let Bookdetail = sessionStorage.getItem("Bookdetail");
|
|
|
+ if (Bookdetail) {
|
|
|
+ Bookdetail = JSON.parse(Bookdetail);
|
|
|
+ }
|
|
|
+ let MethodName = "order-collection_manager-AddMyCollection";
|
|
|
+ let text = "";
|
|
|
+ this.item.sentArr.forEach((item) => {
|
|
|
+ if (item.chs != "#") {
|
|
|
+ text += item.chs;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let sentence_json = {
|
|
|
+ item: JSON.stringify(this.item),
|
|
|
+ bg: this.bg,
|
|
|
+ ed: this.ed,
|
|
|
+ };
|
|
|
+ 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,
|
|
|
+ sentence: {
|
|
|
+ sentence_text: text,
|
|
|
+ sentence_json: JSON.stringify(sentence_json),
|
|
|
+ },
|
|
|
+ };
|
|
|
+ console.log(text);
|
|
|
+ LearnWebSI(MethodName, data).then((res) => {
|
|
|
+ this.isColl = true;
|
|
|
+ this.$message.success("收藏成功!");
|
|
|
+ });
|
|
|
+ },
|
|
|
+ showPrevNext(bool) {
|
|
|
+ this.isShow = bool;
|
|
|
+ },
|
|
|
+ prevSentence() {
|
|
|
+ if (this.curSentIndex == 0) {
|
|
|
+ this.$message.warning("已经是第一个句子了");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.curSentIndex = this.curSentIndex - 1;
|
|
|
+ this.getSentence();
|
|
|
+ },
|
|
|
+ nextSentence() {
|
|
|
+ if (this.curSentIndex == this.sentList.length - 1) {
|
|
|
+ this.$message.warning("已经是最后一个句子了");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.curSentIndex = this.curSentIndex + 1;
|
|
|
+ this.getSentence();
|
|
|
+ },
|
|
|
+ changeStatus(key) {
|
|
|
+ this[key] = !this[key];
|
|
|
+ },
|
|
|
+ getRerordStatus(bool) {
|
|
|
+ this.isShowCompare = bool;
|
|
|
+ },
|
|
|
+ getWavblob(wavblob) {
|
|
|
+ this.wavblob = wavblob;
|
|
|
+ },
|
|
|
+ sentPause(isRecord) {
|
|
|
+ this.isRecord = isRecord;
|
|
|
+ },
|
|
|
+ getCurTime(curTime) {
|
|
|
+ let _this = this;
|
|
|
+ if (_this.isRepeat) {
|
|
|
+ let time = curTime * 1000;
|
|
|
+ if (time > _this.ed || time < _this.bg) {
|
|
|
+ _this.curTime = _this.bg;
|
|
|
+ this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
|
|
|
+ } else {
|
|
|
+ _this.curTime = curTime * 1000;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _this.curTime = curTime * 1000;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeBg(bgIndex) {
|
|
|
+ this.bgIndex = bgIndex;
|
|
|
+ },
|
|
|
+ getSentence() {
|
|
|
+ let _this = this;
|
|
|
+ _this.item = _this.sentList[_this.curSentIndex];
|
|
|
+ _this.bg = _this.curQue.wordTime[_this.curSentIndex].bg;
|
|
|
+ _this.ed = _this.curQue.wordTime[_this.curSentIndex].ed;
|
|
|
+ let maxTime = (_this.ed - _this.bg) / 1000;
|
|
|
+ if (maxTime < 1) {
|
|
|
+ _this.maxTime = 1;
|
|
|
+ } else {
|
|
|
+ _this.maxTime = maxTime;
|
|
|
+ }
|
|
|
+ console.log(_this.sentList);
|
|
|
+ },
|
|
|
+ exitFullScreen() {
|
|
|
+ this.$emit("exitFullscreen");
|
|
|
+ },
|
|
|
+ handleWav(data) {},
|
|
|
+ // 录音时暂停音频播放
|
|
|
+ handleParentPlay() {
|
|
|
+ this.stopAudio = true;
|
|
|
+ },
|
|
|
+ // 音频播放时改变布尔值
|
|
|
+ handleChangeStopAudio() {
|
|
|
+ this.stopAudio = false;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ this.curSentIndex = this.sentIndex;
|
|
|
+ console.log(this.curSentIndex);
|
|
|
+ this.getSentence();
|
|
|
+ },
|
|
|
+ beforeCreate() {}, //生命周期 - 创建之前
|
|
|
+ beforeMount() {}, //生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
+ updated() {}, //生命周期 - 更新之后
|
|
|
+ beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
+ destroyed() {}, //生命周期 - 销毁完成
|
|
|
+ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang='scss' scoped>
|
|
|
+//@import url(); 引入公共css类
|
|
|
+.voicefull {
|
|
|
+ width: 100vh;
|
|
|
+ height: 100vh;
|
|
|
+ overflow: hidden;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ &.bg1 {
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ &.bg2 {
|
|
|
+ background: linear-gradient(180deg, #274533 0%, #385f45 100%);
|
|
|
+ }
|
|
|
+ &-top {
|
|
|
+ height: 136px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 40px;
|
|
|
+ .select-bg {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ width: 96px;
|
|
|
+ height: 56px;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 40px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ box-sizing: border-box;
|
|
|
+ &.select-bg-blue {
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ > div {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ border-radius: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ &.bg-white-box {
|
|
|
+ background: 0 0;
|
|
|
+ margin-right: 4px;
|
|
|
+ &.active {
|
|
|
+ background: #de4444;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.bg-green-box {
|
|
|
+ background: #fff;
|
|
|
+ &.active {
|
|
|
+ background: #ffc600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ > span {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ border-radius: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ cursor: pointer;
|
|
|
+ &.bg-white {
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ &.bg-green {
|
|
|
+ background: linear-gradient(180deg, #274533 0%, #385f45 100%);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .top-middle {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .audio-box {
|
|
|
+ padding: 0 16px;
|
|
|
+ height: 56px;
|
|
|
+ background: #ffffff;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 40px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ &-green {
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .op-btn {
|
|
|
+ width: 56px;
|
|
|
+ height: 56px;
|
|
|
+ border-radius: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 32px;
|
|
|
+ background: #ffffff;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ box-sizing: border-box;
|
|
|
+ &-green {
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ &.close-btn {
|
|
|
+ background: #274533;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ > span {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ &.close-icon {
|
|
|
+ background: url("../../../assets/icon/cross-24-normal-black.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &-white {
|
|
|
+ background: url("../../../assets/icon/cross-24-normal-white.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .repeat-icon {
|
|
|
+ background: url("../../../assets/icon/Repeat-24-normal-red.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.disabled {
|
|
|
+ background: url("../../../assets/icon/Repeat-24-disable-Black.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-yellow {
|
|
|
+ background: url("../../../assets/icon/Repeat-24-normal-yellow.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .pinyin-icon {
|
|
|
+ background: url("../../../assets/icon/pinyin-24-normal-red.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.disabled {
|
|
|
+ background: url("../../../assets/icon/pinyin-24-disable-Black.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-yellow {
|
|
|
+ background: url("../../../assets/icon/pinyin-24-normal-yellow.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .en-icon {
|
|
|
+ background: url("../../../assets/icon/EN-24-normal-Red.png") no-repeat left
|
|
|
+ top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.disabled {
|
|
|
+ background: url("../../../assets/icon/EN-24-disable-Black.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-yellow {
|
|
|
+ background: url("../../../assets/icon/EN-24-normal-yellow.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .coll-icon {
|
|
|
+ background: url("../../../assets/icon/bookmarkfill-24-normal-red.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ &.disabled {
|
|
|
+ background: url("../../../assets/icon/bookmarkfill-24-disable-Black.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-yellow {
|
|
|
+ background: url("../../../assets/icon/bookmarkfill-24-normal-yellow.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-content {
|
|
|
+ flex: 1;
|
|
|
+ width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 36px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .vc-left {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+ cursor: pointer;
|
|
|
+ &-grey {
|
|
|
+ background: url("../../../assets/NPC/left-grey.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-black {
|
|
|
+ background: url("../../../assets/NPC/left-black.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-white {
|
|
|
+ background: url("../../../assets/NPC/left-white.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .vc-right {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+ cursor: pointer;
|
|
|
+ &-grey {
|
|
|
+ background: url("../../../assets/NPC/right-grey.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-black {
|
|
|
+ background: url("../../../assets/NPC/right-black.png") no-repeat left
|
|
|
+ top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &-white {
|
|
|
+ background: url("../../../assets/NPC/right-white.png") no-repeat left
|
|
|
+ top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .vc-main {
|
|
|
+ width: fit-content;
|
|
|
+ margin: 0 auto;
|
|
|
+ .enwords {
|
|
|
+ padding: 0 3px;
|
|
|
+ margin-top: 40px;
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
+ font-size: 24px;
|
|
|
+ line-height: 32px;
|
|
|
+ font-family: "robot";
|
|
|
+ &-green {
|
|
|
+ color: rgba(255, 255, 255, 0.65);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .NNPE-words {
|
|
|
+ float: left;
|
|
|
+ &-box {
|
|
|
+ float: left;
|
|
|
+ > span {
|
|
|
+ display: block;
|
|
|
+ &.NNPE-pinyin {
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 32px;
|
|
|
+ line-height: 40px;
|
|
|
+
|
|
|
+ height: 40px;
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+
|
|
|
+ &.noFont {
|
|
|
+ font-family: initial;
|
|
|
+ }
|
|
|
+ &.textLeft {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ &.wordBlank {
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ }
|
|
|
+ &.font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.NNPE-chs {
|
|
|
+ font-family: "FZJCGFKTK";
|
|
|
+ font-size: 48px;
|
|
|
+ line-height: 56px;
|
|
|
+ padding-bottom: 16px;
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+
|
|
|
+ .active {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
+ .font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // &.padding {
|
|
|
+ // padding-right: 6px;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.textLeft {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ &.textCenter {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ > span {
|
|
|
+ display: block;
|
|
|
+ &.NNPE-pinyin {
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 32px;
|
|
|
+ line-height: 40px;
|
|
|
+ height: 40px;
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ &.noFont {
|
|
|
+ font-family: initial;
|
|
|
+ }
|
|
|
+ &.textLeft {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ &.wordBlank {
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ }
|
|
|
+ &.font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.NNPE-chs {
|
|
|
+ font-family: "FZJCGFKTK";
|
|
|
+ font-size: 48px;
|
|
|
+ line-height: 56px;
|
|
|
+ padding-bottom: 16px;
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ .active {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
+ .font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &.padding {
|
|
|
+ padding: 0 3px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-bottom {
|
|
|
+ height: 136px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding-right: 40px;
|
|
|
+ .bottom-left {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ .compare-box {
|
|
|
+ height: 56px;
|
|
|
+ padding: 16px 16px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 0 40px 40px 0;
|
|
|
+ border-left: 0px solid rgba(0, 0, 0, 0.1);
|
|
|
+ &-white {
|
|
|
+ background: rgba(255, 255, 255, 0.1);
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ border-left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .page-count {
|
|
|
+ padding: 8px;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ font-family: "robot";
|
|
|
+ color: #000000;
|
|
|
+ min-width: 60px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 8px;
|
|
|
+ background: #fff;
|
|
|
+ text-align: center;
|
|
|
+ &-green {
|
|
|
+ color: #ffffff;
|
|
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+.NPC-Big-Book-preview-green {
|
|
|
+ .bg2 {
|
|
|
+ .repeat-icon {
|
|
|
+ background: url("../../../assets/icon/Repeat-24-normal-Green.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .pinyin-icon {
|
|
|
+ background: url("../../../assets/icon/pinyin-24-normal-green.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .en-icon {
|
|
|
+ background: url("../../../assets/icon/EN-24-normal-Green.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .coll-icon {
|
|
|
+ background: url("../../../assets/icon/bookmarkfill-24-normal-green.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.NPC-Big-Book-preview-brown {
|
|
|
+ .bg2 {
|
|
|
+ .repeat-icon {
|
|
|
+ background: url("../../../assets/icon/Repeat-24-normal-Brown.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .pinyin-icon {
|
|
|
+ background: url("../../../assets/icon/pinyin-24-normal-brown.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .en-icon {
|
|
|
+ background: url("../../../assets/icon/EN-24-normal-Brown.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .coll-icon {
|
|
|
+ background: url("../../../assets/icon/bookmarkfill-24-normal-brown.png")
|
|
|
+ no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|