detail.vue 141 KB

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