detail.vue 81 KB

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