detail.vue 82 KB

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