detail.vue 141 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761
  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. <!-- v-if="playVID" -->
  30. <!-- #ifdef MP-WEIXIN -->
  31. <view class="video_box" style="width: 100%; height: 421rpx">
  32. <polyv-player
  33. v-if="playVID"
  34. id="playerVideo"
  35. playerId="playerVideo"
  36. height="421rpx"
  37. :vid="vid"
  38. :showSettingBtn="true"
  39. :enablePlayGesture="true"
  40. :custom-cache="false"
  41. :object-fit="'contain'"
  42. @statechange="onStateChange"
  43. @fullscreenchange="fullscreenchange"
  44. @error="playError"
  45. :autoplay="autoplay"
  46. :page-gesture="true"
  47. :vslide-gesture="true"
  48. :vslide-gesture-in-fullscreen="true"
  49. :isAllowSeek="isAllowSeek"
  50. :playbackRate="playbackRate"
  51. :enableAutoRotation="enableAutoRotation"
  52. @loadedmetadata="loadedmetadata"
  53. ></polyv-player>
  54. <!-- :startTime="startTime" -->
  55. <cover-view
  56. class="video-toast__close"
  57. v-if="videoToastShow"
  58. @click="closeToast()"
  59. >X</cover-view
  60. >
  61. <cover-view class="video-toast" v-if="videoToastShow">
  62. <cover-view class="video-toast__text"
  63. >您上次看到 {{ seekTime }},正在自动续播</cover-view
  64. >
  65. <cover-view class="video-toast__btn" @click="restart()"
  66. >从头播放</cover-view
  67. >
  68. </cover-view>
  69. </view>
  70. <!-- #endif -->
  71. <!-- #ifdef H5 -->
  72. <view class="video_box" style="width: 100%; height: 421rpx">
  73. <view v-show="vid" id="player"></view>
  74. <cover-view
  75. class="video-toast__close"
  76. v-if="videoToastShow"
  77. @click="closeToast()"
  78. >X</cover-view
  79. >
  80. <cover-view class="video-toast" v-if="videoToastShow">
  81. <cover-view class="video-toast__text"
  82. >您上次看到 {{ seekTime }},正在自动续播</cover-view
  83. >
  84. <cover-view class="video-toast__btn" @click="restart()"
  85. >从头播放</cover-view
  86. >
  87. </cover-view>
  88. </view>
  89. <!-- #endif -->
  90. <view
  91. class="video_box"
  92. style="width: 100%; height: 421rpx"
  93. v-if="playChannelId > 0"
  94. >
  95. <player
  96. class="plv-mp-demo-player"
  97. :videoOption="videoOption"
  98. :page-gesture="true"
  99. :vslide-gesture="true"
  100. :vslide-gesture-in-fullscreen="true"
  101. @onLiveStatusChange="playerLiveStatusChange"
  102. />
  103. </view>
  104. </view>
  105. <view class="course_name">
  106. <view class="course_titles">
  107. <view class="video_t1" :class="{ one: !goodsData.buyNote }">{{
  108. detail.courseName
  109. }}</view>
  110. <view class="notice_wrap" v-if="goodsData.buyNote">
  111. <view class="video_t1_t" @click="studyNotice"> 学员须知 </view>
  112. </view>
  113. <view
  114. class="toggle_course"
  115. v-if="goodsTeacher.length > 1"
  116. @click="changeCourses()"
  117. >
  118. <image
  119. class="img"
  120. src="/pages3/static/imgs/toggle.png"
  121. mode="widthFix"
  122. ></image>
  123. <view class="toggle_name">切换课程</view>
  124. <!-- courseTotal -->
  125. <view class="numbers">共{{ goodsTeacher.length }}门</view>
  126. </view>
  127. </view>
  128. </view>
  129. <u-line color="#D6D6DB" />
  130. <view>
  131. <view>
  132. <u-tabs
  133. :item-width="itemWidth()"
  134. :list="list"
  135. font-size="32"
  136. bar-width="24"
  137. :current="current"
  138. @change="change"
  139. active-color="#007AFF"
  140. ></u-tabs>
  141. </view>
  142. </view>
  143. <u-line color="#D6D6DB" />
  144. </view>
  145. <view class="box" :class="{ first_ml: current == 0 }">
  146. <scroll-view class="box_in" scroll-y="true">
  147. <!--目录 -->
  148. <view v-show="current == 0">
  149. <view
  150. class="top__header"
  151. v-if="livingItem"
  152. @click="goLive(livingItem)"
  153. >
  154. <image
  155. class="img"
  156. src="/pages3/static/imgs/live.png"
  157. mode="widthFix"
  158. ></image>
  159. <view class="note">正在直播中</view>
  160. <view class="title">{{ livingItem.sectionName }}</view>
  161. </view>
  162. <view
  163. v-if="teacherList && teacherList.length > 0"
  164. class="teacher_names"
  165. >
  166. <view
  167. v-for="(tea, index) in teacherList"
  168. :key="index"
  169. class="names"
  170. :class="{ nactive: teacherIndex == index }"
  171. @click="activeFunc(tea, index)"
  172. >
  173. {{ tea.aliasName }}
  174. </view>
  175. </view>
  176. <view
  177. class="menuBox onessss"
  178. v-for="(item, index) in menuList"
  179. :key="index"
  180. >
  181. <!--模块 -->
  182. <view v-if="item.type == 1"
  183. ><courseModule
  184. v-if="reStart"
  185. :orderGoodsId="orderGoodsId"
  186. :sectionMaxNum="goodsData.sectionMaxNum"
  187. :needOpen="menuIndex[0] === index ? true : false"
  188. :courseId="courseId"
  189. :preItem="menuList[index - 1]"
  190. :learningOrder="businessData.goodsLearningOrder"
  191. :goodsId="goodsId"
  192. :gradeId="gradeId"
  193. :isBuy="true"
  194. :menuItem="item"
  195. :levelId="item.menuId"
  196. :goodsType="1"
  197. :menuAllList="menuAllList"
  198. :sectionItem="sectionItem"
  199. ></courseModule
  200. ></view>
  201. <!--章 -->
  202. <view v-if="item.type == 2"
  203. ><courseChapter
  204. v-if="reStart"
  205. :orderGoodsId="orderGoodsId"
  206. :sectionMaxNum="goodsData.sectionMaxNum"
  207. :needOpen="menuIndex[0] === index ? true : false"
  208. :courseId="courseId"
  209. :preItem="menuList[index - 1]"
  210. @playEnd="sectionPlayEnd($event, index)"
  211. :learningOrder="businessData.goodsLearningOrder"
  212. :goodsId="goodsId"
  213. :gradeId="gradeId"
  214. :isBuy="true"
  215. :menuItem="item"
  216. :levelId="'0-' + item.menuId"
  217. :goodsType="1"
  218. :menuAllList="menuAllList"
  219. ></courseChapter
  220. ></view>
  221. <!--节 -->
  222. <view v-if="item.type == 3"
  223. ><courseSection
  224. ref="MoudleSection"
  225. v-if="reStart"
  226. :orderGoodsId="orderGoodsId"
  227. :sectionMaxNum="goodsData.sectionMaxNum"
  228. @playEnd="sectionPlayEnd($event, index)"
  229. :courseId="courseId"
  230. :preItem="menuList[index - 1]"
  231. :learningOrder="businessData.goodsLearningOrder"
  232. :goodsId="goodsId"
  233. :gradeId="gradeId"
  234. :isBuy="true"
  235. :menuItem="item"
  236. :levelId="'0-0-' + item.menuId"
  237. :goodsType="1"
  238. :testType="3"
  239. :menuAllList="menuAllList"
  240. ></courseSection
  241. ></view>
  242. <!-- @togoBack="togoBack($event)" -->
  243. </view>
  244. </view>
  245. <!--讲义 -->
  246. <view v-show="current == 1">
  247. <view class="lecture-box" v-if="courseHandoutsData">
  248. <view class="title">
  249. {{ courseHandoutsData.handoutsName }}
  250. <!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
  251. </view>
  252. <view class="btn" @click="openDocument">
  253. <image
  254. v-if="!downLoading"
  255. src="/pages3/static/imgs/downLoad.png"
  256. style="width: 40rpx; height: 40rpx"
  257. ></image>
  258. <image
  259. v-else
  260. src="/pages3/static/imgs/downLoading.png"
  261. class="loading_down"
  262. style="width: 40rpx; height: 40rpx"
  263. ></image>
  264. </view>
  265. </view>
  266. </view>
  267. <!--笔记 -->
  268. <view v-show="current == 2">
  269. <view v-if="noteList.length == 0" style="text-align: center"
  270. >暂无笔记</view
  271. >
  272. <view v-for="(item, index) in noteList" :key="index">
  273. <view class="dateBox">{{
  274. $method.timestampToTime(item.dateNote)
  275. }}</view>
  276. <view class="noteBox">
  277. <view
  278. v-for="(item1, index1) in item.userNotes"
  279. :key="index1"
  280. style="margin-top: 30rpx"
  281. @click="jumpNote(item1)"
  282. >
  283. <view style="display: flex">
  284. <view class="left_ti">
  285. <view>
  286. <image
  287. src="/static/icon/note2.png"
  288. v-if="noteId != item1.noteId"
  289. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  290. ></image>
  291. <image
  292. src="/static/icon/note1.png"
  293. v-if="noteId == item1.noteId"
  294. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  295. ></image>
  296. </view>
  297. <view
  298. class="title"
  299. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  300. >{{ $method.secondToDate(item1.noteSecond) }}</view
  301. >
  302. </view>
  303. <view style="margin-left: 10rpx">
  304. <view class="t2Content leftPadding">{{
  305. item1.sectionName
  306. }}</view>
  307. <view class="tBox2">{{ item1.noteText }}</view>
  308. </view>
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. </view>
  314. <!--答疑 -->
  315. <view v-show="current == 3" class="Answering">
  316. <view
  317. v-for="(item, index) in answerList"
  318. :key="index"
  319. style="background-color: #ffffff"
  320. class="answer_item"
  321. >
  322. <view class="chat_box" @click.stop="clearCtx">
  323. <view style="display: flex; flex: 1">
  324. <view
  325. ><image
  326. :src="
  327. item.assignUserId > 0 && !item.realname
  328. ? '/static/logo_xcx.png'
  329. : $method.splitImgHost(item.avatar)
  330. "
  331. style="width: 64rpx; height: 64rpx"
  332. ></image
  333. ></view>
  334. <view style="margin-left: 15rpx">
  335. <view class="chat1">{{
  336. item.assignUserId > 0 && !item.realname
  337. ? "祥粤老师"
  338. : item.realname
  339. }}</view>
  340. <view class="chat2">{{
  341. $method.timestampToTime(item.createTime, false)
  342. }}</view>
  343. <view class="chat3">
  344. <text v-if="item.assignUserId > 0">回复</text>
  345. <text v-if="item.assignUserId > 0" style="color: #007aff"
  346. >@{{ item.assignRealname }}</text
  347. >
  348. <view style="word-break: break-all">{{
  349. item.answerText
  350. }}</view>
  351. </view>
  352. </view>
  353. </view>
  354. <view
  355. class="btnReply"
  356. @click.stop="replyContent(item)"
  357. v-if="item.userId != userInfo.userId"
  358. >回复</view
  359. >
  360. <view v-else class="btnDel" @click.stop="delContent(item)"
  361. >删除</view
  362. >
  363. </view>
  364. <u-line color="#D6D6DB" />
  365. </view>
  366. <view v-if="answerList.length == 0" style="text-align: center"
  367. >暂无记录</view
  368. >
  369. </view>
  370. <!--目录 -->
  371. <view v-show="current == 4">
  372. <view
  373. class="menuBox"
  374. v-for="(item, index) in reMenuList"
  375. :key="index"
  376. >
  377. <!--模块 -->
  378. <view v-if="item.type == 1"
  379. ><courseModule
  380. :orderGoodsId="orderGoodsId"
  381. :sectionMaxNum="goodsData.sectionMaxNum"
  382. :courseId="courseId"
  383. :goodsId="goodsId"
  384. :gradeId="gradeId"
  385. :isRebuild="true"
  386. :isBuy="true"
  387. :menuItem="item"
  388. :levelId="item.menuId"
  389. :goodsType="1"
  390. :menuAllList="menuAllList"
  391. :sectionItem="sectionItem"
  392. ></courseModule
  393. ></view>
  394. <!--章 -->
  395. <view v-if="item.type == 2">
  396. <courseChapter
  397. :orderGoodsId="orderGoodsId"
  398. :courseId="courseId"
  399. :sectionMaxNum="goodsData.sectionMaxNum"
  400. @playEnd="sectionPlayEnd($event, index)"
  401. :gradeId="gradeId"
  402. :goodsId="goodsId"
  403. :isRebuild="true"
  404. :isBuy="true"
  405. :menuItem="item"
  406. :levelId="'0-' + item.menuId"
  407. :goodsType="1"
  408. :menuAllList="menuAllList"
  409. ></courseChapter>
  410. </view>
  411. <!--节 -->
  412. <view v-if="item.type == 3">
  413. <courseSection
  414. :orderGoodsId="orderGoodsId"
  415. :courseId="courseId"
  416. :sectionMaxNum="goodsData.sectionMaxNum"
  417. @playEnd="sectionPlayEnd($event, index)"
  418. :gradeId="gradeId"
  419. :goodsId="goodsId"
  420. :isRebuild="true"
  421. :isBuy="true"
  422. :nextMenuItem="findMenuNextSection(index)"
  423. :menuItem="item"
  424. :levelId="'0-0-' + item.menuId"
  425. :goodsType="1"
  426. :testType="3"
  427. :menuAllList="menuAllList"
  428. ></courseSection>
  429. </view>
  430. </view>
  431. </view>
  432. </scroll-view>
  433. <!-- 底部固定按钮 -->
  434. <!-- 笔记的输入框 -->
  435. <template v-if="current == 2">
  436. <view
  437. class="inputBottom"
  438. v-if="!(isPlayRebuild > 0) && playChannelId == 0"
  439. :style="{ bottom: bottomHeight + 'px' }"
  440. >
  441. <view style="width: 10%"
  442. ><image
  443. src="/static/icon/note3.png"
  444. style="width: 39rpx; height: 39rpx; margin: 0 29rpx"
  445. ></image
  446. ></view>
  447. <view style="width: 73%; height: 100%; padding: 10rpx 0">
  448. <input
  449. v-model="noteValue"
  450. height="60"
  451. fixed="true"
  452. placeholder="您可以在这里输入笔记内容"
  453. type="text"
  454. :custom-style="inputStyle"
  455. :adjust-position="false"
  456. class="input"
  457. @focus="focusNote"
  458. @blur="blurNote"
  459. />
  460. </view>
  461. <view
  462. style="
  463. color: #007aff;
  464. font-size: 30rpx;
  465. font-weight: bold;
  466. width: 15%;
  467. text-align: center;
  468. "
  469. @click="postNote"
  470. >提交</view
  471. >
  472. </view>
  473. </template>
  474. <!-- 答疑的输入框 -->
  475. <view
  476. v-if="current == 3"
  477. class="inputBottom"
  478. :style="{ bottom: bottomHeight + 'px' }"
  479. >
  480. <view class="flex_auto">
  481. <input
  482. v-model="ctxValue"
  483. height="60"
  484. fixed="true"
  485. :focus="isFocus"
  486. :placeholder="placeholder"
  487. type="text"
  488. :custom-style="inputStyle"
  489. :adjust-position="false"
  490. class="input"
  491. @focus="focusNote"
  492. @blur="blur"
  493. />
  494. </view>
  495. <view class="btn" @click="postContent">提交</view>
  496. </view>
  497. </view>
  498. <!-- 播放前拍照end -->
  499. <u-popup
  500. v-model="showSet"
  501. :mask-close-able="false"
  502. mode="center"
  503. border-radius="24"
  504. >
  505. <view
  506. style="
  507. align-items: center;
  508. padding: 0 40rpx;
  509. display: flex;
  510. flex-direction: column;
  511. justify-content: center;
  512. "
  513. >
  514. <view
  515. style="
  516. font-weight: bold;
  517. color: #333333;
  518. font-size: 30rpx;
  519. margin-top: 30rpx;
  520. "
  521. >温馨提示</view
  522. >
  523. <view
  524. style="
  525. width: 457rpx;
  526. color: #666666;
  527. font-size: 30rpx;
  528. margin-top: 30rpx;
  529. "
  530. >学习过程中需要拍照验证学员身份, 拍照功能需要使用您的相机。
  531. 是否授权使用?</view
  532. >
  533. <view style="margin: 40rpx 0">
  534. <button
  535. open-type="openSetting"
  536. @bindopensetting="openSetting"
  537. class="btnSet"
  538. >
  539. 去授权
  540. </button>
  541. </view>
  542. </view>
  543. </u-popup>
  544. <u-popup v-model="photoPopup" mode="bottom" border-radius="40" :mask-close-able="false">
  545. <!-- 播放前拍照start -->
  546. <!-- :mask-close-able="false" -->
  547. <!-- style="bottom: 0; position: fixed; width: 100%; z-index: 999" -->
  548. <view v-if="photoPopup">
  549. <view class="photoBox">
  550. <view class="photoTop">
  551. <view class="sqzz" v-if="false"
  552. ><u-icon
  553. name="close"
  554. color="#333333"
  555. size="30"
  556. @click="closePhoto"
  557. ></u-icon
  558. ></view>
  559. <view class="centersq">请正视手机屏幕</view>
  560. <view class="sqzz"></view>
  561. </view>
  562. <view class="photoCenter">
  563. <view class="center_camera" v-if="photoPopup && isTaking">
  564. <!-- #ifdef MP-WEIXIN -->
  565. <camera
  566. device-position="front"
  567. flash="off"
  568. @error="error"
  569. style="width: 100%; height: 100%"
  570. >
  571. <!-- 加人脸框 -->
  572. <cover-view class="head_take">
  573. <cover-view class="headTake_up color"></cover-view>
  574. <cover-view class="headTake_minddle">
  575. <cover-view class="min_left color"></cover-view>
  576. <cover-view class="min_img"></cover-view>
  577. <cover-view class="min_right color"></cover-view>
  578. </cover-view>
  579. <cover-view class="headTake_down color"></cover-view>
  580. </cover-view>
  581. </camera>
  582. <!-- #endif -->
  583. <!-- #ifdef H5 -->
  584. <video
  585. :controls='false'
  586. id="video"
  587. width="400"
  588. height="300"
  589. class="photo_v"
  590. ></video>
  591. <view class="mask"></view>
  592. <!-- #endif -->
  593. </view>
  594. <view class="custom" v-if="!isTaking">
  595. <!-- #ifdef MP-WEIXIN -->
  596. <image :src="avatarUrl" mode=""></image>
  597. <!-- #endif -->
  598. <!-- #ifdef H5 -->
  599. <image :src="faceUrl" mode=""></image>
  600. <!-- #endif -->
  601. </view>
  602. </view>
  603. <view class="btns">
  604. <!-- <view class="btnResult" v-if="isTaking" @click="takePhoto"
  605. >拍照</view
  606. > -->
  607. <view v-if="isTaking" class="takePhoto_btn">
  608. <view style="width: 100rpx; height: 2rpx"></view>
  609. <view class="middle_btn" @click="takePhoto">
  610. <view class="square"></view>
  611. </view>
  612. <view class="rights" @click="takePhTips()">
  613. <text>拍照提示</text>
  614. <u-icon name="arrow-right" color="#FFFFFF" size="30"></u-icon>
  615. </view>
  616. </view>
  617. <view class="btnResult" v-if="!isTaking" @click="reTake">重拍</view>
  618. <view class="btnResult" v-if="!isTaking" @click="submit">确认</view>
  619. </view>
  620. </view>
  621. </view>
  622. </u-popup>
  623. <u-popup
  624. v-model="noticeShow"
  625. class="notice_modal"
  626. mode="center"
  627. border-radius="28"
  628. width="650rpx"
  629. height="622rpx"
  630. :mask-close-able="false"
  631. @close="closeNotice"
  632. >
  633. <view class="content">
  634. <view class="title">学员须知</view>
  635. <scroll-view scroll-y="true">
  636. <view
  637. class="text"
  638. v-html="
  639. goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')
  640. "
  641. >
  642. </view>
  643. </scroll-view>
  644. <view
  645. class="had_read"
  646. :class="{ gray: CountTo >= 0 }"
  647. @click="noticeConfirm()"
  648. >
  649. <text v-if="CountTo >= 0">请阅读学员须知,30s后可关闭</text>
  650. <text v-else>我已阅读学员须知</text>
  651. <text v-if="CountTo >= 0">{{ " " + CountTo + "s" }}</text>
  652. </view>
  653. </view>
  654. </u-popup>
  655. <u-modal
  656. v-model="showMark"
  657. title="提示"
  658. @confirm="markConfirm"
  659. @cancel="markCancel"
  660. confirm-text="复制学习网址"
  661. :show-cancel-button="true"
  662. cancel-text="关闭"
  663. >
  664. <view class="slot-content">
  665. <view>您的学习账号已经开通,请按照步骤操作,进行学习。</view>
  666. <view>1.复制学习地址:{{ markContent }}</view>
  667. <view>2.在【浏览器中】打开复制的学习网址</view>
  668. <view>3.打开学习网址后,选择【个人用户】进行登录</view>
  669. <view>(1)账号:您个人的身份证号码</view>
  670. <view>(2)密码:身份证号码,再加111111</view>
  671. </view>
  672. </u-modal>
  673. <!-- 切换课程弹窗 -->
  674. <u-popup
  675. v-model="toggleCourseShow"
  676. mode="bottom"
  677. border-radius="40"
  678. :mask-close-able="false"
  679. >
  680. <view class="popup_box">
  681. <view class="check_head">
  682. <view class="headers">
  683. <view class="grade">切换课程</view>
  684. <u-icon
  685. name="close"
  686. color="#9C9C9C"
  687. size="40"
  688. @click="closePop()"
  689. ></u-icon>
  690. </view>
  691. <view class="coruse_num">共{{ goodsTeacher.length }}门</view>
  692. <view class="menuSel">
  693. <scroll-view class="sub_sliper" scroll-x="true">
  694. <view
  695. v-for="(item, index) in subList"
  696. :key="index"
  697. style="margin-right: 50rpx; display: inline-block"
  698. >
  699. <view
  700. class="r_t1"
  701. :class="{ nactive: subIndex == index }"
  702. @click="cMenu(item, index)"
  703. >
  704. {{ item.subjectName }}
  705. </view>
  706. </view>
  707. </scroll-view>
  708. </view>
  709. </view>
  710. <view class="check_con">
  711. <scroll-view scroll-y="true" style="height: 700rpx">
  712. <view v-for="(courseItem, gTindex) in goodsTeacher" :key="gTindex">
  713. <view
  714. v-for="(item, index) in courseItem.courseList"
  715. :key="index"
  716. v-show="
  717. item.subjectId === newActiveSubjectId || !newActiveSubjectId
  718. "
  719. >
  720. <view class="course_items" v-if="item.show && item.show == 1">
  721. <view class="course_lefts">
  722. <view class="course_title">
  723. {{ item.courseName }}
  724. </view>
  725. <view
  726. v-if="courseItem.teaList && courseItem.teaList.length > 0"
  727. class="teacher_names"
  728. >
  729. <view
  730. v-for="(tea, tindex) in courseItem.teaList"
  731. :key="tindex"
  732. class="names"
  733. >{{ tea.aliasName }}</view
  734. >
  735. </view>
  736. <view class="course_pros">
  737. 学习进度
  738. <text>
  739. {{ item.stuAllNum + item.recordNum }}/{{
  740. item.secAllNum + item.examNum
  741. }}</text
  742. >
  743. </view>
  744. </view>
  745. <view
  746. class="course_rights"
  747. @click="jump(item, gTindex, 'jump')"
  748. >
  749. <view class="cicles">
  750. <u-icon
  751. name="arrow-right"
  752. color="#498AFE"
  753. size="20"
  754. ></u-icon>
  755. </view>
  756. <view class="intoStudy">进入学习</view>
  757. </view>
  758. </view>
  759. </view>
  760. </view>
  761. </scroll-view>
  762. </view>
  763. </view>
  764. </u-popup>
  765. <!-- 拍照提示 -->
  766. <popup-photo
  767. :popupPhotoShow.sync="popupPhotoShow"
  768. @takePhoto="toTakePhoto()"
  769. ></popup-photo>
  770. </view>
  771. </template>
  772. <script>
  773. import plv from "../static/polyv-sdk/index";
  774. import courseModule from "@/components/course/courseModule.vue";
  775. import courseChapter from "@/components/course/courseChapter.vue";
  776. import courseSection from "@/components/course/courseSection.vue";
  777. import PopupPhoto from "@/components/popup/index.vue";
  778. import config from '@/common/config'
  779. import { mapGetters, mapMutations } from "vuex";
  780. var polyvPlayerContext = null;
  781. export default {
  782. components: {
  783. courseModule,
  784. courseChapter,
  785. courseSection,
  786. PopupPhoto,
  787. },
  788. data() {
  789. return {
  790. markContent: "http://admin.zhujianpeixun.com/",
  791. showMark: false,
  792. hasStart: false,
  793. channelItem: null,
  794. lockTimer: null,
  795. orderGoodsId: 0,
  796. noticeShow: false,
  797. navShow: true,
  798. enableAutoRotation: true,
  799. seekTime: "",
  800. toastTimer: null,
  801. videoToastShow: false,
  802. initLiveOk: false,
  803. livePlay: false, //是否正在播放直播,不含暂停
  804. liveDuration: 0, //直播观看时长
  805. videoOption: {
  806. mode: "live",
  807. uid: "",
  808. cid: "",
  809. openId: "",
  810. isAutoChange: false,
  811. forceVideo: false,
  812. },
  813. courseHandoutsData: "",
  814. liveDetail: {},
  815. showSet: false,
  816. startStatus: false,
  817. detail: {},
  818. courseId: 0,
  819. placeholder:
  820. "您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记",
  821. inputStyle: {
  822. background: "rgba(244, 244, 244, 0.98)",
  823. borderRadius: "24rpx",
  824. padding: "8rpx",
  825. marginBottom: "10rpx",
  826. },
  827. list: [],
  828. menuList: [],
  829. current: 0,
  830. vid: "",
  831. goodsId: 0,
  832. goodsData: {},
  833. photoPopup: false,
  834. goodsPlayConfig: null,
  835. autoplay: false,
  836. isAllowSeek: "no",
  837. playbackRate: [1.0],
  838. timer: null,
  839. goodsPhotographConfig: null,
  840. intervalTimeList: [], // 间隔拍照时长
  841. intervalTimeIndex: 0, //当前处于哪个时间段拍照
  842. playTime: 0, //页面播放时长,不含暂停
  843. currentTime: 0,
  844. avatarUrl: "",
  845. ossAvatarUrl: "",
  846. studyDuration: 0, // 当前视频时长
  847. gradeId: 0,
  848. chapterId: 0,
  849. moduleId: 0,
  850. reMenuList: [],
  851. answerList: [],
  852. assignUserId: 0,
  853. placeholder: "您可以在这里输入答疑内容",
  854. ctxValue: "",
  855. noteList: [],
  856. noteValue: "",
  857. noteId: 0,
  858. recordObj: 0,
  859. gradeDetail: {},
  860. isTaking: true, //是否正在拍照
  861. needSeek: false, //第一次播放是否需要跳转
  862. needProfileModal: false, //是否需要资料审核弹框
  863. liveObj: {},
  864. photoNum: 0,
  865. photoList: [], //拍照的时间点
  866. photoConfig: false, //是否配置好拍照次数
  867. photoIndex: 0, //当前位于拍照的区间下标 从0开始
  868. photoHistoryList: [], //已拍照历史的下标点
  869. sectionItem: {},
  870. businessData: {},
  871. showNotes: true,
  872. menuIndex: [],
  873. uploadLock: false, //上传图片
  874. isPlayRebuild: false, //是否正在播放重修视频
  875. isRebuild: false, //视频是否从重修目录点击
  876. isFocus: false,
  877. clearTimer: null,
  878. livingItem: "",
  879. option: null,
  880. isOther: "",
  881. downLoading: false, //下载讲义加载
  882. muluStyle: false, //显示和隐藏目录样式
  883. bottomHeight: 0,
  884. toggleCourseShow: false, // 切换课程弹窗
  885. informId: "", //消息id,从公众号消息模板进来的才有
  886. courseList: [], // 课程列表
  887. reStart: false, // 是否显示模块/章/节
  888. subList: [],
  889. subIndex: 0,
  890. goodsTeacher: [],
  891. teacherList: [],
  892. teacherIndex: 0,
  893. newActiveSubjectId: "", //当前选中ID
  894. compareFaceData: 0, // 拍照匹配相似度
  895. prendreAutoCarme: false, // 是否发起授权相机
  896. studyTimer: null, // 学习记录定时器
  897. CountTo: 30, // 倒计时
  898. handoutTipLength: 0,
  899. menuAllList: [],
  900. popupPhotoShow: false,
  901. curPlayIndex: 0, // 正在播放的节的下标
  902. // h5
  903. vodPlayerJs: "https://player.polyv.net/script/player.js",
  904. player: "",
  905. H5isAllowSeek: "off",
  906. // stream: null,
  907. faceUrl: "",
  908. };
  909. },
  910. computed: {
  911. ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
  912. },
  913. watch: {
  914. showSet(n) {
  915. if (n) {
  916. // var polyvPlayerContext = this.selectComponent("#playerVideo")
  917. if (polyvPlayerContext) {
  918. // #ifdef MP-WEIXIN
  919. polyvPlayerContext.pause();
  920. // #endif
  921. // #ifdef H5
  922. polyvPlayerContext.j2s_pauseVideo(); // 暂停播放视频
  923. // #endif
  924. }
  925. }
  926. },
  927. photoPopup(n) {
  928. if (n) {
  929. if (this.prendreAutoCarme) {
  930. this.photoPopup = false;
  931. }
  932. this.showSet && (this.photoPopup = false);
  933. }
  934. },
  935. },
  936. onLoad(option) {
  937. console.log("--option--", option);
  938. this.courseId = Number(option.id) || "";
  939. this.goodsId = Number(option.goodsId);
  940. this.orderGoodsId = Number(option.orderGoodsId) || "";
  941. this.gradeId = option.gradeId;
  942. this.isOther = option.isOther;
  943. if (this.isOther) {
  944. this.showMark = true;
  945. return;
  946. }
  947. this.option = option;
  948. // 公众号模板消息的数据埋点
  949. if (option.informId) {
  950. this.informId = option.informId;
  951. }
  952. },
  953. async onShow() {
  954. if (this.option.skipPort) {
  955. await this.$method.skipLogin(this.option.skipPort)
  956. }
  957. if (this.$method.isGoLogin()) {
  958. // 从公众号消息进来的没登录需要跳到登录页,登录后返回
  959. return;
  960. }
  961. console.log("onshow返回之后");
  962. this.courseCourseList();
  963. this.informId && this.clickOfficial(); // 从公众号消息点击进来上报一次
  964. this.$store.getters.dictObj;
  965. },
  966. onUnload() {
  967. console.log("onUnloadonUnloadonUnloadonUnload");
  968. this.originUnload();
  969. this.clears();
  970. },
  971. onHide() {
  972. this.originUnload();
  973. },
  974. mounted() {},
  975. methods: {
  976. ...mapMutations(["updateChapterOpen", "updateLiveLast"]),
  977. // 新增微信公众号模板消息点击数据
  978. clickOfficial() {
  979. this.$http({
  980. url: "/data/click",
  981. method: "post",
  982. data: { informId: this.informId },
  983. }).then((res) => {
  984. if (res.data.code == 200) {
  985. console.log("上报埋点");
  986. }
  987. });
  988. },
  989. // 点击课程目录
  990. cMenu(item, index) {
  991. this.subIndex = index;
  992. this.newActiveSubjectId = item.subjectId;
  993. },
  994. courseCourseList() {
  995. // /course/courseList查询商品下的课程列表
  996. this.courseList = [];
  997. this.menuList = [];
  998. this.$api
  999. .courseCourseList({
  1000. pageNum: 1,
  1001. pageSize: 200,
  1002. goodsId: this.goodsId,
  1003. gradeId: this.gradeId,
  1004. orderGoodsId: this.orderGoodsId,
  1005. })
  1006. .then((res) => {
  1007. if (res.data.code == 200) {
  1008. this.courseList.push.apply(this.courseList, res.data.rows);
  1009. // 科目
  1010. let allItem = [{ subjectId: 0, subjectName: "所有" }];
  1011. let ids = [];
  1012. const newArr = [];
  1013. this.courseList.forEach((item) => {
  1014. if (ids.indexOf(item.subjectId) == -1) {
  1015. ids.push(item.subjectId);
  1016. newArr.push(item);
  1017. }
  1018. });
  1019. this.subList = [...allItem, ...newArr];
  1020. console.log(
  1021. "this.courseList:",
  1022. this.courseList,
  1023. "length:",
  1024. res.data.rows.length
  1025. );
  1026. if (res.data.rows.length) {
  1027. this.courseBusiness(res.data.rows[0].businessId);
  1028. }
  1029. if (res.data.total > 1) {
  1030. this.getUserWatchLast();
  1031. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1032. } else if (res.data.total == 1) {
  1033. this.originOnShow();
  1034. this.originMounted();
  1035. }
  1036. }
  1037. });
  1038. },
  1039. /**
  1040. * 获取业务层次详情
  1041. */
  1042. courseBusiness(businessId) {
  1043. // '/app/common/course/business/'+data,
  1044. this.$api.courseBusiness(businessId).then((res) => {
  1045. this.businessData = res.data.data;
  1046. });
  1047. },
  1048. // 查询用户最后一次看的录播的信息
  1049. getUserWatchLast() {
  1050. this.$http({
  1051. url: "/study/record/getUserWatchLast",
  1052. method: "get",
  1053. data: {
  1054. orderGoodsId: this.orderGoodsId,
  1055. },
  1056. }).then((res) => {
  1057. if (res.data.code == 200) {
  1058. this.sectionItem = res.data.data || {};
  1059. if (res.data.data && Object.keys(res.data.data).length) {
  1060. //有最后一次看的录播的信息
  1061. this.courseId = res.data.data.courseId;
  1062. // console.log('查询用户最后一次看的录播的信息', res.data, this.courseId)
  1063. } else {
  1064. this.courseId = this.courseList[0].courseId; // 没有观看记录默认一个课程
  1065. // this.toggleCourseShow = true
  1066. }
  1067. } else {
  1068. this.courseId = this.courseList[0].courseId; // 没有观看记录默认一个课程
  1069. }
  1070. this.originOnShow();
  1071. this.originMounted();
  1072. //获取商品双师资模板
  1073. this.getCourseTeacher(this.courseList);
  1074. });
  1075. },
  1076. getCourseTeacher(rows) {
  1077. this.goodsTeacher = [];
  1078. //获取商品双师资模板
  1079. this.$api
  1080. .courseTeacherList({
  1081. goodsId: this.goodsId,
  1082. })
  1083. .then((res1) => {
  1084. if (res1.data.data && res1.data.data.length > 0) {
  1085. //课程老师模板
  1086. let teacherTel = res1.data.data;
  1087. //商品课程
  1088. let courses = rows;
  1089. teacherTel.forEach((tea) => {
  1090. let dataList = [];
  1091. let teacherList = [];
  1092. courses.forEach((item) => {
  1093. let data = tea.courseList.filter(
  1094. (x) => x.courseId == item.courseId
  1095. );
  1096. if (data && data.length > 0) {
  1097. dataList.push(item);
  1098. teacherList = tea.courseList;
  1099. }
  1100. });
  1101. let result = {
  1102. teaList: teacherList,
  1103. courseList: dataList,
  1104. };
  1105. this.goodsTeacher.push(result);
  1106. });
  1107. if (this.goodsTeacher && this.goodsTeacher.length > 0) {
  1108. let courseIds = [];
  1109. this.goodsTeacher.forEach((item) => {
  1110. item.courseList.forEach((course) => {
  1111. courseIds.push(course.courseId);
  1112. });
  1113. });
  1114. if (courseIds.length > 0) {
  1115. courses.forEach((item) => {
  1116. if (!courseIds.includes(item.courseId)) {
  1117. let data = {
  1118. teaList: [],
  1119. courseList: [],
  1120. };
  1121. data.courseList.push(item);
  1122. this.goodsTeacher.push(data);
  1123. }
  1124. });
  1125. }
  1126. this.goodsTeacher.forEach((item) => {
  1127. if (item.courseList && item.courseList.length > 0) {
  1128. item.courseList[0].show = 1;
  1129. }
  1130. });
  1131. }
  1132. } else {
  1133. //没有双师资模板
  1134. rows.forEach((item) => {
  1135. item.show = 1;
  1136. let data = {
  1137. teaList: [],
  1138. courseList: [],
  1139. };
  1140. data.courseList.push(item);
  1141. this.goodsTeacher.push(data);
  1142. });
  1143. }
  1144. // console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
  1145. this.goodsTeacher.forEach((item) => {
  1146. if (item.courseList.some((x) => x.courseId == this.courseId)) {
  1147. this.teacherList = item.teaList;
  1148. }
  1149. });
  1150. });
  1151. },
  1152. // 原来onshow里面的内容
  1153. originOnShow() {
  1154. if (this.isOther) {
  1155. this.showMark = true;
  1156. return;
  1157. }
  1158. this.getbaseprofiletplists().then((res) => {
  1159. this.courseDetail();
  1160. this.getGoodsDetail();
  1161. this.getAnswerList();
  1162. this.studyRecordMenuAllList();
  1163. // this.answerTimer = setInterval(() => {
  1164. // this.getAnswerList();
  1165. // }, 5000);
  1166. let noteSecond = Number(this.option.noteSecond);
  1167. // console.log('noteSecondnoteSecond:', noteSecond, this.option)
  1168. if (noteSecond > 0) {
  1169. //我的消息跳过来,播放节
  1170. let item = {
  1171. sectionId: Number(this.option.sectionId),
  1172. recordingUrl: this.option.recordingUrl,
  1173. noteSecond: noteSecond,
  1174. studyDuration: noteSecond,
  1175. };
  1176. let playNextId = `moduleId${this.option.moduleId}chapterId${
  1177. this.option.chapterId
  1178. }sectionId${this.option.sectionId}${
  1179. this.option.isRebuild ? "isRebuild" : ""
  1180. }`;
  1181. this.$store.commit("setPlaySectionId", {
  1182. playSectionId: item.sectionId || item.menuId,
  1183. });
  1184. this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
  1185. this.$store.commit("updatePlayNextId", playNextId);
  1186. this.playNoteVideo(item);
  1187. } else {
  1188. this.studyRecordQueryLiveLast();
  1189. }
  1190. });
  1191. this.current = uni.getStorageSync("current") || 0;
  1192. },
  1193. // 原来的mouted内容
  1194. originMounted() {
  1195. uni.$on("changeSection", (oldSectionId) => {
  1196. console.log(
  1197. "切换课程-originMounted->playVID:",
  1198. this.playVID,
  1199. oldSectionId
  1200. );
  1201. this.studyTimer && clearInterval(this.studyTimer); // 清除定时器
  1202. this.hasStart = false;
  1203. this.photoConfig = false;
  1204. this.photoIndex = 0;
  1205. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  1206. if (polyvPlayerContext) {
  1207. //解决同个节视频切换问题
  1208. // #ifdef MP-WEIXIN
  1209. polyvPlayerContext.seek(0);
  1210. polyvPlayerContext.pause();
  1211. // #endif
  1212. // #ifdef H5
  1213. polyvPlayerContext.j2s_seekVideo(0);
  1214. polyvPlayerContext.j2s_pauseVideo(); // 暂停播放视频
  1215. // #endif
  1216. }
  1217. //清除直播
  1218. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  1219. this.postStudyRecord(0, oldSectionId);
  1220. });
  1221. uni.$on("getSection", (item) => {
  1222. //清除直播
  1223. this.studyTimer && clearInterval(this.studyTimer);
  1224. this.hasStart = false;
  1225. this.isPlayRebuild = item.rebuild;
  1226. this.photoConfig = false;
  1227. this.photoIndex = 0;
  1228. this.sectionItem = item;
  1229. this.moduleId = item.moduleId || null;
  1230. this.chapterId = item.chapterId || null;
  1231. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  1232. this.$store.commit("setPlaySectionId", {
  1233. playSectionId: item.sectionId || item.menuId,
  1234. });
  1235. console.log(
  1236. "清除直播节点胡:",
  1237. this.moduleId,
  1238. this.chapterId,
  1239. this.playSectionId,
  1240. this.hasStart
  1241. );
  1242. //获取拍照历史
  1243. this.getPhotoLastRecord();
  1244. this.playVideo(item);
  1245. });
  1246. uni.$on("levelId", (item) => {
  1247. console.log("点击节获取的各层级ID", item);
  1248. let arr = item.split("-");
  1249. //点击节获取的各层级ID
  1250. this.moduleId = arr[0];
  1251. this.chapterId = arr[1];
  1252. });
  1253. uni.$on("getChannel", (item) => {
  1254. //清除录播
  1255. this.studyTimer && clearInterval(this.studyTimer);
  1256. this.hasStart = false;
  1257. this.$store.commit("setPlayVID", { playVID: null });
  1258. this.moduleId = item.moduleId;
  1259. this.chapterId = item.chapterId;
  1260. this.$store.commit("setPlaySectionId", {
  1261. playSectionId: item.sectionId || item.menuId,
  1262. });
  1263. this.getPhotoLastRecord();
  1264. this.playChannel(item);
  1265. this.channelItem = item;
  1266. });
  1267. uni.$on("isRebuild", (item) => {
  1268. this.isRebuild = item;
  1269. });
  1270. this.updateChapterOpen(true);
  1271. },
  1272. // 原来onUnload里面的内容
  1273. originUnload() {
  1274. if (this.playSectionId > 0 && this.hasStart) {
  1275. //退出提交记录
  1276. this.postStudyRecord();
  1277. }
  1278. //清除正在播放的节ID
  1279. // this.$store.commit('setPlayObj',null)
  1280. this.$store.commit("setPlaySectionId", { playSectionId: 0 });
  1281. this.$store.commit("setPlayChannelId", { playChannelId: 0 });
  1282. this.$store.commit("setPlayVID", { playVID: null });
  1283. this.closePlv();
  1284. //移除所有的事件监听器
  1285. uni.$off();
  1286. this.clearTimer && clearTimeout(this.clearTimer);
  1287. this.toastTimer && clearTimeout(this.toastTimer);
  1288. if (this.studyTimer) {
  1289. clearInterval(this.studyTimer);
  1290. this.hasStart = false;
  1291. }
  1292. this.timer && clearInterval(this.timer);
  1293. if (this.lockTimer) {
  1294. clearInterval(this.lockTimer);
  1295. this.$api
  1296. .lockDelLock({
  1297. action: "jxjy",
  1298. uuid: this.$method.getUuid(),
  1299. })
  1300. .then((res) => {
  1301. uni.hideLoading();
  1302. });
  1303. }
  1304. uni.removeStorageSync("current");
  1305. },
  1306. changeCourses() {
  1307. this.toggleCourseShow = true;
  1308. },
  1309. closePop() {
  1310. this.toggleCourseShow = false;
  1311. },
  1312. async activeFunc(item, index) {
  1313. this.teacherIndex = index;
  1314. let findResult = "";
  1315. this.goodsTeacher.forEach((citem, index) => {
  1316. citem.courseList.forEach((e, e_index) => {
  1317. if (e.courseId == item.courseId) {
  1318. findResult = e;
  1319. }
  1320. });
  1321. });
  1322. this.jump(findResult, 1);
  1323. },
  1324. // 进入学习
  1325. async jump(item, index, type) {
  1326. // console.log('item------>', index,item,this.goodsTeacher)
  1327. if (index == 0) {
  1328. await this.nextCourses(item, type);
  1329. if (item.rebuild === 0) {
  1330. //未重修
  1331. this.$navTo.togo("/pages2/learn/details", {
  1332. id: item.courseId,
  1333. gradeId: item.gradeId,
  1334. goodsId: this.goodsId,
  1335. orderGoodsId: this.orderGoodsId,
  1336. });
  1337. return;
  1338. }
  1339. this.$api.courseDetail(item.courseId).then((res) => {
  1340. if (res.data.code == 200) {
  1341. // if (res.data.data.educationName == "继续教育") {
  1342. this.$api
  1343. .lockLockStatus({
  1344. action: "jxjy",
  1345. uuid: this.$method.getUuid(),
  1346. })
  1347. .then((res) => {
  1348. if (res.data.code == 200) {
  1349. //有其他端在操作,不能学习
  1350. uni.showToast({
  1351. icon: "none",
  1352. title: res.data.msg,
  1353. mask: true,
  1354. duration: 3000,
  1355. });
  1356. } else if (res.data.code == 500) {
  1357. //可以学习
  1358. // this.$navTo.togo("/pages3/polyv/detail", {
  1359. // id: item.courseId,
  1360. // goodsId: this.goodsId,
  1361. // orderGoodsId: this.orderGoodsId,
  1362. // });
  1363. this.courseId = item.courseId;
  1364. this.originOnShow();
  1365. this.originMounted();
  1366. }
  1367. });
  1368. }
  1369. });
  1370. } else {
  1371. if (this.businessData.goodsLearningOrder == 2) {
  1372. //学习顺序是从头到尾学习,没学完上一课不能学习下一课
  1373. let prevItem = this.courseList[index - 1]; //上一课
  1374. if (prevItem.stuAllNum == prevItem.secAllNum) {
  1375. await this.nextCourses(item, type);
  1376. if (item.rebuild === 0) {
  1377. //未重修
  1378. this.$navTo.togo("/pages2/learn/details", {
  1379. id: item.courseId,
  1380. gradeId: item.gradeId,
  1381. goodsId: this.goodsId,
  1382. orderGoodsId: this.orderGoodsId,
  1383. });
  1384. return;
  1385. }
  1386. this.$api.courseDetail(item.courseId).then((res) => {
  1387. if (res.data.code == 200) {
  1388. // if (res.data.data.educationName == "继续教育") {
  1389. this.$api
  1390. .lockLockStatus({
  1391. action: "jxjy",
  1392. uuid: this.$method.getUuid(),
  1393. })
  1394. .then((res) => {
  1395. if (res.data.code == 200) {
  1396. //有其他端在操作,不能学习
  1397. uni.showToast({
  1398. icon: "none",
  1399. title: res.data.msg,
  1400. duration: 2000,
  1401. });
  1402. } else if (res.data.code == 500) {
  1403. //可以学习
  1404. // this.$navTo.togo("/pages3/polyv/detail", {
  1405. // id: item.courseId,
  1406. // goodsId: this.goodsId,
  1407. // orderGoodsId: this.orderGoodsId,
  1408. // });
  1409. this.courseId = item.courseId;
  1410. this.originOnShow();
  1411. this.originMounted();
  1412. }
  1413. });
  1414. }
  1415. });
  1416. } else {
  1417. uni.showToast({
  1418. icon: "none",
  1419. title: "请按顺序学完上一课再学习这一课",
  1420. });
  1421. }
  1422. } else {
  1423. await this.nextCourses(item, type);
  1424. if (item.rebuild === 0) {
  1425. //未重修
  1426. this.$navTo.togo("/pages2/learn/details", {
  1427. id: item.courseId,
  1428. gradeId: item.gradeId,
  1429. goodsId: this.goodsId,
  1430. orderGoodsId: this.orderGoodsId,
  1431. });
  1432. return;
  1433. }
  1434. this.$api.courseDetail(item.courseId).then((res) => {
  1435. if (res.data.code == 200) {
  1436. // if (res.data.data.educationName == "继续教育") {
  1437. this.$api
  1438. .lockLockStatus({
  1439. action: "jxjy",
  1440. uuid: this.$method.getUuid(),
  1441. })
  1442. .then((res) => {
  1443. if (res.data.code == 200) {
  1444. //有其他端在操作,不能学习
  1445. uni.showToast({
  1446. icon: "none",
  1447. title: res.data.msg,
  1448. duration: 2000,
  1449. });
  1450. } else if (res.data.code == 500) {
  1451. //可以学习
  1452. // this.$navTo.togo("/pages3/polyv/detail", {
  1453. // id: item.courseId,
  1454. // goodsId: this.goodsId,
  1455. // orderGoodsId: this.orderGoodsId,
  1456. // });
  1457. this.courseId = item.courseId;
  1458. this.originOnShow();
  1459. this.originMounted();
  1460. }
  1461. });
  1462. }
  1463. });
  1464. }
  1465. }
  1466. },
  1467. async nextCourses(item, type) {
  1468. this.vid = "";
  1469. this.hasStart = true;
  1470. await this.originUnload();
  1471. if (type) {
  1472. this.teacherIndex = 0;
  1473. this.goodsTeacher.forEach((citem) => {
  1474. if (citem.courseList.some((x) => x.courseId == item.courseId)) {
  1475. this.teacherList = citem.teaList;
  1476. }
  1477. });
  1478. }
  1479. this.reStart = false;
  1480. this.courseId = item.courseId;
  1481. this.gradeId = item.gradeId;
  1482. this.toggleCourseShow = false;
  1483. },
  1484. clickLeft() {
  1485. // uni.navigateBack()
  1486. uni.switchTab({
  1487. url: "/pages/learn/index",
  1488. });
  1489. },
  1490. markCancel() {
  1491. uni.navigateBack({
  1492. delta: 1,
  1493. });
  1494. },
  1495. markConfirm() {
  1496. uni.setClipboardData({
  1497. data: this.markContent,
  1498. success: function () {
  1499. setTimeout(() => {
  1500. uni.navigateBack({
  1501. delta: 1,
  1502. });
  1503. }, 1000);
  1504. },
  1505. });
  1506. },
  1507. closeNotice() {
  1508. this.$api
  1509. .baseHandoutTip({
  1510. orderGoodsId: this.orderGoodsId,
  1511. })
  1512. .then((res) => {});
  1513. },
  1514. noticeConfirm() {
  1515. if (this.CountTo < 0) {
  1516. this.noticeShow = false;
  1517. if (this.handoutTipLength == 0 && this.goodsPlayConfig.autoPlay > 0) {
  1518. this.autoplay = true;
  1519. // var polyvPlayerContext = this.selectComponent("#playerVideo")
  1520. // #ifdef MP-WEIXIN
  1521. polyvPlayerContext.play();
  1522. // #endif
  1523. // #ifdef H5
  1524. polyvPlayerContext.j2s_resumeVideo();
  1525. // #endif
  1526. }
  1527. }
  1528. },
  1529. baseHandoutTipList() {
  1530. this.$api
  1531. .baseHandoutTipList({
  1532. orderGoodsId: this.orderGoodsId,
  1533. })
  1534. .then((res) => {
  1535. this.handoutTipLength = res.data.rows.length;
  1536. if (res.data.rows.length == 0) {
  1537. this.noticeShow = true;
  1538. if (this.CountTo == 30) {
  1539. var timer = setInterval(() => {
  1540. this.CountTo--;
  1541. if (this.CountTo < 0) {
  1542. clearInterval(timer);
  1543. }
  1544. }, 1000);
  1545. }
  1546. } else {
  1547. this.CountTo = -1;
  1548. if (this.goodsPlayConfig && this.goodsPlayConfig.autoPlay > 0) {
  1549. // #ifdef MP-WEIXIN
  1550. this.autoplay = true;
  1551. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1552. polyvPlayerContext.play();
  1553. // #endif
  1554. // #ifdef H5
  1555. // polyvPlayerContext.j2s_resumeVideo()
  1556. // #endif
  1557. }
  1558. }
  1559. });
  1560. },
  1561. /**
  1562. * 获取上次观看的直播
  1563. */
  1564. studyRecordGetLastLive() {
  1565. this.$api
  1566. .studyRecordGetLastLive({
  1567. orderGoodsId: this.orderGoodsId,
  1568. courseId: this.courseId,
  1569. })
  1570. .then((res) => {
  1571. this.updateLiveLast(res.data.data);
  1572. });
  1573. },
  1574. studyRecordQueryLiveLast() {
  1575. // /study/record/queryLiveLast
  1576. this.$api
  1577. .studyRecordQueryLiveLast({
  1578. gradeId: this.gradeId,
  1579. orderGoodsId: this.orderGoodsId,
  1580. courseId: this.courseId,
  1581. })
  1582. .then(async (res) => {
  1583. if (res.data.data) {
  1584. this.moduleId = res.data.data.moduleId;
  1585. this.chapterId = res.data.data.chapterId;
  1586. if (res.data.data.sectionType == 1) {
  1587. //录播
  1588. this.$store.commit("setPlaySectionId", {
  1589. playSectionId: res.data.data.sectionId,
  1590. });
  1591. this.$store.commit("setPlayVID", {
  1592. playVID: res.data.data.recordingUrl,
  1593. });
  1594. this.sectionItem = res.data.data;
  1595. await this.getPhotoLastRecord(); // 获取拍照历史
  1596. this.playVideo(res.data.data);
  1597. } else if (res.data.data.sectionType == 2) {
  1598. //直播
  1599. this.studyRecordGetLastLive();
  1600. } else if (res.data.data.sectionType == 3) {
  1601. //回放
  1602. this.$store.commit("setPlaySectionId", {
  1603. playSectionId: res.data.data.sectionId,
  1604. });
  1605. this.$store.commit("setPlayVID", {
  1606. playVID: res.data.data.recordingUrl,
  1607. });
  1608. this.sectionItem = res.data.data;
  1609. this.playVideo(res.data.data);
  1610. }
  1611. // 查询用户最后一次看的录播的信息
  1612. this.$http({
  1613. url: "/study/record/getUserWatchLast",
  1614. method: "get",
  1615. data: {
  1616. orderGoodsId: this.orderGoodsId,
  1617. },
  1618. }).then((res) => {
  1619. if (res.data.code == 200) {
  1620. this.sectionItem = res.data.data || {};
  1621. }
  1622. });
  1623. }
  1624. });
  1625. },
  1626. /**
  1627. * 模块大节播放完毕,刷新列表
  1628. */
  1629. sectionPlayEnd(isRebuild, index) {
  1630. if (this.reMenuList.length > 0) {
  1631. //有重修目录
  1632. if (isRebuild.isRebuild) {
  1633. //从重修点击
  1634. this.$api
  1635. .reMenuList({
  1636. orderGoodsId: this.orderGoodsId,
  1637. courseId: this.courseId,
  1638. rebuild: 1,
  1639. gradeId: this.gradeId,
  1640. })
  1641. .then((res) => {
  1642. if (res.data.code == 200) {
  1643. if (res.data.rows.length) {
  1644. res.data.rows[index].name = res.data.rows[index].menuName;
  1645. this.$set(this.reMenuList, index, res.data.rows[index]);
  1646. for (let i = 0; i < res.data.rows.length; i++) {
  1647. let item = res.data.rows[i];
  1648. item.down = true;
  1649. item.id = item.menuId;
  1650. item.name = item.menuName;
  1651. }
  1652. this.reMenuList = [];
  1653. this.$nextTick(() => {
  1654. this.reMenuList = res.data.rows;
  1655. // console.log(this.reMenuList,'this.reMenuList1')
  1656. });
  1657. } else {
  1658. this.reMenuList = [];
  1659. }
  1660. this.$nextTick(() => {
  1661. if (this.reMenuList.length > 0) {
  1662. this.list = [
  1663. {
  1664. name: "目录",
  1665. },
  1666. {
  1667. name: "讲义",
  1668. },
  1669. {
  1670. name: "笔记",
  1671. },
  1672. {
  1673. name: "答疑",
  1674. },
  1675. { name: "重修目录" },
  1676. ];
  1677. } else {
  1678. this.list = [
  1679. {
  1680. name: "目录",
  1681. },
  1682. {
  1683. name: "讲义",
  1684. },
  1685. {
  1686. name: "笔记",
  1687. },
  1688. {
  1689. name: "答疑",
  1690. },
  1691. ];
  1692. if (this.current == 4) {
  1693. this.current = 0;
  1694. }
  1695. }
  1696. });
  1697. }
  1698. });
  1699. this.$api
  1700. .reMenuList({
  1701. courseId: this.courseId,
  1702. gradeId: this.gradeId,
  1703. orderGoodsId: this.orderGoodsId,
  1704. })
  1705. .then((res) => {
  1706. if (res.data.code == 200) {
  1707. for (let i = 0; i < res.data.rows.length; i++) {
  1708. let item = res.data.rows[i];
  1709. item.down = true;
  1710. item.id = item.menuId;
  1711. item.name = item.menuName;
  1712. item.menuType = item.type;
  1713. }
  1714. this.menuList = [];
  1715. this.$nextTick(() => {
  1716. this.menuList = res.data.rows;
  1717. });
  1718. }
  1719. });
  1720. } else {
  1721. //从普通目录点击
  1722. this.$api
  1723. .reMenuList({
  1724. courseId: this.courseId,
  1725. gradeId: this.gradeId,
  1726. orderGoodsId: this.orderGoodsId,
  1727. })
  1728. .then((res) => {
  1729. if (res.data.code == 200) {
  1730. res.data.rows[index].name = res.data.rows[index].menuName;
  1731. res.data.rows[index].id = res.data.rows[index].menuId;
  1732. this.$set(this.menuList, index, res.data.rows[index]);
  1733. }
  1734. });
  1735. this.$api
  1736. .reMenuList({
  1737. orderGoodsId: this.orderGoodsId,
  1738. courseId: this.courseId,
  1739. rebuild: 1,
  1740. gradeId: this.gradeId,
  1741. })
  1742. .then((res) => {
  1743. if (res.data.code == 200) {
  1744. if (res.data.rows.length) {
  1745. // for (let i = 0; i < res.data.rows.length; i++) {
  1746. // let item = res.data.rows[i];
  1747. // item.down = true;
  1748. // item.id = item.menuId;
  1749. // item.name = item.menuName;
  1750. // }
  1751. // this.reMenuList = res.data.rows;
  1752. } else {
  1753. this.reMenuList = [];
  1754. }
  1755. this.$nextTick(() => {
  1756. if (this.reMenuList.length > 0) {
  1757. this.list = [
  1758. {
  1759. name: "目录",
  1760. },
  1761. {
  1762. name: "讲义",
  1763. },
  1764. {
  1765. name: "笔记",
  1766. },
  1767. {
  1768. name: "答疑",
  1769. },
  1770. { name: "重修目录" },
  1771. ];
  1772. } else {
  1773. this.list = [
  1774. {
  1775. name: "目录",
  1776. },
  1777. {
  1778. name: "讲义",
  1779. },
  1780. {
  1781. name: "笔记",
  1782. },
  1783. {
  1784. name: "答疑",
  1785. },
  1786. ];
  1787. if (this.current == 4) {
  1788. this.current = 0;
  1789. }
  1790. }
  1791. });
  1792. }
  1793. });
  1794. }
  1795. } else {
  1796. console.log("--模块大节播放完毕,刷新列表-");
  1797. //没有重修目录
  1798. this.$api
  1799. .reMenuList({
  1800. courseId: this.courseId,
  1801. gradeId: this.gradeId,
  1802. orderGoodsId: this.orderGoodsId,
  1803. })
  1804. .then((res) => {
  1805. if (res.data.code == 200) {
  1806. res.data.rows[index].name = res.data.rows[index].menuName;
  1807. res.data.rows[index].id = res.data.rows[index].menuId;
  1808. this.$set(this.menuList, index, res.data.rows[index]);
  1809. }
  1810. });
  1811. }
  1812. },
  1813. goLive(item) {
  1814. let moduleId = item.moduleId || 0;
  1815. let chapterId = item.chapterId || 0;
  1816. let sectionId = item.sectionId || item.menuId;
  1817. let uuid = new Date().valueOf() + "";
  1818. // buyCourse 是否购买课程:1是 0否
  1819. let encode = encodeURIComponent(
  1820. config.WEBVIEW_URL +
  1821. "pages/live/index?token=" +
  1822. uni.getStorageSync("token") +
  1823. "&userInfo=" +
  1824. JSON.stringify(this.userInfo) +
  1825. "&channelId=" +
  1826. item.liveUrl +
  1827. "&gradeId=" +
  1828. this.gradeId +
  1829. "&courseId=" +
  1830. this.courseId +
  1831. "&goodsId=" +
  1832. this.goodsId +
  1833. "&orderGoodsId=" +
  1834. this.orderGoodsId +
  1835. "&sectionId=" +
  1836. sectionId +
  1837. "&chapterId=" +
  1838. chapterId +
  1839. "&moduleId=" +
  1840. moduleId +
  1841. "&buyCourse=1" +
  1842. "&ident=" +
  1843. uuid
  1844. );
  1845. uni.navigateTo({
  1846. url: `../../pages/webview/index?url=` + encode,
  1847. });
  1848. },
  1849. studyRecordMenuAllList() {
  1850. // study/record/menuAllList
  1851. this.$api
  1852. .studyRecordMenuAllList({
  1853. courseId: this.courseId,
  1854. gradeId: this.gradeId,
  1855. goodsId: this.goodsId,
  1856. })
  1857. .then((res) => {
  1858. let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  1859. if (res.data.data) {
  1860. this.menuAllList = res.data.data;
  1861. // console.log('======0', this.sectionItem);
  1862. this.livingItem = res.data.data.find(
  1863. (item) =>
  1864. item.liveStartTime <= nowTime && item.liveEndTime > nowTime
  1865. );
  1866. }
  1867. });
  1868. },
  1869. getbaseprofiletplists() {
  1870. return new Promise((resolve) => {
  1871. let self = this;
  1872. // #ifdef MP-WEIXIN
  1873. this.getCameraSetting();
  1874. // #endif
  1875. this.$api
  1876. .getbaseprofiletplists({
  1877. goodsId: self.goodsId,
  1878. orderGoodsId: this.orderGoodsId,
  1879. })
  1880. .then((res) => {
  1881. if (res.data.code === 200 && res.data.rows.length) {
  1882. if (res.data.rows[0].keyValue) {
  1883. self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
  1884. if (baseRes.data.code === 200) {
  1885. if (baseRes.data.data) {
  1886. // base/profile/tp/getInfo
  1887. self.$api
  1888. .getbaseprofiletpgetInfo({
  1889. goodsId: self.goodsId,
  1890. orderGoodsId: self.orderGoodsId,
  1891. })
  1892. .then((result) => {
  1893. if (result.data.code === 200) {
  1894. if (
  1895. !result.data.data ||
  1896. (result.data.data.status === 3 &&
  1897. result.data.data.changeStatus === 1)
  1898. ) {
  1899. if (!result.data.data) {
  1900. self.needProfileModal = true;
  1901. uni.showModal({
  1902. content: "请前往填写资料",
  1903. cancelText: "返回",
  1904. success: function (resultst) {
  1905. if (resultst.confirm) {
  1906. self.$navTo.togo("/pages2/verify/input", {
  1907. id: self.goodsId,
  1908. orderGoodsId: self.orderGoodsId,
  1909. });
  1910. }
  1911. if (resultst.cancel) {
  1912. uni.navigateBack();
  1913. }
  1914. },
  1915. });
  1916. } else {
  1917. self.needProfileModal = true;
  1918. uni.showModal({
  1919. content: "资料审核不通过,请前往重新填写",
  1920. cancelText: "返回",
  1921. success: function (resultst) {
  1922. if (resultst.confirm) {
  1923. self.$navTo.togo("/pages2/verify/input", {
  1924. id: self.goodsId,
  1925. orderGoodsId: self.orderGoodsId,
  1926. });
  1927. }
  1928. if (resultst.cancel) {
  1929. uni.navigateBack();
  1930. }
  1931. },
  1932. });
  1933. }
  1934. } else if (
  1935. result.data.data.status === 1 &&
  1936. JSON.parse(res.data.rows[0].keyValue2)[0]
  1937. ) {
  1938. self.$api
  1939. .getbaseprofileStampgetInfo({
  1940. goodsId: self.goodsId,
  1941. orderGoodsId: self.orderGoodsId,
  1942. })
  1943. .then((k) => {
  1944. if (k.data.code === 200) {
  1945. if (
  1946. !k.data.data ||
  1947. (k.data.data.status === 3 &&
  1948. k.data.data.changeStatus === 1)
  1949. ) {
  1950. if (!k.data.data) {
  1951. self.needProfileModal = true;
  1952. uni.showModal({
  1953. cancelText: "返回",
  1954. content: "请前往填写盖章资料",
  1955. success: function (resultst) {
  1956. if (resultst.confirm) {
  1957. self.$navTo.togo(
  1958. "/pages2/verify/input2",
  1959. {
  1960. id: self.goodsId,
  1961. orderGoodsId:
  1962. self.orderGoodsId,
  1963. }
  1964. );
  1965. }
  1966. if (resultst.cancel) {
  1967. uni.navigateBack();
  1968. }
  1969. },
  1970. });
  1971. } else {
  1972. self.needProfileModal = true;
  1973. uni.showModal({
  1974. cancelText: "返回",
  1975. content:
  1976. "资料盖章审核不通过,请前往重新填写",
  1977. success: function (resultst) {
  1978. if (resultst.confirm) {
  1979. self.$navTo.togo(
  1980. "/pages2/verify/input2",
  1981. {
  1982. id: self.goodsId,
  1983. orderGoodsId:
  1984. self.orderGoodsId,
  1985. }
  1986. );
  1987. }
  1988. if (resultst.cancel) {
  1989. uni.navigateBack();
  1990. }
  1991. },
  1992. });
  1993. }
  1994. } else {
  1995. resolve();
  1996. }
  1997. }
  1998. });
  1999. } else {
  2000. resolve();
  2001. }
  2002. }
  2003. });
  2004. } else {
  2005. resolve();
  2006. }
  2007. }
  2008. });
  2009. } else {
  2010. resolve();
  2011. }
  2012. } else {
  2013. resolve();
  2014. }
  2015. });
  2016. if (this.gradeId > 0) {
  2017. //提交完资料返回判断是否已开班
  2018. this.getGradeInfo();
  2019. }
  2020. });
  2021. },
  2022. // /**
  2023. // * 获取业务层次详情
  2024. // */
  2025. // courseBusiness() {
  2026. // this.$api.courseBusiness(this.goodsData.businessId).then((res) => {
  2027. // this.businessData = res.data.data;
  2028. // });
  2029. // },
  2030. /**
  2031. * 计算tabs宽度
  2032. */
  2033. itemWidth() {
  2034. return 100 / this.list.length + "%";
  2035. },
  2036. /**
  2037. * 获取讲义权限
  2038. */
  2039. courseHandouts() {
  2040. this.$api.courseHandouts(this.goodsData.handoutsId).then((res) => {
  2041. this.courseHandoutsData = res.data.data;
  2042. });
  2043. },
  2044. findMenuNextSection(index) {
  2045. for (let i = index + 1; i < this.reMenuList.length; i++) {
  2046. let item = this.reMenuList[i];
  2047. if (item.type == 3) {
  2048. return item;
  2049. }
  2050. }
  2051. return {};
  2052. },
  2053. loadedmetadata(event) {
  2054. console.log("------: loadedmetadata", this.hasStart, polyvPlayerContext);
  2055. if (this.hasStart) {
  2056. // 防止loadedmetadata事件第二次触发
  2057. return;
  2058. }
  2059. // #ifdef MP-WEIXIN
  2060. polyvPlayerContext = this.selectComponent("#playerVideo");
  2061. // #endif
  2062. this.hasStart = true;
  2063. uni.$off("playPause");
  2064. uni.$on("playPause", () => {
  2065. // #ifdef MP-WEIXIN
  2066. polyvPlayerContext.pause();
  2067. // #endif
  2068. // #ifdef H5
  2069. polyvPlayerContext.j2s_pauseVideo(); // 暂停播放视频
  2070. // #endif
  2071. });
  2072. if (!this.recordObj.videoCurrentTime) {
  2073. //新视频直接提交一条观看记录
  2074. this.postStudyRecord(0);
  2075. }
  2076. this.studyTimer && clearInterval(this.studyTimer);
  2077. this.studyTimer = setInterval(() => {
  2078. this.postStudyRecord(0);
  2079. }, 15000);
  2080. },
  2081. getPhotoLastRecord() {
  2082. let self = this;
  2083. let data = {
  2084. sectionId: parseInt(self.playSectionId),
  2085. goodsId: parseInt(self.goodsId),
  2086. courseId: parseInt(self.courseId),
  2087. gradeId: parseInt(self.gradeId),
  2088. chapterId: parseInt(self.chapterId),
  2089. moduleId: parseInt(self.moduleId),
  2090. orderGoodsId: this.orderGoodsId,
  2091. };
  2092. // /course/photo/log/getLastInfo'
  2093. this.$api.getPhotoLastRecord(data).then((res) => {
  2094. if (res.data.code == 200) {
  2095. //清空历史数据
  2096. self.photoHistoryList = [];
  2097. this.photoIndex = 0;
  2098. self.photoList = [];
  2099. for (let i = 0; i < res.data.data.length; i++) {
  2100. //-2存储随机拍照数组
  2101. if (res.data.data[i].photoIndex == -2) {
  2102. self.photoList = res.data.data[i].timeInterval.split(",");
  2103. } else {
  2104. self.photoHistoryList.push(res.data.data[i].photoIndex);
  2105. }
  2106. }
  2107. // console.log('7777', this.photoHistoryList, this.photoList);
  2108. }
  2109. });
  2110. },
  2111. //postTime 只提交随机时间
  2112. postCoursePhotoRecord(postTime = false) {
  2113. return new Promise((resolve, reject) => {
  2114. let currentTime = 0;
  2115. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2116. if (polyvPlayerContext) {
  2117. // #ifdef MP-WEIXIN
  2118. currentTime = polyvPlayerContext.getCurrentTime();
  2119. // #endif
  2120. // #ifdef H5
  2121. currentTime = polyvPlayerContext.j2s_getCurrentTime();
  2122. // #endif
  2123. }
  2124. let self = this;
  2125. let photoIndex = self.photoIndex;
  2126. let data = {
  2127. photo: self.ossAvatarUrl,
  2128. sectionId: parseInt(self.playSectionId),
  2129. goodsId: parseInt(self.goodsId),
  2130. courseId: parseInt(self.courseId),
  2131. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  2132. gradeId: parseInt(self.gradeId),
  2133. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  2134. photoNum: parseInt(self.photoNum),
  2135. chapterId: parseInt(self.chapterId),
  2136. moduleId: parseInt(self.moduleId),
  2137. timeInterval: postTime ? self.photoList.join(",") : "",
  2138. orderGoodsId: this.orderGoodsId,
  2139. };
  2140. // console.log("提交接口", data);
  2141. this.$api
  2142. .coursePhotoRecord(data)
  2143. .then((res) => {
  2144. if (res.data.code == 200) {
  2145. resolve();
  2146. } else {
  2147. reject();
  2148. }
  2149. })
  2150. .catch((err) => {
  2151. reject();
  2152. });
  2153. });
  2154. },
  2155. randomNum(minNum, maxNum) {
  2156. switch (arguments.length) {
  2157. case 1:
  2158. return parseInt(Math.random() * minNum + 1, 10);
  2159. break;
  2160. case 2:
  2161. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  2162. break;
  2163. default:
  2164. return 0;
  2165. break;
  2166. }
  2167. },
  2168. //配置随机拍照时间
  2169. configPhoto() {
  2170. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2171. let totalVideoTime = 0;
  2172. let duration = 0;
  2173. // #ifdef MP-WEIXIN
  2174. totalVideoTime = polyvPlayerContext.getDuration();
  2175. duration = polyvPlayerContext.getCurrentTime();
  2176. // #endif
  2177. // #ifdef H5
  2178. totalVideoTime = polyvPlayerContext.j2s_getDuration();
  2179. duration = polyvPlayerContext.j2s_getCurrentTime();
  2180. // #endif
  2181. let photoNum = this.photoNum;
  2182. if (!this.photoConfig) {
  2183. this.photoConfig = true;
  2184. // let spaceTime = Math.floor(totalVideoTime/photoNum) //拍照时间区间
  2185. // if(spaceTime<5){//区间小于5秒
  2186. // photoNum = Math.floor(totalVideoTime/5)
  2187. // spaceTime = 5
  2188. // }
  2189. // if(photoNum<1){
  2190. // photoNum = 1 //只要设置,至少拍一次
  2191. // spaceTime = totalVideoTime
  2192. // }
  2193. // let initSpace = 0
  2194. //没有历史拍照间隔数据
  2195. if (this.photoList.length == 0) {
  2196. if (totalVideoTime >= 900) {
  2197. //大于15分钟
  2198. if (photoNum == 1) {
  2199. //开头拍1张
  2200. this.photoList.push(0);
  2201. } else if (photoNum == 3) {
  2202. //拍3张
  2203. this.photoList.push(0); //开头拍一张
  2204. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  2205. let centerMinTime = centerTime - 300; //前后5分钟
  2206. let centerMaxTime = centerTime + 300;
  2207. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  2208. this.photoList.push(centerTakeTime); //中间拍一张
  2209. let endMaxTime = totalVideoTime - 60;
  2210. let endMinTime = totalVideoTime - 300;
  2211. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  2212. this.photoList.push(endTakeTime); //最后拍一张
  2213. }
  2214. } else {
  2215. //小于15分钟,只拍前后各一张
  2216. if (photoNum == 1) {
  2217. //开头拍1张
  2218. this.photoList.push(0);
  2219. } else if (photoNum == 3) {
  2220. this.photoList.push(1);
  2221. let centerTime = this.randomNum(
  2222. (1 / 3) * totalVideoTime,
  2223. (2 / 3) * totalVideoTime
  2224. );
  2225. this.photoList.push(centerTime);
  2226. let endTakeTime = this.randomNum(
  2227. (2 / 3) * totalVideoTime,
  2228. totalVideoTime
  2229. );
  2230. this.photoList.push(endTakeTime);
  2231. }
  2232. }
  2233. // for(let i=0;i<photoNum;i++){
  2234. // let s = this.randomNum(initSpace,initSpace+spaceTime)
  2235. // if(s>totalVideoTime){
  2236. // s = totalVideoTime-1
  2237. // }
  2238. // if(s<=5){
  2239. // s =5 //避免出现5秒内拍照时间
  2240. // }
  2241. // this.photoList.push(s)
  2242. // initSpace+=spaceTime
  2243. // }
  2244. // console.log(this.photoList, "随机拍照时间数组11", photoNum);
  2245. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  2246. }
  2247. //兼容已有观看历史
  2248. for (let i = 0; i < this.photoList.length - 1; i++) {
  2249. if (
  2250. this.photoList[i] < duration &&
  2251. this.photoList[i + 1] > duration
  2252. ) {
  2253. this.photoIndex = i + 1;
  2254. break;
  2255. }
  2256. if (duration > this.photoList[this.photoList.length - 1]) {
  2257. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  2258. break;
  2259. }
  2260. }
  2261. // console.log(this.photoList, "随机拍照时间数组11", photoNum);
  2262. }
  2263. },
  2264. getLiveUid(channelId) {
  2265. let self = this;
  2266. return new Promise((resolve) => {
  2267. let data = {
  2268. channelId: channelId,
  2269. orderGoodsId: this.orderGoodsId,
  2270. };
  2271. self.$api.polyvSign(data).then((res) => {
  2272. resolve(res.data.data);
  2273. });
  2274. });
  2275. },
  2276. timeEventLiving() {
  2277. if (plv != null) {
  2278. if (this.livePlay) {
  2279. this.liveDuration = this.liveDuration + 1; //每隔1秒
  2280. if (this.liveDuration == 2) {
  2281. //直播第2秒拍照
  2282. if (
  2283. this.goodsPhotographConfig &&
  2284. this.goodsPhotographConfig.livephotograph == 1 &&
  2285. this.channelItem.learning != 1 &&
  2286. this.photoHistoryList.length == 0
  2287. ) {
  2288. //开启直播拍照
  2289. this.openPhoto();
  2290. } else {
  2291. this.postStudyRecord(0);
  2292. }
  2293. }
  2294. }
  2295. }
  2296. },
  2297. playerLiveStatusChange(e) {
  2298. const status = e.detail.status;
  2299. if (status === "live") {
  2300. //开始播放
  2301. if (this.timer) {
  2302. clearInterval(this.timer);
  2303. }
  2304. this.livePlay = true;
  2305. this.timer = setInterval(this.timeEventLiving, 1000); //定时器
  2306. }
  2307. if (status === "end") {
  2308. this.hasStart = false;
  2309. if (this.livePlay) {
  2310. //只有播放过的结束才提交,避免未开播触发结束
  2311. this.postStudyRecord(1);
  2312. }
  2313. this.livePlay = false;
  2314. // 未开始
  2315. }
  2316. },
  2317. closePlv() {
  2318. if (plv) {
  2319. plv.destroy();
  2320. }
  2321. },
  2322. playChannel(item) {
  2323. if (this.timer) {
  2324. clearInterval(this.timer);
  2325. }
  2326. this.startStatus = true;
  2327. this.initLive();
  2328. },
  2329. setLiveOption(status) {
  2330. const { userId, channelId, recordFileSimpleModel, playbackEnabled } =
  2331. this.detail;
  2332. const playRecordFile =
  2333. playbackEnabled && recordFileSimpleModel && status === "end";
  2334. this.videoOption = {
  2335. mode: "live",
  2336. uid: this.liveObj.uid, //this.playChannelId egsxlptzdq
  2337. cid: this.playChannelId,
  2338. openId: this.userInfo.userAccount,
  2339. isAutoChange: false,
  2340. forceVideo: false,
  2341. };
  2342. },
  2343. async initLive() {
  2344. this.liveObj = await this.getLiveUid(this.playChannelId);
  2345. this.initLiveOk = true;
  2346. let optionsData = {};
  2347. optionsData.mode = "live";
  2348. optionsData.forceVideo = false;
  2349. optionsData.channelId = this.playChannelId; // 频道ID '2553128'
  2350. optionsData.openId = this.userInfo.userAccount; // 用户openId this.userInfo.userAccount 'oQ5eX5BCtSjkE1ct8CzvxGWgh0hQ'
  2351. optionsData.userId = this.liveObj.uid; // 2.0.0及以上版本的demo需要使用 userId 设置学员唯一id 'egsxlptzdq'
  2352. let self = this;
  2353. this.closePlv();
  2354. plv.init(optionsData).then(({ detail, chat }) => {
  2355. self.liveDetail = detail;
  2356. // 设置mode为live的videoOption
  2357. this.setLiveOption();
  2358. if (detail.isPPT) {
  2359. chat.on(chat.events.SLICESTART, () => {
  2360. // 开始直播
  2361. });
  2362. } else {
  2363. plv.api.getOrdinaryLiveStatus(detail.stream);
  2364. }
  2365. });
  2366. },
  2367. openSetting(res) {
  2368. console.log(res, 98);
  2369. },
  2370. getCameraSetting() {
  2371. const self = this;
  2372. // 不支持h5
  2373. wx.getSetting({
  2374. success: (res) => {
  2375. if (res.authSetting["scope.camera"]) {
  2376. // 用户已经授权
  2377. self.showSet = false;
  2378. this.prendreAutoCarme = false;
  2379. } else {
  2380. this.prendreAutoCarme = true;
  2381. // 用户还没有授权,向用户发起授权请求
  2382. wx.authorize({
  2383. scope: "scope.camera",
  2384. success: () => {
  2385. // 用户同意授权
  2386. self.showSet = false;
  2387. this.prendreAutoCarme = false;
  2388. },
  2389. fail: () => {
  2390. // 用户不同意授权
  2391. self.showSet = true;
  2392. },
  2393. });
  2394. }
  2395. },
  2396. fail: (res) => {},
  2397. });
  2398. },
  2399. studyNotice() {
  2400. this.noticeShow = true;
  2401. },
  2402. //播放笔记视频
  2403. async playNoteVideo(item) {
  2404. if (this.timer) {
  2405. clearInterval(this.timer);
  2406. }
  2407. if (this.vid) {
  2408. //切换视频
  2409. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2410. polyvPlayerContext.changeVid(item.recordingUrl);
  2411. } else {
  2412. this.vid = item.recordingUrl;
  2413. }
  2414. this.recordObj = { videoCurrentTime: item.noteSecond };
  2415. if (this.recordObj.videoCurrentTime) {
  2416. this.needSeek = true; //需要跳转到播放记录
  2417. }
  2418. this.startStatus = true;
  2419. //获取节笔记
  2420. this.getNoteList();
  2421. },
  2422. //正常播放视频
  2423. async playVideo(item) {
  2424. console.log(item.recordingUrl, "22222222", this.vid);
  2425. if (this.timer) {
  2426. clearInterval(this.timer);
  2427. }
  2428. // #ifdef H5
  2429. await this.clears();
  2430. // #endif
  2431. if (this.vid) {
  2432. //切换视频
  2433. polyvPlayerContext && polyvPlayerContext.changeVid(item.recordingUrl);
  2434. } else {
  2435. this.vid = item.recordingUrl;
  2436. }
  2437. this.recordObj = null;
  2438. this.recordObj = await this.getRecordLast();
  2439. this.needSeek = true; //跳转到播放记录
  2440. this.startStatus = true;
  2441. // #ifdef H5
  2442. await this.loadPlayerScript(this.loadPlayer);
  2443. // #endif
  2444. // 提交学习记录
  2445. // #ifdef MP-WEIXIN
  2446. this.postStudyRecord(0);
  2447. // #endif
  2448. //获取节笔记
  2449. this.getNoteList();
  2450. },
  2451. getRecordLast() {
  2452. return new Promise((resolve) => {
  2453. let data = {
  2454. gradeId:
  2455. this.gradeId || this.gradeId == 0 ? Number(this.gradeId) : null,
  2456. goodsId:
  2457. this.goodsId || this.goodsId == 0 ? Number(this.goodsId) : null,
  2458. sectionId: this.playSectionId || 0,
  2459. courseId:
  2460. this.courseId || this.courseId == 0 ? Number(this.courseId) : null,
  2461. chapterId: this.chapterId || 0,
  2462. moduleId: this.moduleId || 0,
  2463. orderGoodsId: this.orderGoodsId,
  2464. };
  2465. this.$api.recordLast(data).then((res) => {
  2466. resolve(res.data.data);
  2467. });
  2468. });
  2469. },
  2470. jumpNote(item) {
  2471. this.noteId = item.noteId;
  2472. //没视频播放
  2473. if (this.playSectionId == 0) {
  2474. this.$u.toast("即将跳到笔记位置");
  2475. this.$store.commit("setPlaySectionId", {
  2476. playSectionId: item.sectionId || item.menuId,
  2477. });
  2478. this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
  2479. this.playNoteVideo(item);
  2480. } else {
  2481. //正在看当前笔记视频
  2482. this.$u.toast("即将跳到笔记位置");
  2483. //跳到笔记时刻
  2484. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2485. // #ifdef MP-WEIXIN
  2486. polyvPlayerContext.seek(item.noteSecond);
  2487. polyvPlayerContext.play();
  2488. // #endif
  2489. // #ifdef H5
  2490. polyvPlayerContext.j2s_seekVideo(0);
  2491. polyvPlayerContext.j2s_resumeVideo();
  2492. // #endif
  2493. }
  2494. },
  2495. postNote() {
  2496. let self = this;
  2497. if (!(this.playSectionId > 0)) {
  2498. this.$u.toast("目前无播放视频");
  2499. return;
  2500. }
  2501. if (!this.noteValue) {
  2502. this.$u.toast("请输入内容");
  2503. return;
  2504. }
  2505. if (!this.gradeId) {
  2506. this.$u.toast("暂无班级数据");
  2507. return;
  2508. }
  2509. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2510. let noteDate = this.$method.getZeroTime();
  2511. let noteSecond = 0;
  2512. // #ifdef MP-WEIXIN
  2513. noteSecond = polyvPlayerContext.getCurrentTime();
  2514. // #endif
  2515. // #ifdef H5
  2516. noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  2517. // #endif
  2518. if (!noteSecond) {
  2519. if (noteSecond == 0) {
  2520. //播放结束
  2521. // #ifdef MP-WEIXIN
  2522. noteSecond = polyvPlayerContext.getDuration();
  2523. // #endif
  2524. // #ifdef H5
  2525. noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  2526. // #endif
  2527. }
  2528. if (!noteSecond) {
  2529. this.$u.toast("视频暂未开始");
  2530. return;
  2531. }
  2532. }
  2533. let data = {
  2534. gradeId: this.gradeId,
  2535. goodsId: this.goodsId,
  2536. sectionId: this.playSectionId,
  2537. courseId: this.courseId,
  2538. noteText: this.noteValue,
  2539. noteDate: noteDate,
  2540. noteSecond: noteSecond,
  2541. orderGoodsId: this.orderGoodsId,
  2542. };
  2543. this.$api.postNote(data).then((res) => {
  2544. if (res.data.code == 200) {
  2545. this.$u.toast("发布成功");
  2546. self.getNoteList();
  2547. this.noteValue = "";
  2548. }
  2549. });
  2550. },
  2551. getGradeInfo() {
  2552. let self = this;
  2553. this.$store.state.allowLoading = false;
  2554. this.$api.goodsGradeInfo(this.gradeId).then((res) => {
  2555. if (res.data.code == 200) {
  2556. self.gradeDetail = res.data.data;
  2557. if (self.needProfileModal) {
  2558. return;
  2559. }
  2560. if (self.gradeDetail.learningStatus == 2) {
  2561. uni.showModal({
  2562. showCancel: false,
  2563. confirmText: "确定",
  2564. content:
  2565. "当前课程正在申请中,正式开班后方可进行学习,请耐心等候!",
  2566. success: function (resultst) {
  2567. uni.navigateBack();
  2568. },
  2569. });
  2570. }
  2571. if (
  2572. self.gradeDetail.learningStatus == 3 &&
  2573. Number(self.gradeDetail.learningTimeStart) >
  2574. Number(new Date() / 1000)
  2575. ) {
  2576. uni.showModal({
  2577. showCancel: false,
  2578. cancelText: "返回",
  2579. content:
  2580. "当前课程正在申请中,正式开班后方可进行学习,请耐心等候!",
  2581. success: function (resultst) {
  2582. uni.navigateBack();
  2583. },
  2584. });
  2585. }
  2586. }
  2587. });
  2588. this.$store.state.allowLoading = true;
  2589. },
  2590. getNoteList() {
  2591. let self = this;
  2592. self.noteList = [];
  2593. let data = {
  2594. courseId: this.courseId,
  2595. gradeId: this.gradeId,
  2596. goodsId: this.goodsId,
  2597. orderGoodsId: this.orderGoodsId,
  2598. };
  2599. if (this.playSectionId > 0) {
  2600. data.sectionId = this.playSectionId;
  2601. }
  2602. this.$api.noteList(data).then((res) => {
  2603. if (res.data.code == 200) {
  2604. self.noteList = res.data.rows;
  2605. }
  2606. });
  2607. },
  2608. delAnswer(answerId) {
  2609. let self = this;
  2610. let data = {
  2611. answerId: answerId,
  2612. status: -1,
  2613. orderGoodsId: this.orderGoodsId,
  2614. };
  2615. this.$api.delAnswer(data).then((res) => {
  2616. if (res.data.code == 200) {
  2617. self.getAnswerList();
  2618. }
  2619. });
  2620. },
  2621. clearCtx() {
  2622. this.placeholder = "您可以在这里输入答疑内容";
  2623. this.ctxValue = "";
  2624. this.assignUserId = 0;
  2625. },
  2626. focusNote(event) {
  2627. this.bottomHeight = event.detail.height;
  2628. },
  2629. blurNote() {
  2630. this.bottomHeight = 0;
  2631. },
  2632. blur() {
  2633. this.bottomHeight = 0;
  2634. this.clearTimer = setTimeout(() => {
  2635. this.ctxValue = "";
  2636. this.isFocus = false;
  2637. this.assignUserId = 0;
  2638. this.placeholder = "您可以在这里输入答疑内容";
  2639. }, 2000);
  2640. },
  2641. replyContent(item) {
  2642. this.isFocus = true;
  2643. this.assignUserId = item.userId;
  2644. this.placeholder = "@" + item.realname;
  2645. },
  2646. delContent(item) {
  2647. this.delAnswer(item.answerId);
  2648. },
  2649. postAnswer() {
  2650. let self = this;
  2651. let data = {
  2652. courseId: this.courseId,
  2653. answerText: this.ctxValue,
  2654. goodsId: this.goodsId,
  2655. orderGoodsId: this.orderGoodsId,
  2656. };
  2657. if (this.assignUserId > 0) {
  2658. data.assignUserId = this.assignUserId;
  2659. }
  2660. this.$api.postAnswer(data).then((res) => {
  2661. if (res.data.code == 200) {
  2662. this.$u.toast("发布成功");
  2663. self.getAnswerList();
  2664. this.isFocus = false;
  2665. this.placeholder = "您可以在这里输入答疑内容";
  2666. this.ctxValue = "";
  2667. this.assignUserId = 0;
  2668. }
  2669. });
  2670. },
  2671. postContent() {
  2672. if (!this.ctxValue || this.ctxValue == "") {
  2673. this.$u.toast("请输入内容");
  2674. return;
  2675. }
  2676. this.postAnswer();
  2677. },
  2678. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  2679. console.log("学习记录接口的playSectionId", sectionId, polyvPlayerContext);
  2680. let currentTime = 0;
  2681. let PlayDuration = 0;
  2682. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2683. if (polyvPlayerContext) {
  2684. // #ifdef MP-WEIXIN
  2685. currentTime = polyvPlayerContext.getCurrentTime(); //获取视频当前的播放时刻
  2686. PlayDuration = polyvPlayerContext.getVideoPlayDuration(); //本次看的时长
  2687. // #endif
  2688. // #ifdef H5
  2689. currentTime = polyvPlayerContext.j2s_getCurrentTime(); //当前视频播放时刻
  2690. PlayDuration = polyvPlayerContext.j2s_realPlayVideoTime(); //本次看的时长
  2691. // #endif
  2692. }
  2693. console.log("---学习记录:currentTime", currentTime);
  2694. if (this.playChannelId > 0) {
  2695. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  2696. }
  2697. let self = this;
  2698. let data = {
  2699. fromPlat: 1, //来源平台 1小程序 2网站
  2700. photo: self.ossAvatarUrl,
  2701. sectionId: sectionId || 0,
  2702. goodsId: parseInt(self.goodsId),
  2703. courseId: parseInt(self.courseId),
  2704. orderGoodsId: this.orderGoodsId,
  2705. studyDuration: parseInt(
  2706. PlayDuration > 0 ? PlayDuration : self.studyDuration
  2707. ),
  2708. gradeId: parseInt(self.gradeId),
  2709. chapterId: this.chapterId || 0,
  2710. moduleId: this.moduleId || 0,
  2711. videoCurrentTime: parseInt(
  2712. currentTime > 0 ? currentTime : self.studyDuration
  2713. ),
  2714. };
  2715. if (this.ossAvatarUrl) {
  2716. data.similarity = this.compareFaceData; // 相似度
  2717. }
  2718. if (status > 0) {
  2719. data.status = status;
  2720. }
  2721. // console.log("提交接口:", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
  2722. this.$api
  2723. .studyRecord(data)
  2724. .then((res) => {
  2725. if (res.data.code == 200) {
  2726. if (status > 0) {
  2727. this.studyRecordMenuAllList();
  2728. let moduleId = this.moduleId || 0;
  2729. let chapterId = this.chapterId || 0;
  2730. let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
  2731. let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
  2732. uni.$emit("playNext" + playNextIdisRebuild, {
  2733. fromRebuild: this.isRebuild,
  2734. }); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
  2735. uni.$emit("playNext" + playNextId); //通知播放结束
  2736. }
  2737. self.ossAvatarUrl = "";
  2738. } else {
  2739. this.uploadLock = false;
  2740. uni.showToast({
  2741. icon: "none",
  2742. title: res.data.msg,
  2743. });
  2744. }
  2745. })
  2746. .catch((err) => {
  2747. this.studyRecordMenuAllList();
  2748. });
  2749. },
  2750. uploadFile(options, int) {
  2751. console.log("options:", options);
  2752. var self = this;
  2753. return new Promise((resolve, reject) => {
  2754. var data = {
  2755. imageStatus: int,
  2756. gradeId: this.gradeId,
  2757. orderGoodsId: this.orderGoodsId,
  2758. };
  2759. self.$api.aliyunpolicy(data).then((res) => {
  2760. if (res.data.code != 200) {
  2761. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  2762. return;
  2763. }
  2764. var ossToken = res.data.data.resultContent;
  2765. if (ossToken.host == null || ossToken.host == undefined) {
  2766. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  2767. return;
  2768. }
  2769. let filePath = "";
  2770. // #ifdef H5
  2771. var localData = options; //dataUrl为base64位
  2772. let base = atob(localData.substring(localData.indexOf(",") + 1)); // base是将base64编码解码,去掉data:image/png;base64部分
  2773. let length = base.length;
  2774. let url = new Uint8Array(length);
  2775. while (length--) {
  2776. url[length] = base.charCodeAt(length);
  2777. }
  2778. filePath = new File([url], "a.jpg", {
  2779. type: "image/jpg",
  2780. });
  2781. console.log("filePath:", filePath);
  2782. uni.uploadFile({
  2783. url: ossToken.host,
  2784. name: "file",
  2785. file: filePath,
  2786. fileType: "image",
  2787. header: {
  2788. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  2789. },
  2790. formData: {
  2791. key: ossToken.dir,
  2792. OSSAccessKeyId: ossToken.accessid,
  2793. policy: ossToken.policy,
  2794. Signature: ossToken.signature,
  2795. callback: ossToken.callback,
  2796. success_action_status: 200,
  2797. },
  2798. success: (result) => {
  2799. this.$u.toast("上传成功");
  2800. self.ossAvatarUrl = ossToken.dir;
  2801. console.log("h5上传成功--:", this.ossAvatarUrl);
  2802. resolve();
  2803. },
  2804. fail: (error) => {
  2805. console.log("h5上传失败:", error)
  2806. uni.showToast({
  2807. title: "上传接口报错,请重新拍照上传" + error,
  2808. icon: "none",
  2809. });
  2810. this.openPhoto();
  2811. return;
  2812. },
  2813. });
  2814. // #endif
  2815. // #ifdef MP-WEIXIN
  2816. uni.uploadFile({
  2817. url: ossToken.host,
  2818. name: "file",
  2819. filePath: options,
  2820. fileType: "image",
  2821. header: {
  2822. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  2823. },
  2824. formData: {
  2825. key: ossToken.dir,
  2826. OSSAccessKeyId: ossToken.accessid,
  2827. policy: ossToken.policy,
  2828. Signature: ossToken.signature,
  2829. callback: ossToken.callback,
  2830. success_action_status: 200,
  2831. },
  2832. success: (result) => {
  2833. // if (result.statusCode === 200) {
  2834. this.$u.toast("上传成功");
  2835. self.ossAvatarUrl = ossToken.dir;
  2836. console.log("statusCode:", this.ossAvatarUrl);
  2837. resolve();
  2838. // } else {
  2839. // uni.showToast({
  2840. // title: "上传失败",
  2841. // icon: "none",
  2842. // });
  2843. // this.openPhoto();
  2844. // return;
  2845. // }
  2846. },
  2847. fail: (error) => {
  2848. uni.showToast({
  2849. title: "上传接口报错,请重新拍照上传" + error,
  2850. icon: "none",
  2851. });
  2852. this.openPhoto();
  2853. return;
  2854. },
  2855. });
  2856. // #endif
  2857. });
  2858. });
  2859. },
  2860. imageInfos() {
  2861. console.log("avatarUrl:", this.avatarUrl);
  2862. var self = this;
  2863. return new Promise(async (resolve, reject) => {
  2864. // #ifdef MP-WEIXIN
  2865. uni.getImageInfo({
  2866. src: self.avatarUrl,
  2867. success: async (res) => {
  2868. let canvasWidth = res.width; //图片原始长宽
  2869. let canvasHeight = res.height;
  2870. if (canvasWidth > 2000 || canvasHeight > 2000) {
  2871. // h5不支持
  2872. uni.compressImage({
  2873. src: self.avatarUrl,
  2874. quality: 75,
  2875. width: "35%",
  2876. height: "35%",
  2877. success: async (rest) => {
  2878. const waitUpload = await self.uploadFile(
  2879. rest.tempFilePath,
  2880. 0
  2881. );
  2882. resolve(waitUpload);
  2883. },
  2884. });
  2885. } else if (canvasWidth > 1000 || canvasHeight > 1000) {
  2886. uni.compressImage({
  2887. src: self.avatarUrl,
  2888. quality: 75,
  2889. width: "50%",
  2890. height: "50%",
  2891. success: async (rest) => {
  2892. const waitUpload = await self.uploadFile(
  2893. rest.tempFilePath,
  2894. 0
  2895. );
  2896. resolve(waitUpload);
  2897. },
  2898. });
  2899. } else {
  2900. const waitUpload = await self.uploadFile(self.avatarUrl, 0);
  2901. resolve(waitUpload);
  2902. }
  2903. },
  2904. fail: (err) => {
  2905. this.$u.toast("图片上传失败");
  2906. },
  2907. });
  2908. // #endif
  2909. // #ifdef H5
  2910. const waitUpload = await this.uploadFile(this.faceUrl, 0);
  2911. resolve(waitUpload);
  2912. // #endif
  2913. });
  2914. },
  2915. timeEvent() {
  2916. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2917. if (polyvPlayerContext != null) {
  2918. // #ifdef MP-WEIXIN
  2919. this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
  2920. // #endif
  2921. // #ifdef H5
  2922. this.playTime = polyvPlayerContext.j2s_getCurrentTime();
  2923. // #endif
  2924. console.log(
  2925. 789,
  2926. this.photoHistoryList,
  2927. "this.photoList:",
  2928. this.photoList,
  2929. "photoNum:",
  2930. this.photoNum,
  2931. "playTime:",
  2932. this.playTime
  2933. );
  2934. //判断是否需要拍照
  2935. if (this.photoNum > 0) {
  2936. this.configPhoto();
  2937. let photoTime = 0; //获取拍照秒数
  2938. for (let i = 0; i < this.photoList.length; i++) {
  2939. photoTime = Number(this.photoList[i]); //获取拍照秒数
  2940. console.log(
  2941. "photoTime:",
  2942. photoTime,
  2943. "this.sectionItem.learning",
  2944. this.sectionItem.learning
  2945. );
  2946. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  2947. //3秒区间内才触发拍照,避免拉动滚动条
  2948. if (
  2949. this.photoHistoryList.indexOf(i) < 0 &&
  2950. this.sectionItem.learning != 1
  2951. ) {
  2952. //不存在拍照历史,没有重修过,没有学过,则拍照
  2953. //启动拍照
  2954. //暂停
  2955. // #ifdef MP-WEIXIN
  2956. polyvPlayerContext.exitFullScreen();
  2957. polyvPlayerContext.pause();
  2958. // #endif
  2959. // #ifdef H5
  2960. polyvPlayerContext.j2s_pauseVideo();
  2961. polyvPlayerContext.toggleFullscreen();
  2962. // #endif
  2963. this.photoIndex = i;
  2964. console.log("i:i", i);
  2965. if (
  2966. uni.getStorageSync(`tabkePhotoShow${this.goodsId}`) ==
  2967. this.goodsId
  2968. ) {
  2969. console.log("2222");
  2970. this.openPhoto();
  2971. } else {
  2972. console.log("1111");
  2973. this.popupPhotoShow = true;
  2974. uni.setStorageSync(
  2975. `tabkePhotoShow${this.goodsId}`,
  2976. this.goodsId
  2977. ); // 本地缓存用来判断是否已经弹出过弹窗
  2978. }
  2979. }
  2980. }
  2981. }
  2982. }
  2983. }
  2984. },
  2985. closeToast() {
  2986. clearTimeout(this.toastTimer);
  2987. this.videoToastShow = false;
  2988. },
  2989. restart() {
  2990. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  2991. // #ifdef MP-WEIXIN
  2992. polyvPlayerContext.seek(0);
  2993. // #endif
  2994. // #ifdef H5
  2995. polyvPlayerContext.j2s_seekVideo(0);
  2996. // #endif
  2997. clearTimeout(this.toastTimer);
  2998. this.videoToastShow = false;
  2999. },
  3000. // 新增用户视频学习日志
  3001. studyLog() {
  3002. this.$http({
  3003. url: "/user/study/log",
  3004. method: "post",
  3005. data: {
  3006. goodsId: this.goodsId,
  3007. courseId: this.courseId,
  3008. moduleId: this.moduleId || 0,
  3009. chapterId: this.chapterId || 0,
  3010. sectionId: this.playSectionId || 0,
  3011. fromPlat: 1, //来源平台 1小程序 2PC网站
  3012. goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
  3013. orderGoodsId: this.orderGoodsId,
  3014. },
  3015. }).then((res) => {});
  3016. },
  3017. onStateChange(newstate, oldstate) {
  3018. polyvPlayerContext = this.selectComponent("#playerVideo");
  3019. console.log(
  3020. "视频的开始播放事件",
  3021. newstate.detail.newstate,
  3022. this.needSeek
  3023. );
  3024. if (newstate.detail.newstate == "playing") {
  3025. if (this.needSeek) {
  3026. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  3027. if (this.recordObj.videoCurrentTime) {
  3028. polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
  3029. this.seekTime = this.$method.secondToDate(
  3030. this.recordObj.videoCurrentTime
  3031. );
  3032. this.videoToastShow = true;
  3033. this.toastTimer = setTimeout(() => {
  3034. this.videoToastShow = false;
  3035. }, 3000);
  3036. } else {
  3037. polyvPlayerContext.seek(1); //避免相同节继续播放
  3038. }
  3039. polyvPlayerContext.play();
  3040. this.needSeek = false;
  3041. // 新增用户视频学习日志
  3042. this.studyLog();
  3043. // 提交学习记录
  3044. }
  3045. //开始播放
  3046. if (this.timer) {
  3047. clearInterval(this.timer);
  3048. }
  3049. this.timer = setInterval(this.timeEvent, 1000); //定时器
  3050. }
  3051. if (newstate.detail.newstate == "pause") {
  3052. clearInterval(this.timer);
  3053. //暂停提交记录
  3054. /* this.ossAvatarUrl = ""
  3055. this.postStudyRecord() */
  3056. }
  3057. if (newstate.detail.newstate == "ended") {
  3058. clearInterval(this.timer);
  3059. uni.showToast({
  3060. icon: "none",
  3061. title: "播放完毕",
  3062. });
  3063. this.hasStart = false;
  3064. this.postStudyRecord(1);
  3065. this.nextSection();
  3066. // uni.$emit('playNext') //播放重修下一节
  3067. }
  3068. },
  3069. //播放下一节
  3070. nextSection() {
  3071. if (!this.menuAllList.length) {
  3072. return;
  3073. }
  3074. this.curPlayIndex = this.menuAllList.findIndex((item) => {
  3075. let i_sectionId = item.sectionId || 0;
  3076. let i_chapterId = item.chapterId || 0;
  3077. let i_moduleId = item.moduleId || 0;
  3078. return (
  3079. i_sectionId == this.playSectionId &&
  3080. i_chapterId == this.chapterId &&
  3081. i_moduleId == this.moduleId
  3082. );
  3083. });
  3084. let data = this.menuAllList[this.curPlayIndex + 1];
  3085. if (!data) {
  3086. //第二个弹窗
  3087. uni.showModal({
  3088. title: "温馨提示",
  3089. content: "当前最后一节视频已学完 请检查所有章节是否学习完成?",
  3090. showCancel: false,
  3091. success: (res) => {
  3092. if (res.confirm) {
  3093. }
  3094. },
  3095. });
  3096. } else {
  3097. uni.showModal({
  3098. title: "温馨提示",
  3099. content: "当前节视频已学完,继续学习下一节?",
  3100. success: async (res) => {
  3101. if (res.confirm) {
  3102. this.moduleId = data.moduleId;
  3103. this.chapterId = data.chapterId;
  3104. this.sectionId = data.sectionId;
  3105. if (data.sectionType == 1) {
  3106. //录播
  3107. this.$store.commit("setPlaySectionId", {
  3108. playSectionId: data.sectionId,
  3109. });
  3110. this.$store.commit("setPlayVID", {
  3111. playVID: data.recordingUrl,
  3112. });
  3113. this.hasStart = false;
  3114. this.photoConfig = false;
  3115. this.photoIndex = 0;
  3116. this.sectionItem = data;
  3117. await this.getPhotoLastRecord(); // 获取拍照历史
  3118. this.playVideo(data);
  3119. } else if (data.sectionType == 2) {
  3120. //直播
  3121. this.studyRecordGetLastLive();
  3122. } else if (data.sectionType == 3) {
  3123. //回放
  3124. this.$store.commit("setPlaySectionId", {
  3125. playSectionId: data.sectionId,
  3126. });
  3127. this.$store.commit("setPlayVID", {
  3128. playVID: data.recordingUrl,
  3129. });
  3130. this.sectionItem = data;
  3131. this.playVideo(data);
  3132. }
  3133. let playNextId = `moduleId${data.moduleId}chapterId${data.chapterId}sectionId${data.sectionId}`;
  3134. this.$store.commit("updatePlayNextId", playNextId);
  3135. this.updateChapterOpen(true);
  3136. this.reStart = false;
  3137. this.getMenuList();
  3138. }
  3139. },
  3140. });
  3141. }
  3142. },
  3143. //拍照
  3144. openPhoto() {
  3145. console.log("开始拍照");
  3146. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  3147. if (polyvPlayerContext) {
  3148. // #ifdef MP-WEIXIN
  3149. polyvPlayerContext.exitFullScreen();
  3150. // #endif
  3151. // #ifdef H5
  3152. if (this.isFullScreen()) {
  3153. this.exitFullscreen();
  3154. }
  3155. // #endif
  3156. }
  3157. // #ifdef MP-WEIXIN
  3158. this.enableAutoRotation = false;
  3159. this.photoPopup = true;
  3160. this.isTaking = true;
  3161. uni.setKeepScreenOn({
  3162. keepScreenOn: true,
  3163. });
  3164. uni.authorize({
  3165. scope: "scope.camera",
  3166. success() {},
  3167. });
  3168. // #endif
  3169. // #ifdef H5
  3170. if (
  3171. (window.navigator.mediaDevices &&
  3172. window.navigator.mediaDevices.getUserMedia) ||
  3173. window.navigator.getUserMedia ||
  3174. window.navigator.webkitGetUserMedia ||
  3175. window.navigator.mozGetUserMedia
  3176. ) {
  3177. console.log("getUserMedia----");
  3178. // 调用用户媒体设备, 访问摄像头
  3179. this.getUserMedia(
  3180. {
  3181. video: {
  3182. width: 400,
  3183. height: 300,
  3184. },
  3185. },
  3186. this.photographSuccess,
  3187. this.photographError
  3188. );
  3189. } else {
  3190. console.log("1111没有摄像");
  3191. this.photographError();
  3192. }
  3193. // #endif
  3194. },
  3195. /**
  3196. * 人脸匹配
  3197. */
  3198. faceRecognition() {
  3199. return new Promise((resolve) => {
  3200. // #ifdef MP-WEIXIN
  3201. let fileSystem = uni.getFileSystemManager();
  3202. fileSystem.readFile({
  3203. filePath: `${this.avatarUrl}`,
  3204. encoding: "base64",
  3205. position: 0,
  3206. success: (res) => {
  3207. let base64 = "data:image/jpg;base64," + res.data;
  3208. // console.log('base64Data人脸识别参数:', {
  3209. // imageA: base64,
  3210. // orderGoodsId: this.orderGoodsId,
  3211. // gradeId: this.gradeId,
  3212. // })
  3213. this.CompareFace(base64, resolve);
  3214. },
  3215. fail(err) {
  3216. // this.$u.toast('人脸识别错误!')
  3217. console.error(err, "err-----人脸识别错误");
  3218. },
  3219. });
  3220. // #endif
  3221. // #ifdef H5
  3222. this.CompareFace(this.faceUrl, resolve);
  3223. // #endif
  3224. });
  3225. },
  3226. CompareFace(url, resolve) {
  3227. let timer = setTimeout(() => {
  3228. uni.showToast({
  3229. icon: "none",
  3230. title: "拍照超时,请重新拍照",
  3231. duration: 2000,
  3232. success: () => {
  3233. setTimeout(() => {
  3234. uni.navigateBack();
  3235. }, 1000);
  3236. },
  3237. });
  3238. }, 10 * 1000);
  3239. this.$api
  3240. .faceCertificationCompareFace({
  3241. imageA: url,
  3242. orderGoodsId: this.orderGoodsId,
  3243. gradeId: this.gradeId,
  3244. })
  3245. .then((res) => {
  3246. clearTimeout(timer);
  3247. console.log(res, "人脸识别成功res");
  3248. resolve(res.data.data);
  3249. })
  3250. .catch((err) => {
  3251. clearTimeout(timer);
  3252. // 当前网络延迟,
  3253. console.log("人脸识别错误:", err);
  3254. uni.showModal({
  3255. content: "当前网络延迟",
  3256. showCancel: false,
  3257. success: (resultst) => {
  3258. if (resultst.confirm) {
  3259. uni.navigateBack();
  3260. }
  3261. },
  3262. });
  3263. });
  3264. },
  3265. // 确定拍照
  3266. async submit() {
  3267. if (this.uploadLock) {
  3268. return;
  3269. }
  3270. this.uploadLock = true;
  3271. let compareFaceData = await this.faceRecognition();
  3272. console.log(compareFaceData, "compareFaceData");
  3273. this.compareFaceData = compareFaceData;
  3274. if (compareFaceData >= 80) {
  3275. const waitYS = await this.imageInfos();
  3276. this.postCoursePhotoRecord()
  3277. .then((res) => {
  3278. this.photoHistoryList.push(this.photoIndex);
  3279. // console.log('拍照确定提交', this.photoHistoryList);
  3280. this.postStudyRecord(); //提交记录
  3281. //恢复播放
  3282. // #ifdef MP-WEIXIN
  3283. uni.setKeepScreenOn({
  3284. keepScreenOn: false,
  3285. });
  3286. // #endif
  3287. this.photoPopup = false;
  3288. this.uploadLock = false;
  3289. this.enableAutoRotation = true;
  3290. // var polyvPlayerContext = this.selectComponent("#playerVideo");
  3291. if (polyvPlayerContext != null) {
  3292. // #ifdef MP-WEIXIN
  3293. polyvPlayerContext.play();
  3294. // #endif
  3295. // #ifdef H5
  3296. polyvPlayerContext.j2s_resumeVideo();
  3297. // #endif
  3298. }
  3299. })
  3300. .catch((err) => {
  3301. console.log('拍照记录接口的err', err);
  3302. uni.showToast({
  3303. title: "上传接口报错,请重新拍照上传" + err,
  3304. icon: "none",
  3305. });
  3306. this.uploadLock = false;
  3307. this.openPhoto();
  3308. });
  3309. } else {
  3310. uni.showToast({
  3311. title: "人脸匹配不通过,请重新拍照上传",
  3312. icon: "none",
  3313. duration: 2000,
  3314. });
  3315. setTimeout(() => {
  3316. this.uploadLock = false;
  3317. this.openPhoto();
  3318. }, 2000);
  3319. }
  3320. },
  3321. reTake() {
  3322. this.isTaking = true;
  3323. // #ifdef H5
  3324. this.faceUrl = "";
  3325. this.getUserMedia({
  3326. video: {
  3327. width: 400,
  3328. height: 300,
  3329. },
  3330. });
  3331. // #endif
  3332. },
  3333. toTakePhoto() {
  3334. this.popupPhotoShow = false;
  3335. this.openPhoto();
  3336. },
  3337. takePhTips() {
  3338. this.popupPhotoShow = true;
  3339. this.isTaking = false;
  3340. this.photoPopup = false;
  3341. this.enableAutoRotation = false;
  3342. },
  3343. //确认拍照
  3344. takePhoto() {
  3345. // #ifdef MP-WEIXIN
  3346. const ctx = uni.createCameraContext();
  3347. ctx.takePhoto({
  3348. quality: "high",
  3349. success: (res) => {
  3350. this.avatarUrl = res.tempImagePath;
  3351. console.log("开始拍照this.avatarUrl:", this.avatarUrl);
  3352. this.isTaking = false;
  3353. },
  3354. fail: (err) => {},
  3355. });
  3356. // #endif
  3357. // #ifdef H5
  3358. const canvas = document.createElement("canvas");
  3359. canvas.width = 400;
  3360. canvas.height = 400;
  3361. const context = canvas.getContext("2d");
  3362. const video = document.querySelector("video");
  3363. context.drawImage(video, 0, 0, 400, 400);
  3364. this.faceUrl = canvas.toDataURL("image/png");
  3365. this.isTaking = false;
  3366. // #endif
  3367. },
  3368. playError(e) {
  3369. console.log(e);
  3370. },
  3371. //拍照报错
  3372. error(e) {
  3373. console.log(e.detail);
  3374. },
  3375. //关闭相机
  3376. closePhoto() {
  3377. this.photoPopup = false;
  3378. self.enableAutoRotation = true;
  3379. },
  3380. /**
  3381. * 进入全屏
  3382. */
  3383. fullscreenchange(event) {
  3384. if (event.detail.direction == "vertical") {
  3385. this.navShow = true;
  3386. } else if (event.detail.direction == "horizontal") {
  3387. this.navShow = false;
  3388. }
  3389. },
  3390. getGoodsDetail() {
  3391. let self = this;
  3392. // '/goods/'+ data,
  3393. this.$api.goodsDetail(this.goodsId).then((res) => {
  3394. this.goodsData = res.data.data;
  3395. if (self.goodsData.buyNote) {
  3396. this.baseHandoutTipList();
  3397. }
  3398. self.gradeId = self.goodsData.gradeId;
  3399. this.courseBusiness(this.goodsData.businessId);
  3400. this.courseHandouts();
  3401. self.getMenuList();
  3402. self.getReMenuList(); //获取重修目录
  3403. setTimeout(function () {
  3404. if (!self.needProfileModal) {
  3405. self.getGradeInfo();
  3406. }
  3407. }, 500);
  3408. //获取节笔记
  3409. this.getNoteList();
  3410. if (self.goodsData.goodsPlayConfig) {
  3411. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  3412. if (self.goodsPlayConfig.autoPlay > 0) {
  3413. // #ifdef H5
  3414. self.autoplay = true;
  3415. console.log("是否自动播放:", self.autoplay);
  3416. // #endif
  3417. }
  3418. if (self.goodsPlayConfig.drag > 0) {
  3419. // #ifdef MP-WEIXIN
  3420. self.isAllowSeek = "yes";
  3421. // #endif
  3422. // #ifdef H5
  3423. this.H5isAllowSeek = "off";
  3424. // #endif
  3425. }
  3426. if (self.goodsPlayConfig.speed > 0) {
  3427. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  3428. }
  3429. }
  3430. if (self.goodsData.goodsPhotographConfig) {
  3431. self.goodsPhotographConfig = JSON.parse(
  3432. self.goodsData.goodsPhotographConfig
  3433. );
  3434. if (self.goodsPhotographConfig.photoNum > 0) {
  3435. self.photoNum = self.goodsPhotographConfig.photoNum;
  3436. console.log(self.photoNum, 777777);
  3437. }
  3438. }
  3439. });
  3440. },
  3441. startVideo() {
  3442. this.startStatus = true;
  3443. },
  3444. getAnswerList() {
  3445. let self = this;
  3446. this.$api
  3447. .answerList({
  3448. courseId: this.courseId,
  3449. goodsId: this.goodsId,
  3450. orderGoodsId: this.orderGoodsId,
  3451. })
  3452. .then((res) => {
  3453. if (res.data.code == 200) {
  3454. self.answerList = res.data.rows;
  3455. }
  3456. });
  3457. },
  3458. getReMenuList() {
  3459. // console.log('重修的目录');
  3460. let self = this;
  3461. this.$api
  3462. .reMenuList({
  3463. orderGoodsId: this.orderGoodsId,
  3464. courseId: this.courseId,
  3465. rebuild: 1,
  3466. gradeId: this.gradeId,
  3467. })
  3468. .then((res) => {
  3469. if (res.data.code == 200) {
  3470. for (let i = 0; i < res.data.rows.length; i++) {
  3471. let item = res.data.rows[i];
  3472. item.down = true;
  3473. item.id = item.menuId;
  3474. item.name = item.menuName;
  3475. }
  3476. self.reMenuList = res.data.rows;
  3477. if (self.reMenuList.length > 0) {
  3478. this.showNotes = false;
  3479. self.list = [
  3480. {
  3481. name: "目录",
  3482. },
  3483. {
  3484. name: "讲义",
  3485. },
  3486. {
  3487. name: "笔记",
  3488. },
  3489. {
  3490. name: "答疑",
  3491. },
  3492. { name: "重修目录" },
  3493. ];
  3494. this.current = 0;
  3495. if (Object.keys(this.sectionItem).length) {
  3496. let playNextIdisRebuild = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}isRebuild`;
  3497. this.$store.commit("updatePlayNextId", playNextIdisRebuild);
  3498. }
  3499. } else {
  3500. if (Object.keys(this.sectionItem).length) {
  3501. let playNextId = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}`;
  3502. this.$store.commit("updatePlayNextId", playNextId);
  3503. }
  3504. self.list = [
  3505. {
  3506. name: "目录",
  3507. },
  3508. {
  3509. name: "讲义",
  3510. },
  3511. {
  3512. name: "笔记",
  3513. },
  3514. {
  3515. name: "答疑",
  3516. },
  3517. ];
  3518. this.current = 0;
  3519. }
  3520. }
  3521. });
  3522. },
  3523. getMenuList() {
  3524. // console.log('menuList的目录');
  3525. let self = this;
  3526. // /course/menuList 查询课程目录结构列表
  3527. this.$api
  3528. .reMenuList({
  3529. courseId: this.courseId,
  3530. gradeId: this.gradeId,
  3531. orderGoodsId: this.orderGoodsId,
  3532. })
  3533. .then((res) => {
  3534. if (res.data.code == 200) {
  3535. for (let i = 0; i < res.data.rows.length; i++) {
  3536. let item = res.data.rows[i];
  3537. item.down = true;
  3538. item.id = item.menuId;
  3539. item.name = item.menuName;
  3540. item.menuType = item.type;
  3541. }
  3542. self.menuList = res.data.rows;
  3543. this.reStart = true;
  3544. for (let i = 0; i < res.data.rows.length; i++) {
  3545. if (res.data.rows[i].type == 1) {
  3546. // 模块
  3547. if (Object.keys(this.sectionItem).length) {
  3548. if (res.data.rows[i].menuId == this.sectionItem.moduleId) {
  3549. this.menuIndex = [i];
  3550. break;
  3551. }
  3552. } else {
  3553. this.menuIndex = [i];
  3554. break;
  3555. }
  3556. } else if (res.data.rows[i].type == 2) {
  3557. // 章
  3558. if (Object.keys(this.sectionItem).length) {
  3559. if (
  3560. res.data.rows[i].menuId == this.sectionItem.chapterId &&
  3561. (!this.sectionItem.moduleId ||
  3562. this.sectionItem.moduleId == 0)
  3563. ) {
  3564. this.menuIndex = [i];
  3565. break;
  3566. }
  3567. } else {
  3568. this.menuIndex = [i];
  3569. break;
  3570. }
  3571. }
  3572. }
  3573. // console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
  3574. }
  3575. });
  3576. },
  3577. courseDetail() {
  3578. let self = this;
  3579. // '/course/'+data,
  3580. this.$api.courseDetail(this.courseId).then((res) => {
  3581. if (res.data.code == 200) {
  3582. // if (res.data.data.educationName == "继续教育") {
  3583. this.$api
  3584. .lockLockAction({
  3585. action: "jxjy",
  3586. uuid: this.$method.getUuid(),
  3587. })
  3588. .then((res) => {});
  3589. this.lockTimer = setInterval(() => {
  3590. this.$api
  3591. .lockLockAction({
  3592. action: "jxjy",
  3593. uuid: this.$method.getUuid(),
  3594. })
  3595. .then((res) => {});
  3596. }, 10000);
  3597. // websocket.sendMsg("doCourse");
  3598. // }
  3599. self.detail = res.data.data;
  3600. }
  3601. });
  3602. },
  3603. open(item) {
  3604. item.showChildren = !item.showChildren;
  3605. },
  3606. change(index) {
  3607. this.current = index;
  3608. },
  3609. openDocument() {
  3610. this.downLoading = true;
  3611. let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
  3612. // 不确定h5
  3613. uni.downloadFile({
  3614. url: url,
  3615. success: (res) => {
  3616. var filePath = res.tempFilePath;
  3617. // h5不支持
  3618. uni.openDocument({
  3619. filePath: filePath,
  3620. showMenu: this.courseHandoutsData.canDownload == 1 ? true : false,
  3621. success: (res) => {
  3622. this.downLoading = false;
  3623. uni.setStorageSync("current", this.current);
  3624. },
  3625. fail: (err) => {
  3626. this.downLoading = false;
  3627. uni.showToast({
  3628. icon: "none",
  3629. title: "文档地址错误",
  3630. });
  3631. },
  3632. });
  3633. },
  3634. fail: (err) => {
  3635. this.downLoading = false;
  3636. uni.showModal({
  3637. title: "提示",
  3638. content: "文档错误," + err.errMsg,
  3639. showCancel: false,
  3640. });
  3641. },
  3642. });
  3643. },
  3644. clickMulu() {
  3645. this.muluStyle = !this.muluStyle;
  3646. },
  3647. loadPlayerScript(callback) {
  3648. if (!window.polyvPlayer) {
  3649. const myScript = document.createElement("script");
  3650. myScript.setAttribute("src", this.vodPlayerJs);
  3651. myScript.onload = callback;
  3652. document.body.appendChild(myScript);
  3653. } else {
  3654. callback();
  3655. }
  3656. },
  3657. // 播放视频
  3658. loadPlayer() {
  3659. const polyvPlayer = window.polyvPlayer;
  3660. console.log(
  3661. "h5开始",
  3662. polyvPlayer,
  3663. this.recordObj.videoCurrentTime,
  3664. 666,
  3665. this.vid
  3666. );
  3667. this.$api.polyvVideoSign(this.vid).then(async (res) => {
  3668. console.log("播放凭证res", res);
  3669. this.player = await polyvPlayer({
  3670. wrap: "#player",
  3671. width: "100%",
  3672. showLine: "off",
  3673. height: 218,
  3674. ban_history_time: "on",
  3675. vid: this.vid,
  3676. forceH5: true,
  3677. autoplay: this.autoplay, // 自动播放
  3678. ban_seek: this.H5isAllowSeek, // 是否禁止拖拽进度条
  3679. speed: this.playbackRate, // 倍数
  3680. teaser_show: 1,
  3681. tail_show: 1,
  3682. hideSwitchPlayer: true,
  3683. watchStartTime: this.recordObj.videoCurrentTime, // 播放开始时间,表示视频从第几秒开始播放,参数值需小于视频时长
  3684. ts: res.data.data.ts, // 移动播放加密视频需传入的时间戳。
  3685. sign: res.data.data.sign, // 移动端播放加密视频所需的签名
  3686. // playsafe: (vid, next) => { // PC端播放加密视频所需的授权凭证
  3687. // console.log('111111111111', vid);
  3688. // // this.$api.obtainpolyvvideopcsign(vid).then((res) => {
  3689. // // console.log('请求完后', res);
  3690. // // next(res.data.data);
  3691. // // });
  3692. // },
  3693. });
  3694. polyvPlayerContext = this.player;
  3695. console.log("this.player:", this.player);
  3696. this.player.on("s2j_onPlayStart", (vid) => {
  3697. // 视频初次播放时触发
  3698. console.log("视频初次播放时触发:");
  3699. this.loadedmetadata();
  3700. this.postStudyRecord(0);
  3701. });
  3702. this.player.on("s2j_onVideoPause", () => {
  3703. // 视频暂停时触发
  3704. console.log("视频暂停时触发", this.vid);
  3705. clearInterval(this.studyTimer);
  3706. clearInterval(this.timer);
  3707. });
  3708. this.player.on("s2j_onVideoPlay", () => {
  3709. // 视频初次播放或由暂停恢复播放时触发
  3710. console.log("视频初次播放或由暂停恢复播放时触发");
  3711. if (this.needSeek) {
  3712. if (this.recordObj.videoCurrentTime) {
  3713. this.seekTime = this.$method.secondToDate(
  3714. this.recordObj.videoCurrentTime
  3715. );
  3716. this.videoToastShow = true;
  3717. this.toastTimer = setTimeout(() => {
  3718. this.videoToastShow = false;
  3719. }, 3000);
  3720. }
  3721. this.needSeek = false;
  3722. // 新增用户视频学习日志
  3723. this.studyLog();
  3724. }
  3725. //开始播放
  3726. this.timer && clearInterval(this.timer);
  3727. this.timer = setInterval(this.timeEvent, 1000); //定时器
  3728. this.studyTimer && clearInterval(this.studyTimer);
  3729. this.studyTimer = setInterval(() => {
  3730. this.postStudyRecord(0, this.playSectionId);
  3731. }, 15000);
  3732. });
  3733. this.player.on("s2j_onPlayOver", () => {
  3734. // 当前视频播放完毕时触发
  3735. console.log("结束了结束了");
  3736. this.hasStart = false;
  3737. clearInterval(this.studyTimer);
  3738. clearInterval(this.timer);
  3739. uni.showToast({
  3740. icon: "none",
  3741. title: "播放完毕",
  3742. });
  3743. this.postStudyRecord(1);
  3744. this.nextSection(); // 播放下一节
  3745. });
  3746. });
  3747. },
  3748. clears() {
  3749. return new Promise((resolve, reject) => {
  3750. this.vid = "";
  3751. this.player && this.player.destroy();
  3752. resolve();
  3753. });
  3754. },
  3755. /**
  3756. * 退出全屏
  3757. */
  3758. exitFullscreen() {
  3759. try {
  3760. var de = document;
  3761. // console.log(de);
  3762. if (de.exitFullscreen) {
  3763. de.exitFullscreen();
  3764. } else if (de.mozCancelFullScreen) {
  3765. de.mozCancelFullScreen();
  3766. } else if (de.webkitCancelFullScreen) {
  3767. de.webkitCancelFullScreen();
  3768. }
  3769. } catch (err) {}
  3770. },
  3771. fullele() {
  3772. return (
  3773. document.fullscreenElement ||
  3774. document.webkitFullscreenElement ||
  3775. document.msFullscreenElement ||
  3776. document.mozFullScreenElement ||
  3777. null
  3778. );
  3779. },
  3780. //判断是否全屏
  3781. isFullScreen() {
  3782. return !!(document.webkitIsFullScreen || this.fullele());
  3783. },
  3784. getUserMedia(constraints, success, error) {
  3785. console.log("getUserMedia===", constraints, "success:", success);
  3786. if (window.navigator.mediaDevices.getUserMedia) {
  3787. // 最新的标准API
  3788. window.navigator.mediaDevices
  3789. .getUserMedia(constraints)
  3790. .then(success)
  3791. .catch(error);
  3792. } else if (window.navigator.webkitGetUserMedia) {
  3793. // webkit核心浏览器
  3794. window.navigator.webkitGetUserMedia(constraints, success, error);
  3795. } else if (window.navigator.mozGetUserMedia) {
  3796. // firfox浏览器
  3797. window.navigator.mozGetUserMedia(constraints, success, error);
  3798. } else if (window.navigator.getUserMedia) {
  3799. // 旧版API
  3800. window.navigator.getUserMedia(constraints, success, error);
  3801. }
  3802. },
  3803. photographSuccess(stream) {
  3804. console.log("有摄像头---", stream);
  3805. this.photoPopup = true;
  3806. this.isTaking = true;
  3807. this.enableAutoRotation = false;
  3808. this.$nextTick(() => {
  3809. const video = document.querySelector("video");
  3810. console.log('video:', video);
  3811. video.srcObject = stream;
  3812. video.play();
  3813. })
  3814. },
  3815. photographError(err) {
  3816. console.log("没有摄像头:", err);
  3817. uni.showModal({
  3818. title: "提示",
  3819. content:
  3820. "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
  3821. cancelText: "取消",
  3822. confirmText: "确定",
  3823. success: (res) => {
  3824. if (res.confirm) {
  3825. uni.navigateBack();
  3826. } else if (res.cancel) {
  3827. }
  3828. },
  3829. });
  3830. },
  3831. },
  3832. };
  3833. </script>
  3834. <style lang="scss" scope>
  3835. @import "./css/detail.scss";
  3836. .top {
  3837. &__header {
  3838. position: relative;
  3839. width: 100%;
  3840. height: 150rpx;
  3841. padding: 24rpx 150rpx 24rpx 24rpx;
  3842. .img {
  3843. position: absolute;
  3844. left: 0;
  3845. top: 0;
  3846. width: 100%;
  3847. }
  3848. .note {
  3849. position: relative;
  3850. z-index: 10;
  3851. font-size: 24rpx;
  3852. font-family: PingFang SC;
  3853. font-weight: bold;
  3854. color: #efdbff;
  3855. }
  3856. .title {
  3857. position: relative;
  3858. z-index: 10;
  3859. font-size: 26rpx;
  3860. font-family: PingFang SC;
  3861. font-weight: bold;
  3862. color: #ffffff;
  3863. }
  3864. }
  3865. }
  3866. #top {
  3867. position: relative;
  3868. z-index: 99;
  3869. }
  3870. .polyv_detail {
  3871. display: flex;
  3872. flex-direction: column;
  3873. height: 100vh;
  3874. position: relative;
  3875. top: 0;
  3876. left: 0;
  3877. .pops {
  3878. position: absolute;
  3879. top: 0;
  3880. left: 0;
  3881. background: #ccc;
  3882. opacity: 0.5;
  3883. width: 100%;
  3884. height: 300rpx;
  3885. z-index: 9999;
  3886. }
  3887. .box {
  3888. flex: 1;
  3889. overflow: hidden;
  3890. margin: 16rpx 16rpx 100rpx 16rpx;
  3891. .box_in {
  3892. height: 100%;
  3893. }
  3894. }
  3895. .first_ml {
  3896. margin: 16rpx 16rpx 16rpx 16rpx;
  3897. }
  3898. }
  3899. .btnSet {
  3900. width: 440rpx;
  3901. height: 80rpx;
  3902. background: #007aff;
  3903. border-radius: 40rpx;
  3904. color: #ffffff;
  3905. font-size: 28rpx;
  3906. line-height: 80rpx;
  3907. }
  3908. .btnReply {
  3909. width: 80rpx;
  3910. height: 40rpx;
  3911. background: #e3f0ff;
  3912. border-radius: 16rpx;
  3913. text-align: center;
  3914. color: #007aff;
  3915. }
  3916. .btnDel {
  3917. width: 80rpx;
  3918. height: 40rpx;
  3919. background: #ffedf0;
  3920. border-radius: 16rpx;
  3921. text-align: center;
  3922. color: #ff2d55;
  3923. }
  3924. .btnReply {
  3925. width: 80rpx;
  3926. height: 40rpx;
  3927. background: #e3f0ff;
  3928. border-radius: 16rpx;
  3929. font-size: 24rpx;
  3930. }
  3931. .lecture-box {
  3932. display: flex;
  3933. align-items: center;
  3934. height: 80rpx;
  3935. background: #ffffff;
  3936. border-radius: 16rpx 16rpx 16rpx 16rpx;
  3937. .title {
  3938. padding: 10rpx;
  3939. flex: 1;
  3940. overflow: hidden;
  3941. text-overflow: ellipsis;
  3942. white-space: nowrap;
  3943. color: #333;
  3944. font-weight: bold;
  3945. font-size: 32rpx;
  3946. }
  3947. .btn {
  3948. display: flex;
  3949. align-items: center;
  3950. justify-content: center;
  3951. width: 80rpx;
  3952. height: 80rpx;
  3953. background: #ffffff;
  3954. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
  3955. border-radius: 16rpx 16rpx 16rpx 16rpx;
  3956. }
  3957. @keyframes rotation {
  3958. from {
  3959. -webkit-transform: rotate(0deg);
  3960. }
  3961. to {
  3962. -webkit-transform: rotate(360deg);
  3963. }
  3964. }
  3965. .loading_down {
  3966. transform: rotate(360deg);
  3967. animation: rotation 3s linear infinite;
  3968. }
  3969. }
  3970. .lecture-content {
  3971. background: #fff;
  3972. margin-top: 10rpx;
  3973. padding: 10rpx;
  3974. border-radius: 16rpx;
  3975. }
  3976. .photoBox {
  3977. width: 100%;
  3978. // background-color: #ffffff;
  3979. // border-radius: 24px 24px 0px 0px;
  3980. .photoTop {
  3981. width: 100%;
  3982. height: 74rpx;
  3983. border-radius: 20px 20px 0px 0px;
  3984. background-color: #ffffff;
  3985. display: flex;
  3986. align-items: center;
  3987. justify-content: center;
  3988. padding: 0rpx 38rpx;
  3989. .sqzz {
  3990. width: 28rpx;
  3991. height: 28rpx;
  3992. display: flex;
  3993. align-items: center;
  3994. justify-content: center;
  3995. }
  3996. .centersq {
  3997. color: #333;
  3998. font-size: 30rpx;
  3999. font-weight: 500;
  4000. }
  4001. }
  4002. .photoCenter {
  4003. width: 750rpx;
  4004. height: 75vh;
  4005. position: relative;
  4006. .center_camera {
  4007. width: 100%;
  4008. height: 75vh;
  4009. position: fixed;
  4010. .head_take {
  4011. width: 100%;
  4012. height: 75vh;
  4013. display: flex;
  4014. flex-direction: column;
  4015. }
  4016. .headTake_up {
  4017. width: 100%;
  4018. height: 100rpx;
  4019. }
  4020. .headTake_minddle {
  4021. display: flex;
  4022. .min_img {
  4023. width: 500rpx;
  4024. height: 550rpx;
  4025. }
  4026. .min_left,
  4027. .min_right {
  4028. flex: 1;
  4029. height: 550rpx;
  4030. }
  4031. }
  4032. .headTake_down {
  4033. width: 100%;
  4034. flex: 1;
  4035. }
  4036. .color {
  4037. background-color: #333;
  4038. opacity: 0.5;
  4039. }
  4040. .photo_v {
  4041. width: 100%;
  4042. height: 100%;
  4043. }
  4044. .mask {
  4045. width: 500rpx;
  4046. height: 550rpx;
  4047. position: absolute;
  4048. top: 100rpx;
  4049. left: 0;
  4050. right: 0;
  4051. bottom: 0;
  4052. margin: 0 auto;
  4053. box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
  4054. }
  4055. }
  4056. .custom {
  4057. width: 750rpx;
  4058. height: 75vh;
  4059. position: absolute;
  4060. z-index: 1000;
  4061. top: 0;
  4062. left: 0;
  4063. image {
  4064. width: 100%;
  4065. height: 100%;
  4066. }
  4067. }
  4068. }
  4069. .btns {
  4070. display: flex;
  4071. .takePhoto_btn {
  4072. width: 100%;
  4073. display: flex;
  4074. align-items: center;
  4075. justify-content: space-between;
  4076. background: #a9a7a9;
  4077. padding: 40rpx 26rpx;
  4078. .middle_btn {
  4079. width: 120rpx;
  4080. height: 120rpx;
  4081. border-radius: 40rpx;
  4082. border: 4rpx solid #ffffff;
  4083. display: flex;
  4084. align-items: center;
  4085. justify-content: center;
  4086. }
  4087. .square {
  4088. width: 96rpx;
  4089. height: 96rpx;
  4090. background: #ffffff;
  4091. border-radius: 28rpx;
  4092. }
  4093. .rights {
  4094. font-size: 32rpx;
  4095. font-weight: 500;
  4096. color: #ffffff;
  4097. }
  4098. }
  4099. .btnResult {
  4100. height: 100rpx;
  4101. flex: 1;
  4102. background-color: #07c160;
  4103. text-align: center;
  4104. line-height: 100rpx;
  4105. color: #fff;
  4106. font-size: 32rpx;
  4107. font-weight: bold;
  4108. }
  4109. }
  4110. }
  4111. .chat_box {
  4112. display: flex;
  4113. padding: 20rpx;
  4114. justify-content: space-between;
  4115. }
  4116. .chat3 {
  4117. font-size: 30rpx;
  4118. font-family: PingFang SC;
  4119. font-weight: 500;
  4120. color: #666666;
  4121. margin-top: 10rpx;
  4122. }
  4123. .chat2 {
  4124. font-size: 20rpx;
  4125. font-family: PingFang SC;
  4126. font-weight: 500;
  4127. color: #999999;
  4128. margin-top: 10rpx;
  4129. }
  4130. .chat1 {
  4131. font-size: 24rpx;
  4132. font-family: PingFang SC;
  4133. font-weight: 500;
  4134. color: #333333;
  4135. }
  4136. .leftPadding {
  4137. margin-left: 8rpx;
  4138. }
  4139. .t2Content {
  4140. font-size: 24rpx;
  4141. font-family: PingFang SC;
  4142. font-weight: bold;
  4143. color: #999999;
  4144. line-height: 48rpx;
  4145. }
  4146. .tBox2 {
  4147. display: flex;
  4148. padding-top: 10rpx;
  4149. color: #333333;
  4150. font-size: 30rpx;
  4151. font-weight: 400;
  4152. }
  4153. .tBox {
  4154. display: flex;
  4155. align-items: center;
  4156. padding-top: 10rpx;
  4157. }
  4158. .title {
  4159. font-size: 24rpx;
  4160. color: #999999;
  4161. }
  4162. .Answering {
  4163. .answer_item {
  4164. &:nth-child(2) {
  4165. border-radius: 16rpx 16rpx 0rpx 0rpx;
  4166. }
  4167. &:nth-last-child(1) {
  4168. border-radius: 0rpx 0rpx 16rpx 16rpx;
  4169. }
  4170. }
  4171. }
  4172. .inputBottom {
  4173. position: fixed;
  4174. left: 0;
  4175. bottom: 0;
  4176. background: #ffffff;
  4177. height: 98rpx;
  4178. display: flex;
  4179. align-items: center;
  4180. width: 100%;
  4181. .flex_auto {
  4182. flex: 1;
  4183. margin-left: 10%;
  4184. // .input {
  4185. // height: 60rpx;
  4186. // }
  4187. }
  4188. .btn {
  4189. color: #007aff;
  4190. font-size: 30rpx;
  4191. font-weight: bold;
  4192. width: 15%;
  4193. text-align: center;
  4194. }
  4195. .input {
  4196. background: rgba(244, 244, 244, 0.98);
  4197. height: 60rpx;
  4198. border-radius: 24rpx;
  4199. margin-top: 12rpx;
  4200. }
  4201. }
  4202. .noteBox {
  4203. width: 100%;
  4204. background: #ffffff;
  4205. padding: 0rpx 10rpx 20rpx;
  4206. border-radius: 16rpx;
  4207. overflow: hidden;
  4208. .left_ti {
  4209. padding-top: 14rpx;
  4210. }
  4211. }
  4212. .dateBox {
  4213. width: 216rpx;
  4214. height: 48rpx;
  4215. background: #ffffff;
  4216. border-radius: 24rpx;
  4217. font-size: 24rpx;
  4218. color: #666666;
  4219. text-align: center;
  4220. line-height: 48rpx;
  4221. margin: 16rpx 0rpx 8rpx;
  4222. }
  4223. .t_content1 {
  4224. color: #007aff;
  4225. margin-left: 10rpx;
  4226. }
  4227. .tag1 {
  4228. border: 2rpx solid #007aff;
  4229. border-radius: 8rpx;
  4230. font-size: 20rpx;
  4231. color: #007aff;
  4232. padding: 5rpx;
  4233. }
  4234. .b_title {
  4235. color: #333333;
  4236. font-size: 30rpx;
  4237. font-weight: bold;
  4238. }
  4239. page {
  4240. background: #eaeef1;
  4241. }
  4242. .menuBox {
  4243. width: 100%;
  4244. background: #ffffff;
  4245. border-radius: 16rpx;
  4246. padding: 0rpx 20rpx;
  4247. margin-bottom: 20rpx;
  4248. }
  4249. .btnspric {
  4250. border-top: 1rpx solid #eee;
  4251. display: flex;
  4252. align-items: center;
  4253. justify-content: space-between;
  4254. height: 108rpx;
  4255. padding-left: 43rpx;
  4256. padding-right: 32rpx;
  4257. }
  4258. .btnspric > .lefprL {
  4259. font-size: 36rpx;
  4260. color: #0c141f;
  4261. font-weight: bold;
  4262. }
  4263. .btnspric > .lefprR {
  4264. padding: 0rpx 24rpx;
  4265. height: 60rpx;
  4266. line-height: 60rpx;
  4267. text-align: center;
  4268. color: #fff;
  4269. background: #32467b;
  4270. border-radius: 24rpx;
  4271. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  4272. }
  4273. .yhj,
  4274. .hdyhj {
  4275. padding: 24rpx 29rpx 24rpx 34rpx;
  4276. }
  4277. .yhj {
  4278. border-bottom: 16rpx solid #f9f9f9;
  4279. }
  4280. .yhjtit {
  4281. font-size: 30rpx;
  4282. color: #0c141f;
  4283. font-weight: 500;
  4284. margin-bottom: 14rpx;
  4285. }
  4286. .yhjList {
  4287. display: flex;
  4288. align-items: center;
  4289. justify-content: space-between;
  4290. margin-bottom: 14rpx;
  4291. }
  4292. .yhjList > .yhjLefts {
  4293. display: flex;
  4294. align-items: center;
  4295. }
  4296. .yhjLefts > .yhl {
  4297. color: #32467b;
  4298. font-size: 30rpx;
  4299. margin-right: 31rpx;
  4300. }
  4301. .yhjLefts > .yhbq {
  4302. font-size: 24rpx;
  4303. color: #ff9500;
  4304. border-radius: 18rpx;
  4305. background-color: rgba(255, 149, 0, 0.2);
  4306. border: 2rpx solid #ff9500;
  4307. height: 38rpx;
  4308. line-height: 38rpx;
  4309. padding: 0rpx 16rpx;
  4310. }
  4311. .ts {
  4312. font-size: 24rpx;
  4313. color: #999;
  4314. margin: 14rpx 0rpx;
  4315. padding-right: 29rpx;
  4316. padding-left: 34rpx;
  4317. }
  4318. .yh {
  4319. padding-top: 20rpx;
  4320. }
  4321. .yh > .yhtitle {
  4322. display: flex;
  4323. align-items: center;
  4324. justify-content: space-between;
  4325. padding-right: 29rpx;
  4326. padding-left: 34rpx;
  4327. }
  4328. .priceBxs {
  4329. display: flex;
  4330. align-items: center;
  4331. }
  4332. .priceBxs > .pricleft {
  4333. border-radius: 24rpx;
  4334. border: 1rpx solid #e91313;
  4335. background-color: rgba(233, 19, 19, 0.1);
  4336. padding: 0rpx 18rpx;
  4337. height: 49rpx;
  4338. line-height: 49rpx;
  4339. text-align: center;
  4340. font-size: 30rpx;
  4341. font-weight: 500;
  4342. color: #e91313;
  4343. margin-right: 13rpx;
  4344. }
  4345. .topBox {
  4346. padding: 32rpx 32rpx 24rpx;
  4347. border-bottom: 1rpx solid #eeeeee;
  4348. }
  4349. .topBox > .boldFonstType {
  4350. font-weight: 500;
  4351. font-size: 30rpx;
  4352. margin: 16rpx 0rpx 23rpx;
  4353. }
  4354. .topBox > .firstTopL {
  4355. display: flex;
  4356. align-items: center;
  4357. }
  4358. .topBox > .firstTopL > .imageBs {
  4359. width: 331rpx;
  4360. height: 160rpx;
  4361. border-radius: 6rpx;
  4362. overflow: hidden;
  4363. margin-right: 8rpx;
  4364. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  4365. }
  4366. .topBox > .firstTopL > .imageBs > image {
  4367. width: 100%;
  4368. height: 100%;
  4369. }
  4370. .topBox > .firstTopL > .textBs {
  4371. font-size: 30rpx;
  4372. font-weight: bold;
  4373. color: #0c141f;
  4374. }
  4375. .content {
  4376. padding: 24rpx;
  4377. text-align: left;
  4378. }
  4379. .catalogBox {
  4380. display: flex;
  4381. align-items: center;
  4382. flex-wrap: nowrap;
  4383. overflow-x: auto;
  4384. padding-left: 38rpx;
  4385. max-height: 305rpx;
  4386. overflow-y: auto;
  4387. transition: all 0.4s;
  4388. }
  4389. .catalogBox > .catalogA {
  4390. min-width: 200rpx;
  4391. height: 48rpx;
  4392. line-height: 48rpx;
  4393. // text-align: center;
  4394. border: 2rpx solid transparent;
  4395. white-space: nowrap;
  4396. text-overflow: ellipsis;
  4397. overflow: hidden;
  4398. word-break: break-all;
  4399. border-radius: 10rpx;
  4400. background: rgba(22, 119, 255, 0.05);
  4401. padding-left: 19rpx;
  4402. box-sizing: border-box;
  4403. padding-right: 15rpx;
  4404. margin-right: 16rpx;
  4405. margin-bottom: 20rpx;
  4406. margin-top: 15rpx;
  4407. font-size: 24rpx;
  4408. color: #666;
  4409. }
  4410. .catalogBox > .activesq {
  4411. border-color: #1677ff;
  4412. }
  4413. .changeCatalogBox {
  4414. display: block;
  4415. }
  4416. .catalogBox::-webkit-scrollbar {
  4417. display: none; /* Chrome Safari */
  4418. }
  4419. .price_t2 {
  4420. font-size: 18rpx;
  4421. font-family: PingFang SC;
  4422. font-weight: 500;
  4423. text-decoration: line-through;
  4424. color: #999999;
  4425. }
  4426. .price_t1 {
  4427. font-size: 33rpx;
  4428. font-family: PingFang SC;
  4429. font-weight: bold;
  4430. color: #e91313;
  4431. }
  4432. .sc_t {
  4433. font-size: 22rpx;
  4434. color: #000000;
  4435. }
  4436. .sc {
  4437. width: 29rpx;
  4438. height: 29rpx;
  4439. }
  4440. .buy {
  4441. width: 138rpx;
  4442. height: 48rpx;
  4443. line-height: 48rpx;
  4444. background: #32467b;
  4445. border-radius: 10rpx;
  4446. color: #ffffff;
  4447. font-size: 28rpx;
  4448. text-align: center;
  4449. vertical-align: middle;
  4450. position: absolute;
  4451. right: 30rpx;
  4452. }
  4453. .video_body {
  4454. padding-bottom: 96rpx;
  4455. }
  4456. .footer_tab {
  4457. position: fixed;
  4458. bottom: 0;
  4459. height: 96rpx;
  4460. width: 100%;
  4461. background-color: #ffffff;
  4462. }
  4463. .tj_box {
  4464. width: 50%;
  4465. display: inline-block;
  4466. text-align: center;
  4467. margin: 10rpx 0;
  4468. }
  4469. .teacher_t {
  4470. font-size: 24rpx;
  4471. font-family: PingFang SC;
  4472. font-weight: 400;
  4473. color: #666666;
  4474. line-height: 36rpx;
  4475. margin-left: 15rpx;
  4476. }
  4477. .teacher_img {
  4478. width: 87rpx;
  4479. height: 129rpx;
  4480. }
  4481. .t2 {
  4482. font-size: 24rpx;
  4483. font-family: PingFang SC;
  4484. color: #666666;
  4485. line-height: 36rpx;
  4486. margin: 15rpx;
  4487. }
  4488. .r_t2 {
  4489. width: 201rpx;
  4490. height: 49rpx;
  4491. background: rgba(22, 119, 255, 0.05);
  4492. border: 1rpx solid #32467b;
  4493. border-radius: 16rpx;
  4494. color: #666666;
  4495. font-size: 23rpx;
  4496. text-align: center;
  4497. display: flex;
  4498. align-items: center;
  4499. padding: 5rpx;
  4500. }
  4501. .scroll_box {
  4502. width: 100%;
  4503. height: 60rpx;
  4504. background: #ffffff;
  4505. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  4506. white-space: nowrap;
  4507. overflow: hidden;
  4508. margin: 15rpx 0;
  4509. }
  4510. .r_sliper {
  4511. padding: 0 20rpx;
  4512. }
  4513. .top_line {
  4514. width: 6rpx;
  4515. height: 22rpx;
  4516. background: #32467b;
  4517. margin-right: 10rpx;
  4518. }
  4519. .video_t2 {
  4520. font-size: 24rpx;
  4521. font-family: PingFang SC;
  4522. font-weight: 500;
  4523. color: #666666;
  4524. }
  4525. .video_play {
  4526. position: absolute;
  4527. width: 95rpx;
  4528. height: 95rpx;
  4529. top: 0;
  4530. left: 0;
  4531. right: 0;
  4532. bottom: 0;
  4533. margin: auto;
  4534. }
  4535. .video_box {
  4536. position: relative;
  4537. #playerVideo {
  4538. position: relative;
  4539. z-index: 99;
  4540. }
  4541. .video-toast {
  4542. position: absolute;
  4543. width: 686rpx;
  4544. height: 80rpx;
  4545. background: rgba(0, 0, 0, 0.6);
  4546. border-radius: 24rpx;
  4547. bottom: 100rpx;
  4548. left: 50%;
  4549. transform: translateX(-50%);
  4550. color: #fff;
  4551. display: flex;
  4552. font-size: 26rpx;
  4553. align-items: center;
  4554. overflow: visible;
  4555. z-index: 999;
  4556. &__text {
  4557. flex: 1;
  4558. margin-left: 40rpx;
  4559. }
  4560. &__btn {
  4561. width: 180rpx;
  4562. text-align: center;
  4563. border-left: 1rpx solid #fff;
  4564. }
  4565. }
  4566. .video-toast__close {
  4567. position: absolute;
  4568. right: 32rpx;
  4569. bottom: 184rpx;
  4570. width: 40rpx;
  4571. height: 40rpx;
  4572. line-height: 40rpx;
  4573. text-align: center;
  4574. background: rgba(0, 0, 0, 0.6);
  4575. border-radius: 50%;
  4576. color: rgba(255, 255, 255, 0.3);
  4577. }
  4578. }
  4579. .rotoct {
  4580. transform: rotate(90deg);
  4581. }
  4582. .slot-content {
  4583. padding: 0 20rpx;
  4584. }
  4585. .notice_modal {
  4586. .content {
  4587. width: 100%;
  4588. height: 100%;
  4589. padding: 56rpx 56rpx 56rpx 64rpx;
  4590. .title {
  4591. color: #222;
  4592. line-height: 40rpx;
  4593. font-size: 36rpx;
  4594. text-align: center;
  4595. font-weight: bold;
  4596. margin-bottom: 24rpx;
  4597. }
  4598. .text {
  4599. height: 340rpx;
  4600. line-height: 40rpx;
  4601. text-indent: 2em;
  4602. font-size: 32rpx;
  4603. color: #222;
  4604. }
  4605. .had_read {
  4606. width: 100%;
  4607. height: 88rpx;
  4608. line-height: 88rpx;
  4609. text-align: center;
  4610. background: #3577e8;
  4611. border-radius: 240rpx;
  4612. font-size: 32rpx;
  4613. font-weight: 500;
  4614. color: #fff;
  4615. margin-top: 20rpx;
  4616. &.gray {
  4617. background: #bbbec5;
  4618. }
  4619. }
  4620. }
  4621. }
  4622. .full_mulu {
  4623. position: absolute;
  4624. top: 100rpx;
  4625. right: 20rpx;
  4626. width: 700rpx;
  4627. height: 515rpx;
  4628. color: #333;
  4629. display: flex;
  4630. align-items: center;
  4631. justify-content: space-between;
  4632. z-index: 99999;
  4633. .mulus {
  4634. width: 623rpx;
  4635. // height: 515rpx;
  4636. height: 400rpx;
  4637. overflow-y: scroll;
  4638. // overflow: scroll;
  4639. }
  4640. .mulu_box_in {
  4641. background-color: #b7b7b7;
  4642. border-radius: 16rpx;
  4643. // transition: all 0.5s;
  4644. &::after {
  4645. content: "";
  4646. width: 0;
  4647. height: 0;
  4648. position: absolute;
  4649. top: 235rpx;
  4650. right: 27px;
  4651. border-top: 16rpx solid transparent;
  4652. border-right: 16rpx solid transparent;
  4653. border-left: 16rpx solid #b7b7b7;
  4654. border-bottom: 16rpx solid transparent;
  4655. }
  4656. }
  4657. .mulu_box_out {
  4658. // visibility: hidden;
  4659. display: none;
  4660. }
  4661. .menuBox_mulu {
  4662. // width: 100%;
  4663. background: #ffffff;
  4664. border-radius: 16rpx;
  4665. padding: 0rpx 20rpx;
  4666. margin-bottom: 20rpx;
  4667. }
  4668. .ml_img {
  4669. position: absolute;
  4670. right: 0;
  4671. top: 100rpx;
  4672. }
  4673. .items {
  4674. width: 620rpx;
  4675. height: 100rpx;
  4676. border: 1rpx solid red;
  4677. }
  4678. }
  4679. </style>