detail.vue 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764
  1. <template>
  2. <view class="polyv_detail">
  3. <nav-bar
  4. :title="detail.courseName || '课程详情'"
  5. v-show="navShow"
  6. ></nav-bar>
  7. <view id="top">
  8. <view class="video_box" v-if="!startStatus">
  9. <image
  10. :src="$method.splitImgHost(detail.coverUrl)"
  11. mode="widthFix"
  12. style="width: 100%; height: 421rpx"
  13. ></image>
  14. <image
  15. v-if="false"
  16. class="video_play"
  17. src="/static/play.png"
  18. @click="startVideo"
  19. ></image>
  20. </view>
  21. <view v-else>
  22. <view
  23. class="video_box"
  24. style="width: 100%; height: 421rpx"
  25. v-if="playVID"
  26. >
  27. <polyv-player
  28. id="playerVideo"
  29. playerId="playerVideo"
  30. height="421rpx"
  31. :vid="vid"
  32. :showSettingBtn="true"
  33. :enablePlayGesture="true"
  34. :custom-cache="false"
  35. :object-fit="'contain'"
  36. @statechange="onStateChange"
  37. @fullscreenchange="fullscreenchange"
  38. @error="playError"
  39. :autoplay="true"
  40. :page-gesture="true"
  41. :vslide-gesture="true"
  42. :vslide-gesture-in-fullscreen="true"
  43. :isAllowSeek="isAllowSeek"
  44. :playbackRate="playbackRate"
  45. :startTime="startTime"
  46. :enableAutoRotation="enableAutoRotation"
  47. @loadedmetadata="loadedmetadata"
  48. ></polyv-player>
  49. <cover-view
  50. class="video-toast__close"
  51. v-if="videoToastShow"
  52. @click="closeToast()"
  53. >X</cover-view
  54. >
  55. <cover-view class="video-toast" v-if="videoToastShow">
  56. <cover-view class="video-toast__text"
  57. >您上次看到 {{ seekTime }},正在自动续播</cover-view
  58. >
  59. <cover-view class="video-toast__btn" @click="restart()"
  60. >从头播放</cover-view
  61. >
  62. </cover-view>
  63. </view>
  64. <view
  65. class="video_box"
  66. style="width: 100%; height: 421rpx"
  67. v-if="playChannelId > 0"
  68. >
  69. <player
  70. class="plv-mp-demo-player"
  71. :videoOption="videoOption"
  72. :page-gesture="true"
  73. :vslide-gesture="true"
  74. :vslide-gesture-in-fullscreen="true"
  75. @onLiveStatusChange="playerLiveStatusChange"
  76. />
  77. </view>
  78. </view>
  79. <view class="course_name">
  80. <u-row>
  81. <u-col span="10">
  82. <view class="video_t1">{{ detail.courseName }}</view>
  83. </u-col>
  84. <u-col span="2">
  85. <div class="notice_wrap" v-if="goodsData.buyNote">
  86. <view class="video_t1_t" @click="studyNotice"> 学员须知 </view>
  87. </div>
  88. </u-col>
  89. </u-row>
  90. </view>
  91. <u-line color="#D6D6DB" />
  92. <view>
  93. <view
  94. ><u-tabs
  95. gutter="0"
  96. :item-width="itemWidth()"
  97. :list="list"
  98. font-size="32"
  99. bar-width="24"
  100. :current="current"
  101. @change="change"
  102. active-color="#007AFF"
  103. ></u-tabs
  104. ></view>
  105. </view>
  106. <u-line color="#D6D6DB" />
  107. </view>
  108. <view class="box" :class="{'first_ml': current == 0}">
  109. <scroll-view class="box_in" scroll-y="true">
  110. <!--目录 -->
  111. <view v-show="current == 0">
  112. <view class="top__header" v-if="livingItem" @click="goLive(livingItem)">
  113. <image class="img" src="/pages3/static/imgs/live.png" mode="widthFix"></image>
  114. <view class="note">正在直播中</view>
  115. <view class="title">{{livingItem.sectionName}}</view>
  116. </view>
  117. <view class="menuBox" v-for="(item, index) in menuList" :key="index">
  118. <!--模块 -->
  119. <view v-if="item.type == 1"
  120. ><courseModule
  121. :isLive="true"
  122. :orderGoodsId="orderGoodsId"
  123. :sectionMaxNum="goodsData.sectionMaxNum"
  124. :needOpen="menuIndex[0] === index ? true : false"
  125. :courseId="courseId"
  126. :preItem="menuList[index - 1]"
  127. :learningOrder="businessData.goodsLearningOrder"
  128. :goodsId="goodsId"
  129. :gradeId="gradeId"
  130. :isBuy="true"
  131. :menuItem="item"
  132. :levelId="item.menuId"
  133. ></courseModule
  134. ></view>
  135. <!--章 -->
  136. <view v-if="item.type == 2"
  137. ><courseChapter
  138. :isLive="true"
  139. :orderGoodsId="orderGoodsId"
  140. :sectionMaxNum="goodsData.sectionMaxNum"
  141. :needOpen="menuIndex[0] === index ? true : false"
  142. :courseId="courseId"
  143. :preItem="menuList[index - 1]"
  144. @playEnd="sectionPlayEnd($event, index)"
  145. :learningOrder="businessData.goodsLearningOrder"
  146. :goodsId="goodsId"
  147. :gradeId="gradeId"
  148. :isBuy="true"
  149. :menuItem="item"
  150. :levelId="'0-' + item.menuId"
  151. ></courseChapter
  152. ></view>
  153. <!--节 -->
  154. <view v-if="item.type == 3"
  155. ><courseSection
  156. :isLive="true"
  157. :orderGoodsId="orderGoodsId"
  158. :sectionMaxNum="goodsData.sectionMaxNum"
  159. @playEnd="sectionPlayEnd($event, index)"
  160. :courseId="courseId"
  161. :preItem="menuList[index - 1]"
  162. :learningOrder="businessData.goodsLearningOrder"
  163. :goodsId="goodsId"
  164. :gradeId="gradeId"
  165. :isBuy="true"
  166. :menuItem="item"
  167. :levelId="'0-0-' + item.menuId"
  168. ></courseSection
  169. ></view>
  170. </view>
  171. </view>
  172. <!--笔记 -->
  173. <view v-show="current == 1">
  174. <view v-if="noteList.length == 0" style="text-align: center"
  175. >暂无笔记</view
  176. >
  177. <!-- <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
  178. <view style="width: 10%"
  179. ><image
  180. src="/static/icon/note3.png"
  181. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  182. ></image
  183. ></view>
  184. <view style="width: 73%; height: 100%; padding: 10rpx 0">
  185. <u-input
  186. class="input"
  187. height="60"
  188. fixed="true"
  189. placeholder="您可以在这里输入笔记内容"
  190. type="input"
  191. :custom-style="inputStyle"
  192. v-model="noteValue"
  193. />
  194. </view>
  195. <view
  196. style="
  197. color: #007aff;
  198. font-size: 30rpx;
  199. font-weight: bold;
  200. width: 15%;
  201. text-align: center;
  202. "
  203. @click="postNote"
  204. >提交</view
  205. >
  206. </view> -->
  207. <view v-for="(item, index) in noteList" :key="index">
  208. <view class="dateBox">{{
  209. $method.timestampToTime(item.dateNote)
  210. }}</view>
  211. <view class="noteBox">
  212. <view
  213. v-for="(item1, index1) in item.userNotes"
  214. :key="index1"
  215. style="margin-top: 30rpx"
  216. @click="jumpNote(item1)"
  217. >
  218. <view style="display: flex">
  219. <view class="left_ti">
  220. <view>
  221. <image
  222. src="/static/icon/note2.png"
  223. v-if="noteId != item1.noteId"
  224. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  225. ></image>
  226. <image
  227. src="/static/icon/note1.png"
  228. v-if="noteId == item1.noteId"
  229. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  230. ></image>
  231. </view>
  232. <view
  233. class="title"
  234. style="width: 39rpx; height: 39rpx;"
  235. >{{ $method.secondToDate(item1.noteSecond) }}</view
  236. >
  237. </view>
  238. <view style="margin-left: 10rpx">
  239. <view class="t2Content leftPadding">{{
  240. item1.sectionName
  241. }}</view>
  242. <view class="tBox2">{{ item1.noteText }}</view>
  243. </view>
  244. </view>
  245. </view>
  246. </view>
  247. </view>
  248. </view>
  249. <!--答疑 -->
  250. <view v-show="current == 2" class="Answering">
  251. <!-- <view class="inputBottom">
  252. <view class="flex_auto">
  253. <u-input
  254. height="60"
  255. fixed="true"
  256. :focus="isFocus"
  257. :placeholder="placeholder"
  258. type="input"
  259. @blur="blur"
  260. :custom-style="inputStyle"
  261. v-model="ctxValue"
  262. />
  263. </view>
  264. <view class="btn" @click="postContent">提交</view>
  265. </view> -->
  266. <view
  267. v-for="(item, index) in answerList"
  268. :key="index"
  269. style="background-color: #ffffff;"
  270. class="answer_item"
  271. >
  272. <view class="chat_box" @click.stop="clearCtx">
  273. <view style="display: flex; flex: 1">
  274. <view
  275. ><image
  276. :src="
  277. item.assignUserId > 0 && !item.realname
  278. ? '/static/logo_xcx.png'
  279. : $method.splitImgHost(item.avatar)
  280. "
  281. style="width: 64rpx; height: 64rpx"
  282. ></image
  283. ></view>
  284. <view style="margin-left: 15rpx">
  285. <view class="chat1">{{
  286. item.assignUserId > 0 && !item.realname
  287. ? "祥粤老师"
  288. : item.realname
  289. }}</view>
  290. <view class="chat2">{{
  291. $method.timestampToTime(item.createTime, false)
  292. }}</view>
  293. <view class="chat3">
  294. <text v-if="item.assignUserId > 0">回复</text>
  295. <text v-if="item.assignUserId > 0" style="color: #007aff"
  296. >@{{ item.assignRealname }}</text
  297. >
  298. <view style="word-break: break-all">{{
  299. item.answerText
  300. }}</view>
  301. </view>
  302. </view>
  303. </view>
  304. <view
  305. class="btnReply"
  306. @click.stop="replyContent(item)"
  307. v-if="item.userId != userInfo.userId"
  308. >回复</view
  309. >
  310. <view v-else class="btnDel" @click.stop="delContent(item)"
  311. >删除</view
  312. >
  313. </view>
  314. <u-line color="#D6D6DB" />
  315. </view>
  316. <view v-if="answerList.length == 0" style="text-align: center"
  317. >暂无记录</view
  318. >
  319. </view>
  320. <!--答疑 -->
  321. <view v-show="current == 3">
  322. <view
  323. v-for="(item, index) in historyChatMsgList"
  324. :key="index"
  325. style="background-color: #ffffff; margin-bottom: 20rpx"
  326. >
  327. <view class="chat_box" @click.stop="clearCtx">
  328. <view style="display: flex; flex: 1">
  329. <view
  330. ><image
  331. :src="
  332. item.user.pic
  333. "
  334. style="width: 64rpx; height: 64rpx"
  335. ></image
  336. ></view>
  337. <view style="margin-left: 15rpx">
  338. <view class="chat1">{{
  339. item.user.nickname
  340. }}</view>
  341. <view class="chat2">{{
  342. item.time | formatDate
  343. }}</view>
  344. <view class="chat3">
  345. <!-- <text v-if="item.assignUserId > 0">回复</text>
  346. <text v-if="item.assignUserId > 0" style="color: #007aff"
  347. >@{{ item.assignRealname }}</text
  348. > -->
  349. <view style="word-break: break-all">{{
  350. item.content
  351. }}</view>
  352. </view>
  353. </view>
  354. </view>
  355. </view>
  356. <u-line color="#D6D6DB" />
  357. </view>
  358. <view v-if="historyChatMsgList.length == 0" style="text-align: center"
  359. >暂无记录</view
  360. >
  361. </view>
  362. </scroll-view>
  363. <!-- 底部固定按钮 -->
  364. <!-- 笔记的输入框 -->
  365. <template v-if="current == 1">
  366. <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0" :style="{ bottom: bottomHeight + 'px' }">
  367. <view style="width: 10%"
  368. ><image
  369. src="/static/icon/note3.png"
  370. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  371. ></image
  372. ></view>
  373. <view style="width: 73%; height: 100%; padding: 10rpx 0">
  374. <input
  375. v-model="noteValue"
  376. class="input"
  377. height="60"
  378. fixed="true"
  379. placeholder="您可以在这里输入笔记内容"
  380. type="text"
  381. :custom-style="inputStyle"
  382. :adjust-position="false"
  383. @focus="focusNote"
  384. @blur="blurNote"
  385. />
  386. </view>
  387. <view
  388. style="
  389. color: #007aff;
  390. font-size: 30rpx;
  391. font-weight: bold;
  392. width: 15%;
  393. text-align: center;
  394. "
  395. @click="postNote"
  396. >提交</view
  397. >
  398. </view>
  399. </template>
  400. <!-- 答疑 -->
  401. <view v-if="current == 2" class="inputBottom" :style="{ bottom: bottomHeight + 'px' }">
  402. <view class="flex_auto">
  403. <input
  404. v-model="ctxValue"
  405. height="60"
  406. fixed="true"
  407. :focus="isFocus"
  408. :placeholder="placeholder"
  409. type="text"
  410. :custom-style="inputStyle"
  411. :adjust-position="false"
  412. class="input"
  413. @focus="focusNote"
  414. @blur="blur"
  415. />
  416. </view>
  417. <view class="btn" @click="postContent">提交</view>
  418. </view>
  419. </view>
  420. <!-- 播放前拍照end -->
  421. <u-popup
  422. v-model="showSet"
  423. :mask-close-able="false"
  424. mode="center"
  425. border-radius="24"
  426. >
  427. <view
  428. style="
  429. align-items: center;
  430. padding: 0 40rpx;
  431. display: flex;
  432. flex-direction: column;
  433. justify-content: center;
  434. "
  435. >
  436. <view
  437. style="
  438. font-weight: bold;
  439. color: #333333;
  440. font-size: 30rpx;
  441. margin-top: 30rpx;
  442. "
  443. >温馨提示</view
  444. >
  445. <view
  446. style="
  447. width: 457rpx;
  448. color: #666666;
  449. font-size: 30rpx;
  450. margin-top: 30rpx;
  451. "
  452. >学习过程中需要拍照验证学员身份, 拍照功能需要使用您的相机。
  453. 是否授权使用?</view
  454. >
  455. <view style="margin: 40rpx 0">
  456. <button
  457. open-type="openSetting"
  458. @bindopensetting="openSetting"
  459. class="btnSet"
  460. >
  461. 去授权
  462. </button>
  463. </view>
  464. </view>
  465. </u-popup>
  466. <u-mask :show="photoPopup">
  467. <!-- 播放前拍照start -->
  468. <view
  469. v-if="photoPopup"
  470. :mask-close-able="false"
  471. style="bottom: 0; position: fixed; width: 100%; z-index: 999"
  472. >
  473. <view class="photoBox">
  474. <view class="photoTop">
  475. <view class="sqzz" v-if="false"
  476. ><u-icon
  477. name="close"
  478. color="#333333"
  479. size="30"
  480. @click="closePhoto"
  481. ></u-icon
  482. ></view>
  483. <view class="centersq">请正视手机屏幕</view>
  484. <view class="sqzz"></view>
  485. </view>
  486. <view class="photoCenter">
  487. <view
  488. style="width: 100%; height: 979rpx; position: fixed"
  489. v-if="photoPopup && isTaking"
  490. >
  491. <camera
  492. device-position="front"
  493. flash="off"
  494. @error="error"
  495. style="width: 100%; height: 100%"
  496. ></camera>
  497. </view>
  498. <view class="custom" v-if="!isTaking"
  499. ><image :src="avatarUrl" mode=""></image
  500. ></view>
  501. </view>
  502. <view class="btns">
  503. <view class="btnResult" v-if="isTaking" @click="takePhoto"
  504. >拍照</view
  505. >
  506. <view class="btnResult" v-if="!isTaking" @click="reTake">重拍</view>
  507. <view class="btnResult" v-if="!isTaking" @click="submit">确认</view>
  508. </view>
  509. </view>
  510. </view>
  511. </u-mask>
  512. <u-popup
  513. v-model="noticeShow"
  514. class="notice_modal"
  515. mode="center"
  516. border-radius="14"
  517. width="700rpx"
  518. height="900rpx"
  519. >
  520. <div class="content">
  521. <scroll-view scroll-y="true" style="height: 100%">
  522. <view class="title">学员须知</view>
  523. <text class="text">
  524. {{ goodsData.buyNote }}
  525. </text>
  526. </scroll-view>
  527. </div>
  528. </u-popup>
  529. </view>
  530. </template>
  531. <script>
  532. import plv from "@/pages3/static/polyv-sdk/index";
  533. import courseModule from "@/components/course/courseModule.vue";
  534. import courseChapter from "@/components/course/courseChapter.vue";
  535. import courseSection from "@/components/course/courseSection.vue";
  536. import {WEBVIEW_URL} from '@/common/request.js'
  537. // import { websocket } from "@/common/socket.js";
  538. import { mapGetters, mapMutations } from "vuex";
  539. export default {
  540. components: {
  541. courseModule,
  542. courseChapter,
  543. courseSection,
  544. },
  545. filters: {
  546. formatDate(date) {
  547. const nDate = new Date(date)
  548. const nyear = nDate.getFullYear()
  549. const nmonth = (nDate.getMonth()+1).toString().padStart(2,0)
  550. const nday = nDate.getDate().toString().padStart(2,0)
  551. const hour = nDate.getHours()
  552. const mins = nDate.getMinutes()
  553. const seconds = nDate.getSeconds()
  554. return nyear+'-'+nmonth+'-'+nday+' '+hour+':'+(mins>=10 ? mins : '0'+mins)+':'+(seconds>=10 ? seconds : '0'+seconds)
  555. }
  556. },
  557. data() {
  558. return {
  559. hasStart:false,
  560. channelItem:null,
  561. lockTimer: null,
  562. orderGoodsId: 0,
  563. noticeShow: false,
  564. navShow: true,
  565. enableAutoRotation: true,
  566. seekTime: "",
  567. toastTimer: null,
  568. videoToastShow: false,
  569. initLiveOk: false,
  570. livePlay: false, //是否正在播放直播,不含暂停
  571. liveDuration: 0, //直播观看时长
  572. videoOption: {
  573. mode: "live",
  574. uid: "",
  575. cid: "",
  576. openId: "",
  577. isAutoChange: false,
  578. forceVideo: false,
  579. },
  580. courseHandoutsData: "",
  581. liveDetail: {},
  582. showSet: false,
  583. startStatus: false,
  584. detail: {},
  585. courseId: 0,
  586. placeholder:
  587. "您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记",
  588. inputStyle: {
  589. background: "rgba(244, 244, 244, 0.98)",
  590. borderRadius: "24rpx",
  591. padding: "8rpx",
  592. marginBottom: "10rpx",
  593. },
  594. list: [{
  595. name: "目录",
  596. },
  597. {
  598. name: "笔记",
  599. },
  600. {
  601. name: "答疑",
  602. },
  603. {
  604. name: "聊天",
  605. }],
  606. menuList: [],
  607. current: 0,
  608. vid: "",
  609. goodsId: 0,
  610. goodsData: {},
  611. photoPopup: false,
  612. goodsPlayConfig: null,
  613. autoplay: false,
  614. isAllowSeek: "no",
  615. playbackRate: [1.0],
  616. timer: null,
  617. answerTimer: null,
  618. goodsPhotographConfig: null,
  619. intervalTimeList: [], // 间隔拍照时长
  620. intervalTimeIndex: 0, //当前处于哪个时间段拍照
  621. playTime: 0, //页面播放时长,不含暂停
  622. currentTime: 0,
  623. avatarUrl: "",
  624. ossAvatarUrl: "",
  625. studyDuration: 0, // 当前视频时长
  626. gradeId: 0,
  627. chapterId: 0,
  628. moduleId: 0,
  629. reMenuList: [],
  630. answerList: [],
  631. assignUserId: 0,
  632. placeholder: "您可以在这里输入答疑内容",
  633. ctxValue: "",
  634. noteList: [],
  635. noteValue: "",
  636. noteId: 0,
  637. recordObj: 0,
  638. gradeDetail: {},
  639. isTaking: true, //是否正在拍照
  640. needSeek: false, //第一次播放是否需要跳转
  641. needProfileModal: false, //是否需要资料审核弹框
  642. liveObj: {},
  643. photoNum: 0,
  644. photoList: [], //拍照的时间点
  645. photoConfig: false, //是否配置好拍照次数
  646. photoIndex: 0, //当前位于拍照的区间下标 从0开始
  647. photoHistoryList: [], //已拍照历史的下标点
  648. sectionItem: null,
  649. businessData: {},
  650. showNotes: true,
  651. menuIndex: [],
  652. uploadLock: false, //上传图片
  653. isPlayRebuild: false, //是否正在播放重修视频
  654. isRebuild: false, //视频是否从重修目录点击
  655. isFocus:false,
  656. clearTimer:null,
  657. historyChatMsgList:[],
  658. livingItem:'',
  659. bottomHeight: 0,
  660. };
  661. },
  662. computed: {
  663. ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
  664. },
  665. onLoad(option) {
  666. console.log('option====', option)
  667. this.courseId = Number(option.courseId);
  668. this.goodsId = Number(option.goodsId);
  669. // this.gradeId = option.gradeId || 0
  670. this.orderGoodsId = Number(option.orderGoodsId) || '';
  671. this.updateLiveLast(null)
  672. this.courseDetail();
  673. this.getGoodsDetail();
  674. this.getAnswerList();
  675. this.studyRecordMenuAllList();
  676. this.answerTimer = setInterval(() => {
  677. this.getAnswerList();
  678. }, 5000);
  679. let noteSecond = Number(option.noteSecond);
  680. if (noteSecond > 0) {
  681. //我的消息跳过来,播放节
  682. let item = {
  683. sectionId: Number(option.sectionId),
  684. recordingUrl: option.recordingUrl,
  685. noteSecond: noteSecond,
  686. studyDuration: noteSecond,
  687. };
  688. let playNextId = `moduleId${option.moduleId}chapterId${
  689. option.chapterId
  690. }sectionId${option.sectionId}${option.isRebuild ? "isRebuild" : ""}`;
  691. this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
  692. this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
  693. this.$store.commit("updatePlayNextId", playNextId);
  694. console.log("this.playNoteVideo");
  695. this.playNoteVideo(item)
  696. } else {
  697. this.studyRecordQueryLiveLast();
  698. }
  699. },
  700. onShow() {
  701. var self = this;
  702. //相机授权
  703. // this.userConfirmInfoDetail().then(res => {
  704. // })
  705. // this.getbaseprofiletplists();
  706. console.log(this.gradeId, 7512);
  707. },
  708. onHide() {
  709. },
  710. onUnload() {
  711. if (this.playSectionId > 0 && this.hasStart) {
  712. //退出提交记录
  713. this.postStudyRecord();
  714. }
  715. //清除正在播放的节ID
  716. // this.$store.commit('setPlayObj',null)
  717. this.$store.commit("setPlaySectionId", { playSectionId: 0 });
  718. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  719. this.$store.commit("setPlayVID", { playVID: null });
  720. this.closePlv();
  721. // console.log("onUnload");
  722. //移除所有的事件监听器
  723. uni.$off();
  724. clearInterval(this.answerTimer);
  725. if (this.timer) {
  726. clearInterval(this.timer);
  727. }
  728. // console.log(this.lockTimer, "this.lockTimer");
  729. if (this.lockTimer) {
  730. clearInterval(this.lockTimer);
  731. this.$api
  732. .lockDelLock({
  733. action: "jxjy",
  734. })
  735. .then((res) => {});
  736. }
  737. // websocket.sendMsg("delAction");
  738. },
  739. mounted() {
  740. uni.$on("changeSection", (oldSectionId) => {
  741. console.log(this.playVID);
  742. this.hasStart = false;
  743. this.photoConfig = false;
  744. this.photoIndex = 0;
  745. var polyvPlayerContext = this.selectComponent("#playerVideo");
  746. if (polyvPlayerContext) {
  747. //解决同个节视频切换问题
  748. polyvPlayerContext.seek(0);
  749. polyvPlayerContext.pause();
  750. }
  751. //清除直播
  752. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  753. this.postStudyRecord(0, oldSectionId);
  754. });
  755. uni.$on("getSection", (item) => {
  756. //清除直播
  757. this.hasStart = false;
  758. this.isPlayRebuild = item.rebuild;
  759. this.photoConfig = false;
  760. this.photoIndex = 0;
  761. this.sectionItem = item;
  762. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  763. //获取拍照历史
  764. this.getPhotoLastRecord();
  765. this.polyvLiveHistoryChatMsgList();
  766. this.playVideo(item);
  767. });
  768. uni.$on("levelId", (item) => {
  769. let arr = item.split("-");
  770. //点击节获取的各层级ID
  771. this.moduleId = arr[0];
  772. this.chapterId = arr[1];
  773. });
  774. uni.$on("getChannel", (item) => {
  775. //清除录播
  776. this.hasStart = false;
  777. this.$store.commit("setPlayVID", { playVID: null });
  778. this.getPhotoLastRecord();
  779. this.playChannel(item);
  780. this.channelItem = item;
  781. });
  782. uni.$on("isRebuild", (item) => {
  783. console.log(item);
  784. this.isRebuild = item;
  785. });
  786. this.updateChapterOpen(true);
  787. },
  788. methods: {
  789. ...mapMutations(["updateChapterOpen","updateLiveLast"]),
  790. /**
  791. * 获取上次观看的直播
  792. */
  793. studyRecordGetLastLive() {
  794. this.$api.studyRecordGetLastLive({
  795. orderGoodsId:this.orderGoodsId,
  796. courseId:this.courseId
  797. }).then(res => {
  798. console.log(res,'liveres')
  799. this.updateLiveLast(res.data.data)
  800. })
  801. },
  802. /**
  803. * 获取最后一次看的节
  804. */
  805. studyRecordQueryLiveLast() {
  806. this.$api.studyRecordQueryLiveLast({
  807. orderGoodsId:this.orderGoodsId,
  808. courseId:this.courseId
  809. }).then(res => {
  810. console.log(res,'couse')
  811. if(res.data.data) {
  812. if(res.data.data.sectionType == 1) { //录播
  813. this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
  814. this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
  815. this.sectionItem = res.data.data;
  816. this.playVideo(res.data.data)
  817. } else if(res.data.data.sectionType == 2) { //直播
  818. this.studyRecordGetLastLive();
  819. } else if(res.data.data.sectionType == 3) { //回放
  820. this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
  821. this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
  822. this.sectionItem = res.data.data;
  823. this.polyvLiveHistoryChatMsgList();
  824. if(!res.data.data.recordingUrl) {
  825. return;
  826. }
  827. this.playVideo(res.data.data)
  828. }
  829. }
  830. })
  831. },
  832. async goLive(item) {
  833. let data = await this.studyRecordGetChannelBasicInfo(item.liveUrl);
  834. let nowTime = +this.$method.timest();
  835. if (item.liveStartTime > nowTime) {
  836. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  837. uni.showToast({
  838. title: '直播未开始',
  839. icon: 'none'
  840. });
  841. return;
  842. }
  843. } else if (
  844. item.liveStartTime < nowTime &&
  845. item.liveEndTime > nowTime
  846. ) {
  847. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  848. uni.showToast({
  849. title: '暂无直播',
  850. icon: 'none'
  851. });
  852. return;
  853. }
  854. } else if (item.liveEndTime < nowTime) {
  855. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  856. uni.showToast({
  857. title: '直播已结束',
  858. icon: 'none'
  859. });
  860. return;
  861. }
  862. }
  863. let moduleId = item.moduleId || 0;
  864. let chapterId = item.chapterId || 0;
  865. let sectionId = item.sectionId || item.menuId;
  866. let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+item.liveUrl+'&gradeId='+this.gradeId+'&courseId='+this.courseId+'&goodsId='+this.goodsId+'&orderGoodsId='+this.orderGoodsId+'&sectionId='+sectionId+'&chapterId='+chapterId+'&moduleId='+moduleId)
  867. uni.navigateTo({
  868. url:`../../pages/webview/index?url=`+encode
  869. })
  870. },
  871. studyRecordMenuAllList() {
  872. this.$api.studyRecordMenuAllList({
  873. courseId:this.courseId,
  874. gradeId:this.gradeId,
  875. goodsId:this.goodsId
  876. }).then(res => {
  877. let nowTime = Number(new Date().getTime()/1000).toFixed(0)
  878. // this.livingItem = res.data.data[0]
  879. this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
  880. })
  881. },
  882. studyRecordGetChannelBasicInfo(channelId) {
  883. return new Promise((resolve) => {
  884. this.$api
  885. .studyRecordGetChannelBasicInfo({
  886. channelId,
  887. })
  888. .then((res) => {
  889. resolve(res.data.data);
  890. });
  891. });
  892. },
  893. polyvLiveHistoryChatMsgList() {
  894. this.$api.polyvLiveHistoryChatMsgList({
  895. sectionId:this.playSectionId,
  896. channelId:this.sectionItem.liveUrl
  897. }).then(res => {
  898. this.historyChatMsgList = res.data.data
  899. })
  900. },
  901. /**
  902. * 获取业务层次详情
  903. */
  904. // courseBusiness() {
  905. // this.$api.courseBusiness(this.goodsData.businessId).then((res) => {
  906. // this.businessData = res.data.data;
  907. // });
  908. // },
  909. /**
  910. * 计算tabs宽度
  911. */
  912. itemWidth() {
  913. return 100 / this.list.length + "%";
  914. },
  915. /**
  916. * 获取讲义权限
  917. */
  918. // courseHandouts() {
  919. // this.$api.courseHandouts(this.goodsData.handoutsId).then((res) => {
  920. // this.courseHandoutsData = res.data.data;
  921. // });
  922. // },
  923. findMenuNextSection(index) {
  924. for (let i = index + 1; i < this.reMenuList.length; i++) {
  925. let item = this.reMenuList[i];
  926. if (item.type == 3) {
  927. return item;
  928. }
  929. }
  930. return {};
  931. },
  932. loadedmetadata(e) {
  933. var polyvPlayerContext = this.selectComponent("#playerVideo");
  934. this.hasStart = true;
  935. uni.$off('playPause')
  936. uni.$on('playPause',() => {
  937. polyvPlayerContext.pause()
  938. })
  939. if(!this.recordObj.videoCurrentTime) { //新视频直接提交一条观看记录
  940. this.postStudyRecord(0)
  941. }
  942. },
  943. getPhotoLastRecord() {
  944. let self = this;
  945. let data = {
  946. sectionId: parseInt(self.playSectionId),
  947. goodsId: parseInt(self.goodsId),
  948. courseId: parseInt(self.courseId),
  949. gradeId: parseInt(self.gradeId),
  950. chapterId: parseInt(self.chapterId),
  951. moduleId: parseInt(self.moduleId),
  952. orderGoodsId: this.orderGoodsId,
  953. };
  954. this.$api.getPhotoLastRecord(data).then((res) => {
  955. if (res.data.code == 200) {
  956. //清空历史数据
  957. self.photoHistoryList = [];
  958. this.photoIndex = 0;
  959. self.photoList = [];
  960. for (let i = 0; i < res.data.data.length; i++) {
  961. //-2存储随机拍照数组
  962. if (res.data.data[i].photoIndex == -2) {
  963. self.photoList = res.data.data[i].timeInterval.split(",");
  964. } else {
  965. self.photoHistoryList.push(res.data.data[i].photoIndex);
  966. }
  967. }
  968. }
  969. });
  970. },
  971. //postTime 只提交随机时间
  972. postCoursePhotoRecord(postTime = false) {
  973. return new Promise((resolve, reject) => {
  974. let currentTime = 0;
  975. var polyvPlayerContext = this.selectComponent("#playerVideo");
  976. if (polyvPlayerContext) {
  977. currentTime = polyvPlayerContext.getCurrentTime();
  978. }
  979. let self = this;
  980. let photoIndex = self.photoIndex;
  981. let data = {
  982. photo: self.ossAvatarUrl,
  983. sectionId: parseInt(self.playSectionId),
  984. goodsId: parseInt(self.goodsId),
  985. courseId: parseInt(self.courseId),
  986. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  987. gradeId: parseInt(self.gradeId),
  988. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  989. photoNum: parseInt(self.photoNum),
  990. chapterId: parseInt(self.chapterId),
  991. moduleId: parseInt(self.moduleId),
  992. timeInterval: postTime ? self.photoList.join(",") : "",
  993. orderGoodsId: this.orderGoodsId,
  994. };
  995. console.log("提交接口", data);
  996. this.$api
  997. .coursePhotoRecord(data)
  998. .then((res) => {
  999. console.log(res,'postCoursePhotoRecord')
  1000. if (res.data.code == 200) {
  1001. resolve();
  1002. } else {
  1003. reject();
  1004. }
  1005. })
  1006. .catch((err) => {
  1007. reject();
  1008. });
  1009. });
  1010. },
  1011. randomNum(minNum, maxNum) {
  1012. switch (arguments.length) {
  1013. case 1:
  1014. return parseInt(Math.random() * minNum + 1, 10);
  1015. break;
  1016. case 2:
  1017. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  1018. break;
  1019. default:
  1020. return 0;
  1021. break;
  1022. }
  1023. },
  1024. //配置随机拍照时间
  1025. configPhoto() {
  1026. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1027. let totalVideoTime = polyvPlayerContext.getDuration();
  1028. let duration = polyvPlayerContext.getCurrentTime();
  1029. let photoNum = this.photoNum;
  1030. if (!this.photoConfig) {
  1031. this.photoConfig = true;
  1032. // let spaceTime = Math.floor(totalVideoTime/photoNum) //拍照时间区间
  1033. // if(spaceTime<5){//区间小于5秒
  1034. // photoNum = Math.floor(totalVideoTime/5)
  1035. // spaceTime = 5
  1036. // }
  1037. // if(photoNum<1){
  1038. // photoNum = 1 //只要设置,至少拍一次
  1039. // spaceTime = totalVideoTime
  1040. // }
  1041. // let initSpace = 0
  1042. //没有历史拍照间隔数据
  1043. if (this.photoList.length == 0) {
  1044. if (totalVideoTime >= 900) {
  1045. //大于15分钟
  1046. if (photoNum == 1) {
  1047. //开头拍1张
  1048. this.photoList.push(0);
  1049. } else if (photoNum == 3) {
  1050. //拍3张
  1051. this.photoList.push(0); //开头拍一张
  1052. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  1053. let centerMinTime = centerTime - 300; //前后5分钟
  1054. let centerMaxTime = centerTime + 300;
  1055. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  1056. this.photoList.push(centerTakeTime); //中间拍一张
  1057. let endMaxTime = totalVideoTime - 60;
  1058. let endMinTime = totalVideoTime - 300;
  1059. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  1060. this.photoList.push(endTakeTime); //最后拍一张
  1061. }
  1062. } else {
  1063. //小于15分钟,只拍前后各一张
  1064. if (photoNum == 1) {
  1065. //开头拍1张
  1066. this.photoList.push(0);
  1067. } else if (photoNum == 3) {
  1068. //拍2张
  1069. if (totalVideoTime <= 300) {
  1070. //小于5分钟
  1071. this.photoList.push(0); //开头拍一张
  1072. let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
  1073. this.photoList.push(endTakeTime);
  1074. } else {
  1075. this.photoList.push(0); //开头拍一张
  1076. let endMaxTime = totalVideoTime - 60;
  1077. let endMinTime = totalVideoTime - 300;
  1078. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  1079. this.photoList.push(endTakeTime); //最后1-5分钟拍一张
  1080. }
  1081. }
  1082. }
  1083. // for(let i=0;i<photoNum;i++){
  1084. // let s = this.randomNum(initSpace,initSpace+spaceTime)
  1085. // if(s>totalVideoTime){
  1086. // s = totalVideoTime-1
  1087. // }
  1088. // if(s<=5){
  1089. // s =5 //避免出现5秒内拍照时间
  1090. // }
  1091. // this.photoList.push(s)
  1092. // initSpace+=spaceTime
  1093. // }
  1094. console.log(this.photoList, "随机拍照时间数组11", photoNum);
  1095. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  1096. }
  1097. console.log(this.photoList, "随机拍照时间数组");
  1098. //兼容已有观看历史
  1099. for (let i = 0; i < this.photoList.length - 1; i++) {
  1100. if (
  1101. this.photoList[i] < duration &&
  1102. this.photoList[i + 1] > duration
  1103. ) {
  1104. this.photoIndex = i + 1;
  1105. // console.log("我的修改了photoIndex")
  1106. break;
  1107. }
  1108. if (duration > this.photoList[this.photoList.length - 1]) {
  1109. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  1110. // console.log("我的修改了photoIndex")
  1111. break;
  1112. }
  1113. }
  1114. }
  1115. },
  1116. getLiveUid(channelId) {
  1117. let self = this;
  1118. return new Promise((resolve) => {
  1119. let data = {
  1120. channelId: channelId,
  1121. orderGoodsId: this.orderGoodsId,
  1122. };
  1123. self.$api.polyvSign(data).then((res) => {
  1124. resolve(res.data.data);
  1125. });
  1126. });
  1127. },
  1128. timeEventLiving() {
  1129. if (plv != null) {
  1130. if (this.livePlay) {
  1131. this.liveDuration = this.liveDuration + 1; //每隔1秒
  1132. if (this.liveDuration == 2) {
  1133. //直播第2秒拍照
  1134. console.log(this.channelItem)
  1135. console.log(this.photoHistoryList,'this.photoHistoryList')
  1136. if (
  1137. this.goodsPhotographConfig && this.goodsPhotographConfig.livephotograph == 1 &&
  1138. this.channelItem.learning != 1 && this.photoHistoryList.length == 0
  1139. ) {
  1140. //开启直播拍照
  1141. this.openPhoto();
  1142. } else {
  1143. this.postStudyRecord(0);
  1144. }
  1145. }
  1146. }
  1147. }
  1148. },
  1149. playerLiveStatusChange(e) {
  1150. const status = e.detail.status;
  1151. console.log("直播状态", status);
  1152. if (status === "live") {
  1153. console.log("开始直播");
  1154. //开始播放
  1155. if (this.timer) {
  1156. clearInterval(this.timer);
  1157. }
  1158. this.livePlay = true;
  1159. this.timer = setInterval(this.timeEventLiving, 1000); //定时器
  1160. }
  1161. if (status === "end") {
  1162. this.hasStart = false;
  1163. if (this.livePlay) {
  1164. //只有播放过的结束才提交,避免未开播触发结束
  1165. this.postStudyRecord(1);
  1166. }
  1167. console.log("结束直播");
  1168. this.livePlay = false;
  1169. // 未开始
  1170. }
  1171. },
  1172. closePlv() {
  1173. if (plv) {
  1174. plv.destroy();
  1175. }
  1176. },
  1177. playChannel(item) {
  1178. if (this.timer) {
  1179. clearInterval(this.timer);
  1180. }
  1181. this.startStatus = true;
  1182. this.initLive();
  1183. },
  1184. setLiveOption(status) {
  1185. const { userId, channelId, recordFileSimpleModel, playbackEnabled } =
  1186. this.detail;
  1187. const playRecordFile =
  1188. playbackEnabled && recordFileSimpleModel && status === "end";
  1189. // if(this.channelItem.sectionType == 3) { //回放
  1190. // // this.videoOption = {
  1191. // // mode: "live",
  1192. // // uid: this.liveObj.uid, //this.playChannelId egsxlptzdq
  1193. // // cid: this.playChannelId,
  1194. // // openId: this.userInfo.userAccount,
  1195. // // isAutoChange: false,
  1196. // // forceVideo: false,
  1197. // // };
  1198. // } else { //直播
  1199. this.videoOption = {
  1200. mode: "live",
  1201. uid: this.liveObj.uid, //this.playChannelId egsxlptzdq
  1202. cid: this.playChannelId,
  1203. openId: this.userInfo.userAccount,
  1204. isAutoChange: false,
  1205. forceVideo: false,
  1206. };
  1207. // }
  1208. },
  1209. async initLive() {
  1210. console.log(this.playChannelId, 7111);
  1211. this.liveObj = await this.getLiveUid(this.playChannelId);
  1212. this.initLiveOk = true;
  1213. let optionsData = {};
  1214. optionsData.mode = "live";
  1215. optionsData.forceVideo = false;
  1216. optionsData.channelId = this.playChannelId; // 频道ID '2553128'
  1217. optionsData.openId = this.userInfo.userAccount; // 用户openId this.userInfo.userAccount 'oQ5eX5BCtSjkE1ct8CzvxGWgh0hQ'
  1218. optionsData.userId = this.liveObj.uid; // 2.0.0及以上版本的demo需要使用 userId 设置学员唯一id 'egsxlptzdq'
  1219. let self = this;
  1220. this.closePlv();
  1221. plv.init(optionsData).then(({ detail, chat }) => {
  1222. self.liveDetail = detail;
  1223. // 设置mode为live的videoOption
  1224. this.setLiveOption();
  1225. if (detail.isPPT) {
  1226. chat.on(chat.events.SLICESTART, () => {
  1227. // 开始直播
  1228. });
  1229. } else {
  1230. plv.api.getOrdinaryLiveStatus(detail.stream);
  1231. }
  1232. });
  1233. },
  1234. openSetting(res) {
  1235. console.log(res, 98);
  1236. },
  1237. getCameraSetting() {
  1238. const self = this;
  1239. wx.getSetting({
  1240. success: (res) => {
  1241. if (res.authSetting["scope.camera"]) {
  1242. // 用户已经授权
  1243. self.showSet = false;
  1244. } else {
  1245. // 用户还没有授权,向用户发起授权请求
  1246. wx.authorize({
  1247. scope: "scope.camera",
  1248. success() {
  1249. // 用户同意授权
  1250. self.showSet = false;
  1251. },
  1252. fail() {
  1253. // 用户不同意授权
  1254. self.showSet = true;
  1255. /* wx.showToast({
  1256. title: '摄像头授权失败',
  1257. icon: 'none',
  1258. duration: 3000
  1259. }) */
  1260. },
  1261. });
  1262. }
  1263. },
  1264. fail: (res) => {},
  1265. });
  1266. },
  1267. studyNotice() {
  1268. this.noticeShow = true;
  1269. },
  1270. //播放笔记视频
  1271. async playNoteVideo(item) {
  1272. console.log(item, "noteItem");
  1273. if (this.timer) {
  1274. clearInterval(this.timer);
  1275. }
  1276. if (this.vid) {
  1277. //切换视频
  1278. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1279. polyvPlayerContext.changeVid(item.recordingUrl);
  1280. } else {
  1281. this.vid = item.recordingUrl;
  1282. }
  1283. this.recordObj = { videoCurrentTime: item.noteSecond };
  1284. if (this.recordObj.videoCurrentTime) {
  1285. this.needSeek = true; //需要跳转到播放记录
  1286. }
  1287. this.startStatus = true;
  1288. //获取节笔记
  1289. this.getNoteList();
  1290. },
  1291. //正常播放视频
  1292. async playVideo(item) {
  1293. console.log(item);
  1294. if (this.timer) {
  1295. clearInterval(this.timer);
  1296. }
  1297. if (this.vid) {
  1298. //切换视频
  1299. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1300. polyvPlayerContext.changeVid(item.recordingUrl);
  1301. } else {
  1302. console.log(2)
  1303. this.vid = item.recordingUrl;
  1304. }
  1305. this.recordObj = null;
  1306. this.recordObj = await this.getRecordLast();
  1307. this.needSeek = true; //跳转到播放记录
  1308. this.startStatus = true;
  1309. //获取节笔记
  1310. this.getNoteList();
  1311. },
  1312. getRecordLast() {
  1313. let self = this;
  1314. return new Promise((resolve) => {
  1315. let data = {
  1316. gradeId: Number(self.gradeId),
  1317. goodsId: Number(self.goodsId),
  1318. sectionId: Number(self.playSectionId),
  1319. courseId: Number(self.courseId),
  1320. chapterId: parseInt(self.chapterId),
  1321. moduleId: parseInt(self.moduleId),
  1322. orderGoodsId: this.orderGoodsId,
  1323. };
  1324. self.$api.recordLast(data).then((res) => {
  1325. resolve(res.data.data);
  1326. });
  1327. });
  1328. },
  1329. jumpNote(item) {
  1330. this.noteId = item.noteId;
  1331. //没视频播放
  1332. if (this.playSectionId == 0) {
  1333. console.log("即将跳到笔记位置1");
  1334. this.$u.toast("即将跳到笔记位置");
  1335. this.$store.commit("setPlaySectionId", {
  1336. playSectionId: item.sectionId,
  1337. });
  1338. this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
  1339. this.playNoteVideo(item);
  1340. } else {
  1341. //正在看当前笔记视频
  1342. console.log("即将跳到笔记位置2");
  1343. this.$u.toast("即将跳到笔记位置");
  1344. //跳到笔记时刻
  1345. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1346. polyvPlayerContext.seek(item.noteSecond);
  1347. polyvPlayerContext.play();
  1348. }
  1349. },
  1350. postNote() {
  1351. let self = this;
  1352. if (!(this.playSectionId > 0)) {
  1353. this.$u.toast("目前无播放视频");
  1354. return;
  1355. }
  1356. if (!this.noteValue) {
  1357. this.$u.toast("请输入内容");
  1358. return;
  1359. }
  1360. // if (!this.gradeId) { // 直播课程没有班级,去掉判断,默认为0
  1361. // this.$u.toast("暂无班级数据");
  1362. // return;
  1363. // }
  1364. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1365. let noteDate = this.$method.getZeroTime();
  1366. let noteSecond = polyvPlayerContext.getCurrentTime();
  1367. console.log(noteSecond, 698);
  1368. if (!noteSecond) {
  1369. if (noteSecond == 0) {
  1370. //播放结束
  1371. noteSecond = polyvPlayerContext.getDuration();
  1372. console.log(noteSecond, 63398);
  1373. }
  1374. if (!noteSecond) {
  1375. this.$u.toast("视频暂未开始");
  1376. return;
  1377. }
  1378. }
  1379. let data = {
  1380. gradeId: this.gradeId,
  1381. goodsId: this.goodsId,
  1382. sectionId: this.playSectionId,
  1383. courseId: this.courseId,
  1384. noteText: this.noteValue,
  1385. noteDate: noteDate,
  1386. noteSecond: noteSecond,
  1387. orderGoodsId: this.orderGoodsId,
  1388. };
  1389. // /user/note 新增用户笔记
  1390. this.$api.postNote(data).then((res) => {
  1391. if (res.data.code == 200) {
  1392. this.$u.toast("发布成功");
  1393. self.getNoteList();
  1394. this.noteValue = "";
  1395. }
  1396. });
  1397. },
  1398. getNoteList() {
  1399. let self = this;
  1400. self.noteList = [];
  1401. let data = {
  1402. courseId: this.courseId,
  1403. gradeId: this.gradeId,
  1404. goodsId: this.goodsId,
  1405. orderGoodsId: this.orderGoodsId,
  1406. };
  1407. if (this.playSectionId > 0) {
  1408. data.sectionId = this.playSectionId;
  1409. }
  1410. this.$api.noteList(data).then((res) => {
  1411. if (res.data.code == 200) {
  1412. self.noteList = res.data.rows;
  1413. }
  1414. });
  1415. },
  1416. delAnswer(answerId) {
  1417. let self = this;
  1418. let data = { answerId: answerId, status: -1 ,orderGoodsId: this.orderGoodsId,};
  1419. this.$api.delAnswer(data).then((res) => {
  1420. if (res.data.code == 200) {
  1421. self.getAnswerList();
  1422. }
  1423. });
  1424. },
  1425. clearCtx() {
  1426. console.log(4234);
  1427. this.placeholder = "您可以在这里输入答疑内容";
  1428. this.ctxValue = "";
  1429. this.assignUserId = 0;
  1430. },
  1431. focusNote(event) {
  1432. console.log('event', event.detail.height)
  1433. this.bottomHeight = event.detail.height
  1434. },
  1435. blurNote() {
  1436. this.bottomHeight = 0
  1437. },
  1438. blur() {
  1439. this.bottomHeight = 0
  1440. this.clearTimer = setTimeout(() => {
  1441. this.ctxValue = ""
  1442. this.isFocus = false;
  1443. this.assignUserId = 0;
  1444. this.placeholder = '您可以在这里输入答疑内容';
  1445. },2000)
  1446. },
  1447. replyContent(item) {
  1448. this.isFocus = true;
  1449. this.assignUserId = item.userId;
  1450. this.placeholder = "@" + item.realname;
  1451. },
  1452. delContent(item) {
  1453. this.delAnswer(item.answerId);
  1454. },
  1455. postAnswer() {
  1456. let self = this;
  1457. let data = {
  1458. courseId: this.courseId,
  1459. answerText: this.ctxValue,
  1460. goodsId: this.goodsId,
  1461. orderGoodsId: this.orderGoodsId,
  1462. };
  1463. if (this.assignUserId > 0) {
  1464. data.assignUserId = this.assignUserId;
  1465. }
  1466. this.$api.postAnswer(data).then((res) => {
  1467. if (res.data.code == 200) {
  1468. this.$u.toast("发布成功");
  1469. self.getAnswerList();
  1470. this.isFocus = false;
  1471. this.placeholder = "您可以在这里输入答疑内容";
  1472. this.ctxValue = "";
  1473. this.assignUserId = 0;
  1474. }
  1475. });
  1476. },
  1477. postContent() {
  1478. if (!this.ctxValue || this.ctxValue == "") {
  1479. this.$u.toast("请输入内容");
  1480. return;
  1481. }
  1482. this.postAnswer();
  1483. },
  1484. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  1485. console.log("status", status);
  1486. let currentTime = 0;
  1487. let PlayDuration = 0;
  1488. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1489. if (polyvPlayerContext) {
  1490. currentTime = polyvPlayerContext.getCurrentTime(); //总的视频播放时刻
  1491. PlayDuration = polyvPlayerContext.getVideoPlayDuration(); //本次看的时长
  1492. }
  1493. if (this.playChannelId > 0) {
  1494. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  1495. }
  1496. let self = this;
  1497. let data = {
  1498. photo: self.ossAvatarUrl,
  1499. sectionId: parseInt(sectionId),
  1500. goodsId: parseInt(self.goodsId),
  1501. courseId: parseInt(self.courseId),
  1502. orderGoodsId: this.orderGoodsId,
  1503. studyDuration: parseInt(
  1504. PlayDuration > 0 ? PlayDuration : self.studyDuration
  1505. ),
  1506. gradeId: parseInt(self.gradeId),
  1507. chapterId: parseInt(self.chapterId),
  1508. moduleId: parseInt(self.moduleId),
  1509. videoCurrentTime: parseInt(
  1510. currentTime > 0 ? currentTime : self.studyDuration
  1511. ),
  1512. };
  1513. if (status > 0) {
  1514. console.log(sectionId, "sectionId");
  1515. data.status = status;
  1516. }
  1517. console.log("提交接口", data);
  1518. this.$api.studyRecord(data).then((res) => {
  1519. if (res.data.code == 200) {
  1520. if (status > 0) {
  1521. let moduleId = this.moduleId || 0;
  1522. let chapterId = this.chapterId || 0;
  1523. let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
  1524. let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
  1525. console.log(playNextId, "playNextId");
  1526. console.log(playNextIdisRebuild, "playNextIdisRebuild");
  1527. uni.$emit("playNext" + playNextIdisRebuild, {
  1528. fromRebuild: this.isRebuild,
  1529. }); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
  1530. uni.$emit("playNext" + playNextId); //通知播放结束
  1531. }
  1532. self.ossAvatarUrl = "";
  1533. } else {
  1534. this.uploadLock = false;
  1535. uni.showToast({
  1536. icon: "none",
  1537. title: res.data.msg,
  1538. });
  1539. }
  1540. console.log(res, "res");
  1541. });
  1542. },
  1543. uploadFile(options, int) {
  1544. console.log(options)
  1545. var self = this;
  1546. return new Promise((resolve, reject) => {
  1547. var data = {
  1548. imageStatus: int,
  1549. gradeId: this.gradeId,
  1550. orderGoodsId: this.orderGoodsId,
  1551. };
  1552. self.$api.aliyunpolicy(data).then((res) => {
  1553. if (res.data.code != 200) {
  1554. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  1555. return;
  1556. }
  1557. var ossToken = res.data.data.resultContent;
  1558. if (ossToken.host == null || ossToken.host == undefined) {
  1559. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  1560. return;
  1561. }
  1562. uni.uploadFile({
  1563. url: ossToken.host,
  1564. name: "file",
  1565. filePath: options,
  1566. fileType: "image",
  1567. header: {
  1568. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  1569. },
  1570. formData: {
  1571. key: ossToken.dir,
  1572. OSSAccessKeyId: ossToken.accessid,
  1573. policy: ossToken.policy,
  1574. Signature: ossToken.signature,
  1575. callback: ossToken.callback,
  1576. success_action_status: 200,
  1577. },
  1578. success: (result) => {
  1579. if (result.statusCode === 200) {
  1580. self.ossAvatarUrl = ossToken.dir;
  1581. resolve();
  1582. } else {
  1583. uni.showToast({
  1584. title: "上传失败",
  1585. icon: "none",
  1586. });
  1587. this.openPhoto();
  1588. return;
  1589. }
  1590. },
  1591. fail: (error) => {
  1592. uni.showToast({
  1593. title: "上传接口报错,请重新拍照上传" + error,
  1594. icon: "none",
  1595. });
  1596. this.openPhoto();
  1597. return;
  1598. },
  1599. });
  1600. });
  1601. });
  1602. },
  1603. imageInfos() {
  1604. var self = this;
  1605. return new Promise((resolve, reject) => {
  1606. uni.getImageInfo({
  1607. src: self.avatarUrl,
  1608. success: async (res) => {
  1609. let canvasWidth = res.width; //图片原始长宽
  1610. let canvasHeight = res.height;
  1611. if (canvasWidth > 2000 || canvasHeight > 2000) {
  1612. uni.compressImage({
  1613. src: self.avatarUrl,
  1614. quality: 75,
  1615. width: "35%",
  1616. height: "35%",
  1617. success: async (rest) => {
  1618. const waitUpload = await self.uploadFile(
  1619. rest.tempFilePath,
  1620. 0
  1621. );
  1622. resolve(waitUpload);
  1623. },
  1624. });
  1625. } else if (canvasWidth > 1000 || canvasHeight > 1000) {
  1626. uni.compressImage({
  1627. src: self.avatarUrl,
  1628. quality: 75,
  1629. width: "50%",
  1630. height: "50%",
  1631. success: async (rest) => {
  1632. const waitUpload = await self.uploadFile(
  1633. rest.tempFilePath,
  1634. 0
  1635. );
  1636. resolve(waitUpload);
  1637. },
  1638. });
  1639. } else {
  1640. console.log("无需压缩");
  1641. const waitUpload = await self.uploadFile(self.avatarUrl, 0);
  1642. resolve(waitUpload);
  1643. }
  1644. },
  1645. });
  1646. });
  1647. },
  1648. timeEvent() {
  1649. let self = this;
  1650. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1651. if (polyvPlayerContext != null) {
  1652. this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
  1653. // console.log(this.playTime,789,this.photoHistoryList)
  1654. //判断是否需要拍照
  1655. if (this.photoNum > 0) {
  1656. this.configPhoto();
  1657. let photoTime = 0; //获取拍照秒数
  1658. for (let i = 0; i < this.photoList.length; i++) {
  1659. photoTime = Number(this.photoList[i]); //获取拍照秒数
  1660. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  1661. //3秒区间内才触发拍照,避免拉动滚动条
  1662. if (
  1663. this.photoHistoryList.indexOf(i) < 0 &&
  1664. this.sectionItem.learning != 1
  1665. ) {
  1666. //不存在拍照历史,没有重修过,没有学过,则拍照
  1667. //启动拍照
  1668. //暂停
  1669. polyvPlayerContext.exitFullScreen();
  1670. polyvPlayerContext.pause();
  1671. this.photoIndex = i;
  1672. this.openPhoto();
  1673. }
  1674. }
  1675. }
  1676. }
  1677. }
  1678. },
  1679. closeToast() {
  1680. clearTimeout(this.toastTimer);
  1681. this.videoToastShow = false;
  1682. },
  1683. restart() {
  1684. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1685. polyvPlayerContext.seek(0);
  1686. console.log("seek1");
  1687. clearTimeout(this.toastTimer);
  1688. this.videoToastShow = false;
  1689. },
  1690. onStateChange(newstate, oldstate) {
  1691. if (newstate.detail.newstate == "playing") {
  1692. if (this.needSeek) {
  1693. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1694. if (this.recordObj.videoCurrentTime) {
  1695. console.log("seek2");
  1696. polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
  1697. this.seekTime = this.$method.secondToDate(
  1698. this.recordObj.videoCurrentTime
  1699. );
  1700. this.videoToastShow = true;
  1701. this.toastTimer = setTimeout(() => {
  1702. this.videoToastShow = false;
  1703. }, 3000);
  1704. } else {
  1705. polyvPlayerContext.seek(1); //避免相同节继续播放
  1706. console.log("seek3");
  1707. }
  1708. polyvPlayerContext.play();
  1709. this.needSeek = false;
  1710. }
  1711. //开始播放
  1712. if (this.timer) {
  1713. clearInterval(this.timer);
  1714. }
  1715. this.timer = setInterval(this.timeEvent, 1000); //定时器
  1716. }
  1717. if (newstate.detail.newstate == "pause") {
  1718. clearInterval(this.timer);
  1719. //暂停提交记录
  1720. /* this.ossAvatarUrl = ""
  1721. this.postStudyRecord() */
  1722. }
  1723. if (newstate.detail.newstate == "ended") {
  1724. clearInterval(this.timer);
  1725. uni.showToast({
  1726. icon: "none",
  1727. title: "播放完毕",
  1728. });
  1729. this.hasStart = false;
  1730. this.postStudyRecord(1);
  1731. // uni.$emit('playNext') //播放重修下一节
  1732. }
  1733. },
  1734. //拍照
  1735. openPhoto() {
  1736. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1737. if (polyvPlayerContext) {
  1738. polyvPlayerContext.exitFullScreen();
  1739. }
  1740. this.enableAutoRotation = false;
  1741. this.photoPopup = true;
  1742. this.isTaking = true;
  1743. uni.setKeepScreenOn({
  1744. keepScreenOn: true,
  1745. });
  1746. uni.authorize({
  1747. scope: "scope.camera",
  1748. success() {},
  1749. });
  1750. },
  1751. /**
  1752. * 人脸匹配
  1753. */
  1754. faceRecognition() {
  1755. return new Promise((resolve) => {
  1756. let fileSystem = uni.getFileSystemManager();
  1757. fileSystem.readFile({
  1758. filePath: `${this.avatarUrl}`,
  1759. encoding: "base64",
  1760. position: 0,
  1761. success: (res) => {
  1762. console.log(res);
  1763. let base64 = "data:image/jpg;base64," + res.data;
  1764. console.log({
  1765. imageA: base64,
  1766. orderGoodsId: this.orderGoodsId,
  1767. gradeId: this.gradeId,
  1768. },'base64Data')
  1769. this.$api
  1770. .faceCertificationCompareFace({
  1771. imageA: base64,
  1772. orderGoodsId: this.orderGoodsId,
  1773. gradeId: this.gradeId,
  1774. })
  1775. .then((res) => {
  1776. console.log(res, "res");
  1777. resolve(res.data.data);
  1778. });
  1779. },
  1780. fail(err) {
  1781. console.error(err, "err");
  1782. },
  1783. });
  1784. });
  1785. },
  1786. async submit() {
  1787. if (this.uploadLock) {
  1788. return;
  1789. }
  1790. this.uploadLock = true;
  1791. let compareFaceData = await this.faceRecognition();
  1792. console.log(compareFaceData,'compareFaceData')
  1793. if (compareFaceData >= 80) {
  1794. const waitYS = await this.imageInfos();
  1795. this.postCoursePhotoRecord()
  1796. .then((res) => {
  1797. this.photoHistoryList.push(this.photoIndex);
  1798. this.postStudyRecord(); //提交记录
  1799. //恢复播放
  1800. uni.setKeepScreenOn({
  1801. keepScreenOn: false,
  1802. });
  1803. this.photoPopup = false;
  1804. this.uploadLock = false;
  1805. this.enableAutoRotation = true;
  1806. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1807. if (polyvPlayerContext != null) {
  1808. polyvPlayerContext.play();
  1809. }
  1810. })
  1811. .catch((err) => {
  1812. uni.showToast({
  1813. title: "上传接口报错,请重新拍照上传" + err,
  1814. icon: "none",
  1815. });
  1816. this.uploadLock = false;
  1817. this.openPhoto();
  1818. });
  1819. } else {
  1820. uni.showToast({
  1821. title: "人脸匹配不通过,请重新拍照上传",
  1822. icon: "none",
  1823. duration: 2000,
  1824. });
  1825. setTimeout(() => {
  1826. this.uploadLock = false;
  1827. this.openPhoto();
  1828. }, 2000);
  1829. return;
  1830. }
  1831. },
  1832. reTake() {
  1833. this.isTaking = true;
  1834. },
  1835. //确认拍照
  1836. takePhoto() {
  1837. var self = this;
  1838. const ctx = uni.createCameraContext();
  1839. ctx.takePhoto({
  1840. quality: "high",
  1841. success: (res) => {
  1842. console.log(res.tempImagePath);
  1843. self.avatarUrl = res.tempImagePath;
  1844. this.isTaking = false;
  1845. // self.submit();
  1846. // self.photoPopup = false;
  1847. // self.enableAutoRotation = true;
  1848. },
  1849. fail: (err) => {
  1850. console.log(err);
  1851. },
  1852. });
  1853. },
  1854. playError(e) {
  1855. console.log(e);
  1856. },
  1857. //拍照报错
  1858. error(e) {
  1859. console.log(e.detail);
  1860. },
  1861. //关闭相机
  1862. closePhoto() {
  1863. this.photoPopup = false;
  1864. self.enableAutoRotation = true;
  1865. },
  1866. /**
  1867. * 进入全屏
  1868. */
  1869. fullscreenchange(event) {
  1870. console.log(event);
  1871. if (event.detail.direction == "vertical") {
  1872. this.navShow = true;
  1873. } else if (event.detail.direction == "horizontal") {
  1874. this.navShow = false;
  1875. }
  1876. },
  1877. getGoodsDetail() {
  1878. let self = this;
  1879. // app/common/goods/'+ data
  1880. this.$api.goodsDetail(this.goodsId).then((res) => {
  1881. self.goodsData = res.data.data;
  1882. console.log(self.gradeId, "班级ID");
  1883. // this.courseBusiness();
  1884. // this.courseHandouts();
  1885. self.getMenuList();
  1886. console.log(self.goodsData,'self.goodsData')
  1887. //获取节笔记
  1888. this.getNoteList();
  1889. if (self.goodsData.goodsPlayConfig) {
  1890. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  1891. if (self.goodsPlayConfig.autoPlay > 0) {
  1892. self.autoplay = true;
  1893. }
  1894. if (self.goodsPlayConfig.drag > 0) {
  1895. self.isAllowSeek = "yes";
  1896. }
  1897. if (self.goodsPlayConfig.speed > 0) {
  1898. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  1899. }
  1900. }
  1901. if (self.goodsData.goodsPhotographConfig) {
  1902. self.goodsPhotographConfig = JSON.parse(
  1903. self.goodsData.goodsPhotographConfig
  1904. );
  1905. if (self.goodsPhotographConfig.photoNum > 0) {
  1906. self.photoNum = self.goodsPhotographConfig.photoNum;
  1907. console.log(self.photoNum, 777777);
  1908. }
  1909. }
  1910. });
  1911. },
  1912. startVideo() {
  1913. this.startStatus = true;
  1914. },
  1915. getAnswerList() {
  1916. let self = this;
  1917. this.$api
  1918. .answerList({ courseId: this.courseId, goodsId: this.goodsId,orderGoodsId: this.orderGoodsId, })
  1919. .then((res) => {
  1920. if (res.data.code == 200) {
  1921. self.answerList = res.data.rows;
  1922. }
  1923. });
  1924. },
  1925. getMenuList() {
  1926. let self = this;
  1927. this.$api
  1928. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
  1929. .then((res) => {
  1930. if (res.data.code == 200) {
  1931. for (let i = 0; i < res.data.rows.length; i++) {
  1932. let item = res.data.rows[i];
  1933. item.down = true;
  1934. item.id = item.menuId;
  1935. item.name = item.menuName;
  1936. item.menuType = item.type;
  1937. }
  1938. self.menuList = res.data.rows;
  1939. for (let i = 0; i < res.data.rows.length; i++) {
  1940. if (res.data.rows[i].type == 1) {
  1941. this.menuIndex = [i];
  1942. break;
  1943. } else if (res.data.rows[i].type == 2) {
  1944. this.menuIndex = [i];
  1945. break;
  1946. }
  1947. }
  1948. }
  1949. });
  1950. },
  1951. courseDetail() {
  1952. let self = this;
  1953. // /course/'+data 获取课程详细信息
  1954. this.$api.courseDetail(this.courseId).then((res) => {
  1955. if (res.data.code == 200) {
  1956. // if (res.data.data.educationName == "继续教育") {
  1957. this.$api
  1958. .lockLockAction({
  1959. action: "jxjy",
  1960. uuid:this.$method.getUuid()
  1961. })
  1962. .then((res) => {});
  1963. this.lockTimer = setInterval(() => {
  1964. this.$api
  1965. .lockLockAction({
  1966. action: "jxjy",
  1967. uuid:this.$method.getUuid()
  1968. })
  1969. .then((res) => {});
  1970. }, 10000);
  1971. // websocket.sendMsg("doCourse");
  1972. // }
  1973. self.detail = res.data.data;
  1974. }
  1975. });
  1976. },
  1977. open(item) {
  1978. item.showChildren = !item.showChildren;
  1979. },
  1980. change(index) {
  1981. this.current = index;
  1982. },
  1983. openDocument() {
  1984. let self = this;
  1985. let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
  1986. console.log(url);
  1987. uni.downloadFile({
  1988. url: url,
  1989. success: function (res) {
  1990. console.log(999);
  1991. var filePath = res.tempFilePath;
  1992. uni.openDocument({
  1993. filePath: filePath,
  1994. showMenu: self.courseHandoutsData.canDownload == 1 ? true : false,
  1995. success: function (res) {
  1996. console.log(res, "打开文档成功");
  1997. },
  1998. fail: function (err) {
  1999. console.log(err);
  2000. uni.showToast({
  2001. icon: "none",
  2002. title: "文档地址错误",
  2003. });
  2004. },
  2005. });
  2006. },
  2007. fail: (err) => {
  2008. uni.showModal({
  2009. title: "提示",
  2010. content: "文档错误," + err.errMsg,
  2011. showCancel: false,
  2012. });
  2013. },
  2014. });
  2015. },
  2016. },
  2017. };
  2018. </script>
  2019. <style lang="scss" scope>
  2020. .top {
  2021. &__header {
  2022. position:relative;
  2023. width:100%;
  2024. height:150rpx;
  2025. padding:24rpx 150rpx 24rpx 24rpx;
  2026. .img {
  2027. position:absolute;
  2028. left:0;
  2029. top:0;
  2030. width:100%;
  2031. }
  2032. .note {
  2033. position:relative;
  2034. z-index: 10;
  2035. font-size: 24rpx;
  2036. font-family: PingFang SC;
  2037. font-weight: bold;
  2038. color: #EFDBFF;
  2039. }
  2040. .title {
  2041. position:relative;
  2042. z-index: 10;
  2043. font-size: 26rpx;
  2044. font-family: PingFang SC;
  2045. font-weight: bold;
  2046. color: #FFFFFF;
  2047. }
  2048. .desc {
  2049. }
  2050. }
  2051. }
  2052. .polyv_detail {
  2053. display: flex;
  2054. flex-direction: column;
  2055. height: 100vh;
  2056. .box {
  2057. flex: 1;
  2058. overflow: hidden;
  2059. margin: 16rpx 16rpx 100rpx 16rpx;
  2060. .box_in {
  2061. height: 100%;
  2062. }
  2063. }
  2064. .first_ml {
  2065. margin: 16rpx 16rpx 16rpx 16rpx;
  2066. }
  2067. }
  2068. .btnSet {
  2069. width: 440rpx;
  2070. height: 80rpx;
  2071. background: #007aff;
  2072. border-radius: 40rpx;
  2073. color: #ffffff;
  2074. font-size: 28rpx;
  2075. line-height: 80rpx;
  2076. }
  2077. .btnReply {
  2078. width: 80rpx;
  2079. height: 40rpx;
  2080. background: #e3f0ff;
  2081. border-radius: 16rpx;
  2082. text-align: center;
  2083. color: #007aff;
  2084. }
  2085. .btnDel {
  2086. width: 80rpx;
  2087. height: 40rpx;
  2088. background: #ffedf0;
  2089. border-radius: 16rpx;
  2090. text-align: center;
  2091. color: #ff2d55;
  2092. }
  2093. .btnReply {
  2094. width: 80rpx;
  2095. height: 40rpx;
  2096. background: #e3f0ff;
  2097. border-radius: 16rpx;
  2098. font-size: 24rpx;
  2099. }
  2100. .lecture-box {
  2101. display: flex;
  2102. align-items: center;
  2103. height: 80rpx;
  2104. background: #ffffff;
  2105. border-radius: 16rpx 16rpx 16rpx 16rpx;
  2106. .title {
  2107. padding: 10rpx;
  2108. flex: 1;
  2109. overflow: hidden;
  2110. text-overflow: ellipsis;
  2111. white-space: nowrap;
  2112. color: #333;
  2113. font-weight: bold;
  2114. font-size: 32rpx;
  2115. }
  2116. .btn {
  2117. display: flex;
  2118. align-items: center;
  2119. justify-content: center;
  2120. width: 80rpx;
  2121. height: 80rpx;
  2122. background: #ffffff;
  2123. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
  2124. border-radius: 16rpx 16rpx 16rpx 16rpx;
  2125. }
  2126. }
  2127. .lecture-content {
  2128. background: #fff;
  2129. margin-top: 10rpx;
  2130. padding: 10rpx;
  2131. border-radius: 16rpx;
  2132. }
  2133. .photoBox {
  2134. background-color: #ffffff;
  2135. border-radius: 32px 32px 0px 0px;
  2136. .photoTop {
  2137. height: 74rpx;
  2138. display: flex;
  2139. align-items: center;
  2140. justify-content: space-between;
  2141. padding: 0rpx 38rpx;
  2142. .sqzz {
  2143. width: 28rpx;
  2144. height: 28rpx;
  2145. display: flex;
  2146. align-items: center;
  2147. justify-content: center;
  2148. }
  2149. .centersq {
  2150. color: #333;
  2151. font-size: 30rpx;
  2152. font-weight: 500;
  2153. }
  2154. }
  2155. .photoCenter {
  2156. width: 750rpx;
  2157. height: 979rpx;
  2158. position: relative;
  2159. .custom {
  2160. width: 750rpx;
  2161. height: 979rpx;
  2162. position: absolute;
  2163. z-index: 1000;
  2164. top: 0;
  2165. left: 0;
  2166. image {
  2167. width: 100%;
  2168. height: 100%;
  2169. }
  2170. }
  2171. }
  2172. .btns {
  2173. display: flex;
  2174. .btnResult {
  2175. height: 100rpx;
  2176. flex: 1;
  2177. background-color: #07c160;
  2178. text-align: center;
  2179. line-height: 100rpx;
  2180. color: #fff;
  2181. font-size: 32rpx;
  2182. font-weight: bold;
  2183. }
  2184. }
  2185. }
  2186. .chat_box {
  2187. display: flex;
  2188. padding: 20rpx;
  2189. justify-content: space-between;
  2190. }
  2191. .chat3 {
  2192. font-size: 30rpx;
  2193. font-family: PingFang SC;
  2194. font-weight: 500;
  2195. color: #666666;
  2196. margin-top: 10rpx;
  2197. }
  2198. .chat2 {
  2199. font-size: 20rpx;
  2200. font-family: PingFang SC;
  2201. font-weight: 500;
  2202. color: #999999;
  2203. margin-top: 10rpx;
  2204. }
  2205. .chat1 {
  2206. font-size: 24rpx;
  2207. font-family: PingFang SC;
  2208. font-weight: 500;
  2209. color: #333333;
  2210. }
  2211. .leftPadding {
  2212. margin-left: 8rpx;
  2213. }
  2214. .t2Content {
  2215. font-size: 24rpx;
  2216. font-family: PingFang SC;
  2217. font-weight: bold;
  2218. color: #999999;
  2219. line-height: 48rpx;
  2220. }
  2221. .tBox2 {
  2222. display: flex;
  2223. padding-top: 10rpx;
  2224. color: #333333;
  2225. font-size: 30rpx;
  2226. font-weight: 400;
  2227. }
  2228. .tBox {
  2229. display: flex;
  2230. align-items: center;
  2231. padding-top: 10rpx;
  2232. }
  2233. .title {
  2234. font-size: 24rpx;
  2235. color: #999999;
  2236. }
  2237. page {
  2238. // padding-top: 10px;
  2239. // padding-top: constant(safe-area-inset-top);
  2240. // padding-top: env(safe-area-inset-top);
  2241. }
  2242. .Answering {
  2243. .answer_item {
  2244. &:nth-child(2) {
  2245. border-radius: 16rpx 16rpx 0rpx 0rpx;
  2246. }
  2247. &:nth-last-child(1) {
  2248. border-radius: 0rpx 0rpx 16rpx 16rpx;
  2249. }
  2250. }
  2251. }
  2252. .inputBottom {
  2253. position: fixed;
  2254. left: 0;
  2255. bottom: 0;
  2256. background: #ffffff;
  2257. height: 98rpx;
  2258. display: flex;
  2259. align-items: center;
  2260. width: 100%;
  2261. z-index: 99;
  2262. .flex_auto {
  2263. flex: 1;
  2264. margin-left: 10%;
  2265. }
  2266. .btn {
  2267. color: #007aff;
  2268. font-size: 30rpx;
  2269. font-weight: bold;
  2270. width: 15%;
  2271. text-align: center;
  2272. }
  2273. .input {
  2274. background: rgba(244, 244, 244, 0.98);
  2275. height: 60rpx;
  2276. border-radius: 24rpx;
  2277. margin-top: 12rpx;
  2278. }
  2279. }
  2280. .noteBox {
  2281. width: 100%;
  2282. background: #ffffff;
  2283. padding: 0rpx 10rpx 20rpx;
  2284. border-radius: 16rpx;
  2285. overflow: hidden;
  2286. .left_ti {
  2287. padding-top: 14rpx;
  2288. }
  2289. }
  2290. .dateBox {
  2291. width: 216rpx;
  2292. height: 48rpx;
  2293. background: #ffffff;
  2294. border-radius: 24rpx;
  2295. font-size: 24rpx;
  2296. color: #666666;
  2297. text-align: center;
  2298. line-height: 48rpx;
  2299. margin: 16rpx 0rpx 8rpx;
  2300. }
  2301. .t_content1 {
  2302. color: #007aff;
  2303. margin-left: 10rpx;
  2304. }
  2305. .tag1 {
  2306. border: 2rpx solid #007aff;
  2307. border-radius: 8rpx;
  2308. font-size: 20rpx;
  2309. color: #007aff;
  2310. padding: 5rpx;
  2311. }
  2312. .b_title {
  2313. color: #333333;
  2314. font-size: 30rpx;
  2315. font-weight: bold;
  2316. }
  2317. page {
  2318. background: #eaeef1;
  2319. }
  2320. .menuBox {
  2321. width: 100%;
  2322. background: #ffffff;
  2323. border-radius: 16rpx;
  2324. padding: 20rpx;
  2325. margin-bottom: 20rpx;
  2326. }
  2327. .btnspric {
  2328. border-top: 1rpx solid #eee;
  2329. display: flex;
  2330. align-items: center;
  2331. justify-content: space-between;
  2332. height: 108rpx;
  2333. padding-left: 43rpx;
  2334. padding-right: 32rpx;
  2335. }
  2336. .btnspric > .lefprL {
  2337. font-size: 36rpx;
  2338. color: #0c141f;
  2339. font-weight: bold;
  2340. }
  2341. .btnspric > .lefprR {
  2342. padding: 0rpx 24rpx;
  2343. height: 60rpx;
  2344. line-height: 60rpx;
  2345. text-align: center;
  2346. color: #fff;
  2347. background: #32467b;
  2348. border-radius: 24rpx;
  2349. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  2350. }
  2351. .yhj,
  2352. .hdyhj {
  2353. padding: 24rpx 29rpx 24rpx 34rpx;
  2354. }
  2355. .yhj {
  2356. border-bottom: 16rpx solid #f9f9f9;
  2357. }
  2358. .yhjtit {
  2359. font-size: 30rpx;
  2360. color: #0c141f;
  2361. font-weight: 500;
  2362. margin-bottom: 14rpx;
  2363. }
  2364. .yhjList {
  2365. display: flex;
  2366. align-items: center;
  2367. justify-content: space-between;
  2368. margin-bottom: 14rpx;
  2369. }
  2370. .yhjList > .yhjLefts {
  2371. display: flex;
  2372. align-items: center;
  2373. }
  2374. .yhjLefts > .yhl {
  2375. color: #32467b;
  2376. font-size: 30rpx;
  2377. margin-right: 31rpx;
  2378. }
  2379. .yhjLefts > .yhbq {
  2380. font-size: 24rpx;
  2381. color: #ff9500;
  2382. border-radius: 18rpx;
  2383. background-color: rgba(255, 149, 0, 0.2);
  2384. border: 2rpx solid #ff9500;
  2385. height: 38rpx;
  2386. line-height: 38rpx;
  2387. padding: 0rpx 16rpx;
  2388. }
  2389. .ts {
  2390. font-size: 24rpx;
  2391. color: #999;
  2392. margin: 14rpx 0rpx;
  2393. padding-right: 29rpx;
  2394. padding-left: 34rpx;
  2395. }
  2396. .yh {
  2397. padding-top: 20rpx;
  2398. }
  2399. .yh > .yhtitle {
  2400. display: flex;
  2401. align-items: center;
  2402. justify-content: space-between;
  2403. padding-right: 29rpx;
  2404. padding-left: 34rpx;
  2405. }
  2406. .priceBxs {
  2407. display: flex;
  2408. align-items: center;
  2409. }
  2410. .priceBxs > .pricleft {
  2411. border-radius: 24rpx;
  2412. border: 1rpx solid #e91313;
  2413. background-color: rgba(233, 19, 19, 0.1);
  2414. padding: 0rpx 18rpx;
  2415. height: 49rpx;
  2416. line-height: 49rpx;
  2417. text-align: center;
  2418. font-size: 30rpx;
  2419. font-weight: 500;
  2420. color: #e91313;
  2421. margin-right: 13rpx;
  2422. }
  2423. .topBox {
  2424. padding: 32rpx 32rpx 24rpx;
  2425. border-bottom: 1rpx solid #eeeeee;
  2426. }
  2427. .topBox > .boldFonstType {
  2428. font-weight: 500;
  2429. font-size: 30rpx;
  2430. margin: 16rpx 0rpx 23rpx;
  2431. }
  2432. .topBox > .firstTopL {
  2433. display: flex;
  2434. align-items: center;
  2435. }
  2436. .topBox > .firstTopL > .imageBs {
  2437. width: 331rpx;
  2438. height: 160rpx;
  2439. border-radius: 6rpx;
  2440. overflow: hidden;
  2441. margin-right: 8rpx;
  2442. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  2443. }
  2444. .topBox > .firstTopL > .imageBs > image {
  2445. width: 100%;
  2446. height: 100%;
  2447. }
  2448. .topBox > .firstTopL > .textBs {
  2449. font-size: 30rpx;
  2450. font-weight: bold;
  2451. color: #0c141f;
  2452. }
  2453. .content {
  2454. padding: 24rpx;
  2455. text-align: left;
  2456. }
  2457. .catalogBox {
  2458. display: flex;
  2459. align-items: center;
  2460. flex-wrap: nowrap;
  2461. overflow-x: auto;
  2462. padding-left: 38rpx;
  2463. max-height: 305rpx;
  2464. overflow-y: auto;
  2465. transition: all 0.4s;
  2466. }
  2467. .catalogBox > .catalogA {
  2468. min-width: 200rpx;
  2469. height: 48rpx;
  2470. line-height: 48rpx;
  2471. // text-align: center;
  2472. border: 2rpx solid transparent;
  2473. white-space: nowrap;
  2474. text-overflow: ellipsis;
  2475. overflow: hidden;
  2476. word-break: break-all;
  2477. border-radius: 10rpx;
  2478. background: rgba(22, 119, 255, 0.05);
  2479. padding-left: 19rpx;
  2480. box-sizing: border-box;
  2481. padding-right: 15rpx;
  2482. margin-right: 16rpx;
  2483. margin-bottom: 20rpx;
  2484. margin-top: 15rpx;
  2485. font-size: 24rpx;
  2486. color: #666;
  2487. }
  2488. .catalogBox > .activesq {
  2489. border-color: #1677ff;
  2490. }
  2491. .changeCatalogBox {
  2492. display: block;
  2493. }
  2494. .catalogBox::-webkit-scrollbar {
  2495. display: none; /* Chrome Safari */
  2496. }
  2497. .price_t2 {
  2498. font-size: 18rpx;
  2499. font-family: PingFang SC;
  2500. font-weight: 500;
  2501. text-decoration: line-through;
  2502. color: #999999;
  2503. }
  2504. .price_t1 {
  2505. font-size: 33rpx;
  2506. font-family: PingFang SC;
  2507. font-weight: bold;
  2508. color: #e91313;
  2509. }
  2510. .sc_t {
  2511. font-size: 22rpx;
  2512. color: #000000;
  2513. }
  2514. .sc {
  2515. width: 29rpx;
  2516. height: 29rpx;
  2517. }
  2518. .buy {
  2519. width: 138rpx;
  2520. height: 48rpx;
  2521. line-height: 48rpx;
  2522. background: #32467b;
  2523. border-radius: 10rpx;
  2524. color: #ffffff;
  2525. font-size: 28rpx;
  2526. text-align: center;
  2527. vertical-align: middle;
  2528. position: absolute;
  2529. right: 30rpx;
  2530. }
  2531. .video_body {
  2532. padding-bottom: 96rpx;
  2533. }
  2534. .footer_tab {
  2535. position: fixed;
  2536. bottom: 0;
  2537. height: 96rpx;
  2538. width: 100%;
  2539. background-color: #ffffff;
  2540. }
  2541. .tj_box {
  2542. width: 50%;
  2543. display: inline-block;
  2544. text-align: center;
  2545. margin: 10rpx 0;
  2546. }
  2547. .teacher_t {
  2548. font-size: 24rpx;
  2549. font-family: PingFang SC;
  2550. font-weight: 400;
  2551. color: #666666;
  2552. line-height: 36rpx;
  2553. margin-left: 15rpx;
  2554. }
  2555. .teacher_img {
  2556. width: 87rpx;
  2557. height: 129rpx;
  2558. }
  2559. .t2 {
  2560. font-size: 24rpx;
  2561. font-family: PingFang SC;
  2562. color: #666666;
  2563. line-height: 36rpx;
  2564. margin: 15rpx;
  2565. }
  2566. .r_t2 {
  2567. width: 201rpx;
  2568. height: 49rpx;
  2569. background: rgba(22, 119, 255, 0.05);
  2570. border: 1rpx solid #32467b;
  2571. border-radius: 16rpx;
  2572. color: #666666;
  2573. font-size: 23rpx;
  2574. text-align: center;
  2575. display: flex;
  2576. align-items: center;
  2577. padding: 5rpx;
  2578. }
  2579. .scroll_box {
  2580. width: 100%;
  2581. height: 60rpx;
  2582. background: #ffffff;
  2583. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  2584. white-space: nowrap;
  2585. overflow: hidden;
  2586. margin: 15rpx 0;
  2587. }
  2588. .r_sliper {
  2589. padding: 0 20rpx;
  2590. }
  2591. .top_line {
  2592. width: 6rpx;
  2593. height: 22rpx;
  2594. background: #32467b;
  2595. margin-right: 10rpx;
  2596. }
  2597. .video_t2 {
  2598. font-size: 24rpx;
  2599. font-family: PingFang SC;
  2600. font-weight: 500;
  2601. color: #666666;
  2602. }
  2603. .course_name {
  2604. height: 80rpx;
  2605. background-color: #fff;
  2606. }
  2607. .video_t1 {
  2608. height: 80rpx;
  2609. color: #333333;
  2610. line-height: 80rpx;
  2611. font-size: 30rpx;
  2612. font-family: PingFang SC;
  2613. font-weight: bold;
  2614. color: #333333;
  2615. margin-left: 15rpx;
  2616. overflow: hidden;
  2617. text-overflow: ellipsis;
  2618. white-space: nowrap;
  2619. }
  2620. .notice_wrap {
  2621. height: 80rpx;
  2622. display: flex;
  2623. align-items: center;
  2624. justify-content: flex-end;
  2625. .video_t1_t {
  2626. width: 100%;
  2627. height: 40rpx;
  2628. line-height: 40rpx;
  2629. text-align: center;
  2630. background: rgba(245, 154, 35, 1);
  2631. color: #333;
  2632. border-radius: 10rpx;
  2633. font-size: 24rpx;
  2634. }
  2635. }
  2636. .video_play {
  2637. position: absolute;
  2638. width: 95rpx;
  2639. height: 95rpx;
  2640. top: 0;
  2641. left: 0;
  2642. right: 0;
  2643. bottom: 0;
  2644. margin: auto;
  2645. }
  2646. .video_box {
  2647. position: relative;
  2648. .video-toast {
  2649. position: absolute;
  2650. width: 686rpx;
  2651. height: 80rpx;
  2652. background: rgba(0, 0, 0, 0.6);
  2653. border-radius: 24rpx;
  2654. bottom: 100rpx;
  2655. left: 50%;
  2656. transform: translateX(-50%);
  2657. color: #fff;
  2658. display: flex;
  2659. font-size: 26rpx;
  2660. align-items: center;
  2661. overflow: visible;
  2662. &__text {
  2663. flex: 1;
  2664. margin-left: 40rpx;
  2665. }
  2666. &__btn {
  2667. width: 180rpx;
  2668. text-align: center;
  2669. border-left: 1rpx solid #fff;
  2670. }
  2671. }
  2672. .video-toast__close {
  2673. position: absolute;
  2674. right: 32rpx;
  2675. bottom: 184rpx;
  2676. width: 40rpx;
  2677. height: 40rpx;
  2678. line-height: 40rpx;
  2679. text-align: center;
  2680. background: rgba(0, 0, 0, 0.6);
  2681. border-radius: 50%;
  2682. color: rgba(255, 255, 255, 0.3);
  2683. }
  2684. }
  2685. .rotoct {
  2686. transform: rotate(90deg);
  2687. }
  2688. .notice_modal {
  2689. .content {
  2690. width: 100%;
  2691. height: 100%;
  2692. padding: 20rpx;
  2693. .title {
  2694. color: #333;
  2695. line-height: 40rpx;
  2696. font-size: 30rpx;
  2697. text-align: center;
  2698. font-weight: bold;
  2699. }
  2700. .text {
  2701. line-height: 40rpx;
  2702. }
  2703. }
  2704. }
  2705. </style>