detail.vue 98 KB

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