Voicefullscreen.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091
  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. :isFull="true"
  707. />
  708. </div>
  709. </template>
  710. <div class="word-play-audio" v-if="isWordPlay || isNewWordPlay">
  711. <AudioLineSentence
  712. :mp3="isWordPlay ? NpcNewWordMp3 : isNewWordPlay ? wordPlayMp3 : ''"
  713. :getCurTime="getCurWordTime"
  714. ref="audioLineWord"
  715. :audioId="'artPraAudioId' + curSentIndex + wordIndex"
  716. :stopAudio="stopAudio"
  717. :width="120"
  718. :hideSlider="false"
  719. :bg="wordbg"
  720. :ed="worded"
  721. :maxTime="wordMaxTime"
  722. :bgIndex="bgIndex"
  723. :isRepeat="isRepeat"
  724. :wordPlay="true"
  725. @changePlayStatus="changePlayStatus"
  726. />
  727. </div>
  728. </div>
  729. </template>
  730. <script>
  731. import AudioLineSentence from "./AudioLineSentence.vue";
  732. import Soundrecorddiff from "./Soundrecorddiff.vue";
  733. import AudioCompare from "./AudioCompare.vue";
  734. import Wordcard from "./components/Wordcard.vue";
  735. import { LearnWebSI } from "../../../api/ajax";
  736. export default {
  737. components: {
  738. AudioLineSentence,
  739. Soundrecorddiff,
  740. AudioCompare,
  741. Wordcard
  742. },
  743. props: [
  744. "sentList",
  745. "sentIndex",
  746. "mp3",
  747. "wordTimeList",
  748. "curQue",
  749. "noFont",
  750. "themeColor",
  751. "NNPENewWordList",
  752. "currentTreeID",
  753. "config",
  754. "TaskModel",
  755. "NpcNewWordMp3"
  756. ],
  757. data() {
  758. return {
  759. pySize: 32,
  760. hzSize: 48,
  761. enSize: 24,
  762. bgIndex: 1,
  763. maxTime: 0,
  764. item: null,
  765. bg: 0,
  766. ed: 0,
  767. isRepeat: false,
  768. NumberList: [
  769. "①",
  770. "②",
  771. "③",
  772. "④",
  773. "⑤",
  774. "⑥",
  775. "⑦",
  776. "⑧",
  777. "⑨",
  778. "⑩",
  779. "⑪",
  780. "⑫",
  781. "⑬",
  782. "⑭",
  783. "⑮",
  784. "⑯",
  785. "⑰",
  786. "⑱",
  787. "⑲",
  788. "⑳"
  789. ],
  790. chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、"],
  791. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  792. curTime: 0,
  793. wavblob: null,
  794. stopAudio: false,
  795. isRecord: false,
  796. isShowCompare: false,
  797. isShowRight: false,
  798. isShowLeft: false,
  799. curSentIndex: 0,
  800. oldHz: "",
  801. hz: "",
  802. clientY: 0,
  803. top: 0,
  804. left: 0,
  805. newWordList: [],
  806. pinyin: "",
  807. wordIndex: -1,
  808. isShow: false,
  809. wordbg: 0,
  810. worded: 0,
  811. wordbgs: 0,
  812. wordeds: 0,
  813. wordMaxTime: 0,
  814. isWordPlay: false,
  815. isNewWordPlay: false,
  816. curWordTime: 0,
  817. isPlaying: false,
  818. isAuto: false,
  819. key: "isRepeat",
  820. isKeyboard: true,
  821. isTopShow: false,
  822. isBottomShow: false,
  823. isRecording: false,
  824. recordPlaying: false,
  825. isCollArr: [],
  826. enwords: "",
  827. screenHeight: 0,
  828. wordPlayMp3: ""
  829. };
  830. },
  831. computed: {
  832. // isPlaying: function () {
  833. // let playing = false;
  834. // if (this.$refs.audioLineSent) {
  835. // playing = this.$refs.audioLineSent.audio.isPlaying;
  836. // }
  837. // console.log(playing);
  838. // return playing;
  839. // },
  840. },
  841. watch: {
  842. isRecording: {
  843. handler: function(newVal, oldVal) {
  844. if (newVal) {
  845. this.isBottomShow = newVal;
  846. }
  847. },
  848. deep: true
  849. },
  850. recordPlaying: {
  851. handler: function(newVal, oldVal) {
  852. if (newVal) {
  853. this.isBottomShow = newVal;
  854. }
  855. },
  856. deep: true
  857. },
  858. sentIndex: {
  859. handler: function(newVal, oldVal) {
  860. this.curSentIndex = newVal;
  861. this.getSentence();
  862. },
  863. deep: true
  864. },
  865. hz: {
  866. handler: function(val, oldVal) {
  867. let _this = this;
  868. if (val) {
  869. _this.handleNewWords(val);
  870. }
  871. },
  872. // 深度观察监听
  873. deep: true
  874. },
  875. isShow: {
  876. handler: function(val, oldVal) {
  877. let _this = this;
  878. if (val) {
  879. setTimeout(() => {
  880. _this.cardHeight = _this.$refs.wordcard.offsetHeight;
  881. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  882. _this.top = _this.clientY + 20;
  883. } else {
  884. _this.top = _this.clientY - _this.cardHeight - 30;
  885. }
  886. }, 50);
  887. }
  888. },
  889. // 深度观察监听
  890. deep: true
  891. }
  892. },
  893. //方法集合
  894. methods: {
  895. setTopShow(bool) {
  896. this.isTopShow = bool;
  897. },
  898. setBottomShow(bool) {
  899. if (!this.recordPlaying && !this.isRecording) {
  900. this.isBottomShow = bool;
  901. }
  902. },
  903. getPlayStatus(bool) {
  904. this.recordPlaying = bool;
  905. },
  906. setFontSize(type) {
  907. let _this = this;
  908. if (type == "-") {
  909. if (_this.hzSize >= 34) {
  910. this.hzSize = this.hzSize - 4;
  911. }
  912. }
  913. if (type == "+") {
  914. if (_this.hzSize <= 76) {
  915. this.hzSize = this.hzSize + 4;
  916. }
  917. }
  918. _this.pySize = parseInt(_this.hzSize / 1.5);
  919. _this.enSize = parseInt(_this.hzSize / 2);
  920. },
  921. playChange(bool) {
  922. this.isPlaying = bool;
  923. },
  924. handleColl() {
  925. let _this = this;
  926. if (_this.isCollArr[_this.curSentIndex]) {
  927. _this.cancleColl();
  928. } else {
  929. _this.addColl();
  930. }
  931. },
  932. //添加收藏
  933. addColl() {
  934. let Bookdetail = sessionStorage.getItem("Bookdetail");
  935. if (Bookdetail) {
  936. Bookdetail = JSON.parse(Bookdetail);
  937. let MethodName = "order-collection_manager-AddMyCollection";
  938. let text = "";
  939. this.item.forEach(item => {
  940. if (item.chs != "#") {
  941. text += item.chs;
  942. }
  943. });
  944. let sentence_json = {
  945. item: JSON.stringify(this.item),
  946. bg: this.bg,
  947. ed: this.ed,
  948. mp3: this.mp3,
  949. pyPosition: this.curQue.pyPosition
  950. };
  951. let data = {
  952. goods_id: this.currentTreeID,
  953. goods_type: 502,
  954. goods_name: Bookdetail.name,
  955. goods_person_name_desc: Bookdetail.author ? Bookdetail.author : "",
  956. goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
  957. goods_price: Bookdetail.price,
  958. sentence: {
  959. sentence_text: text,
  960. sentence_json: JSON.stringify(sentence_json)
  961. }
  962. };
  963. LearnWebSI(MethodName, data).then(res => {
  964. this.$set(this.isCollArr, this.curSentIndex, true);
  965. this.$message.success("收藏成功!");
  966. });
  967. } else {
  968. this.$message.warning("权限不足!");
  969. }
  970. },
  971. //取消收藏
  972. cancleColl() {
  973. let text = "";
  974. this.item.forEach(item => {
  975. if (item.chs != "#") {
  976. text += item.chs;
  977. }
  978. });
  979. let MethodName = "order-collection_manager-CancelMyGoodsCollection_WS";
  980. let data = {
  981. goods_type: 502,
  982. goods_list: [
  983. {
  984. goods_id: this.currentTreeID, //课件的id
  985. sentence_text: text
  986. }
  987. ]
  988. };
  989. LearnWebSI(MethodName, data).then(res => {
  990. this.$set(this.isCollArr, this.curSentIndex, false);
  991. this.$message.success("取消成功!");
  992. });
  993. },
  994. //检查收藏状态
  995. checkCollStatus() {
  996. let text = "";
  997. this.item.forEach(item => {
  998. if (item.chs != "#") {
  999. text += item.chs;
  1000. }
  1001. });
  1002. let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
  1003. let data = {
  1004. goods_type: 502,
  1005. goods_id: this.currentTreeID, //课件的id
  1006. sentence_text: text
  1007. };
  1008. LearnWebSI(MethodName, data).then(res => {
  1009. let collFlag = res.is_collection == "true" ? true : false;
  1010. this.$set(this.isCollArr, this.curSentIndex, collFlag);
  1011. });
  1012. },
  1013. showPrevNext(bool, key) {
  1014. this[key] = bool;
  1015. },
  1016. prevSentence() {
  1017. let _this = this;
  1018. if (_this.curSentIndex == 0) {
  1019. // _this.$message.warning("已经是第一个句子了");
  1020. return;
  1021. }
  1022. _this.curSentIndex = _this.curSentIndex - 1;
  1023. _this.getSentence();
  1024. if (_this.isAuto) {
  1025. _this.curTime = _this.bg;
  1026. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1027. }
  1028. },
  1029. nextSentence() {
  1030. if (this.curSentIndex == this.sentList.length - 1) {
  1031. // this.$message.warning("已经是最后一个句子了");
  1032. return;
  1033. }
  1034. this.curSentIndex = this.curSentIndex + 1;
  1035. this.getSentence();
  1036. },
  1037. rollSentence() {
  1038. if (this.curSentIndex == this.sentList.length - 1) {
  1039. this.curSentIndex = 0;
  1040. } else {
  1041. this.curSentIndex = this.curSentIndex + 1;
  1042. }
  1043. this.getSentence();
  1044. },
  1045. changeStatus(key) {
  1046. if (key == "config.isShowEN") {
  1047. if (this.enwords) {
  1048. this[key] = !this[key];
  1049. }
  1050. } else {
  1051. this[key] = !this[key];
  1052. }
  1053. },
  1054. changePinyin() {
  1055. this.$emit("changePinyin");
  1056. },
  1057. changeEN() {
  1058. this.$emit("changeEN");
  1059. },
  1060. setStatus() {
  1061. let _this = this;
  1062. if (_this.key == "isRepeat") {
  1063. if (_this.isRepeat) {
  1064. _this.isRepeat = false;
  1065. _this.isAuto = true;
  1066. _this.key = "isAuto";
  1067. } else {
  1068. _this.isRepeat = true;
  1069. _this.key = "isRepeat";
  1070. }
  1071. } else if (_this.key == "isAuto") {
  1072. if (_this.isAuto) {
  1073. _this.isRepeat = false;
  1074. _this.isAuto = false;
  1075. _this.key = "isRepeat";
  1076. }
  1077. }
  1078. },
  1079. getRerordStatus(bool) {
  1080. this.isShowCompare = bool;
  1081. },
  1082. getMicrophoneStatus(bool) {
  1083. this.isRecording = bool;
  1084. },
  1085. getWavblob(wavblob) {
  1086. this.wavblob = wavblob;
  1087. },
  1088. sentPause(isRecord) {
  1089. this.isRecord = isRecord;
  1090. },
  1091. getCurTime(curTime) {
  1092. let _this = this;
  1093. if (_this.isRepeat) {
  1094. let time = curTime * 1000;
  1095. if (time > _this.ed || time < _this.bg) {
  1096. _this.curTime = _this.bg;
  1097. this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1098. } else {
  1099. _this.curTime = curTime * 1000;
  1100. }
  1101. } else if (_this.isAuto) {
  1102. let time = curTime * 1000;
  1103. if (time > _this.ed) {
  1104. _this.rollSentence();
  1105. _this.curTime = _this.bg;
  1106. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  1107. } else {
  1108. _this.curTime = curTime * 1000;
  1109. }
  1110. } else {
  1111. _this.curTime = curTime * 1000;
  1112. }
  1113. },
  1114. getCurCompareTime(curTime) {
  1115. let _this = this;
  1116. _this.curTime = curTime * 1000;
  1117. },
  1118. getCurWordTime(curTime) {
  1119. let _this = this;
  1120. _this.curWordTime = curTime * 1000;
  1121. },
  1122. changeBg(bgIndex) {
  1123. this.bgIndex = bgIndex;
  1124. },
  1125. getSentence() {
  1126. let _this = this;
  1127. _this.isShowCompare =
  1128. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex] &&
  1129. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList &&
  1130. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList
  1131. .length > 0;
  1132. _this.pauseAudio();
  1133. _this.isPlaying = false;
  1134. let item = JSON.parse(JSON.stringify(_this.sentList[_this.curSentIndex]));
  1135. if (item.sentArr) {
  1136. _this.item = item.sentArr;
  1137. _this.enwords = item.enwords;
  1138. } else {
  1139. _this.item = item;
  1140. }
  1141. _this.sentList.forEach(item => {
  1142. this.isCollArr.push(false);
  1143. });
  1144. _this.bg =
  1145. _this.curQue.wordTime && _this.curQue.wordTime[_this.curSentIndex]
  1146. ? _this.curQue.wordTime[_this.curSentIndex].bg
  1147. : 0;
  1148. _this.ed =
  1149. _this.curQue.wordTime && _this.curQue.wordTime[_this.curSentIndex]
  1150. ? _this.curQue.wordTime[_this.curSentIndex].ed
  1151. : 0;
  1152. let maxTime = (_this.ed - _this.bg) / 1000;
  1153. if (maxTime < 1) {
  1154. _this.maxTime = 1;
  1155. } else {
  1156. _this.maxTime = maxTime;
  1157. }
  1158. _this.checkCollStatus();
  1159. },
  1160. pauseAudio() {
  1161. let audio = document.getElementsByTagName("audio");
  1162. if (
  1163. audio &&
  1164. audio.length > 0 &&
  1165. window.location.href.indexOf("GCLS-Learn") == -1
  1166. ) {
  1167. audio.forEach(item => {
  1168. item.pause();
  1169. });
  1170. }
  1171. },
  1172. exitFullScreen() {
  1173. this.pauseAudio();
  1174. this.$emit("exitFullscreen");
  1175. },
  1176. changeFullScreen() {
  1177. this.pauseAudio();
  1178. this.$emit("changeIsFull");
  1179. },
  1180. handleWav(list, tmIndex) {
  1181. tmIndex = tmIndex ? tmIndex : 0;
  1182. this.$emit("handleWav", list, tmIndex);
  1183. },
  1184. // 录音时暂停音频播放
  1185. handleParentPlay() {
  1186. this.stopAudio = true;
  1187. },
  1188. // 音频播放时改变布尔值
  1189. handleChangeStopAudio() {
  1190. this.stopAudio = false;
  1191. },
  1192. //播放音频
  1193. // playWord(item) {
  1194. // let _this = this;
  1195. // if (this.newWordList.indexOf(item.chs) > -1 || item.words) {
  1196. // _this.pauseAudio();
  1197. // _this.isWordPlay = false;
  1198. // _this.wordIndex = item.wordIndex;
  1199. // setTimeout(() => {
  1200. // let leg = item.timeList.length;
  1201. // _this.wordbg = item.timeList[0].wordBg;
  1202. // _this.worded = item.timeList[leg - 1].wordEd;
  1203. // let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
  1204. // if (wordMaxTime < 1) {
  1205. // _this.wordMaxTime = 1;
  1206. // } else {
  1207. // _this.wordMaxTime = wordMaxTime;
  1208. // }
  1209. // _this.isWordPlay = true;
  1210. // }, 50);
  1211. // }
  1212. // },
  1213. playWord(item) {
  1214. let _this = this;
  1215. if (this.newWordList.indexOf(item.chs) > -1 || item.words) {
  1216. _this.pauseAudio();
  1217. _this.isNewWordPlay = false;
  1218. let new_word = item.words ? item.words : item.chs;
  1219. _this.NNPENewWordList.forEach(items => {
  1220. items.forEach(itemn => {
  1221. if (itemn.new_word === new_word) {
  1222. _this.wordbg = itemn.bg;
  1223. _this.worded = itemn.ed;
  1224. _this.wordPlayMp3 = itemn.newWordMp3;
  1225. }
  1226. });
  1227. });
  1228. setTimeout(() => {
  1229. _this.isNewWordPlay = true;
  1230. }, 50);
  1231. }
  1232. },
  1233. changePlayStatus() {
  1234. this.isWordPlay = false;
  1235. this.isNewWordPlay = false;
  1236. this.wordIndex = -1;
  1237. },
  1238. showWordDetail(e, item) {
  1239. let _this = this;
  1240. if (_this.TaskModel == "ANSWER") {
  1241. return;
  1242. }
  1243. if (
  1244. _this.chsFhList.indexOf(item.chs) > -1 ||
  1245. /^[a-zA-Z0-9]/.test(item.chs)
  1246. ) {
  1247. return;
  1248. }
  1249. if (_this.oldHz != item.chs) {
  1250. this.isShow = false;
  1251. setTimeout(() => {
  1252. _this.hz = item.words ? item.words : item.chs;
  1253. _this.pinyin = item.pinyin;
  1254. _this.wordIndex = item.wordIndex;
  1255. }, 50);
  1256. }
  1257. _this.clientY = e.clientY;
  1258. let new_word = item.words ? item.words : item.chs;
  1259. _this.wordPlayMp3 = "";
  1260. _this.NNPENewWordList.forEach(items => {
  1261. items.forEach(itemn => {
  1262. if (itemn.new_word === new_word) {
  1263. _this.wordbgs = itemn.bg;
  1264. _this.wordeds = itemn.ed;
  1265. _this.wordPlayMp3 = itemn.newWordMp3;
  1266. }
  1267. });
  1268. });
  1269. let left = e.clientX;
  1270. let width = 0;
  1271. if (item.chs.length == 1 || item.chs.length == 2) {
  1272. width = 304;
  1273. } else if (item.chs.length == 3 || item.chs.length == 4) {
  1274. width = 432;
  1275. } else if (item.chs.length > 3) {
  1276. width = 560;
  1277. }
  1278. // if (left - this.bodyLeft > this.contentWidth / 2) {
  1279. // _this.left = left - width + 10;
  1280. // } else {
  1281. _this.left = left - width / 2;
  1282. //}
  1283. },
  1284. changeWordCard(isShow) {
  1285. let _this = this;
  1286. _this.isShow = isShow;
  1287. _this.oldHz = "";
  1288. _this.hz = "";
  1289. _this.wordIndex = -1;
  1290. },
  1291. // 处理分词数据
  1292. handleNewWords(val) {
  1293. let _this = this;
  1294. _this.isShow = true;
  1295. _this.word = null;
  1296. if (_this.newWordList.indexOf(val) > -1) {
  1297. for (let i = 0; i < this.NNPENewWordList.length; i++) {
  1298. let pItem = this.NNPENewWordList[i];
  1299. for (let j = 0; j < pItem.length; j++) {
  1300. let item = pItem[j];
  1301. if (item.new_word.trim() == val.trim()) {
  1302. let wordlist = val.split("");
  1303. this.word = { list: wordlist, detail: item };
  1304. break;
  1305. }
  1306. }
  1307. }
  1308. } else {
  1309. let wordlist = val.split("");
  1310. let option = {
  1311. definition_list: [],
  1312. mp3_list: [],
  1313. new_word: val,
  1314. pinyin: _this.pinyin
  1315. };
  1316. _this.word = { list: wordlist, detail: option };
  1317. }
  1318. _this.oldHz = val;
  1319. },
  1320. handleNewword() {
  1321. let NewWordList = [];
  1322. this.NNPENewWordList.forEach(item => {
  1323. item.forEach(wItem => {
  1324. NewWordList.push(wItem.new_word);
  1325. });
  1326. });
  1327. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  1328. },
  1329. getScreenHeight() {
  1330. this.screenHeight = window.innerHeight;
  1331. }
  1332. },
  1333. //生命周期 - 创建完成(可以访问当前this实例)
  1334. created() {},
  1335. //生命周期 - 挂载完成(可以访问DOM元素)
  1336. mounted() {
  1337. let _this = this;
  1338. $(window).resize(() => {
  1339. _this.getScreenHeight();
  1340. });
  1341. _this.getScreenHeight();
  1342. document.addEventListener("keyup", function(e) {
  1343. if (_this.isKeyboard) {
  1344. if (e.keyCode == 32) {
  1345. //空格
  1346. _this.$nextTick(() => {
  1347. if (_this.$refs.audioLineSent) {
  1348. _this.$refs.audioLineSent.PlayAudio();
  1349. }
  1350. });
  1351. } else if (e.keyCode == 38) {
  1352. _this.prevSentence();
  1353. } else if (e.keyCode == 40) {
  1354. _this.nextSentence();
  1355. } else if (e.keyCode == 13) {
  1356. _this.$nextTick(() => {
  1357. _this.$refs.Soundrecorddiff.microphone();
  1358. });
  1359. }
  1360. }
  1361. });
  1362. if (_this.NNPENewWordList) {
  1363. _this.handleNewword();
  1364. }
  1365. _this.curSentIndex = _this.sentIndex;
  1366. _this.getSentence();
  1367. document.addEventListener("fullscreenchange", () => {
  1368. let isFullscreen =
  1369. document.fullscreenElement ||
  1370. document.mozFullScreenElement ||
  1371. document.webkitFullscreenElement ||
  1372. document.fullScreen ||
  1373. document.mozFullScreen ||
  1374. document.webkitIsFullScreen;
  1375. if (!isFullscreen) {
  1376. _this.changeFullScreen();
  1377. }
  1378. });
  1379. document.addEventListener("mozfullscreenchange", () => {
  1380. let isFullscreen =
  1381. document.fullscreenElement ||
  1382. document.mozFullScreenElement ||
  1383. document.webkitFullscreenElement ||
  1384. document.fullScreen ||
  1385. document.mozFullScreen ||
  1386. document.webkitIsFullScreen;
  1387. if (!isFullscreen) {
  1388. _this.changeFullScreen();
  1389. }
  1390. });
  1391. document.addEventListener("webkitfullscreenchange", () => {
  1392. let isFullscreen =
  1393. document.fullscreenElement ||
  1394. document.mozFullScreenElement ||
  1395. document.webkitFullscreenElement ||
  1396. document.fullScreen ||
  1397. document.mozFullScreen ||
  1398. document.webkitIsFullScreen;
  1399. if (!isFullscreen) {
  1400. _this.changeFullScreen();
  1401. }
  1402. });
  1403. document.addEventListener("msfullscreenchange", () => {
  1404. let isFullscreen =
  1405. document.fullscreenElement ||
  1406. document.mozFullScreenElement ||
  1407. document.webkitFullscreenElement ||
  1408. document.fullScreen ||
  1409. document.mozFullScreen ||
  1410. document.webkitIsFullScreen;
  1411. if (!isFullscreen) {
  1412. _this.changeFullScreen();
  1413. }
  1414. });
  1415. },
  1416. beforeCreate() {}, //生命周期 - 创建之前
  1417. beforeMount() {}, //生命周期 - 挂载之前
  1418. beforeUpdate() {}, //生命周期 - 更新之前
  1419. updated() {}, //生命周期 - 更新之后
  1420. beforeDestroy() {}, //生命周期 - 销毁之前
  1421. destroyed() {}, //生命周期 - 销毁完成
  1422. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  1423. };
  1424. </script>
  1425. <style lang="scss" scoped>
  1426. //@import url(); 引入公共css类
  1427. .voicefull {
  1428. width: 100%;
  1429. height: 100vh;
  1430. overflow: hidden;
  1431. display: flex;
  1432. flex-direction: column;
  1433. .NNPE-wordDetail {
  1434. position: fixed;
  1435. z-index: 9999;
  1436. top: 50%;
  1437. margin-top: -196px;
  1438. }
  1439. &.bg1 {
  1440. background: #fff;
  1441. }
  1442. &.bg2 {
  1443. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1444. .newActive {
  1445. color: #ffc600 !important;
  1446. }
  1447. }
  1448. &-top {
  1449. height: 136px;
  1450. width: 100%;
  1451. box-sizing: border-box;
  1452. padding: 0 40px;
  1453. .voicefull-top-hidden {
  1454. width: 100%;
  1455. height: 136px;
  1456. visibility: hidden;
  1457. display: flex;
  1458. justify-content: space-between;
  1459. align-items: center;
  1460. }
  1461. .voicefull-top-show {
  1462. width: 100%;
  1463. height: 136px;
  1464. visibility: visible;
  1465. display: flex;
  1466. justify-content: space-between;
  1467. align-items: center;
  1468. }
  1469. .top-left {
  1470. display: flex;
  1471. justify-content: flex-start;
  1472. align-items: center;
  1473. }
  1474. .select-bg {
  1475. display: flex;
  1476. justify-content: space-between;
  1477. align-items: center;
  1478. width: 96px;
  1479. height: 56px;
  1480. border: 1px solid rgba(0, 0, 0, 0.1);
  1481. border-radius: 40px;
  1482. display: flex;
  1483. justify-content: center;
  1484. align-items: center;
  1485. box-sizing: border-box;
  1486. margin-right: 32px;
  1487. &.select-bg-blue {
  1488. background: rgba(255, 255, 255, 0.1);
  1489. border: 1px solid rgba(0, 0, 0, 0.1);
  1490. }
  1491. > div {
  1492. width: 36px;
  1493. height: 36px;
  1494. border-radius: 100%;
  1495. display: flex;
  1496. justify-content: center;
  1497. align-items: center;
  1498. &.bg-white-box {
  1499. background: 0 0;
  1500. margin-right: 4px;
  1501. &.active {
  1502. background: #de4444;
  1503. }
  1504. }
  1505. &.bg-green-box {
  1506. background: #fff;
  1507. &.active {
  1508. background: #ffc600;
  1509. }
  1510. }
  1511. > span {
  1512. width: 24px;
  1513. height: 24px;
  1514. border-radius: 100%;
  1515. box-sizing: border-box;
  1516. cursor: pointer;
  1517. &.bg-white {
  1518. background: #fff;
  1519. }
  1520. &.bg-green {
  1521. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1522. }
  1523. }
  1524. }
  1525. }
  1526. .set-fontSize {
  1527. padding: 0 20px;
  1528. height: 56px;
  1529. background: #ffffff;
  1530. border: 1px solid rgba(0, 0, 0, 0.1);
  1531. border-radius: 40px;
  1532. display: flex;
  1533. justify-content: center;
  1534. align-items: center;
  1535. &-green {
  1536. background: rgba(255, 255, 255, 0.1);
  1537. border: 1px solid rgba(0, 0, 0, 0.1);
  1538. }
  1539. > span {
  1540. width: 24px;
  1541. height: 24px;
  1542. margin: 0 4px;
  1543. &.font-jian {
  1544. &-black {
  1545. background: url("../../../assets/NPC/jian-black.png") no-repeat left
  1546. top;
  1547. background-size: 100% 100%;
  1548. cursor: pointer;
  1549. }
  1550. &-yellow {
  1551. background: url("../../../assets/NPC/jian-white.png") no-repeat left
  1552. top;
  1553. background-size: 100% 100%;
  1554. cursor: pointer;
  1555. }
  1556. &-white-disabled {
  1557. background: url("../../../assets/NPC/jian-white-disabled.png")
  1558. no-repeat left top;
  1559. background-size: 100% 100%;
  1560. cursor: pointer;
  1561. }
  1562. &-yellow-disabled {
  1563. background: url("../../../assets/NPC/jian-yellow-disabled.png")
  1564. no-repeat left top;
  1565. background-size: 100% 100%;
  1566. cursor: pointer;
  1567. }
  1568. }
  1569. &.font-img {
  1570. &-black {
  1571. background: url("../../../assets/NPC/fontSize-black.png") no-repeat
  1572. left top;
  1573. background-size: 100% 100%;
  1574. }
  1575. &-yellow {
  1576. background: url("../../../assets/NPC/fontSize-white.png") no-repeat
  1577. left top;
  1578. background-size: 100% 100%;
  1579. }
  1580. }
  1581. &.font-jia {
  1582. &-black {
  1583. background: url("../../../assets/NPC/jia-black.png") no-repeat left
  1584. top;
  1585. background-size: 100% 100%;
  1586. cursor: pointer;
  1587. }
  1588. &-yellow {
  1589. background: url("../../../assets/NPC/jia-white.png") no-repeat left
  1590. top;
  1591. background-size: 100% 100%;
  1592. cursor: pointer;
  1593. }
  1594. &-white-disabled {
  1595. background: url("../../../assets/NPC/jia-white-disabled.png")
  1596. no-repeat left top;
  1597. background-size: 100% 100%;
  1598. cursor: pointer;
  1599. }
  1600. &-yellow-disabled {
  1601. background: url("../../../assets/NPC/jia-yellow-disabled.png")
  1602. no-repeat left top;
  1603. background-size: 100% 100%;
  1604. cursor: pointer;
  1605. }
  1606. }
  1607. }
  1608. }
  1609. .top-middle {
  1610. display: flex;
  1611. justify-content: center;
  1612. align-items: center;
  1613. .audio-box {
  1614. width: 56px;
  1615. height: 56px;
  1616. background: #ffffff;
  1617. border: 1px solid rgba(0, 0, 0, 0.1);
  1618. border-radius: 40px;
  1619. display: flex;
  1620. justify-content: center;
  1621. align-items: center;
  1622. &-green {
  1623. background: rgba(255, 255, 255, 0.1);
  1624. border: 1px solid rgba(0, 0, 0, 0.1);
  1625. }
  1626. }
  1627. }
  1628. }
  1629. .op-btn {
  1630. width: 56px;
  1631. height: 56px;
  1632. border-radius: 100%;
  1633. display: flex;
  1634. justify-content: center;
  1635. align-items: center;
  1636. cursor: pointer;
  1637. margin-left: 32px;
  1638. background: #ffffff;
  1639. border: 1px solid rgba(0, 0, 0, 0.1);
  1640. box-sizing: border-box;
  1641. &-green {
  1642. background: rgba(255, 255, 255, 0.1);
  1643. border: 1px solid rgba(0, 0, 0, 0.1);
  1644. }
  1645. &.close-btn {
  1646. background: #274533;
  1647. border: 1px solid rgba(0, 0, 0, 0.1);
  1648. }
  1649. > span {
  1650. width: 24px;
  1651. height: 24px;
  1652. &.close-icon {
  1653. background: url("../../../assets/icon/cross-24-normal-black.png")
  1654. no-repeat left top;
  1655. background-size: 100% 100%;
  1656. &-white {
  1657. background: url("../../../assets/icon/cross-24-normal-white.png")
  1658. no-repeat left top;
  1659. background-size: 100% 100%;
  1660. }
  1661. }
  1662. }
  1663. }
  1664. .repeat-icon {
  1665. background: url("../../../assets/icon/Repeat-24-normal-red.png") no-repeat
  1666. left top;
  1667. background-size: 100% 100%;
  1668. &.disabled {
  1669. background: url("../../../assets/icon/Repeat-24-disable-Black.png")
  1670. no-repeat left top;
  1671. background-size: 100% 100%;
  1672. }
  1673. &-yellow {
  1674. background: url("../../../assets/icon/Repeat-24-normal-yellow.png")
  1675. no-repeat left top;
  1676. background-size: 100% 100%;
  1677. }
  1678. &.auto-icon {
  1679. background: url("../../../assets/icon/Auto-24-next-red.png") no-repeat
  1680. left top;
  1681. background-size: 100% 100%;
  1682. &-yellow {
  1683. background: url("../../../assets/icon/Auto-24-next-yellow.png")
  1684. no-repeat left top;
  1685. background-size: 100% 100%;
  1686. }
  1687. }
  1688. }
  1689. .pinyin-icon {
  1690. background: url("../../../assets/icon/pinyin-24-normal-red.png") no-repeat
  1691. left top;
  1692. background-size: 100% 100%;
  1693. &.disabled {
  1694. background: url("../../../assets/icon/pinyin-24-disable-Black.png")
  1695. no-repeat left top;
  1696. background-size: 100% 100%;
  1697. }
  1698. &-yellow {
  1699. background: url("../../../assets/icon/pinyin-24-normal-yellow.png")
  1700. no-repeat left top;
  1701. background-size: 100% 100%;
  1702. }
  1703. }
  1704. .en-icon {
  1705. background: url("../../../assets/icon/EN-24-normal-Red.png") no-repeat left
  1706. top;
  1707. background-size: 100% 100%;
  1708. &.disabled {
  1709. background: url("../../../assets/icon/EN-24-disable-Black.png") no-repeat
  1710. left top;
  1711. background-size: 100% 100%;
  1712. }
  1713. &-yellow {
  1714. background: url("../../../assets/icon/EN-24-normal-yellow.png") no-repeat
  1715. left top;
  1716. background-size: 100% 100%;
  1717. }
  1718. }
  1719. .coll-icon {
  1720. background: url("../../../assets/icon/bookmarkfill-24-normal-red.png")
  1721. no-repeat left top;
  1722. background-size: 100% 100%;
  1723. &.disabled {
  1724. background: url("../../../assets/icon/bookmarkfill-24-disable-Black.png")
  1725. no-repeat left top;
  1726. background-size: 100% 100%;
  1727. }
  1728. &-yellow {
  1729. background: url("../../../assets/icon/bookmarkfill-24-normal-yellow.png")
  1730. no-repeat left top;
  1731. background-size: 100% 100%;
  1732. }
  1733. }
  1734. .keyboard-icon {
  1735. background: url("../../../assets/icon/enter-24-keyboard-red.png") no-repeat
  1736. left top;
  1737. background-size: 100% 100%;
  1738. &.disabled {
  1739. background: url("../../../assets/icon/enter-24-keyboard-disable-Black.png")
  1740. no-repeat left top;
  1741. background-size: 100% 100%;
  1742. }
  1743. &-yellow {
  1744. background: url("../../../assets/icon/enter-24-keyboard-yellow.png")
  1745. no-repeat left top;
  1746. background-size: 100% 100%;
  1747. }
  1748. }
  1749. &-content {
  1750. flex: 1;
  1751. width: 100%;
  1752. box-sizing: border-box;
  1753. display: flex;
  1754. align-items: center;
  1755. .vc-box {
  1756. padding: 0 8px 0 36px;
  1757. &-right {
  1758. padding: 0 36px 0 8px;
  1759. }
  1760. }
  1761. .vc-left {
  1762. width: 64px;
  1763. height: 64px;
  1764. cursor: pointer;
  1765. &-grey {
  1766. background: url("../../../assets/NPC/left-grey.png") no-repeat left top;
  1767. background-size: 100% 100%;
  1768. }
  1769. &-black {
  1770. background: url("../../../assets/NPC/left-black.png") no-repeat left top;
  1771. background-size: 100% 100%;
  1772. }
  1773. &-white {
  1774. background: url("../../../assets/NPC/left-white.png") no-repeat left top;
  1775. background-size: 100% 100%;
  1776. }
  1777. &.hidden {
  1778. visibility: hidden;
  1779. }
  1780. }
  1781. .vc-right {
  1782. width: 64px;
  1783. height: 64px;
  1784. cursor: pointer;
  1785. &-grey {
  1786. background: url("../../../assets/NPC/right-grey.png") no-repeat left top;
  1787. background-size: 100% 100%;
  1788. }
  1789. &-black {
  1790. background: url("../../../assets/NPC/right-black.png") no-repeat left
  1791. top;
  1792. background-size: 100% 100%;
  1793. }
  1794. &-white {
  1795. background: url("../../../assets/NPC/right-white.png") no-repeat left
  1796. top;
  1797. background-size: 100% 100%;
  1798. }
  1799. }
  1800. .vc-main {
  1801. width: fit-content;
  1802. margin: 0 auto;
  1803. padding: 0 67px;
  1804. .enwords {
  1805. padding: 0 3px;
  1806. margin-top: 24px;
  1807. color: rgba(0, 0, 0, 0.45);
  1808. font-size: 24px;
  1809. line-height: 32px;
  1810. font-family: Helvetica;
  1811. word-break: break-word;
  1812. &-green {
  1813. color: rgba(255, 255, 255, 0.65);
  1814. }
  1815. }
  1816. }
  1817. .NNPE-words {
  1818. float: left;
  1819. user-select: none;
  1820. -webkit-user-select: none;
  1821. -moz-user-select: none;
  1822. -ms-user-select: none;
  1823. &-box {
  1824. float: left;
  1825. > span {
  1826. display: block;
  1827. &.NNPE-pinyin {
  1828. font-family: "GB-PINYINOK-B";
  1829. font-weight: normal;
  1830. font-size: 32px;
  1831. line-height: 1.25;
  1832. box-sizing: border-box;
  1833. color: rgba(0, 0, 0, 0.85);
  1834. &.bottom {
  1835. padding-bottom: 16px;
  1836. }
  1837. &.noFont {
  1838. font-family: initial;
  1839. }
  1840. &.textLeft {
  1841. text-align: left;
  1842. }
  1843. &.font-white {
  1844. color: #fff;
  1845. }
  1846. &.wordBlank {
  1847. color: rgba(0, 0, 0, 0.85);
  1848. }
  1849. }
  1850. &.NNPE-chs {
  1851. font-family: "FZJCGFKTK";
  1852. font-size: 48px;
  1853. line-height: 1.17;
  1854. color: rgba(0, 0, 0, 0.85);
  1855. display: flex;
  1856. flex-flow: wrap; // 兼容不是汉字的内容
  1857. &.bottom {
  1858. padding-bottom: 16px;
  1859. }
  1860. .font-white {
  1861. color: #fff;
  1862. }
  1863. .active {
  1864. color: #de4444;
  1865. &-yellow {
  1866. color: #ffc600;
  1867. }
  1868. }
  1869. .wordActive {
  1870. color: #de4444;
  1871. }
  1872. .wordActive-blue {
  1873. color: #ffc600;
  1874. }
  1875. .newActive {
  1876. color: #de4444;
  1877. }
  1878. }
  1879. // &.padding {
  1880. // padding-right: 6px;
  1881. // }
  1882. }
  1883. }
  1884. &.textLeft {
  1885. text-align: left;
  1886. }
  1887. &.textCenter {
  1888. text-align: center;
  1889. }
  1890. &.textRight {
  1891. text-align: right;
  1892. }
  1893. > span {
  1894. display: block;
  1895. &.NNPE-pinyin {
  1896. font-family: "GB-PINYINOK-B";
  1897. font-weight: normal;
  1898. font-size: 32px;
  1899. line-height: 1.25;
  1900. box-sizing: border-box;
  1901. color: rgba(0, 0, 0, 0.85);
  1902. &.bottom {
  1903. padding-bottom: 16px;
  1904. }
  1905. &.font-white {
  1906. color: #fff;
  1907. }
  1908. &.noFont {
  1909. font-family: initial;
  1910. }
  1911. &.textLeft {
  1912. text-align: left;
  1913. }
  1914. &.wordBlank {
  1915. color: rgba(0, 0, 0, 0.85);
  1916. }
  1917. }
  1918. &.NNPE-chs {
  1919. font-family: "FZJCGFKTK";
  1920. font-size: 48px;
  1921. line-height: 1.17;
  1922. color: rgba(0, 0, 0, 0.85);
  1923. display: flex;
  1924. flex-flow: wrap; // 兼容不是汉字的内容
  1925. &.bottom {
  1926. padding-bottom: 16px;
  1927. }
  1928. .font-white {
  1929. color: #fff;
  1930. }
  1931. .active {
  1932. color: #de4444;
  1933. &-yellow {
  1934. color: #ffc600;
  1935. }
  1936. }
  1937. .wordActive {
  1938. color: #de4444;
  1939. }
  1940. .wordActive-blue {
  1941. color: #ffc600;
  1942. }
  1943. .newActive {
  1944. color: #de4444;
  1945. }
  1946. }
  1947. &.padding {
  1948. padding-left: 3px;
  1949. padding-right: 3px;
  1950. }
  1951. }
  1952. }
  1953. }
  1954. &-bottom {
  1955. height: 136px;
  1956. width: 100%;
  1957. box-sizing: border-box;
  1958. display: flex;
  1959. justify-content: space-between;
  1960. align-items: center;
  1961. padding-right: 40px;
  1962. .voicefull-bottom-show {
  1963. height: 136px;
  1964. width: 100%;
  1965. display: flex;
  1966. justify-content: space-between;
  1967. align-items: center;
  1968. visibility: visible;
  1969. }
  1970. .voicefull-bottom-hidden {
  1971. height: 136px;
  1972. width: 100%;
  1973. display: flex;
  1974. justify-content: space-between;
  1975. align-items: center;
  1976. visibility: hidden;
  1977. }
  1978. .bottom-left {
  1979. display: flex;
  1980. justify-content: flex-start;
  1981. align-items: center;
  1982. &-margin {
  1983. margin-left: 40px;
  1984. }
  1985. .compare-box {
  1986. height: 56px;
  1987. padding: 16px 16px;
  1988. box-sizing: border-box;
  1989. border: 1px solid rgba(0, 0, 0, 0.1);
  1990. border-radius: 0 40px 40px 0;
  1991. border-left: 0px solid rgba(0, 0, 0, 0.1);
  1992. &-white {
  1993. background: rgba(255, 255, 255, 0.1);
  1994. border: 1px solid rgba(0, 0, 0, 0.1);
  1995. border-left: 0;
  1996. }
  1997. &-answer {
  1998. border-radius: 40px;
  1999. }
  2000. }
  2001. }
  2002. .page-count {
  2003. padding: 8px;
  2004. font-size: 16px;
  2005. line-height: 24px;
  2006. font-family: "robot";
  2007. color: #000000;
  2008. min-width: 60px;
  2009. box-sizing: border-box;
  2010. border-radius: 8px;
  2011. background: #fff;
  2012. text-align: center;
  2013. &-green {
  2014. color: #ffffff;
  2015. background: rgba(255, 255, 255, 0.2);
  2016. }
  2017. }
  2018. }
  2019. }
  2020. .word-play-audio {
  2021. position: absolute;
  2022. left: -1000px;
  2023. }
  2024. </style>
  2025. <style lang="scss">
  2026. .NPC-Big-Book-preview-green {
  2027. .bg1 {
  2028. .repeat-icon {
  2029. background: url("../../../assets/icon/Repeat-24-normal-Green.png")
  2030. no-repeat left top;
  2031. background-size: 100% 100%;
  2032. }
  2033. .pinyin-icon {
  2034. background: url("../../../assets/icon/pinyin-24-normal-green.png")
  2035. no-repeat left top;
  2036. background-size: 100% 100%;
  2037. }
  2038. .en-icon {
  2039. background: url("../../../assets/icon/EN-24-normal-Green.png") no-repeat
  2040. left top;
  2041. background-size: 100% 100%;
  2042. }
  2043. .coll-icon {
  2044. background: url("../../../assets/icon/bookmarkfill-24-normal-green.png")
  2045. no-repeat left top;
  2046. background-size: 100% 100%;
  2047. }
  2048. }
  2049. }
  2050. .NPC-Big-Book-preview-brown {
  2051. .bg1 {
  2052. .repeat-icon {
  2053. background: url("../../../assets/icon/Repeat-24-normal-Brown.png")
  2054. no-repeat left top;
  2055. background-size: 100% 100%;
  2056. }
  2057. .pinyin-icon {
  2058. background: url("../../../assets/icon/pinyin-24-normal-brown.png")
  2059. no-repeat left top;
  2060. background-size: 100% 100%;
  2061. }
  2062. .en-icon {
  2063. background: url("../../../assets/icon/EN-24-normal-Brown.png") no-repeat
  2064. left top;
  2065. background-size: 100% 100%;
  2066. }
  2067. .coll-icon {
  2068. background: url("../../../assets/icon/bookmarkfill-24-normal-brown.png")
  2069. no-repeat left top;
  2070. background-size: 100% 100%;
  2071. }
  2072. }
  2073. }
  2074. </style>