detail.vue 76 KB

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