12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811 |
- <!-- -->
- <template>
- <div :class="['voicefull', bgIndex == 0 ? 'bg1' : 'bg2']" v-if="sentList">
- <div
- class="voicefull-top"
- @mouseover="setTopShow(true)"
- @mouseleave="setTopShow(false)"
- >
- <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
- <div class="top-left">
- <div :class="['select-bg', bgIndex == 1 ? 'select-bg-blue' : '']">
- <div :class="['bg-green-box', bgIndex == 1 ? 'active' : '']">
- <span
- :class="['bg-green', bgIndex == 1 ? 'active' : '']"
- @click="changeBg(1)"
- ></span>
- </div>
- <div :class="['bg-white-box', bgIndex == 0 ? 'active' : '']">
- <span
- :class="['bg-white', bgIndex == 0 ? 'active' : '']"
- @click="changeBg(0)"
- ></span>
- </div>
- </div>
- <div
- :class="['set-fontSize', bgIndex == 1 ? 'set-fontSize-green' : '']"
- >
- <template v-if="hzSize >= 34">
- <span
- :class="[
- 'font-jian-black',
- bgIndex == 1 ? 'font-jian-yellow' : '',
- ]"
- @click="setFontSize('-')"
- ></span>
- </template>
- <template v-else>
- <span
- :class="[
- 'font-jian-black',
- bgIndex == 1
- ? 'font-jian-yellow-disabled'
- : 'font-jian-white-disabled',
- ]"
- ></span>
- </template>
- <span
- :class="['font-img-black', bgIndex == 1 ? 'font-img-yellow' : '']"
- ></span>
- <template v-if="hzSize <= 76">
- <span
- :class="[
- 'font-jia-black',
- bgIndex == 1 ? 'font-jia-yellow' : '',
- ]"
- @click="setFontSize('+')"
- ></span>
- </template>
- <template v-else>
- <span
- :class="[
- 'font-jia-black',
- bgIndex == 1
- ? 'font-jia-yellow-disabled'
- : 'font-jia-white-disabled',
- ]"
- ></span>
- </template>
- </div>
- <div
- :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
- @click="changeStatus('isKeyboard')"
- >
- <span
- :class="[
- 'keyboard-icon',
- !isKeyboard ? 'disabled' : '',
- isKeyboard && bgIndex == 1 ? 'keyboard-icon-yellow' : '',
- ]"
- ></span>
- </div>
- </div>
- <div class="top-middle">
- <template v-if="mp3">
- <AudioLineSentence
- :key="'sent' + curSentIndex"
- :mp3="mp3"
- :getCurTime="getCurTime"
- ref="audioLineSent"
- :audioId="'artPraAudioId' + curSentIndex"
- :stopAudio="stopAudio"
- :width="120"
- :hideSlider="true"
- :bg="bg"
- :ed="ed"
- :curTime="curTime"
- :maxTime="maxTime"
- :bgIndex="bgIndex"
- :isRepeat="isRepeat"
- :isAuto="isAuto"
- @playChange="playChange"
- @rollSentence="rollSentence"
- />
- </template>
- <div
- :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
- @click="setStatus"
- >
- <span
- :class="[
- 'repeat-icon',
- !isRepeat && !isAuto ? 'disabled' : '',
- !isRepeat && isAuto ? 'auto-icon' : '',
- isRepeat && bgIndex == 1 ? 'repeat-icon-yellow' : '',
- !isRepeat && isAuto && bgIndex == 1 ? 'auto-icon-yellow' : '',
- ]"
- ></span>
- </div>
- <div
- :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
- @click="changePinyin"
- >
- <span
- :class="[
- 'pinyin-icon',
- !config.isShowPY ? 'disabled' : '',
- config.isShowPY && bgIndex == 1 ? 'pinyin-icon-yellow' : '',
- ]"
- ></span>
- </div>
- <div
- :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
- @click="changeEN"
- >
- <span
- :class="[
- 'en-icon',
- !enwords ? 'disabled' : '',
- !config.isShowEN ? 'disabled' : '',
- config.isShowEN && bgIndex == 1 ? 'en-icon-yellow' : '',
- ]"
- ></span>
- </div>
- <div
- :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
- @click="handleColl"
- >
- <span
- :class="[
- 'coll-icon',
- !isCollArr[curSentIndex] ? 'disabled' : '',
- isCollArr[curSentIndex] && 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-white' : '']"
- ></span>
- </div>
- </div>
- </div>
- <div class="voicefull-content" v-if="item">
- <div
- class="vc-box"
- @mousemove="showPrevNext(true, 'isShowLeft')"
- @mouseleave="showPrevNext(false, 'isShowLeft')"
- >
- <div
- :class="[
- 'vc-left vc-left-grey',
- isShowLeft && bgIndex == 0 ? 'vc-left-black' : '',
- isShowLeft && bgIndex == 1 ? 'vc-left-white' : '',
- curSentIndex == 0 ? 'hidden' : '',
- ]"
- @click="prevSentence"
- ></div>
- </div>
- <div class="vc-main">
- <div class="NNPE-words-box">
- <div
- class="NNPE-words"
- v-for="(pItem, pIndex) in item"
- :key="'wordsList' + pIndex"
- :class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
- @dblclick="showWordDetail($event, pItem)"
- @click="playWord(pItem)"
- >
- <template v-if="!pItem.width">
- <template v-if="pItem.isShow">
- <template
- v-if="
- item[pIndex + 1] &&
- item[pIndex + 1].chs &&
- chsFhList.indexOf(item[pIndex + 1].chs) > -1
- "
- >
- <span class="NNPE-words-box">
- <template v-if="curQue.pyPosition == 'top'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.className ? pItem.className : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="'font-size:' + pySize + 'px'"
- >{{ pItem.pinyin }}</span
- >
- </template>
- <span
- class="NNPE-chs"
- :class="[
- pItem.padding && config.isShowPY ? 'padding' : '',
- curQue.pyPosition == 'top' ? 'bottom' : '',
- ]"
- >
- <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
- ? bgIndex == 0
- ? 'active'
- : 'active-yellow'
- : '',
- bgIndex == 1 ? 'font-white' : '',
- bgIndex == 0 && wordIndex == pItem.wordIndex
- ? 'wordActive'
- : '',
- bgIndex == 1 && wordIndex == pItem.wordIndex
- ? 'wordActive-blue'
- : '',
- ]"
- :style="'font-size:' + hzSize + 'px'"
- >{{ pItem.chs[wIndex] }}</span
- >
- </template>
- </span>
- <template v-if="curQue.pyPosition == 'bottom'">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin bottom"
- :class="[
- pItem.className ? pItem.className : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="'font-size:' + pySize + 'px'"
- >{{ pItem.pinyin }}</span
- >
- </template>
- </span>
- <span class="NNPE-words-box">
- <template v-if="curQue.pyPosition == 'top'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- noFont.indexOf(item[pIndex + 1].pinyin) > -1
- ? 'noFont'
- : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="{ fontSize: pySize + 'px', textAlign: left }"
- >{{ item[pIndex + 1].pinyin }}</span
- >
- </template>
- <span
- :class="[
- 'NNPE-chs',
- curQue.pyPosition == 'top' ? 'bottom' : '',
- ]"
- :style="{ fontSize: hzSize + 'px', textAlign: 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
- ? bgIndex == 0
- ? 'active'
- : 'active-yellow'
- : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="{ fontSize: pySize + 'px' }"
- >{{ item[pIndex + 1].chs }}</span
- >
- </span>
- <template v-if="curQue.pyPosition == 'bottom'">
- <span
- v-if="config.isShowPY"
- :class="[
- 'NNPE-pinyin',
- noFont.indexOf(item[pIndex + 1].pinyin) > -1
- ? 'noFont'
- : '',
- bgIndex == 1 ? 'font-white' : '',
- 'bottom',
- ]"
- :style="{ fontSize: pySize + 'px', textAlign: left }"
- >{{ item[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="config.isShowPY"
- class="NNPE-pinyin"
- :class="[
- pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="{ fontSize: pySize + 'px' }"
- >{{ pItem.pinyin }}</span
- >
- </template>
- </template>
- <span
- v-if="pItem.chs != '#'"
- class="NNPE-chs"
- :class="[
- pItem.padding && config.isShowPY ? 'padding' : '',
- curQue.pyPosition == 'top' ? 'bottom' : '',
- ]"
- >
- <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
- ? bgIndex == 0
- ? 'active'
- : 'active-yellow'
- : '',
- bgIndex == 1 ? 'font-white' : '',
- bgIndex == 0 && wordIndex == pItem.wordIndex
- ? 'wordActive'
- : '',
- bgIndex == 1 && wordIndex == pItem.wordIndex
- ? 'wordActive-blue'
- : '',
- ]"
- :style="{ fontSize: hzSize + 'px' }"
- >{{ pItem.chs[wIndex] }}</span
- >
- </template>
- </span>
- <template v-if="curQue.pyPosition == 'bottom'">
- <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
- <span
- v-if="config.isShowPY"
- class="NNPE-pinyin bottom"
- :class="[
- pItem.padding ? 'padding' : '',
- pItem.className ? pItem.className : '',
- bgIndex == 1 ? 'font-white' : '',
- ]"
- :style="{ fontSize: pySize + 'px' }"
- >{{ 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="enwords && config.isShowEN"
- :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
- :style="{ fontSize: enSize + 'px' }"
- >
- {{ enwords }}
- </div>
- </div>
- <div
- class="vc-box-right"
- @mousemove="showPrevNext(true, 'isShowRight')"
- @mouseleave="showPrevNext(false, 'isShowRight')"
- >
- <div
- :class="[
- 'vc-left vc-right-grey',
- isShowRight && bgIndex == 0 ? 'vc-right-black' : '',
- isShowRight && bgIndex == 1 ? 'vc-right-white' : '',
- curSentIndex == sentList.length - 1 ? 'hidden' : '',
- ]"
- @click="nextSentence"
- ></div>
- </div>
- </div>
- <div
- class="voicefull-bottom"
- @mouseover="setBottomShow(true)"
- @mouseleave="setBottomShow(false)"
- >
- <div
- :class="[
- isBottomShow ? 'voicefull-bottom-show' : 'voicefull-bottom-hidden',
- ]"
- >
- <div class="bottom-left">
- <Soundrecorddiff
- ref="Soundrecorddiff"
- @handleWav="handleWav"
- @getWavblob="getWavblob"
- @handleParentPlay="handleParentPlay"
- @sentPause="sentPause"
- @getRerordStatus="getRerordStatus"
- @getMicrophoneStatus="getMicrophoneStatus"
- @getPlayStatus="getPlayStatus"
- :bgIndex="bgIndex"
- :TaskModel="TaskModel"
- :answerRecordList="
- curQue.Bookanswer.practiceModel[sentIndex] &&
- curQue.Bookanswer.practiceModel[sentIndex].recordList
- "
- :tmIndex="sentIndex"
- />
- <div
- :class="['compare-box', bgIndex == 1 ? 'compare-box-white' : '']"
- v-if="isShowCompare"
- >
- <Audio-compare
- :bgIndex="bgIndex"
- type="full"
- :themeColor="themeColor"
- :index="curSentIndex"
- :sentIndex="curSentIndex"
- :url="curQue.mp3_list[0].id"
- :bg="bg"
- :ed="ed"
- :wavblob="wavblob"
- :getCurTime="getCurCompareTime"
- :sentPause="sentPause"
- :isRecord="isRecord"
- :handleChangeStopAudio="handleChangeStopAudio"
- :getPlayStatus="getPlayStatus"
- />
- </div>
- </div>
- <div
- :class="[
- 'page-count',
- bgIndex == 0 ? 'page-count-white' : 'page-count-green',
- ]"
- >
- {{ curSentIndex + 1 }}/{{ sentList.length }}
- </div>
- </div>
- </div>
- <template v-if="isShow">
- <div
- ref="wordcard"
- class="NNPE-wordDetail"
- :style="{ top: top + 'px', left: left + 'px' }"
- >
- <Wordcard
- :word="word"
- :changeWordCard="changeWordCard"
- :themeColor="themeColor"
- :currentTreeID="currentTreeID"
- />
- </div>
- </template>
- <div class="word-play-audio" v-if="isWordPlay">
- <AudioLineSentence
- :mp3="mp3"
- :getCurTime="getCurWordTime"
- ref="audioLineWord"
- :audioId="'artPraAudioId' + curSentIndex + wordIndex"
- :stopAudio="stopAudio"
- :width="120"
- :hideSlider="false"
- :bg="wordbg"
- :ed="worded"
- :maxTime="wordMaxTime"
- :bgIndex="bgIndex"
- :isRepeat="isRepeat"
- :wordPlay="true"
- @changePlayStatus="changePlayStatus"
- />
- </div>
- </div>
- </template>
- <script>
- import AudioLineSentence from "./AudioLineSentence.vue";
- import Soundrecorddiff from "./Soundrecorddiff.vue";
- import AudioCompare from "./AudioCompare.vue";
- import Wordcard from "./components/Wordcard.vue";
- import { LearnWebSI } from "../../../api/ajax";
- export default {
- components: {
- AudioLineSentence,
- Soundrecorddiff,
- AudioCompare,
- Wordcard,
- },
- props: [
- "sentList",
- "sentIndex",
- "mp3",
- "wordTimeList",
- "curQue",
- "noFont",
- "themeColor",
- "NNPENewWordList",
- "currentTreeID",
- "config",
- "TaskModel",
- ],
- data() {
- return {
- pySize: 32,
- hzSize: 48,
- enSize: 24,
- bgIndex: 1,
- maxTime: 0,
- item: null,
- bg: 0,
- ed: 0,
- isRepeat: false,
- NumberList: [
- "①",
- "②",
- "③",
- "④",
- "⑤",
- "⑥",
- "⑦",
- "⑧",
- "⑨",
- "⑩",
- "⑪",
- "⑫",
- "⑬",
- "⑭",
- "⑮",
- "⑯",
- "⑰",
- "⑱",
- "⑲",
- "⑳",
- ],
- chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
- enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
- curTime: 0,
- wavblob: null,
- stopAudio: false,
- isRecord: false,
- isShowCompare: false,
- isShowRight: false,
- isShowLeft: false,
- curSentIndex: 0,
- oldHz: "",
- hz: "",
- clientY: 0,
- top: 0,
- left: 0,
- newWordList: [],
- pinyin: "",
- wordIndex: -1,
- isShow: false,
- wordbg: 0,
- worded: 0,
- wordMaxTime: 0,
- isWordPlay: false,
- curWordTime: 0,
- isPlaying: false,
- isAuto: false,
- key: "isRepeat",
- isKeyboard: true,
- isTopShow: false,
- isBottomShow: false,
- isRecording: false,
- recordPlaying: false,
- isCollArr: [],
- enwords: "",
- };
- },
- computed: {
- // isPlaying: function () {
- // let playing = false;
- // if (this.$refs.audioLineSent) {
- // playing = this.$refs.audioLineSent.audio.isPlaying;
- // }
- // console.log(playing);
- // return playing;
- // },
- },
- watch: {
- isRecording: {
- handler: function (newVal, oldVal) {
- if (newVal) {
- this.isBottomShow = newVal;
- }
- },
- deep: true,
- },
- recordPlaying: {
- handler: function (newVal, oldVal) {
- if (newVal) {
- this.isBottomShow = newVal;
- }
- },
- deep: true,
- },
- sentIndex: {
- handler: function (newVal, oldVal) {
- this.curSentIndex = newVal;
- this.getSentence();
- },
- deep: true,
- },
- hz: {
- handler: function (val, oldVal) {
- let _this = this;
- if (val) {
- _this.handleNewWords(val);
- }
- },
- // 深度观察监听
- deep: true,
- },
- isShow: {
- handler: function (val, oldVal) {
- let _this = this;
- if (val) {
- setTimeout(() => {
- _this.cardHeight = _this.$refs.wordcard.offsetHeight;
- if (_this.screenHeight - _this.clientY > _this.cardHeight) {
- _this.top = _this.clientY + 20;
- } else {
- _this.top = _this.clientY - _this.cardHeight - 30;
- }
- }, 50);
- }
- },
- // 深度观察监听
- deep: true,
- },
- },
- //方法集合
- methods: {
- setTopShow(bool) {
- this.isTopShow = bool;
- },
- setBottomShow(bool) {
- if (!this.recordPlaying && !this.isRecording) {
- this.isBottomShow = bool;
- }
- },
- getPlayStatus(bool) {
- this.recordPlaying = bool;
- },
- setFontSize(type) {
- let _this = this;
- if (type == "-") {
- if (_this.hzSize >= 34) {
- this.hzSize = this.hzSize - 4;
- }
- }
- if (type == "+") {
- if (_this.hzSize <= 76) {
- this.hzSize = this.hzSize + 4;
- }
- }
- _this.pySize = parseInt(_this.hzSize / 1.5);
- _this.enSize = parseInt(_this.hzSize / 2);
- },
- playChange(bool) {
- this.isPlaying = bool;
- },
- handleColl() {
- let _this = this;
- if (_this.isCollArr[_this.curSentIndex]) {
- _this.cancleColl();
- } else {
- _this.addColl();
- }
- },
- //添加收藏
- addColl() {
- 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);
- this.$message.success("收藏成功!");
- });
- } else {
- this.$message.warning("权限不足!");
- }
- },
- //取消收藏
- cancleColl() {
- let text = "";
- this.item.forEach((item) => {
- if (item.chs != "#") {
- text += item.chs;
- }
- });
- let MethodName = "order-collection_manager-CancelMyGoodsCollection_WS";
- let data = {
- goods_type: 502,
- goods_list: [
- {
- goods_id: this.currentTreeID, //课件的id
- sentence_text: text,
- },
- ],
- };
- LearnWebSI(MethodName, data).then((res) => {
- this.$set(this.isCollArr, this.curSentIndex, false);
- this.$message.success("取消成功!");
- });
- },
- //检查收藏状态
- checkCollStatus() {
- let text = "";
- this.item.forEach((item) => {
- if (item.chs != "#") {
- text += item.chs;
- }
- });
- let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
- let data = {
- goods_type: 502,
- goods_id: this.currentTreeID, //课件的id
- sentence_text: text,
- };
- LearnWebSI(MethodName, data).then((res) => {
- let collFlag = res.is_collection == "true" ? true : false;
- this.$set(this.isCollArr, this.curSentIndex, collFlag);
- });
- },
- showPrevNext(bool, key) {
- this[key] = bool;
- },
- prevSentence() {
- let _this = this;
- if (_this.curSentIndex == 0) {
- _this.$message.warning("已经是第一个句子了");
- return;
- }
- _this.curSentIndex = _this.curSentIndex - 1;
- _this.getSentence();
- if (_this.isAuto) {
- _this.curTime = _this.bg;
- _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
- }
- },
- nextSentence() {
- if (this.curSentIndex == this.sentList.length - 1) {
- this.$message.warning("已经是最后一个句子了");
- return;
- }
- this.curSentIndex = this.curSentIndex + 1;
- this.getSentence();
- },
- rollSentence() {
- if (this.curSentIndex == this.sentList.length - 1) {
- this.curSentIndex = 0;
- } else {
- this.curSentIndex = this.curSentIndex + 1;
- }
- this.getSentence();
- },
- changeStatus(key) {
- if (key == "config.isShowEN") {
- if (this.enwords) {
- this[key] = !this[key];
- }
- } else {
- this[key] = !this[key];
- }
- },
- changePinyin() {
- this.$emit("changePinyin");
- },
- changeEN() {
- this.$emit("changeEN");
- },
- setStatus() {
- let _this = this;
- if (_this.key == "isRepeat") {
- if (_this.isRepeat) {
- _this.isRepeat = false;
- _this.isAuto = true;
- _this.key = "isAuto";
- } else {
- _this.isRepeat = true;
- _this.key = "isRepeat";
- }
- } else if (_this.key == "isAuto") {
- if (_this.isAuto) {
- _this.isRepeat = false;
- _this.isAuto = false;
- _this.key = "isRepeat";
- }
- }
- },
- getRerordStatus(bool) {
- this.isShowCompare = bool;
- },
- getMicrophoneStatus(bool) {
- this.isRecording = 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 if (_this.isAuto) {
- let time = curTime * 1000;
- if (time > _this.ed) {
- _this.rollSentence();
- _this.curTime = _this.bg;
- _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
- } else {
- _this.curTime = curTime * 1000;
- }
- } else {
- _this.curTime = curTime * 1000;
- }
- },
- getCurCompareTime(curTime) {
- let _this = this;
- _this.curTime = curTime * 1000;
- },
- getCurWordTime(curTime) {
- let _this = this;
- _this.curWordTime = curTime * 1000;
- },
- changeBg(bgIndex) {
- this.bgIndex = bgIndex;
- },
- getSentence() {
- let _this = this;
- _this.pauseAudio();
- _this.isPlaying = false;
- let item = JSON.parse(JSON.stringify(_this.sentList[_this.curSentIndex]));
- if (item.sentArr) {
- _this.item = item.sentArr;
- _this.enwords = item.enwords;
- } else {
- _this.item = item;
- }
- _this.sentList.forEach((item) => {
- this.isCollArr.push(false);
- });
- _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;
- }
- _this.checkCollStatus();
- },
- pauseAudio() {
- let audio = document.getElementsByTagName("audio");
- audio.forEach((item) => {
- item.pause();
- });
- },
- exitFullScreen() {
- this.pauseAudio();
- this.$emit("exitFullscreen");
- },
- changeFullScreen() {
- this.pauseAudio();
- this.$emit("changeIsFull");
- },
- handleWav(list, tmIndex) {
- tmIndex = tmIndex ? tmIndex : 0;
- this.$emit("handleWav", list, tmIndex);
- },
- // 录音时暂停音频播放
- handleParentPlay() {
- this.stopAudio = true;
- },
- // 音频播放时改变布尔值
- handleChangeStopAudio() {
- this.stopAudio = false;
- },
- //播放音频
- playWord(item) {
- let _this = this;
- _this.pauseAudio();
- _this.isWordPlay = false;
- _this.wordIndex = item.wordIndex;
- setTimeout(() => {
- let leg = item.timeList.length;
- _this.wordbg = item.timeList[0].wordBg;
- _this.worded = item.timeList[leg - 1].wordEd;
- let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
- if (wordMaxTime < 1) {
- _this.wordMaxTime = 1;
- } else {
- _this.wordMaxTime = wordMaxTime;
- }
- _this.isWordPlay = true;
- }, 50);
- },
- changePlayStatus() {
- this.isWordPlay = false;
- this.wordIndex = -1;
- },
- showWordDetail(e, item) {
- let _this = this;
- if (_this.TaskModel == "ANSWER") {
- return;
- }
- if (_this.chsFhList.indexOf(item.chs) > -1) {
- return;
- }
- if (_this.oldHz != item.chs) {
- this.isShow = false;
- setTimeout(() => {
- _this.hz = item.chs;
- _this.pinyin = item.pinyin;
- _this.wordIndex = item.wordIndex;
- }, 50);
- }
- _this.clientY = e.clientY;
- let left = e.clientX;
- let width = 0;
- if (item.chs.length == 1 || item.chs.length == 2) {
- width = 304;
- } else if (item.chs.length == 3 || item.chs.length == 4) {
- width = 432;
- } else if (item.chs.length > 3) {
- width = 560;
- }
- // if (left - this.bodyLeft > this.contentWidth / 2) {
- // _this.left = left - width + 10;
- // } else {
- _this.left = left - width / 2;
- //}
- },
- changeWordCard(isShow) {
- let _this = this;
- _this.isShow = isShow;
- _this.oldHz = "";
- _this.hz = "";
- _this.wordIndex = -1;
- },
- // 处理分词数据
- handleNewWords(val) {
- let _this = this;
- _this.isShow = true;
- _this.word = null;
- if (_this.newWordList.indexOf(val) > -1) {
- for (let i = 0; i < this.NNPENewWordList.length; i++) {
- let pItem = this.NNPENewWordList[i];
- for (let j = 0; j < pItem.length; j++) {
- let item = pItem[j];
- if (item.new_word.trim() == val.trim()) {
- let wordlist = val.split("");
- this.word = { list: wordlist, detail: item };
- break;
- }
- }
- }
- } else {
- let wordlist = val.split("");
- let option = {
- definition_list: [],
- mp3_list: [],
- new_word: val,
- pinyin: _this.pinyin,
- };
- _this.word = { list: wordlist, detail: option };
- }
- _this.oldHz = val;
- },
- handleNewword() {
- let NewWordList = [];
- this.NNPENewWordList.forEach((item) => {
- item.forEach((wItem) => {
- NewWordList.push(wItem.new_word);
- });
- });
- this.newWordList = JSON.parse(JSON.stringify(NewWordList));
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {
- let _this = this;
- },
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- let _this = this;
- document.addEventListener("keyup", function (e) {
- if (_this.isKeyboard) {
- if (e.keyCode == 32) {
- //空格
- _this.$nextTick(() => {
- if (_this.$refs.audioLineSent) {
- _this.$refs.audioLineSent.PlayAudio();
- }
- });
- } else if (e.keyCode == 38) {
- _this.prevSentence();
- } else if (e.keyCode == 40) {
- _this.nextSentence();
- } else if (e.keyCode == 13) {
- _this.$nextTick(() => {
- _this.$refs.Soundrecorddiff.microphone();
- });
- }
- }
- });
- if (_this.NNPENewWordList) {
- _this.handleNewword();
- }
- _this.curSentIndex = _this.sentIndex;
- _this.getSentence();
- let isFullscreen =
- document.fullscreenElement ||
- document.mozFullScreenElement ||
- document.webkitFullscreenElement ||
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen;
- isFullscreen = !!isFullscreen;
- document.addEventListener("fullscreenchange", () => {
- let isFullscreen =
- document.fullscreenElement ||
- document.mozFullScreenElement ||
- document.webkitFullscreenElement ||
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen;
- if (!isFullscreen) {
- _this.changeFullScreen();
- }
- });
- document.addEventListener("mozfullscreenchange", () => {
- let isFullscreen =
- document.fullscreenElement ||
- document.mozFullScreenElement ||
- document.webkitFullscreenElement ||
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen;
- if (!isFullscreen) {
- _this.changeFullScreen();
- }
- });
- document.addEventListener("webkitfullscreenchange", () => {
- let isFullscreen =
- document.fullscreenElement ||
- document.mozFullScreenElement ||
- document.webkitFullscreenElement ||
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen;
- if (!isFullscreen) {
- _this.changeFullScreen();
- }
- });
- document.addEventListener("msfullscreenchange", () => {
- let isFullscreen =
- document.fullscreenElement ||
- document.mozFullScreenElement ||
- document.webkitFullscreenElement ||
- document.fullScreen ||
- document.mozFullScreen ||
- document.webkitIsFullScreen;
- if (!isFullscreen) {
- _this.changeFullScreen();
- }
- });
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang='scss' scoped>
- //@import url(); 引入公共css类
- .voicefull {
- width: 100%;
- height: 100vh;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- .NNPE-wordDetail {
- position: fixed;
- z-index: 9999;
- }
- &.bg1 {
- background: #fff;
- }
- &.bg2 {
- background: linear-gradient(180deg, #274533 0%, #385f45 100%);
- }
- &-top {
- height: 136px;
- width: 100%;
- box-sizing: border-box;
- padding: 0 40px;
- .voicefull-top-hidden {
- width: 100%;
- height: 136px;
- visibility: hidden;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .voicefull-top-show {
- width: 100%;
- height: 136px;
- visibility: visible;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .top-left {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
- .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;
- margin-right: 32px;
- &.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%);
- }
- }
- }
- }
- .set-fontSize {
- padding: 0 20px;
- 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);
- }
- > span {
- width: 24px;
- height: 24px;
- margin: 0 4px;
- &.font-jian {
- &-black {
- background: url("../../../assets/NPC/jian-black.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow {
- background: url("../../../assets/NPC/jian-white.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-white-disabled {
- background: url("../../../assets/NPC/jian-white-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow-disabled {
- background: url("../../../assets/NPC/jian-yellow-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- }
- &.font-img {
- &-black {
- background: url("../../../assets/NPC/fontSize-black.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/NPC/fontSize-white.png") no-repeat
- left top;
- background-size: 100% 100%;
- }
- }
- &.font-jia {
- &-black {
- background: url("../../../assets/NPC/jia-black.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow {
- background: url("../../../assets/NPC/jia-white.png") no-repeat left
- top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-white-disabled {
- background: url("../../../assets/NPC/jia-white-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- &-yellow-disabled {
- background: url("../../../assets/NPC/jia-yellow-disabled.png")
- no-repeat left top;
- background-size: 100% 100%;
- cursor: pointer;
- }
- }
- }
- }
- .top-middle {
- display: flex;
- justify-content: center;
- align-items: center;
- .audio-box {
- width: 56px;
- 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%;
- }
- &.auto-icon {
- background: url("../../../assets/icon/Auto-24-next-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &-yellow {
- background: url("../../../assets/icon/Auto-24-next-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%;
- }
- }
- .keyboard-icon {
- background: url("../../../assets/icon/enter-24-keyboard-red.png") no-repeat
- left top;
- background-size: 100% 100%;
- &.disabled {
- background: url("../../../assets/icon/enter-24-keyboard-disable-Black.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- &-yellow {
- background: url("../../../assets/icon/enter-24-keyboard-yellow.png")
- no-repeat left top;
- background-size: 100% 100%;
- }
- }
- &-content {
- flex: 1;
- width: 100%;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- .vc-box {
- padding: 0 8px 0 36px;
- &-right {
- padding: 0 36px 0 8px;
- }
- }
- .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%;
- }
- &.hidden {
- visibility: hidden;
- }
- }
- .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;
- padding: 0 67px;
- .enwords {
- padding: 0 3px;
- margin-top: 24px;
- 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;
- user-select: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- &-box {
- float: left;
- > span {
- display: block;
- &.NNPE-pinyin {
- font-family: "GB-PINYINOK-B";
- font-weight: normal;
- font-size: 32px;
- line-height: 1.25;
- box-sizing: border-box;
- color: rgba(0, 0, 0, 0.85);
- &.bottom {
- padding-bottom: 16px;
- }
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- &.font-white {
- color: #fff;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 0.85);
- }
- }
- &.NNPE-chs {
- font-family: "FZJCGFKTK";
- font-size: 48px;
- line-height: 1.17;
- color: rgba(0, 0, 0, 0.85);
- &.bottom {
- padding-bottom: 16px;
- }
- .font-white {
- color: #fff;
- }
- .active {
- color: #de4444;
- &-yellow {
- color: #ffc600;
- }
- }
- .wordActive {
- color: #de4444;
- }
- .wordActive-blue {
- color: #ffc600;
- }
- }
- // &.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: 1.25;
- box-sizing: border-box;
- color: rgba(0, 0, 0, 0.85);
- &.bottom {
- padding-bottom: 16px;
- }
- &.font-white {
- color: #fff;
- }
- &.noFont {
- font-family: initial;
- }
- &.textLeft {
- text-align: left;
- }
- &.wordBlank {
- color: rgba(0, 0, 0, 0.85);
- }
- }
- &.NNPE-chs {
- font-family: "FZJCGFKTK";
- font-size: 48px;
- line-height: 1.17;
- color: rgba(0, 0, 0, 0.85);
- &.bottom {
- padding-bottom: 16px;
- }
- .font-white {
- color: #fff;
- }
- .active {
- color: #de4444;
- &-yellow {
- color: #ffc600;
- }
- }
- .wordActive {
- color: #de4444;
- }
- .wordActive-blue {
- color: #ffc600;
- }
- }
- &.padding {
- padding-left: 3px;
- padding-right: 3px;
- }
- }
- }
- }
- &-bottom {
- height: 136px;
- width: 100%;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-right: 40px;
- .voicefull-bottom-show {
- height: 136px;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- visibility: visible;
- }
- .voicefull-bottom-hidden {
- height: 136px;
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- visibility: hidden;
- }
- .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;
- }
- &-answer {
- border-radius: 40px;
- }
- }
- }
- .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);
- }
- }
- }
- }
- .word-play-audio {
- position: absolute;
- left: -1000px;
- }
- </style>
- <style lang="scss">
- .NPC-Big-Book-preview-green {
- .bg1 {
- .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 {
- .bg1 {
- .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>
|