Voicefullscreen.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087
  1. <!-- -->
  2. <template>
  3. <div :class="['voicefull', bgIndex == 0 ? 'bg1' : 'bg2']" v-if="sentList">
  4. <div
  5. class="voicefull-top"
  6. @mouseover="setTopShow(true)"
  7. @mouseleave="setTopShow(false)"
  8. >
  9. <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
  10. <div class="top-left">
  11. <div :class="['select-bg', bgIndex == 1 ? 'select-bg-blue' : '']">
  12. <div :class="['bg-green-box', bgIndex == 1 ? 'active' : '']">
  13. <span
  14. :class="['bg-green', bgIndex == 1 ? 'active' : '']"
  15. @click="changeBg(1)"
  16. ></span>
  17. </div>
  18. <div :class="['bg-white-box', bgIndex == 0 ? 'active' : '']">
  19. <span
  20. :class="['bg-white', bgIndex == 0 ? 'active' : '']"
  21. @click="changeBg(0)"
  22. ></span>
  23. </div>
  24. </div>
  25. <div
  26. :class="['set-fontSize', bgIndex == 1 ? 'set-fontSize-green' : '']"
  27. >
  28. <template v-if="hzSize >= 34">
  29. <span
  30. :class="[
  31. 'font-jian-black',
  32. bgIndex == 1 ? 'font-jian-yellow' : ''
  33. ]"
  34. @click="setFontSize('-')"
  35. ></span>
  36. </template>
  37. <template v-else>
  38. <span
  39. :class="[
  40. 'font-jian-black',
  41. bgIndex == 1
  42. ? 'font-jian-yellow-disabled'
  43. : 'font-jian-white-disabled'
  44. ]"
  45. ></span>
  46. </template>
  47. <span
  48. :class="['font-img-black', bgIndex == 1 ? 'font-img-yellow' : '']"
  49. ></span>
  50. <template v-if="hzSize <= 76">
  51. <span
  52. :class="[
  53. 'font-jia-black',
  54. bgIndex == 1 ? 'font-jia-yellow' : ''
  55. ]"
  56. @click="setFontSize('+')"
  57. ></span>
  58. </template>
  59. <template v-else>
  60. <span
  61. :class="[
  62. 'font-jia-black',
  63. bgIndex == 1
  64. ? 'font-jia-yellow-disabled'
  65. : 'font-jia-white-disabled'
  66. ]"
  67. ></span>
  68. </template>
  69. </div>
  70. <div
  71. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  72. @click="changeStatus('isKeyboard')"
  73. title="键盘控制开启后,可用方向键控制翻页,空格键播放暂停,回车键录音"
  74. >
  75. <span
  76. :class="[
  77. 'keyboard-icon',
  78. !isKeyboard ? 'disabled' : '',
  79. isKeyboard && bgIndex == 1 ? 'keyboard-icon-yellow' : ''
  80. ]"
  81. ></span>
  82. </div>
  83. </div>
  84. <div class="top-middle">
  85. <template v-if="mp3">
  86. <AudioLineSentence
  87. :key="'sent' + curSentIndex"
  88. :mp3="mp3"
  89. :getCurTime="getCurTime"
  90. ref="audioLineSent"
  91. :audioId="'artPraAudioId' + curSentIndex"
  92. :stopAudio="stopAudio"
  93. :width="120"
  94. :hideSlider="true"
  95. :bg="bg"
  96. :ed="ed"
  97. :curTime="curTime"
  98. :maxTime="maxTime"
  99. :bgIndex="bgIndex"
  100. :isRepeat="isRepeat"
  101. :isAuto="isAuto"
  102. @playChange="playChange"
  103. @rollSentence="rollSentence"
  104. />
  105. </template>
  106. <div
  107. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  108. @click="setStatus"
  109. >
  110. <span
  111. :class="[
  112. 'repeat-icon',
  113. !isRepeat && !isAuto ? 'disabled' : '',
  114. !isRepeat && isAuto ? 'auto-icon' : '',
  115. isRepeat && bgIndex == 1 ? 'repeat-icon-yellow' : '',
  116. !isRepeat && isAuto && bgIndex == 1 ? 'auto-icon-yellow' : ''
  117. ]"
  118. ></span>
  119. </div>
  120. <div
  121. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  122. @click="changePinyin"
  123. >
  124. <span
  125. :class="[
  126. 'pinyin-icon',
  127. !config.isShowPY ? 'disabled' : '',
  128. config.isShowPY && bgIndex == 1 ? 'pinyin-icon-yellow' : ''
  129. ]"
  130. ></span>
  131. </div>
  132. <div
  133. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  134. @click="changeEN"
  135. >
  136. <span
  137. :class="[
  138. 'en-icon',
  139. !enwords ? 'disabled' : '',
  140. !config.isShowEN ? 'disabled' : '',
  141. config.isShowEN && bgIndex == 1 ? 'en-icon-yellow' : ''
  142. ]"
  143. ></span>
  144. </div>
  145. <div
  146. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  147. @click="handleColl"
  148. title="点击收藏后可在“个人中心”-“我的收藏”查看"
  149. >
  150. <span
  151. :class="[
  152. 'coll-icon',
  153. !isCollArr[curSentIndex] ? 'disabled' : '',
  154. isCollArr[curSentIndex] && bgIndex == 1
  155. ? 'coll-icon-yellow'
  156. : ''
  157. ]"
  158. ></span>
  159. </div>
  160. </div>
  161. <div
  162. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  163. @click="exitFullScreen"
  164. >
  165. <span
  166. :class="['close-icon', bgIndex == 1 ? 'close-icon-white' : '']"
  167. ></span>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="voicefull-content" v-if="item">
  172. <div
  173. class="vc-box"
  174. @mousemove="showPrevNext(true, 'isShowLeft')"
  175. @mouseleave="showPrevNext(false, 'isShowLeft')"
  176. >
  177. <div
  178. :class="[
  179. 'vc-left vc-left-grey',
  180. isShowLeft && bgIndex == 0 ? 'vc-left-black' : '',
  181. isShowLeft && bgIndex == 1 ? 'vc-left-white' : '',
  182. curSentIndex == 0 ? 'hidden' : ''
  183. ]"
  184. @click="prevSentence"
  185. ></div>
  186. </div>
  187. <div class="vc-main">
  188. <div class="NNPE-words-box">
  189. <div style="clear: both; overflow: hidden"></div>
  190. <div
  191. v-if="
  192. enwords &&
  193. config.isShowEN &&
  194. curQue.enPosition &&
  195. curQue.enPosition == 'top'
  196. "
  197. :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
  198. :style="{ fontSize: enSize + 'px' }"
  199. >
  200. {{ enwords }}
  201. </div>
  202. <div
  203. class="NNPE-words"
  204. v-for="(pItem, pIndex) in item"
  205. :key="'wordsList' + pIndex"
  206. :class="[
  207. pItem.chs != '“' && pItem.wordIndex == 0
  208. ? 'textLeft'
  209. : 'textCenter',
  210. pItem.chs == '“' ? 'textRight' : ''
  211. ]"
  212. @dblclick="showWordDetail($event, pItem)"
  213. @click="playWord(pItem)"
  214. >
  215. <template v-if="NumberList.indexOf(pItem.chs) == -1">
  216. <template v-if="!pItem.width">
  217. <template v-if="pItem.isShow">
  218. <template
  219. v-if="
  220. item[pIndex + 1] &&
  221. item[pIndex + 1].chs &&
  222. chsFhList.indexOf(item[pIndex + 1].chs) > -1
  223. "
  224. >
  225. <span class="NNPE-words-box">
  226. <template v-if="curQue.pyPosition == 'top'">
  227. <span
  228. v-if="config.isShowPY"
  229. class="NNPE-pinyin"
  230. :class="[
  231. pItem.className ? pItem.className : '',
  232. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  233. bgIndex == 1 ? 'font-white' : ''
  234. ]"
  235. :style="{
  236. fontSize: pySize + 'px',
  237. height: pySize * 1.25 + 'px'
  238. }"
  239. >{{ pItem.pinyin }}</span
  240. >
  241. </template>
  242. <span
  243. class="NNPE-chs"
  244. :class="[
  245. pItem.padding && config.isShowPY ? 'padding' : '',
  246. curQue.pyPosition == 'top' ? 'bottom' : ''
  247. ]"
  248. :style="{
  249. height: hzSize * 1.17 + 'px'
  250. }"
  251. >
  252. <template>
  253. <span
  254. v-for="(wItem, wIndex) in pItem.leg"
  255. :key="'ci' + wIndex + pIndex"
  256. :class="[
  257. pItem.timeList &&
  258. pItem.timeList[wIndex] &&
  259. curTime >= pItem.timeList[wIndex].wordBg &&
  260. curQue.wordTime &&
  261. curQue.wordTime[curSentIndex] &&
  262. curTime <= curQue.wordTime[curSentIndex].ed
  263. ? bgIndex == 0
  264. ? 'active'
  265. : 'active-yellow'
  266. : '',
  267. bgIndex == 1 ? 'font-white' : '',
  268. bgIndex == 0 && wordIndex == pItem.wordIndex
  269. ? 'wordActive'
  270. : '',
  271. bgIndex == 1 && wordIndex == pItem.wordIndex
  272. ? 'wordActive-blue'
  273. : '',
  274. newWordList.indexOf(pItem.chs) > -1 && !isPlaying
  275. ? 'newActive'
  276. : '',
  277. pItem.words && !isPlaying ? 'newActive' : ''
  278. ]"
  279. :style="{
  280. fontSize: hzSize + 'px',
  281. fontFamily:
  282. pItem.config && pItem.config.fontFamily
  283. ? pItem.config.fontFamily
  284. : '',
  285. height: hzSize * 1.17 + 'px',
  286. display: 'inline-block',
  287. width:
  288. pItem.chs[wIndex].trim() === '' ? '10px' : ''
  289. }"
  290. >{{ pItem.chs[wIndex] }}</span
  291. >
  292. </template>
  293. </span>
  294. <template v-if="curQue.pyPosition == 'bottom'">
  295. <span
  296. v-if="config.isShowPY"
  297. class="NNPE-pinyin bottom"
  298. :class="[
  299. pItem.className ? pItem.className : '',
  300. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  301. bgIndex == 1 ? 'font-white' : ''
  302. ]"
  303. :style="{
  304. fontSize: pySize + 'px',
  305. height: pySize * 1.25 + 'px'
  306. }"
  307. >{{ pItem.pinyin }}</span
  308. >
  309. </template>
  310. </span>
  311. <span class="NNPE-words-box">
  312. <template v-if="curQue.pyPosition == 'top'">
  313. <span
  314. v-if="config.isShowPY"
  315. :class="[
  316. 'NNPE-pinyin',
  317. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  318. ? 'noFont'
  319. : '',
  320. bgIndex == 1 ? 'font-white' : ''
  321. ]"
  322. :style="{
  323. fontSize: pySize + 'px',
  324. textAlign: left,
  325. height: pySize * 1.25 + 'px'
  326. }"
  327. >{{ item[pIndex + 1].pinyin }}</span
  328. >
  329. </template>
  330. <span
  331. :class="[
  332. 'NNPE-chs',
  333. curQue.pyPosition == 'top' ? 'bottom' : ''
  334. ]"
  335. :style="{
  336. fontSize: hzSize + 'px',
  337. textAlign: left,
  338. height: hzSize * 1.17 + 'px'
  339. }"
  340. >
  341. <span
  342. :class="[
  343. pItem.timeList[pItem.leg - 1] &&
  344. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  345. curQue.wordTime &&
  346. curQue.wordTime[curSentIndex] &&
  347. curTime <= curQue.wordTime[curSentIndex].ed
  348. ? bgIndex == 0
  349. ? 'active'
  350. : 'active-yellow'
  351. : '',
  352. bgIndex == 1 ? 'font-white' : '',
  353. newWordList.indexOf(item[pIndex + 1].chs) > -1 &&
  354. !isPlaying
  355. ? 'newActive'
  356. : '',
  357. item[pIndex + 1].words && !isPlaying
  358. ? 'newActive'
  359. : ''
  360. ]"
  361. :style="{
  362. fontSize: hzSize + 'px',
  363. fontFamily:
  364. item[pIndex + 1].config &&
  365. item[pIndex + 1].config.fontFamily
  366. ? item[pIndex + 1].config.fontFamily
  367. : '',
  368. height: hzSize * 1.17 + 'px',
  369. display: 'inline-block',
  370. width:
  371. item[pIndex + 1].chs.trim() === '' ? '10px' : ''
  372. }"
  373. >{{ item[pIndex + 1].chs }}</span
  374. >
  375. </span>
  376. <template v-if="curQue.pyPosition == 'bottom'">
  377. <span
  378. v-if="config.isShowPY"
  379. :class="[
  380. 'NNPE-pinyin',
  381. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  382. ? 'noFont'
  383. : '',
  384. bgIndex == 1 ? 'font-white' : '',
  385. 'bottom'
  386. ]"
  387. :style="{
  388. fontSize: pySize + 'px',
  389. textAlign: left,
  390. height: pySize * 1.25 + 'px'
  391. }"
  392. >{{ item[pIndex + 1].pinyin }}</span
  393. >
  394. </template>
  395. </span>
  396. <span
  397. class="NNPE-words-box"
  398. v-if="
  399. item[pIndex + 2] &&
  400. item[pIndex + 2].chs &&
  401. chsFhList.indexOf(item[pIndex + 2].chs) > -1
  402. "
  403. >
  404. <template v-if="curQue.pyPosition == 'top'">
  405. <span
  406. v-if="config.isShowPY"
  407. :class="[
  408. 'NNPE-pinyin',
  409. noFont.indexOf(item[pIndex + 2].pinyin) > -1
  410. ? 'noFont'
  411. : '',
  412. bgIndex == 1 ? 'font-white' : ''
  413. ]"
  414. :style="{
  415. fontSize: pySize + 'px',
  416. textAlign: left,
  417. height: pySize * 1.25 + 'px'
  418. }"
  419. >{{ item[pIndex + 2].pinyin }}</span
  420. >
  421. </template>
  422. <span
  423. :class="[
  424. 'NNPE-chs',
  425. curQue.pyPosition == 'top' ? 'bottom' : ''
  426. ]"
  427. :style="{
  428. fontSize: hzSize + 'px',
  429. textAlign: left,
  430. height: hzSize * 1.17 + 'px'
  431. }"
  432. >
  433. <span
  434. :class="[
  435. pItem.timeList[pItem.leg - 1] &&
  436. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  437. curQue.wordTime &&
  438. curQue.wordTime[curSentIndex] &&
  439. curTime <= curQue.wordTime[curSentIndex].ed
  440. ? bgIndex == 0
  441. ? 'active'
  442. : 'active-yellow'
  443. : '',
  444. bgIndex == 1 ? 'font-white' : '',
  445. newWordList.indexOf(item[pIndex + 2].chs) > -1 &&
  446. !isPlaying
  447. ? 'newActive'
  448. : '',
  449. item[pIndex + 2].words && !isPlaying
  450. ? 'newActive'
  451. : ''
  452. ]"
  453. :style="{
  454. fontSize: hzSize + 'px',
  455. fontFamily:
  456. item[pIndex + 2].config &&
  457. item[pIndex + 2].config.fontFamily
  458. ? item[pIndex + 2].config.fontFamily
  459. : '',
  460. height: hzSize * 1.17 + 'px',
  461. display: 'inline-block',
  462. width:
  463. item[pIndex + 2].chs.trim() === '' ? '10px' : ''
  464. }"
  465. >{{ item[pIndex + 2].chs }}</span
  466. >
  467. </span>
  468. <template v-if="curQue.pyPosition == 'bottom'">
  469. <span
  470. v-if="config.isShowPY"
  471. :class="[
  472. 'NNPE-pinyin',
  473. noFont.indexOf(item[pIndex + 2].pinyin) > -1
  474. ? 'noFont'
  475. : '',
  476. bgIndex == 1 ? 'font-white' : '',
  477. 'bottom'
  478. ]"
  479. :style="{
  480. fontSize: pySize + 'px',
  481. textAlign: left,
  482. height: pySize * 1.25 + 'px'
  483. }"
  484. >{{ item[pIndex + 2].pinyin }}</span
  485. >
  486. </template>
  487. </span>
  488. </template>
  489. <template v-else>
  490. <template v-if="curQue.pyPosition == 'top'">
  491. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  492. <span
  493. v-if="config.isShowPY"
  494. class="NNPE-pinyin"
  495. :class="[
  496. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  497. pItem.className ? pItem.className : '',
  498. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  499. bgIndex == 1 ? 'font-white' : ''
  500. ]"
  501. :style="{
  502. fontSize: pySize + 'px',
  503. height: pySize * 1.25 + 'px'
  504. }"
  505. >{{ pItem.pinyin }}</span
  506. >
  507. </template>
  508. </template>
  509. <span
  510. v-if="pItem.chs != '#'"
  511. class="NNPE-chs"
  512. :class="[
  513. pItem.chs != '“' && pItem.padding && config.isShowPY
  514. ? 'padding'
  515. : '',
  516. curQue.pyPosition == 'top' ? 'bottom' : ''
  517. ]"
  518. :style="{
  519. height: hzSize * 1.17 + 'px'
  520. }"
  521. >
  522. <template>
  523. <span
  524. v-for="(wItem, wIndex) in pItem.leg"
  525. :key="'ci' + wIndex + pIndex + curSentIndex"
  526. :class="[
  527. pItem.timeList &&
  528. pItem.timeList[wIndex] &&
  529. curTime >= pItem.timeList[wIndex].wordBg &&
  530. curQue.wordTime &&
  531. curQue.wordTime[curSentIndex] &&
  532. curTime <= curQue.wordTime[curSentIndex].ed
  533. ? bgIndex == 0
  534. ? 'active'
  535. : 'active-yellow'
  536. : '',
  537. bgIndex == 1 ? 'font-white' : '',
  538. bgIndex == 0 && wordIndex == pItem.wordIndex
  539. ? 'wordActive'
  540. : '',
  541. bgIndex == 1 && wordIndex == pItem.wordIndex
  542. ? 'wordActive-blue'
  543. : '',
  544. newWordList.indexOf(pItem.chs) > -1 && !isPlaying
  545. ? 'newActive'
  546. : '',
  547. pItem.words && !isPlaying ? 'newActive' : ''
  548. ]"
  549. :style="{
  550. fontSize: hzSize + 'px',
  551. fontFamily:
  552. pItem.config && pItem.config.fontFamily
  553. ? pItem.config.fontFamily
  554. : '',
  555. height: hzSize * 1.17 + 'px',
  556. display: 'inline-block',
  557. width: pItem.chs[wIndex].trim() === '' ? '10px' : ''
  558. }"
  559. >{{ pItem.chs[wIndex] }}</span
  560. >
  561. </template>
  562. </span>
  563. <template v-if="curQue.pyPosition == 'bottom'">
  564. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  565. <span
  566. v-if="config.isShowPY"
  567. class="NNPE-pinyin bottom"
  568. :class="[
  569. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  570. pItem.className ? pItem.className : '',
  571. bgIndex == 1 ? 'font-white' : ''
  572. ]"
  573. :style="{
  574. fontSize: pySize + 'px',
  575. height: pySize * 1.25 + 'px'
  576. }"
  577. >{{ pItem.pinyin }}</span
  578. >
  579. </template>
  580. </template>
  581. </template>
  582. </template>
  583. </template>
  584. <template v-else>
  585. <span
  586. :style="{
  587. height: pItem.height + 'px',
  588. width: pItem.width + 'px'
  589. }"
  590. ></span>
  591. </template>
  592. </template>
  593. </div>
  594. </div>
  595. <div style="clear: both; overflow: hidden"></div>
  596. <div
  597. v-if="
  598. enwords &&
  599. config.isShowEN &&
  600. (!curQue.enPosition ||
  601. (curQue.enPosition && curQue.enPosition == 'bottom'))
  602. "
  603. :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
  604. :style="{ fontSize: enSize + 'px' }"
  605. >
  606. {{ enwords }}
  607. </div>
  608. </div>
  609. <div
  610. class="vc-box-right"
  611. @mousemove="showPrevNext(true, 'isShowRight')"
  612. @mouseleave="showPrevNext(false, 'isShowRight')"
  613. >
  614. <div
  615. :class="[
  616. 'vc-left vc-right-grey',
  617. isShowRight && bgIndex == 0 ? 'vc-right-black' : '',
  618. isShowRight && bgIndex == 1 ? 'vc-right-white' : '',
  619. curSentIndex == sentList.length - 1 ? 'hidden' : ''
  620. ]"
  621. @click="nextSentence"
  622. ></div>
  623. </div>
  624. </div>
  625. <div
  626. class="voicefull-bottom"
  627. @mouseover="setBottomShow(true)"
  628. @mouseleave="setBottomShow(false)"
  629. >
  630. <div
  631. :class="[
  632. isBottomShow ? 'voicefull-bottom-show' : 'voicefull-bottom-hidden'
  633. ]"
  634. >
  635. <div
  636. :class="[
  637. 'bottom-left',
  638. TaskModel == 'ANSWER' ? 'bottom-left-margin' : ''
  639. ]"
  640. >
  641. <Soundrecorddiff
  642. ref="Soundrecorddiff"
  643. @handleWav="handleWav"
  644. @getWavblob="getWavblob"
  645. @handleParentPlay="handleParentPlay"
  646. @sentPause="sentPause"
  647. @getRerordStatus="getRerordStatus"
  648. @getMicrophoneStatus="getMicrophoneStatus"
  649. @getPlayStatus="getPlayStatus"
  650. :bgIndex="bgIndex"
  651. :TaskModel="TaskModel"
  652. :answerRecordList="
  653. curQue.Bookanswer.practiceModel[curSentIndex] &&
  654. curQue.Bookanswer.practiceModel[curSentIndex].recordList
  655. "
  656. :tmIndex="curSentIndex"
  657. :key="'Soundrecorddiff' + curSentIndex"
  658. />
  659. <div
  660. :class="['compare-box', bgIndex == 1 ? 'compare-box-white' : '']"
  661. v-if="isShowCompare"
  662. >
  663. <Audio-compare
  664. :bgIndex="bgIndex"
  665. type="full"
  666. :themeColor="themeColor"
  667. :index="curSentIndex"
  668. :sentIndex="curSentIndex"
  669. :url="curQue.mp3_list[0].id"
  670. :bg="bg"
  671. :ed="ed"
  672. :wavblob="wavblob"
  673. :getCurTime="getCurCompareTime"
  674. :sentPause="sentPause"
  675. :isRecord="isRecord"
  676. :handleChangeStopAudio="handleChangeStopAudio"
  677. :getPlayStatus="getPlayStatus"
  678. :key="'mp3Compare' + curSentIndex"
  679. />
  680. </div>
  681. </div>
  682. <div
  683. :class="[
  684. 'page-count',
  685. bgIndex == 0 ? 'page-count-white' : 'page-count-green'
  686. ]"
  687. >
  688. {{ curSentIndex + 1 }}/{{ sentList.length }}
  689. </div>
  690. </div>
  691. </div>
  692. <template v-if="isShow">
  693. <div
  694. ref="wordcard"
  695. class="NNPE-wordDetail"
  696. :style="{ left: left + 'px' }"
  697. >
  698. <Wordcard
  699. :word="word"
  700. :changeWordCard="changeWordCard"
  701. :themeColor="themeColor"
  702. :currentTreeID="currentTreeID"
  703. :mp3Url="wordPlayMp3"
  704. :bg="wordbgs"
  705. :ed="wordeds"
  706. />
  707. </div>
  708. </template>
  709. <div class="word-play-audio" v-if="isWordPlay">
  710. <AudioLineSentence
  711. :mp3="NpcNewWordMp3"
  712. :getCurTime="getCurWordTime"
  713. ref="audioLineWord"
  714. :audioId="'artPraAudioId' + curSentIndex + wordIndex"
  715. :stopAudio="stopAudio"
  716. :width="120"
  717. :hideSlider="false"
  718. :bg="wordbg"
  719. :ed="worded"
  720. :maxTime="wordMaxTime"
  721. :bgIndex="bgIndex"
  722. :isRepeat="isRepeat"
  723. :wordPlay="true"
  724. @changePlayStatus="changePlayStatus"
  725. />
  726. </div>
  727. </div>
  728. </template>
  729. <script>
  730. import AudioLineSentence from "./AudioLineSentence.vue";
  731. import Soundrecorddiff from "./Soundrecorddiff.vue";
  732. import AudioCompare from "./AudioCompare.vue";
  733. import Wordcard from "./components/Wordcard.vue";
  734. import { LearnWebSI } from "../../../api/ajax";
  735. export default {
  736. components: {
  737. AudioLineSentence,
  738. Soundrecorddiff,
  739. AudioCompare,
  740. Wordcard
  741. },
  742. props: [
  743. "sentList",
  744. "sentIndex",
  745. "mp3",
  746. "wordTimeList",
  747. "curQue",
  748. "noFont",
  749. "themeColor",
  750. "NNPENewWordList",
  751. "currentTreeID",
  752. "config",
  753. "TaskModel",
  754. "NpcNewWordMp3"
  755. ],
  756. data() {
  757. return {
  758. pySize: 32,
  759. hzSize: 48,
  760. enSize: 24,
  761. bgIndex: 1,
  762. maxTime: 0,
  763. item: null,
  764. bg: 0,
  765. ed: 0,
  766. isRepeat: false,
  767. NumberList: [
  768. "①",
  769. "②",
  770. "③",
  771. "④",
  772. "⑤",
  773. "⑥",
  774. "⑦",
  775. "⑧",
  776. "⑨",
  777. "⑩",
  778. "⑪",
  779. "⑫",
  780. "⑬",
  781. "⑭",
  782. "⑮",
  783. "⑯",
  784. "⑰",
  785. "⑱",
  786. "⑲",
  787. "⑳"
  788. ],
  789. chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、"],
  790. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  791. curTime: 0,
  792. wavblob: null,
  793. stopAudio: false,
  794. isRecord: false,
  795. isShowCompare: false,
  796. isShowRight: false,
  797. isShowLeft: false,
  798. curSentIndex: 0,
  799. oldHz: "",
  800. hz: "",
  801. clientY: 0,
  802. top: 0,
  803. left: 0,
  804. newWordList: [],
  805. pinyin: "",
  806. wordIndex: -1,
  807. isShow: false,
  808. wordbg: 0,
  809. worded: 0,
  810. wordbgs: 0,
  811. wordeds: 0,
  812. wordMaxTime: 0,
  813. isWordPlay: false,
  814. curWordTime: 0,
  815. isPlaying: false,
  816. isAuto: false,
  817. key: "isRepeat",
  818. isKeyboard: true,
  819. isTopShow: false,
  820. isBottomShow: false,
  821. isRecording: false,
  822. recordPlaying: false,
  823. isCollArr: [],
  824. enwords: "",
  825. screenHeight: 0,
  826. wordPlayMp3: ""
  827. };
  828. },
  829. computed: {
  830. // isPlaying: function () {
  831. // let playing = false;
  832. // if (this.$refs.audioLineSent) {
  833. // playing = this.$refs.audioLineSent.audio.isPlaying;
  834. // }
  835. // console.log(playing);
  836. // return playing;
  837. // },
  838. },
  839. watch: {
  840. isRecording: {
  841. handler: function(newVal, oldVal) {
  842. if (newVal) {
  843. this.isBottomShow = newVal;
  844. }
  845. },
  846. deep: true
  847. },
  848. recordPlaying: {
  849. handler: function(newVal, oldVal) {
  850. if (newVal) {
  851. this.isBottomShow = newVal;
  852. }
  853. },
  854. deep: true
  855. },
  856. sentIndex: {
  857. handler: function(newVal, oldVal) {
  858. this.curSentIndex = newVal;
  859. this.getSentence();
  860. },
  861. deep: true
  862. },
  863. hz: {
  864. handler: function(val, oldVal) {
  865. let _this = this;
  866. if (val) {
  867. _this.handleNewWords(val);
  868. }
  869. },
  870. // 深度观察监听
  871. deep: true
  872. },
  873. isShow: {
  874. handler: function(val, oldVal) {
  875. let _this = this;
  876. if (val) {
  877. setTimeout(() => {
  878. _this.cardHeight = _this.$refs.wordcard.offsetHeight;
  879. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  880. _this.top = _this.clientY + 20;
  881. } else {
  882. _this.top = _this.clientY - _this.cardHeight - 30;
  883. }
  884. }, 50);
  885. }
  886. },
  887. // 深度观察监听
  888. deep: true
  889. }
  890. },
  891. //方法集合
  892. methods: {
  893. setTopShow(bool) {
  894. this.isTopShow = bool;
  895. },
  896. setBottomShow(bool) {
  897. if (!this.recordPlaying && !this.isRecording) {
  898. this.isBottomShow = bool;
  899. }
  900. },
  901. getPlayStatus(bool) {
  902. this.recordPlaying = bool;
  903. },
  904. setFontSize(type) {
  905. let _this = this;
  906. if (type == "-") {
  907. if (_this.hzSize >= 34) {
  908. this.hzSize = this.hzSize - 4;
  909. }
  910. }
  911. if (type == "+") {
  912. if (_this.hzSize <= 76) {
  913. this.hzSize = this.hzSize + 4;
  914. }
  915. }
  916. _this.pySize = parseInt(_this.hzSize / 1.5);
  917. _this.enSize = parseInt(_this.hzSize / 2);
  918. },
  919. playChange(bool) {
  920. this.isPlaying = bool;
  921. },
  922. handleColl() {
  923. let _this = this;
  924. if (_this.isCollArr[_this.curSentIndex]) {
  925. _this.cancleColl();
  926. } else {
  927. _this.addColl();
  928. }
  929. },
  930. //添加收藏
  931. addColl() {
  932. let Bookdetail = sessionStorage.getItem("Bookdetail");
  933. if (Bookdetail) {
  934. Bookdetail = JSON.parse(Bookdetail);
  935. let MethodName = "order-collection_manager-AddMyCollection";
  936. let text = "";
  937. this.item.forEach(item => {
  938. if (item.chs != "#") {
  939. text += item.chs;
  940. }
  941. });
  942. let sentence_json = {
  943. item: JSON.stringify(this.item),
  944. bg: this.bg,
  945. ed: this.ed,
  946. mp3: this.mp3,
  947. pyPosition: this.curQue.pyPosition
  948. };
  949. let data = {
  950. goods_id: this.currentTreeID,
  951. goods_type: 502,
  952. goods_name: Bookdetail.name,
  953. goods_person_name_desc: Bookdetail.author ? Bookdetail.author : "",
  954. goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
  955. goods_price: Bookdetail.price,
  956. sentence: {
  957. sentence_text: text,
  958. sentence_json: JSON.stringify(sentence_json)
  959. }
  960. };
  961. LearnWebSI(MethodName, data).then(res => {
  962. this.$set(this.isCollArr, this.curSentIndex, true);
  963. this.$message.success("收藏成功!");
  964. });
  965. } else {
  966. this.$message.warning("权限不足!");
  967. }
  968. },
  969. //取消收藏
  970. cancleColl() {
  971. let text = "";
  972. this.item.forEach(item => {
  973. if (item.chs != "#") {
  974. text += item.chs;
  975. }
  976. });
  977. let MethodName = "order-collection_manager-CancelMyGoodsCollection_WS";
  978. let data = {
  979. goods_type: 502,
  980. goods_list: [
  981. {
  982. goods_id: this.currentTreeID, //课件的id
  983. sentence_text: text
  984. }
  985. ]
  986. };
  987. LearnWebSI(MethodName, data).then(res => {
  988. this.$set(this.isCollArr, this.curSentIndex, false);
  989. this.$message.success("取消成功!");
  990. });
  991. },
  992. //检查收藏状态
  993. checkCollStatus() {
  994. let text = "";
  995. this.item.forEach(item => {
  996. if (item.chs != "#") {
  997. text += item.chs;
  998. }
  999. });
  1000. let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
  1001. let data = {
  1002. goods_type: 502,
  1003. goods_id: this.currentTreeID, //课件的id
  1004. sentence_text: text
  1005. };
  1006. LearnWebSI(MethodName, data).then(res => {
  1007. let collFlag = res.is_collection == "true" ? true : false;
  1008. this.$set(this.isCollArr, this.curSentIndex, collFlag);
  1009. });
  1010. },
  1011. showPrevNext(bool, key) {
  1012. this[key] = bool;
  1013. },
  1014. prevSentence() {
  1015. let _this = this;
  1016. if (_this.curSentIndex == 0) {
  1017. // _this.$message.warning("已经是第一个句子了");
  1018. return;
  1019. }
  1020. _this.curSentIndex = _this.curSentIndex - 1;
  1021. _this.getSentence();
  1022. if (_this.isAuto) {
  1023. _this.curTime = _this.bg;
  1024. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1025. }
  1026. },
  1027. nextSentence() {
  1028. if (this.curSentIndex == this.sentList.length - 1) {
  1029. // this.$message.warning("已经是最后一个句子了");
  1030. return;
  1031. }
  1032. this.curSentIndex = this.curSentIndex + 1;
  1033. this.getSentence();
  1034. },
  1035. rollSentence() {
  1036. if (this.curSentIndex == this.sentList.length - 1) {
  1037. this.curSentIndex = 0;
  1038. } else {
  1039. this.curSentIndex = this.curSentIndex + 1;
  1040. }
  1041. this.getSentence();
  1042. },
  1043. changeStatus(key) {
  1044. if (key == "config.isShowEN") {
  1045. if (this.enwords) {
  1046. this[key] = !this[key];
  1047. }
  1048. } else {
  1049. this[key] = !this[key];
  1050. }
  1051. },
  1052. changePinyin() {
  1053. this.$emit("changePinyin");
  1054. },
  1055. changeEN() {
  1056. this.$emit("changeEN");
  1057. },
  1058. setStatus() {
  1059. let _this = this;
  1060. if (_this.key == "isRepeat") {
  1061. if (_this.isRepeat) {
  1062. _this.isRepeat = false;
  1063. _this.isAuto = true;
  1064. _this.key = "isAuto";
  1065. } else {
  1066. _this.isRepeat = true;
  1067. _this.key = "isRepeat";
  1068. }
  1069. } else if (_this.key == "isAuto") {
  1070. if (_this.isAuto) {
  1071. _this.isRepeat = false;
  1072. _this.isAuto = false;
  1073. _this.key = "isRepeat";
  1074. }
  1075. }
  1076. },
  1077. getRerordStatus(bool) {
  1078. this.isShowCompare = bool;
  1079. },
  1080. getMicrophoneStatus(bool) {
  1081. this.isRecording = bool;
  1082. },
  1083. getWavblob(wavblob) {
  1084. this.wavblob = wavblob;
  1085. },
  1086. sentPause(isRecord) {
  1087. this.isRecord = isRecord;
  1088. },
  1089. getCurTime(curTime) {
  1090. let _this = this;
  1091. if (_this.isRepeat) {
  1092. let time = curTime * 1000;
  1093. if (time > _this.ed || time < _this.bg) {
  1094. _this.curTime = _this.bg;
  1095. this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1096. } else {
  1097. _this.curTime = curTime * 1000;
  1098. }
  1099. } else if (_this.isAuto) {
  1100. let time = curTime * 1000;
  1101. if (time > _this.ed) {
  1102. _this.rollSentence();
  1103. _this.curTime = _this.bg;
  1104. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1105. } else {
  1106. _this.curTime = curTime * 1000;
  1107. }
  1108. } else {
  1109. _this.curTime = curTime * 1000;
  1110. }
  1111. },
  1112. getCurCompareTime(curTime) {
  1113. let _this = this;
  1114. _this.curTime = curTime * 1000;
  1115. },
  1116. getCurWordTime(curTime) {
  1117. let _this = this;
  1118. _this.curWordTime = curTime * 1000;
  1119. },
  1120. changeBg(bgIndex) {
  1121. this.bgIndex = bgIndex;
  1122. },
  1123. getSentence() {
  1124. let _this = this;
  1125. _this.isShowCompare =
  1126. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex] &&
  1127. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList &&
  1128. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList
  1129. .length > 0;
  1130. _this.pauseAudio();
  1131. _this.isPlaying = false;
  1132. let item = JSON.parse(JSON.stringify(_this.sentList[_this.curSentIndex]));
  1133. if (item.sentArr) {
  1134. _this.item = item.sentArr;
  1135. _this.enwords = item.enwords;
  1136. } else {
  1137. _this.item = item;
  1138. }
  1139. _this.sentList.forEach(item => {
  1140. this.isCollArr.push(false);
  1141. });
  1142. _this.bg =
  1143. _this.curQue.wordTime && _this.curQue.wordTime[_this.curSentIndex]
  1144. ? _this.curQue.wordTime[_this.curSentIndex].bg
  1145. : 0;
  1146. _this.ed =
  1147. _this.curQue.wordTime && _this.curQue.wordTime[_this.curSentIndex]
  1148. ? _this.curQue.wordTime[_this.curSentIndex].ed
  1149. : 0;
  1150. let maxTime = (_this.ed - _this.bg) / 1000;
  1151. if (maxTime < 1) {
  1152. _this.maxTime = 1;
  1153. } else {
  1154. _this.maxTime = maxTime;
  1155. }
  1156. _this.checkCollStatus();
  1157. },
  1158. pauseAudio() {
  1159. let audio = document.getElementsByTagName("audio");
  1160. if (
  1161. audio &&
  1162. audio.length > 0 &&
  1163. window.location.href.indexOf("GCLS-Learn") == -1
  1164. ) {
  1165. audio.forEach(item => {
  1166. item.pause();
  1167. });
  1168. }
  1169. },
  1170. exitFullScreen() {
  1171. this.pauseAudio();
  1172. this.$emit("exitFullscreen");
  1173. },
  1174. changeFullScreen() {
  1175. this.pauseAudio();
  1176. this.$emit("changeIsFull");
  1177. },
  1178. handleWav(list, tmIndex) {
  1179. tmIndex = tmIndex ? tmIndex : 0;
  1180. this.$emit("handleWav", list, tmIndex);
  1181. },
  1182. // 录音时暂停音频播放
  1183. handleParentPlay() {
  1184. this.stopAudio = true;
  1185. },
  1186. // 音频播放时改变布尔值
  1187. handleChangeStopAudio() {
  1188. this.stopAudio = false;
  1189. },
  1190. //播放音频
  1191. // playWord(item) {
  1192. // let _this = this;
  1193. // if (this.newWordList.indexOf(item.chs) > -1 || item.words) {
  1194. // _this.pauseAudio();
  1195. // _this.isWordPlay = false;
  1196. // _this.wordIndex = item.wordIndex;
  1197. // setTimeout(() => {
  1198. // let leg = item.timeList.length;
  1199. // _this.wordbg = item.timeList[0].wordBg;
  1200. // _this.worded = item.timeList[leg - 1].wordEd;
  1201. // let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
  1202. // if (wordMaxTime < 1) {
  1203. // _this.wordMaxTime = 1;
  1204. // } else {
  1205. // _this.wordMaxTime = wordMaxTime;
  1206. // }
  1207. // _this.isWordPlay = true;
  1208. // }, 50);
  1209. // }
  1210. // },
  1211. playWord(item) {
  1212. let _this = this;
  1213. if (this.newWordList.indexOf(item.chs) > -1 || item.words) {
  1214. _this.pauseAudio();
  1215. _this.isWordPlay = false;
  1216. let new_word = item.words ? item.words : item.chs;
  1217. _this.NNPENewWordList.forEach(items => {
  1218. items.forEach(itemn => {
  1219. if (itemn.new_word === new_word) {
  1220. _this.wordbg = itemn.bg;
  1221. _this.worded = itemn.ed;
  1222. }
  1223. });
  1224. });
  1225. setTimeout(() => {
  1226. _this.isWordPlay = true;
  1227. }, 50);
  1228. }
  1229. },
  1230. changePlayStatus() {
  1231. this.isWordPlay = false;
  1232. this.wordIndex = -1;
  1233. },
  1234. showWordDetail(e, item) {
  1235. let _this = this;
  1236. if (_this.TaskModel == "ANSWER") {
  1237. return;
  1238. }
  1239. if (
  1240. _this.chsFhList.indexOf(item.chs) > -1 ||
  1241. /^[a-zA-Z0-9]/.test(item.chs)
  1242. ) {
  1243. return;
  1244. }
  1245. if (_this.oldHz != item.chs) {
  1246. this.isShow = false;
  1247. setTimeout(() => {
  1248. _this.hz = item.words ? item.words : item.chs;
  1249. _this.pinyin = item.pinyin;
  1250. _this.wordIndex = item.wordIndex;
  1251. }, 50);
  1252. }
  1253. _this.clientY = e.clientY;
  1254. let new_word = item.words ? item.words : item.chs;
  1255. _this.wordPlayMp3 = "";
  1256. _this.NNPENewWordList.forEach(items => {
  1257. items.forEach(itemn => {
  1258. if (itemn.new_word === new_word) {
  1259. _this.wordbgs = itemn.bg;
  1260. _this.wordeds = itemn.ed;
  1261. _this.wordPlayMp3 = _this.NpcNewWordMp3;
  1262. }
  1263. });
  1264. });
  1265. let left = e.clientX;
  1266. let width = 0;
  1267. if (item.chs.length == 1 || item.chs.length == 2) {
  1268. width = 304;
  1269. } else if (item.chs.length == 3 || item.chs.length == 4) {
  1270. width = 432;
  1271. } else if (item.chs.length > 3) {
  1272. width = 560;
  1273. }
  1274. // if (left - this.bodyLeft > this.contentWidth / 2) {
  1275. // _this.left = left - width + 10;
  1276. // } else {
  1277. _this.left = left - width / 2;
  1278. //}
  1279. },
  1280. changeWordCard(isShow) {
  1281. let _this = this;
  1282. _this.isShow = isShow;
  1283. _this.oldHz = "";
  1284. _this.hz = "";
  1285. _this.wordIndex = -1;
  1286. },
  1287. // 处理分词数据
  1288. handleNewWords(val) {
  1289. let _this = this;
  1290. _this.isShow = true;
  1291. _this.word = null;
  1292. if (_this.newWordList.indexOf(val) > -1) {
  1293. for (let i = 0; i < this.NNPENewWordList.length; i++) {
  1294. let pItem = this.NNPENewWordList[i];
  1295. for (let j = 0; j < pItem.length; j++) {
  1296. let item = pItem[j];
  1297. if (item.new_word.trim() == val.trim()) {
  1298. let wordlist = val.split("");
  1299. this.word = { list: wordlist, detail: item };
  1300. break;
  1301. }
  1302. }
  1303. }
  1304. } else {
  1305. let wordlist = val.split("");
  1306. let option = {
  1307. definition_list: [],
  1308. mp3_list: [],
  1309. new_word: val,
  1310. pinyin: _this.pinyin
  1311. };
  1312. _this.word = { list: wordlist, detail: option };
  1313. }
  1314. _this.oldHz = val;
  1315. },
  1316. handleNewword() {
  1317. let NewWordList = [];
  1318. this.NNPENewWordList.forEach(item => {
  1319. item.forEach(wItem => {
  1320. NewWordList.push(wItem.new_word);
  1321. });
  1322. });
  1323. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  1324. },
  1325. getScreenHeight() {
  1326. this.screenHeight = window.innerHeight;
  1327. }
  1328. },
  1329. //生命周期 - 创建完成(可以访问当前this实例)
  1330. created() {},
  1331. //生命周期 - 挂载完成(可以访问DOM元素)
  1332. mounted() {
  1333. let _this = this;
  1334. $(window).resize(() => {
  1335. _this.getScreenHeight();
  1336. });
  1337. _this.getScreenHeight();
  1338. document.addEventListener("keyup", function(e) {
  1339. if (_this.isKeyboard) {
  1340. if (e.keyCode == 32) {
  1341. //空格
  1342. _this.$nextTick(() => {
  1343. if (_this.$refs.audioLineSent) {
  1344. _this.$refs.audioLineSent.PlayAudio();
  1345. }
  1346. });
  1347. } else if (e.keyCode == 38) {
  1348. _this.prevSentence();
  1349. } else if (e.keyCode == 40) {
  1350. _this.nextSentence();
  1351. } else if (e.keyCode == 13) {
  1352. _this.$nextTick(() => {
  1353. _this.$refs.Soundrecorddiff.microphone();
  1354. });
  1355. }
  1356. }
  1357. });
  1358. if (_this.NNPENewWordList) {
  1359. _this.handleNewword();
  1360. }
  1361. _this.curSentIndex = _this.sentIndex;
  1362. _this.getSentence();
  1363. document.addEventListener("fullscreenchange", () => {
  1364. let isFullscreen =
  1365. document.fullscreenElement ||
  1366. document.mozFullScreenElement ||
  1367. document.webkitFullscreenElement ||
  1368. document.fullScreen ||
  1369. document.mozFullScreen ||
  1370. document.webkitIsFullScreen;
  1371. if (!isFullscreen) {
  1372. _this.changeFullScreen();
  1373. }
  1374. });
  1375. document.addEventListener("mozfullscreenchange", () => {
  1376. let isFullscreen =
  1377. document.fullscreenElement ||
  1378. document.mozFullScreenElement ||
  1379. document.webkitFullscreenElement ||
  1380. document.fullScreen ||
  1381. document.mozFullScreen ||
  1382. document.webkitIsFullScreen;
  1383. if (!isFullscreen) {
  1384. _this.changeFullScreen();
  1385. }
  1386. });
  1387. document.addEventListener("webkitfullscreenchange", () => {
  1388. let isFullscreen =
  1389. document.fullscreenElement ||
  1390. document.mozFullScreenElement ||
  1391. document.webkitFullscreenElement ||
  1392. document.fullScreen ||
  1393. document.mozFullScreen ||
  1394. document.webkitIsFullScreen;
  1395. if (!isFullscreen) {
  1396. _this.changeFullScreen();
  1397. }
  1398. });
  1399. document.addEventListener("msfullscreenchange", () => {
  1400. let isFullscreen =
  1401. document.fullscreenElement ||
  1402. document.mozFullScreenElement ||
  1403. document.webkitFullscreenElement ||
  1404. document.fullScreen ||
  1405. document.mozFullScreen ||
  1406. document.webkitIsFullScreen;
  1407. if (!isFullscreen) {
  1408. _this.changeFullScreen();
  1409. }
  1410. });
  1411. },
  1412. beforeCreate() {}, //生命周期 - 创建之前
  1413. beforeMount() {}, //生命周期 - 挂载之前
  1414. beforeUpdate() {}, //生命周期 - 更新之前
  1415. updated() {}, //生命周期 - 更新之后
  1416. beforeDestroy() {}, //生命周期 - 销毁之前
  1417. destroyed() {}, //生命周期 - 销毁完成
  1418. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  1419. };
  1420. </script>
  1421. <style lang="scss" scoped>
  1422. //@import url(); 引入公共css类
  1423. .voicefull {
  1424. width: 100%;
  1425. height: 100vh;
  1426. overflow: hidden;
  1427. display: flex;
  1428. flex-direction: column;
  1429. .NNPE-wordDetail {
  1430. position: fixed;
  1431. z-index: 9999;
  1432. top: 50%;
  1433. margin-top: -196px;
  1434. }
  1435. &.bg1 {
  1436. background: #fff;
  1437. }
  1438. &.bg2 {
  1439. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1440. .newActive {
  1441. color: #ffc600 !important;
  1442. }
  1443. }
  1444. &-top {
  1445. height: 136px;
  1446. width: 100%;
  1447. box-sizing: border-box;
  1448. padding: 0 40px;
  1449. .voicefull-top-hidden {
  1450. width: 100%;
  1451. height: 136px;
  1452. visibility: hidden;
  1453. display: flex;
  1454. justify-content: space-between;
  1455. align-items: center;
  1456. }
  1457. .voicefull-top-show {
  1458. width: 100%;
  1459. height: 136px;
  1460. visibility: visible;
  1461. display: flex;
  1462. justify-content: space-between;
  1463. align-items: center;
  1464. }
  1465. .top-left {
  1466. display: flex;
  1467. justify-content: flex-start;
  1468. align-items: center;
  1469. }
  1470. .select-bg {
  1471. display: flex;
  1472. justify-content: space-between;
  1473. align-items: center;
  1474. width: 96px;
  1475. height: 56px;
  1476. border: 1px solid rgba(0, 0, 0, 0.1);
  1477. border-radius: 40px;
  1478. display: flex;
  1479. justify-content: center;
  1480. align-items: center;
  1481. box-sizing: border-box;
  1482. margin-right: 32px;
  1483. &.select-bg-blue {
  1484. background: rgba(255, 255, 255, 0.1);
  1485. border: 1px solid rgba(0, 0, 0, 0.1);
  1486. }
  1487. > div {
  1488. width: 36px;
  1489. height: 36px;
  1490. border-radius: 100%;
  1491. display: flex;
  1492. justify-content: center;
  1493. align-items: center;
  1494. &.bg-white-box {
  1495. background: 0 0;
  1496. margin-right: 4px;
  1497. &.active {
  1498. background: #de4444;
  1499. }
  1500. }
  1501. &.bg-green-box {
  1502. background: #fff;
  1503. &.active {
  1504. background: #ffc600;
  1505. }
  1506. }
  1507. > span {
  1508. width: 24px;
  1509. height: 24px;
  1510. border-radius: 100%;
  1511. box-sizing: border-box;
  1512. cursor: pointer;
  1513. &.bg-white {
  1514. background: #fff;
  1515. }
  1516. &.bg-green {
  1517. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1518. }
  1519. }
  1520. }
  1521. }
  1522. .set-fontSize {
  1523. padding: 0 20px;
  1524. height: 56px;
  1525. background: #ffffff;
  1526. border: 1px solid rgba(0, 0, 0, 0.1);
  1527. border-radius: 40px;
  1528. display: flex;
  1529. justify-content: center;
  1530. align-items: center;
  1531. &-green {
  1532. background: rgba(255, 255, 255, 0.1);
  1533. border: 1px solid rgba(0, 0, 0, 0.1);
  1534. }
  1535. > span {
  1536. width: 24px;
  1537. height: 24px;
  1538. margin: 0 4px;
  1539. &.font-jian {
  1540. &-black {
  1541. background: url("../../../assets/NPC/jian-black.png") no-repeat left
  1542. top;
  1543. background-size: 100% 100%;
  1544. cursor: pointer;
  1545. }
  1546. &-yellow {
  1547. background: url("../../../assets/NPC/jian-white.png") no-repeat left
  1548. top;
  1549. background-size: 100% 100%;
  1550. cursor: pointer;
  1551. }
  1552. &-white-disabled {
  1553. background: url("../../../assets/NPC/jian-white-disabled.png")
  1554. no-repeat left top;
  1555. background-size: 100% 100%;
  1556. cursor: pointer;
  1557. }
  1558. &-yellow-disabled {
  1559. background: url("../../../assets/NPC/jian-yellow-disabled.png")
  1560. no-repeat left top;
  1561. background-size: 100% 100%;
  1562. cursor: pointer;
  1563. }
  1564. }
  1565. &.font-img {
  1566. &-black {
  1567. background: url("../../../assets/NPC/fontSize-black.png") no-repeat
  1568. left top;
  1569. background-size: 100% 100%;
  1570. }
  1571. &-yellow {
  1572. background: url("../../../assets/NPC/fontSize-white.png") no-repeat
  1573. left top;
  1574. background-size: 100% 100%;
  1575. }
  1576. }
  1577. &.font-jia {
  1578. &-black {
  1579. background: url("../../../assets/NPC/jia-black.png") no-repeat left
  1580. top;
  1581. background-size: 100% 100%;
  1582. cursor: pointer;
  1583. }
  1584. &-yellow {
  1585. background: url("../../../assets/NPC/jia-white.png") no-repeat left
  1586. top;
  1587. background-size: 100% 100%;
  1588. cursor: pointer;
  1589. }
  1590. &-white-disabled {
  1591. background: url("../../../assets/NPC/jia-white-disabled.png")
  1592. no-repeat left top;
  1593. background-size: 100% 100%;
  1594. cursor: pointer;
  1595. }
  1596. &-yellow-disabled {
  1597. background: url("../../../assets/NPC/jia-yellow-disabled.png")
  1598. no-repeat left top;
  1599. background-size: 100% 100%;
  1600. cursor: pointer;
  1601. }
  1602. }
  1603. }
  1604. }
  1605. .top-middle {
  1606. display: flex;
  1607. justify-content: center;
  1608. align-items: center;
  1609. .audio-box {
  1610. width: 56px;
  1611. height: 56px;
  1612. background: #ffffff;
  1613. border: 1px solid rgba(0, 0, 0, 0.1);
  1614. border-radius: 40px;
  1615. display: flex;
  1616. justify-content: center;
  1617. align-items: center;
  1618. &-green {
  1619. background: rgba(255, 255, 255, 0.1);
  1620. border: 1px solid rgba(0, 0, 0, 0.1);
  1621. }
  1622. }
  1623. }
  1624. }
  1625. .op-btn {
  1626. width: 56px;
  1627. height: 56px;
  1628. border-radius: 100%;
  1629. display: flex;
  1630. justify-content: center;
  1631. align-items: center;
  1632. cursor: pointer;
  1633. margin-left: 32px;
  1634. background: #ffffff;
  1635. border: 1px solid rgba(0, 0, 0, 0.1);
  1636. box-sizing: border-box;
  1637. &-green {
  1638. background: rgba(255, 255, 255, 0.1);
  1639. border: 1px solid rgba(0, 0, 0, 0.1);
  1640. }
  1641. &.close-btn {
  1642. background: #274533;
  1643. border: 1px solid rgba(0, 0, 0, 0.1);
  1644. }
  1645. > span {
  1646. width: 24px;
  1647. height: 24px;
  1648. &.close-icon {
  1649. background: url("../../../assets/icon/cross-24-normal-black.png")
  1650. no-repeat left top;
  1651. background-size: 100% 100%;
  1652. &-white {
  1653. background: url("../../../assets/icon/cross-24-normal-white.png")
  1654. no-repeat left top;
  1655. background-size: 100% 100%;
  1656. }
  1657. }
  1658. }
  1659. }
  1660. .repeat-icon {
  1661. background: url("../../../assets/icon/Repeat-24-normal-red.png") no-repeat
  1662. left top;
  1663. background-size: 100% 100%;
  1664. &.disabled {
  1665. background: url("../../../assets/icon/Repeat-24-disable-Black.png")
  1666. no-repeat left top;
  1667. background-size: 100% 100%;
  1668. }
  1669. &-yellow {
  1670. background: url("../../../assets/icon/Repeat-24-normal-yellow.png")
  1671. no-repeat left top;
  1672. background-size: 100% 100%;
  1673. }
  1674. &.auto-icon {
  1675. background: url("../../../assets/icon/Auto-24-next-red.png") no-repeat
  1676. left top;
  1677. background-size: 100% 100%;
  1678. &-yellow {
  1679. background: url("../../../assets/icon/Auto-24-next-yellow.png")
  1680. no-repeat left top;
  1681. background-size: 100% 100%;
  1682. }
  1683. }
  1684. }
  1685. .pinyin-icon {
  1686. background: url("../../../assets/icon/pinyin-24-normal-red.png") no-repeat
  1687. left top;
  1688. background-size: 100% 100%;
  1689. &.disabled {
  1690. background: url("../../../assets/icon/pinyin-24-disable-Black.png")
  1691. no-repeat left top;
  1692. background-size: 100% 100%;
  1693. }
  1694. &-yellow {
  1695. background: url("../../../assets/icon/pinyin-24-normal-yellow.png")
  1696. no-repeat left top;
  1697. background-size: 100% 100%;
  1698. }
  1699. }
  1700. .en-icon {
  1701. background: url("../../../assets/icon/EN-24-normal-Red.png") no-repeat left
  1702. top;
  1703. background-size: 100% 100%;
  1704. &.disabled {
  1705. background: url("../../../assets/icon/EN-24-disable-Black.png") no-repeat
  1706. left top;
  1707. background-size: 100% 100%;
  1708. }
  1709. &-yellow {
  1710. background: url("../../../assets/icon/EN-24-normal-yellow.png") no-repeat
  1711. left top;
  1712. background-size: 100% 100%;
  1713. }
  1714. }
  1715. .coll-icon {
  1716. background: url("../../../assets/icon/bookmarkfill-24-normal-red.png")
  1717. no-repeat left top;
  1718. background-size: 100% 100%;
  1719. &.disabled {
  1720. background: url("../../../assets/icon/bookmarkfill-24-disable-Black.png")
  1721. no-repeat left top;
  1722. background-size: 100% 100%;
  1723. }
  1724. &-yellow {
  1725. background: url("../../../assets/icon/bookmarkfill-24-normal-yellow.png")
  1726. no-repeat left top;
  1727. background-size: 100% 100%;
  1728. }
  1729. }
  1730. .keyboard-icon {
  1731. background: url("../../../assets/icon/enter-24-keyboard-red.png") no-repeat
  1732. left top;
  1733. background-size: 100% 100%;
  1734. &.disabled {
  1735. background: url("../../../assets/icon/enter-24-keyboard-disable-Black.png")
  1736. no-repeat left top;
  1737. background-size: 100% 100%;
  1738. }
  1739. &-yellow {
  1740. background: url("../../../assets/icon/enter-24-keyboard-yellow.png")
  1741. no-repeat left top;
  1742. background-size: 100% 100%;
  1743. }
  1744. }
  1745. &-content {
  1746. flex: 1;
  1747. width: 100%;
  1748. box-sizing: border-box;
  1749. display: flex;
  1750. align-items: center;
  1751. .vc-box {
  1752. padding: 0 8px 0 36px;
  1753. &-right {
  1754. padding: 0 36px 0 8px;
  1755. }
  1756. }
  1757. .vc-left {
  1758. width: 64px;
  1759. height: 64px;
  1760. cursor: pointer;
  1761. &-grey {
  1762. background: url("../../../assets/NPC/left-grey.png") no-repeat left top;
  1763. background-size: 100% 100%;
  1764. }
  1765. &-black {
  1766. background: url("../../../assets/NPC/left-black.png") no-repeat left top;
  1767. background-size: 100% 100%;
  1768. }
  1769. &-white {
  1770. background: url("../../../assets/NPC/left-white.png") no-repeat left top;
  1771. background-size: 100% 100%;
  1772. }
  1773. &.hidden {
  1774. visibility: hidden;
  1775. }
  1776. }
  1777. .vc-right {
  1778. width: 64px;
  1779. height: 64px;
  1780. cursor: pointer;
  1781. &-grey {
  1782. background: url("../../../assets/NPC/right-grey.png") no-repeat left top;
  1783. background-size: 100% 100%;
  1784. }
  1785. &-black {
  1786. background: url("../../../assets/NPC/right-black.png") no-repeat left
  1787. top;
  1788. background-size: 100% 100%;
  1789. }
  1790. &-white {
  1791. background: url("../../../assets/NPC/right-white.png") no-repeat left
  1792. top;
  1793. background-size: 100% 100%;
  1794. }
  1795. }
  1796. .vc-main {
  1797. width: fit-content;
  1798. margin: 0 auto;
  1799. padding: 0 67px;
  1800. .enwords {
  1801. padding: 0 3px;
  1802. margin-top: 24px;
  1803. color: rgba(0, 0, 0, 0.45);
  1804. font-size: 24px;
  1805. line-height: 32px;
  1806. font-family: Helvetica;
  1807. word-break: break-word;
  1808. &-green {
  1809. color: rgba(255, 255, 255, 0.65);
  1810. }
  1811. }
  1812. }
  1813. .NNPE-words {
  1814. float: left;
  1815. user-select: none;
  1816. -webkit-user-select: none;
  1817. -moz-user-select: none;
  1818. -ms-user-select: none;
  1819. &-box {
  1820. float: left;
  1821. > span {
  1822. display: block;
  1823. &.NNPE-pinyin {
  1824. font-family: "GB-PINYINOK-B";
  1825. font-weight: normal;
  1826. font-size: 32px;
  1827. line-height: 1.25;
  1828. box-sizing: border-box;
  1829. color: rgba(0, 0, 0, 0.85);
  1830. &.bottom {
  1831. padding-bottom: 16px;
  1832. }
  1833. &.noFont {
  1834. font-family: initial;
  1835. }
  1836. &.textLeft {
  1837. text-align: left;
  1838. }
  1839. &.font-white {
  1840. color: #fff;
  1841. }
  1842. &.wordBlank {
  1843. color: rgba(0, 0, 0, 0.85);
  1844. }
  1845. }
  1846. &.NNPE-chs {
  1847. font-family: "FZJCGFKTK";
  1848. font-size: 48px;
  1849. line-height: 1.17;
  1850. color: rgba(0, 0, 0, 0.85);
  1851. display: flex;
  1852. flex-flow: wrap; // 兼容不是汉字的内容
  1853. &.bottom {
  1854. padding-bottom: 16px;
  1855. }
  1856. .font-white {
  1857. color: #fff;
  1858. }
  1859. .active {
  1860. color: #de4444;
  1861. &-yellow {
  1862. color: #ffc600;
  1863. }
  1864. }
  1865. .wordActive {
  1866. color: #de4444;
  1867. }
  1868. .wordActive-blue {
  1869. color: #ffc600;
  1870. }
  1871. .newActive {
  1872. color: #de4444;
  1873. }
  1874. }
  1875. // &.padding {
  1876. // padding-right: 6px;
  1877. // }
  1878. }
  1879. }
  1880. &.textLeft {
  1881. text-align: left;
  1882. }
  1883. &.textCenter {
  1884. text-align: center;
  1885. }
  1886. &.textRight {
  1887. text-align: right;
  1888. }
  1889. > span {
  1890. display: block;
  1891. &.NNPE-pinyin {
  1892. font-family: "GB-PINYINOK-B";
  1893. font-weight: normal;
  1894. font-size: 32px;
  1895. line-height: 1.25;
  1896. box-sizing: border-box;
  1897. color: rgba(0, 0, 0, 0.85);
  1898. &.bottom {
  1899. padding-bottom: 16px;
  1900. }
  1901. &.font-white {
  1902. color: #fff;
  1903. }
  1904. &.noFont {
  1905. font-family: initial;
  1906. }
  1907. &.textLeft {
  1908. text-align: left;
  1909. }
  1910. &.wordBlank {
  1911. color: rgba(0, 0, 0, 0.85);
  1912. }
  1913. }
  1914. &.NNPE-chs {
  1915. font-family: "FZJCGFKTK";
  1916. font-size: 48px;
  1917. line-height: 1.17;
  1918. color: rgba(0, 0, 0, 0.85);
  1919. display: flex;
  1920. flex-flow: wrap; // 兼容不是汉字的内容
  1921. &.bottom {
  1922. padding-bottom: 16px;
  1923. }
  1924. .font-white {
  1925. color: #fff;
  1926. }
  1927. .active {
  1928. color: #de4444;
  1929. &-yellow {
  1930. color: #ffc600;
  1931. }
  1932. }
  1933. .wordActive {
  1934. color: #de4444;
  1935. }
  1936. .wordActive-blue {
  1937. color: #ffc600;
  1938. }
  1939. .newActive {
  1940. color: #de4444;
  1941. }
  1942. }
  1943. &.padding {
  1944. padding-left: 3px;
  1945. padding-right: 3px;
  1946. }
  1947. }
  1948. }
  1949. }
  1950. &-bottom {
  1951. height: 136px;
  1952. width: 100%;
  1953. box-sizing: border-box;
  1954. display: flex;
  1955. justify-content: space-between;
  1956. align-items: center;
  1957. padding-right: 40px;
  1958. .voicefull-bottom-show {
  1959. height: 136px;
  1960. width: 100%;
  1961. display: flex;
  1962. justify-content: space-between;
  1963. align-items: center;
  1964. visibility: visible;
  1965. }
  1966. .voicefull-bottom-hidden {
  1967. height: 136px;
  1968. width: 100%;
  1969. display: flex;
  1970. justify-content: space-between;
  1971. align-items: center;
  1972. visibility: hidden;
  1973. }
  1974. .bottom-left {
  1975. display: flex;
  1976. justify-content: flex-start;
  1977. align-items: center;
  1978. &-margin {
  1979. margin-left: 40px;
  1980. }
  1981. .compare-box {
  1982. height: 56px;
  1983. padding: 16px 16px;
  1984. box-sizing: border-box;
  1985. border: 1px solid rgba(0, 0, 0, 0.1);
  1986. border-radius: 0 40px 40px 0;
  1987. border-left: 0px solid rgba(0, 0, 0, 0.1);
  1988. &-white {
  1989. background: rgba(255, 255, 255, 0.1);
  1990. border: 1px solid rgba(0, 0, 0, 0.1);
  1991. border-left: 0;
  1992. }
  1993. &-answer {
  1994. border-radius: 40px;
  1995. }
  1996. }
  1997. }
  1998. .page-count {
  1999. padding: 8px;
  2000. font-size: 16px;
  2001. line-height: 24px;
  2002. font-family: "robot";
  2003. color: #000000;
  2004. min-width: 60px;
  2005. box-sizing: border-box;
  2006. border-radius: 8px;
  2007. background: #fff;
  2008. text-align: center;
  2009. &-green {
  2010. color: #ffffff;
  2011. background: rgba(255, 255, 255, 0.2);
  2012. }
  2013. }
  2014. }
  2015. }
  2016. .word-play-audio {
  2017. position: absolute;
  2018. left: -1000px;
  2019. }
  2020. </style>
  2021. <style lang="scss">
  2022. .NPC-Big-Book-preview-green {
  2023. .bg1 {
  2024. .repeat-icon {
  2025. background: url("../../../assets/icon/Repeat-24-normal-Green.png")
  2026. no-repeat left top;
  2027. background-size: 100% 100%;
  2028. }
  2029. .pinyin-icon {
  2030. background: url("../../../assets/icon/pinyin-24-normal-green.png")
  2031. no-repeat left top;
  2032. background-size: 100% 100%;
  2033. }
  2034. .en-icon {
  2035. background: url("../../../assets/icon/EN-24-normal-Green.png") no-repeat
  2036. left top;
  2037. background-size: 100% 100%;
  2038. }
  2039. .coll-icon {
  2040. background: url("../../../assets/icon/bookmarkfill-24-normal-green.png")
  2041. no-repeat left top;
  2042. background-size: 100% 100%;
  2043. }
  2044. }
  2045. }
  2046. .NPC-Big-Book-preview-brown {
  2047. .bg1 {
  2048. .repeat-icon {
  2049. background: url("../../../assets/icon/Repeat-24-normal-Brown.png")
  2050. no-repeat left top;
  2051. background-size: 100% 100%;
  2052. }
  2053. .pinyin-icon {
  2054. background: url("../../../assets/icon/pinyin-24-normal-brown.png")
  2055. no-repeat left top;
  2056. background-size: 100% 100%;
  2057. }
  2058. .en-icon {
  2059. background: url("../../../assets/icon/EN-24-normal-Brown.png") no-repeat
  2060. left top;
  2061. background-size: 100% 100%;
  2062. }
  2063. .coll-icon {
  2064. background: url("../../../assets/icon/bookmarkfill-24-normal-brown.png")
  2065. no-repeat left top;
  2066. background-size: 100% 100%;
  2067. }
  2068. }
  2069. }
  2070. </style>