detail.vue 82 KB

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