detail.vue 141 KB

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