Voicefullscreen.vue 68 KB

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