detail.vue 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835
  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.$api.lockLockAction({
  2096. action:'jxjy'
  2097. }).then(res => {
  2098. })
  2099. this.lockTimer = setInterval(() => {
  2100. this.$api.lockLockAction({
  2101. action:'jxjy'
  2102. }).then(res => {
  2103. })
  2104. },10000)
  2105. // websocket.sendMsg("doCourse");
  2106. }
  2107. self.detail = res.data.data;
  2108. }
  2109. });
  2110. },
  2111. open(item) {
  2112. item.showChildren = !item.showChildren;
  2113. },
  2114. change(index) {
  2115. this.current = index;
  2116. },
  2117. openDocument() {
  2118. let self = this;
  2119. let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
  2120. console.log(url);
  2121. uni.downloadFile({
  2122. url: url,
  2123. success: function (res) {
  2124. console.log(999);
  2125. var filePath = res.tempFilePath;
  2126. uni.openDocument({
  2127. filePath: filePath,
  2128. showMenu: self.courseHandoutsData.canDownload == 1 ? true : false,
  2129. success: function (res) {
  2130. console.log(res, "打开文档成功");
  2131. },
  2132. fail: function (err) {
  2133. console.log(err);
  2134. uni.showToast({
  2135. icon: "none",
  2136. title: "文档地址错误",
  2137. });
  2138. },
  2139. });
  2140. },
  2141. fail: (err) => {
  2142. uni.showModal({
  2143. title: "提示",
  2144. content: "文档错误," + err.errMsg,
  2145. showCancel: false,
  2146. });
  2147. },
  2148. });
  2149. },
  2150. },
  2151. };
  2152. </script>
  2153. <style lang="scss" scope>
  2154. .polyv_detail {
  2155. display: flex;
  2156. flex-direction: column;
  2157. height: 100vh;
  2158. .box {
  2159. flex: 1;
  2160. overflow: hidden;
  2161. margin: 20rpx;
  2162. .box_in {
  2163. height: 100%;
  2164. }
  2165. }
  2166. }
  2167. .btnSet {
  2168. width: 440rpx;
  2169. height: 80rpx;
  2170. background: #007aff;
  2171. border-radius: 40rpx;
  2172. color: #ffffff;
  2173. font-size: 28rpx;
  2174. line-height: 80rpx;
  2175. }
  2176. .btnReply {
  2177. width: 80rpx;
  2178. height: 40rpx;
  2179. background: #e3f0ff;
  2180. border-radius: 16rpx;
  2181. text-align: center;
  2182. color: #007aff;
  2183. }
  2184. .btnDel {
  2185. width: 80rpx;
  2186. height: 40rpx;
  2187. background: #ffedf0;
  2188. border-radius: 16rpx;
  2189. text-align: center;
  2190. color: #ff2d55;
  2191. }
  2192. .btnReply {
  2193. width: 80rpx;
  2194. height: 40rpx;
  2195. background: #e3f0ff;
  2196. border-radius: 16rpx;
  2197. font-size: 24rpx;
  2198. }
  2199. .lecture-box {
  2200. display: flex;
  2201. align-items: center;
  2202. height: 80rpx;
  2203. background: #ffffff;
  2204. border-radius: 16rpx 16rpx 16rpx 16rpx;
  2205. .title {
  2206. padding: 10rpx;
  2207. flex: 1;
  2208. overflow: hidden;
  2209. text-overflow: ellipsis;
  2210. white-space: nowrap;
  2211. color: #333;
  2212. font-weight: bold;
  2213. font-size: 32rpx;
  2214. }
  2215. .btn {
  2216. display: flex;
  2217. align-items: center;
  2218. justify-content: center;
  2219. width: 80rpx;
  2220. height: 80rpx;
  2221. background: #ffffff;
  2222. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
  2223. border-radius: 16rpx 16rpx 16rpx 16rpx;
  2224. }
  2225. }
  2226. .lecture-content {
  2227. background: #fff;
  2228. margin-top: 10rpx;
  2229. padding: 10rpx;
  2230. border-radius: 16rpx;
  2231. }
  2232. .photoBox {
  2233. background-color: #ffffff;
  2234. border-radius: 32px 32px 0px 0px;
  2235. .photoTop {
  2236. height: 74rpx;
  2237. display: flex;
  2238. align-items: center;
  2239. justify-content: space-between;
  2240. padding: 0rpx 38rpx;
  2241. .sqzz {
  2242. width: 28rpx;
  2243. height: 28rpx;
  2244. display: flex;
  2245. align-items: center;
  2246. justify-content: center;
  2247. }
  2248. .centersq {
  2249. color: #333;
  2250. font-size: 30rpx;
  2251. font-weight: 500;
  2252. }
  2253. }
  2254. .photoCenter {
  2255. width: 750rpx;
  2256. height: 979rpx;
  2257. position: relative;
  2258. .custom {
  2259. width: 750rpx;
  2260. height: 979rpx;
  2261. position: absolute;
  2262. z-index: 1000;
  2263. top: 0;
  2264. left: 0;
  2265. image {
  2266. width: 100%;
  2267. height: 100%;
  2268. }
  2269. }
  2270. }
  2271. .btns {
  2272. display: flex;
  2273. .btnResult {
  2274. height: 100rpx;
  2275. flex: 1;
  2276. background-color: #07c160;
  2277. text-align: center;
  2278. line-height: 100rpx;
  2279. color: #fff;
  2280. font-size: 32rpx;
  2281. font-weight: bold;
  2282. }
  2283. }
  2284. }
  2285. .chat_box {
  2286. display: flex;
  2287. padding: 20rpx;
  2288. justify-content: space-between;
  2289. }
  2290. .chat3 {
  2291. font-size: 30rpx;
  2292. font-family: PingFang SC;
  2293. font-weight: 500;
  2294. color: #666666;
  2295. margin-top: 10rpx;
  2296. }
  2297. .chat2 {
  2298. font-size: 20rpx;
  2299. font-family: PingFang SC;
  2300. font-weight: 500;
  2301. color: #999999;
  2302. margin-top: 10rpx;
  2303. }
  2304. .chat1 {
  2305. font-size: 24rpx;
  2306. font-family: PingFang SC;
  2307. font-weight: 500;
  2308. color: #333333;
  2309. }
  2310. .leftPadding {
  2311. margin-left: 8rpx;
  2312. }
  2313. .t2Content {
  2314. font-size: 28rpx;
  2315. font-family: PingFang SC;
  2316. font-weight: bold;
  2317. color: #999999;
  2318. line-height: 48rpx;
  2319. }
  2320. .tBox2 {
  2321. display: flex;
  2322. padding-top: 10rpx;
  2323. color: #333333;
  2324. font-size: 30rpx;
  2325. }
  2326. .tBox {
  2327. display: flex;
  2328. align-items: center;
  2329. padding-top: 10rpx;
  2330. }
  2331. .title {
  2332. font-size: 24rpx;
  2333. color: #999999;
  2334. }
  2335. page {
  2336. // padding-top: 10px;
  2337. // padding-top: constant(safe-area-inset-top);
  2338. // padding-top: env(safe-area-inset-top);
  2339. }
  2340. .inputBottom {
  2341. position: fixed;
  2342. left: 0;
  2343. bottom: 0;
  2344. background: #ffffff;
  2345. height: 98rpx;
  2346. display: flex;
  2347. align-items: center;
  2348. width: 100%;
  2349. .flex_auto {
  2350. flex: 1;
  2351. margin-left: 10%;
  2352. .input {
  2353. height: 60rpx;
  2354. }
  2355. }
  2356. .btn {
  2357. color: #007aff;
  2358. font-size: 30rpx;
  2359. font-weight: bold;
  2360. width: 15%;
  2361. text-align: center;
  2362. }
  2363. }
  2364. .noteBox {
  2365. width: 100%;
  2366. background: #ffffff;
  2367. padding: 10rpx;
  2368. border-radius: 16rpx;
  2369. }
  2370. .dateBox {
  2371. width: 216rpx;
  2372. height: 48rpx;
  2373. background: #ffffff;
  2374. border-radius: 24rpx;
  2375. font-size: 24rpx;
  2376. color: #666666;
  2377. text-align: center;
  2378. line-height: 48rpx;
  2379. margin: 20rpx 0;
  2380. }
  2381. .t_content1 {
  2382. color: #007aff;
  2383. margin-left: 10rpx;
  2384. }
  2385. .tag1 {
  2386. border: 2rpx solid #007aff;
  2387. border-radius: 8rpx;
  2388. font-size: 20rpx;
  2389. color: #007aff;
  2390. padding: 5rpx;
  2391. }
  2392. .b_title {
  2393. color: #333333;
  2394. font-size: 30rpx;
  2395. font-weight: bold;
  2396. }
  2397. page {
  2398. background: #eaeef1;
  2399. }
  2400. .menuBox {
  2401. width: 100%;
  2402. background: #ffffff;
  2403. border-radius: 16rpx;
  2404. padding: 20rpx;
  2405. margin-bottom: 20rpx;
  2406. }
  2407. .btnspric {
  2408. border-top: 1rpx solid #eee;
  2409. display: flex;
  2410. align-items: center;
  2411. justify-content: space-between;
  2412. height: 108rpx;
  2413. padding-left: 43rpx;
  2414. padding-right: 32rpx;
  2415. }
  2416. .btnspric > .lefprL {
  2417. font-size: 36rpx;
  2418. color: #0c141f;
  2419. font-weight: bold;
  2420. }
  2421. .btnspric > .lefprR {
  2422. padding: 0rpx 24rpx;
  2423. height: 60rpx;
  2424. line-height: 60rpx;
  2425. text-align: center;
  2426. color: #fff;
  2427. background: #32467b;
  2428. border-radius: 24rpx;
  2429. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  2430. }
  2431. .yhj,
  2432. .hdyhj {
  2433. padding: 24rpx 29rpx 24rpx 34rpx;
  2434. }
  2435. .yhj {
  2436. border-bottom: 16rpx solid #f9f9f9;
  2437. }
  2438. .yhjtit {
  2439. font-size: 30rpx;
  2440. color: #0c141f;
  2441. font-weight: 500;
  2442. margin-bottom: 14rpx;
  2443. }
  2444. .yhjList {
  2445. display: flex;
  2446. align-items: center;
  2447. justify-content: space-between;
  2448. margin-bottom: 14rpx;
  2449. }
  2450. .yhjList > .yhjLefts {
  2451. display: flex;
  2452. align-items: center;
  2453. }
  2454. .yhjLefts > .yhl {
  2455. color: #32467b;
  2456. font-size: 30rpx;
  2457. margin-right: 31rpx;
  2458. }
  2459. .yhjLefts > .yhbq {
  2460. font-size: 24rpx;
  2461. color: #ff9500;
  2462. border-radius: 18rpx;
  2463. background-color: rgba(255, 149, 0, 0.2);
  2464. border: 2rpx solid #ff9500;
  2465. height: 38rpx;
  2466. line-height: 38rpx;
  2467. padding: 0rpx 16rpx;
  2468. }
  2469. .ts {
  2470. font-size: 24rpx;
  2471. color: #999;
  2472. margin: 14rpx 0rpx;
  2473. padding-right: 29rpx;
  2474. padding-left: 34rpx;
  2475. }
  2476. .yh {
  2477. padding-top: 20rpx;
  2478. }
  2479. .yh > .yhtitle {
  2480. display: flex;
  2481. align-items: center;
  2482. justify-content: space-between;
  2483. padding-right: 29rpx;
  2484. padding-left: 34rpx;
  2485. }
  2486. .priceBxs {
  2487. display: flex;
  2488. align-items: center;
  2489. }
  2490. .priceBxs > .pricleft {
  2491. border-radius: 24rpx;
  2492. border: 1rpx solid #e91313;
  2493. background-color: rgba(233, 19, 19, 0.1);
  2494. padding: 0rpx 18rpx;
  2495. height: 49rpx;
  2496. line-height: 49rpx;
  2497. text-align: center;
  2498. font-size: 30rpx;
  2499. font-weight: 500;
  2500. color: #e91313;
  2501. margin-right: 13rpx;
  2502. }
  2503. .topBox {
  2504. padding: 32rpx 32rpx 24rpx;
  2505. border-bottom: 1rpx solid #eeeeee;
  2506. }
  2507. .topBox > .boldFonstType {
  2508. font-weight: 500;
  2509. font-size: 30rpx;
  2510. margin: 16rpx 0rpx 23rpx;
  2511. }
  2512. .topBox > .firstTopL {
  2513. display: flex;
  2514. align-items: center;
  2515. }
  2516. .topBox > .firstTopL > .imageBs {
  2517. width: 331rpx;
  2518. height: 160rpx;
  2519. border-radius: 6rpx;
  2520. overflow: hidden;
  2521. margin-right: 8rpx;
  2522. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  2523. }
  2524. .topBox > .firstTopL > .imageBs > image {
  2525. width: 100%;
  2526. height: 100%;
  2527. }
  2528. .topBox > .firstTopL > .textBs {
  2529. font-size: 30rpx;
  2530. font-weight: bold;
  2531. color: #0c141f;
  2532. }
  2533. .content {
  2534. padding: 24rpx;
  2535. text-align: left;
  2536. }
  2537. .catalogBox {
  2538. display: flex;
  2539. align-items: center;
  2540. flex-wrap: nowrap;
  2541. overflow-x: auto;
  2542. padding-left: 38rpx;
  2543. max-height: 305rpx;
  2544. overflow-y: auto;
  2545. transition: all 0.4s;
  2546. }
  2547. .catalogBox > .catalogA {
  2548. min-width: 200rpx;
  2549. height: 48rpx;
  2550. line-height: 48rpx;
  2551. // text-align: center;
  2552. border: 2rpx solid transparent;
  2553. white-space: nowrap;
  2554. text-overflow: ellipsis;
  2555. overflow: hidden;
  2556. word-break: break-all;
  2557. border-radius: 10rpx;
  2558. background: rgba(22, 119, 255, 0.05);
  2559. padding-left: 19rpx;
  2560. box-sizing: border-box;
  2561. padding-right: 15rpx;
  2562. margin-right: 16rpx;
  2563. margin-bottom: 20rpx;
  2564. margin-top: 15rpx;
  2565. font-size: 24rpx;
  2566. color: #666;
  2567. }
  2568. .catalogBox > .activesq {
  2569. border-color: #1677ff;
  2570. }
  2571. .changeCatalogBox {
  2572. display: block;
  2573. }
  2574. .catalogBox::-webkit-scrollbar {
  2575. display: none; /* Chrome Safari */
  2576. }
  2577. .price_t2 {
  2578. font-size: 18rpx;
  2579. font-family: PingFang SC;
  2580. font-weight: 500;
  2581. text-decoration: line-through;
  2582. color: #999999;
  2583. }
  2584. .price_t1 {
  2585. font-size: 33rpx;
  2586. font-family: PingFang SC;
  2587. font-weight: bold;
  2588. color: #e91313;
  2589. }
  2590. .sc_t {
  2591. font-size: 22rpx;
  2592. color: #000000;
  2593. }
  2594. .sc {
  2595. width: 29rpx;
  2596. height: 29rpx;
  2597. }
  2598. .buy {
  2599. width: 138rpx;
  2600. height: 48rpx;
  2601. line-height: 48rpx;
  2602. background: #32467b;
  2603. border-radius: 10rpx;
  2604. color: #ffffff;
  2605. font-size: 28rpx;
  2606. text-align: center;
  2607. vertical-align: middle;
  2608. position: absolute;
  2609. right: 30rpx;
  2610. }
  2611. .video_body {
  2612. padding-bottom: 96rpx;
  2613. }
  2614. .footer_tab {
  2615. position: fixed;
  2616. bottom: 0;
  2617. height: 96rpx;
  2618. width: 100%;
  2619. background-color: #ffffff;
  2620. }
  2621. .tj_box {
  2622. width: 50%;
  2623. display: inline-block;
  2624. text-align: center;
  2625. margin: 10rpx 0;
  2626. }
  2627. .teacher_t {
  2628. font-size: 24rpx;
  2629. font-family: PingFang SC;
  2630. font-weight: 400;
  2631. color: #666666;
  2632. line-height: 36rpx;
  2633. margin-left: 15rpx;
  2634. }
  2635. .teacher_img {
  2636. width: 87rpx;
  2637. height: 129rpx;
  2638. }
  2639. .t2 {
  2640. font-size: 24rpx;
  2641. font-family: PingFang SC;
  2642. color: #666666;
  2643. line-height: 36rpx;
  2644. margin: 15rpx;
  2645. }
  2646. .r_t2 {
  2647. width: 201rpx;
  2648. height: 49rpx;
  2649. background: rgba(22, 119, 255, 0.05);
  2650. border: 1rpx solid #32467b;
  2651. border-radius: 16rpx;
  2652. color: #666666;
  2653. font-size: 23rpx;
  2654. text-align: center;
  2655. display: flex;
  2656. align-items: center;
  2657. padding: 5rpx;
  2658. }
  2659. .scroll_box {
  2660. width: 100%;
  2661. height: 60rpx;
  2662. background: #ffffff;
  2663. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  2664. white-space: nowrap;
  2665. overflow: hidden;
  2666. margin: 15rpx 0;
  2667. }
  2668. .r_sliper {
  2669. padding: 0 20rpx;
  2670. }
  2671. .top_line {
  2672. width: 6rpx;
  2673. height: 22rpx;
  2674. background: #32467b;
  2675. margin-right: 10rpx;
  2676. }
  2677. .video_t2 {
  2678. font-size: 24rpx;
  2679. font-family: PingFang SC;
  2680. font-weight: 500;
  2681. color: #666666;
  2682. }
  2683. .video_t1 {
  2684. height: 80rpx;
  2685. color: #333333;
  2686. line-height: 80rpx;
  2687. font-size: 30rpx;
  2688. font-family: PingFang SC;
  2689. font-weight: bold;
  2690. color: #333333;
  2691. overflow: hidden;
  2692. text-overflow: ellipsis;
  2693. white-space: nowrap;
  2694. }
  2695. .notice_wrap {
  2696. height: 80rpx;
  2697. display: flex;
  2698. align-items: center;
  2699. justify-content: flex-end;
  2700. .video_t1_t {
  2701. width: 100%;
  2702. height: 40rpx;
  2703. line-height: 40rpx;
  2704. text-align: center;
  2705. background: rgba(245, 154, 35, 1);
  2706. color: #333;
  2707. border-radius: 10rpx;
  2708. font-size: 24rpx;
  2709. }
  2710. }
  2711. .video_play {
  2712. position: absolute;
  2713. width: 95rpx;
  2714. height: 95rpx;
  2715. top: 0;
  2716. left: 0;
  2717. right: 0;
  2718. bottom: 0;
  2719. margin: auto;
  2720. }
  2721. .video_box {
  2722. position: relative;
  2723. .video-toast {
  2724. position: absolute;
  2725. width: 686rpx;
  2726. height: 80rpx;
  2727. background: rgba(0, 0, 0, 0.6);
  2728. border-radius: 24rpx;
  2729. bottom: 100rpx;
  2730. left: 50%;
  2731. transform: translateX(-50%);
  2732. color: #fff;
  2733. display: flex;
  2734. font-size: 26rpx;
  2735. align-items: center;
  2736. overflow: visible;
  2737. &__text {
  2738. flex: 1;
  2739. margin-left: 40rpx;
  2740. }
  2741. &__btn {
  2742. width: 180rpx;
  2743. text-align: center;
  2744. border-left: 1rpx solid #fff;
  2745. }
  2746. }
  2747. .video-toast__close {
  2748. position: absolute;
  2749. right: 32rpx;
  2750. bottom: 184rpx;
  2751. width: 40rpx;
  2752. height: 40rpx;
  2753. line-height: 40rpx;
  2754. text-align: center;
  2755. background: rgba(0, 0, 0, 0.6);
  2756. border-radius: 50%;
  2757. color: rgba(255, 255, 255, 0.3);
  2758. }
  2759. }
  2760. .rotoct {
  2761. transform: rotate(90deg);
  2762. }
  2763. .notice_modal {
  2764. .content {
  2765. width: 100%;
  2766. height: 100%;
  2767. padding: 20rpx;
  2768. .title {
  2769. color: #333;
  2770. line-height: 40rpx;
  2771. font-size: 30rpx;
  2772. text-align: center;
  2773. font-weight: bold;
  2774. }
  2775. .text {
  2776. line-height: 40rpx;
  2777. }
  2778. }
  2779. }
  2780. </style>