detail.vue 121 KB

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