detail.vue 141 KB

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