detail.vue 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018
  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. :enableAutoRotation="enableAutoRotation"
  54. @loadedmetadata="loadedmetadata"
  55. ></polyv-player>
  56. <!-- :startTime="startTime" -->
  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. // #ifdef MP-WEIXIN
  1607. this.getCameraSetting();
  1608. // #endif
  1609. this.$api.getbaseprofiletplists({ goodsId: self.goodsId,orderGoodsId: this.orderGoodsId, }).then((res) => {
  1610. if (res.data.code === 200 && res.data.rows.length) {
  1611. if (res.data.rows[0].keyValue) {
  1612. self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
  1613. if (baseRes.data.code === 200) {
  1614. if (baseRes.data.data) {
  1615. // base/profile/tp/getInfo
  1616. self.$api
  1617. .getbaseprofiletpgetInfo({
  1618. goodsId: self.goodsId,
  1619. orderGoodsId: self.orderGoodsId,
  1620. })
  1621. .then((result) => {
  1622. if (result.data.code === 200) {
  1623. if (
  1624. !result.data.data ||
  1625. (result.data.data.status === 3 &&
  1626. result.data.data.changeStatus === 1)
  1627. ) {
  1628. if (!result.data.data) {
  1629. self.needProfileModal = true;
  1630. uni.showModal({
  1631. content: "请前往填写资料",
  1632. cancelText: "返回",
  1633. success: function (resultst) {
  1634. if (resultst.confirm) {
  1635. self.$navTo.togo("/pages2/verify/input", {
  1636. id: self.goodsId,
  1637. orderGoodsId: self.orderGoodsId,
  1638. });
  1639. }
  1640. if (resultst.cancel) {
  1641. uni.navigateBack();
  1642. }
  1643. },
  1644. });
  1645. } else {
  1646. self.needProfileModal = true;
  1647. uni.showModal({
  1648. content: "资料审核不通过,请前往重新填写",
  1649. cancelText: "返回",
  1650. success: function (resultst) {
  1651. if (resultst.confirm) {
  1652. self.$navTo.togo("/pages2/verify/input", {
  1653. id: self.goodsId,
  1654. orderGoodsId: self.orderGoodsId,
  1655. });
  1656. }
  1657. if (resultst.cancel) {
  1658. uni.navigateBack();
  1659. }
  1660. },
  1661. });
  1662. }
  1663. }
  1664. else if (
  1665. result.data.data.status === 1 &&
  1666. JSON.parse(res.data.rows[0].keyValue2)[0]
  1667. ) {
  1668. self.$api
  1669. .getbaseprofileStampgetInfo({
  1670. goodsId: self.goodsId,
  1671. orderGoodsId: self.orderGoodsId,
  1672. })
  1673. .then((k) => {
  1674. if (k.data.code === 200) {
  1675. if (
  1676. !k.data.data ||
  1677. (k.data.data.status === 3 &&
  1678. k.data.data.changeStatus === 1)
  1679. ) {
  1680. if (!k.data.data) {
  1681. self.needProfileModal = true;
  1682. uni.showModal({
  1683. cancelText: "返回",
  1684. content: "请前往填写盖章资料",
  1685. success: function (resultst) {
  1686. if (resultst.confirm) {
  1687. self.$navTo.togo(
  1688. "/pages2/verify/input2",
  1689. {
  1690. id: self.goodsId,
  1691. orderGoodsId: self.orderGoodsId,
  1692. }
  1693. );
  1694. }
  1695. if (resultst.cancel) {
  1696. uni.navigateBack();
  1697. }
  1698. },
  1699. });
  1700. } else {
  1701. self.needProfileModal = true;
  1702. uni.showModal({
  1703. cancelText: "返回",
  1704. content:
  1705. "资料盖章审核不通过,请前往重新填写",
  1706. success: function (resultst) {
  1707. if (resultst.confirm) {
  1708. self.$navTo.togo(
  1709. "/pages2/verify/input2",
  1710. {
  1711. id: self.goodsId,
  1712. orderGoodsId: self.orderGoodsId,
  1713. }
  1714. );
  1715. }
  1716. if (resultst.cancel) {
  1717. uni.navigateBack();
  1718. }
  1719. },
  1720. });
  1721. }
  1722. } else {
  1723. resolve();
  1724. }
  1725. }
  1726. });
  1727. } else {
  1728. resolve();
  1729. }
  1730. }
  1731. });
  1732. } else {
  1733. resolve();
  1734. }
  1735. }
  1736. });
  1737. } else {
  1738. resolve();
  1739. }
  1740. } else {
  1741. resolve();
  1742. }
  1743. });
  1744. if (this.gradeId > 0) {
  1745. //提交完资料返回判断是否已开班
  1746. this.getGradeInfo();
  1747. }
  1748. })
  1749. },
  1750. // /**
  1751. // * 获取业务层次详情
  1752. // */
  1753. // courseBusiness() {
  1754. // this.$api.courseBusiness(this.goodsData.businessId).then((res) => {
  1755. // this.businessData = res.data.data;
  1756. // });
  1757. // },
  1758. /**
  1759. * 计算tabs宽度
  1760. */
  1761. itemWidth() {
  1762. return 100 / this.list.length + "%";
  1763. },
  1764. /**
  1765. * 获取讲义权限
  1766. */
  1767. courseHandouts() {
  1768. this.$api.courseHandouts(this.goodsData.handoutsId).then((res) => {
  1769. this.courseHandoutsData = res.data.data;
  1770. });
  1771. },
  1772. findMenuNextSection(index) {
  1773. for (let i = index + 1; i < this.reMenuList.length; i++) {
  1774. let item = this.reMenuList[i];
  1775. if (item.type == 3) {
  1776. return item;
  1777. }
  1778. }
  1779. return {};
  1780. },
  1781. loadedmetadata(event) {
  1782. console.log('------: loadedmetadata', this.hasStart);
  1783. if (this.hasStart) { // 防止loadedmetadata事件第二次触发
  1784. return
  1785. }
  1786. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1787. this.hasStart = true;
  1788. uni.$off('playPause')
  1789. uni.$on('playPause',() => {
  1790. polyvPlayerContext.pause()
  1791. })
  1792. if(!this.recordObj.videoCurrentTime) { //新视频直接提交一条观看记录
  1793. this.postStudyRecord(0)
  1794. }
  1795. this.studyTimer = setInterval(() => {
  1796. this.postStudyRecord(0)
  1797. }, 15 * 1000)
  1798. },
  1799. getPhotoLastRecord() {
  1800. let self = this;
  1801. let data = {
  1802. sectionId: parseInt(self.playSectionId),
  1803. goodsId: parseInt(self.goodsId),
  1804. courseId: parseInt(self.courseId),
  1805. gradeId: parseInt(self.gradeId),
  1806. chapterId: parseInt(self.chapterId),
  1807. moduleId: parseInt(self.moduleId),
  1808. orderGoodsId: this.orderGoodsId,
  1809. };
  1810. // /course/photo/log/getLastInfo'
  1811. this.$api.getPhotoLastRecord(data).then((res) => {
  1812. if (res.data.code == 200) {
  1813. //清空历史数据
  1814. self.photoHistoryList = [];
  1815. this.photoIndex = 0;
  1816. self.photoList = [];
  1817. for (let i = 0; i < res.data.data.length; i++) {
  1818. //-2存储随机拍照数组
  1819. if (res.data.data[i].photoIndex == -2) {
  1820. self.photoList = res.data.data[i].timeInterval.split(",");
  1821. } else {
  1822. self.photoHistoryList.push(res.data.data[i].photoIndex);
  1823. }
  1824. }
  1825. }
  1826. });
  1827. },
  1828. //postTime 只提交随机时间
  1829. postCoursePhotoRecord(postTime = false) {
  1830. return new Promise((resolve, reject) => {
  1831. let currentTime = 0;
  1832. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1833. if (polyvPlayerContext) {
  1834. currentTime = polyvPlayerContext.getCurrentTime();
  1835. }
  1836. let self = this;
  1837. let photoIndex = self.photoIndex;
  1838. let data = {
  1839. photo: self.ossAvatarUrl,
  1840. sectionId: parseInt(self.playSectionId),
  1841. goodsId: parseInt(self.goodsId),
  1842. courseId: parseInt(self.courseId),
  1843. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  1844. gradeId: parseInt(self.gradeId),
  1845. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  1846. photoNum: parseInt(self.photoNum),
  1847. chapterId: parseInt(self.chapterId),
  1848. moduleId: parseInt(self.moduleId),
  1849. timeInterval: postTime ? self.photoList.join(",") : "",
  1850. orderGoodsId: this.orderGoodsId,
  1851. };
  1852. // console.log("提交接口", data);
  1853. this.$api
  1854. .coursePhotoRecord(data)
  1855. .then((res) => {
  1856. if (res.data.code == 200) {
  1857. resolve();
  1858. } else {
  1859. reject();
  1860. }
  1861. })
  1862. .catch((err) => {
  1863. reject();
  1864. });
  1865. });
  1866. },
  1867. randomNum(minNum, maxNum) {
  1868. switch (arguments.length) {
  1869. case 1:
  1870. return parseInt(Math.random() * minNum + 1, 10);
  1871. break;
  1872. case 2:
  1873. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  1874. break;
  1875. default:
  1876. return 0;
  1877. break;
  1878. }
  1879. },
  1880. //配置随机拍照时间
  1881. configPhoto() {
  1882. var polyvPlayerContext = this.selectComponent("#playerVideo");
  1883. let totalVideoTime = polyvPlayerContext.getDuration();
  1884. let duration = polyvPlayerContext.getCurrentTime();
  1885. let photoNum = this.photoNum;
  1886. if (!this.photoConfig) {
  1887. this.photoConfig = true;
  1888. // let spaceTime = Math.floor(totalVideoTime/photoNum) //拍照时间区间
  1889. // if(spaceTime<5){//区间小于5秒
  1890. // photoNum = Math.floor(totalVideoTime/5)
  1891. // spaceTime = 5
  1892. // }
  1893. // if(photoNum<1){
  1894. // photoNum = 1 //只要设置,至少拍一次
  1895. // spaceTime = totalVideoTime
  1896. // }
  1897. // let initSpace = 0
  1898. //没有历史拍照间隔数据
  1899. if (this.photoList.length == 0) {
  1900. if (totalVideoTime >= 900) {
  1901. //大于15分钟
  1902. if (photoNum == 1) {
  1903. //开头拍1张
  1904. this.photoList.push(0);
  1905. } else if (photoNum == 3) {
  1906. //拍3张
  1907. this.photoList.push(0); //开头拍一张
  1908. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  1909. let centerMinTime = centerTime - 300; //前后5分钟
  1910. let centerMaxTime = centerTime + 300;
  1911. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  1912. this.photoList.push(centerTakeTime); //中间拍一张
  1913. let endMaxTime = totalVideoTime - 60;
  1914. let endMinTime = totalVideoTime - 300;
  1915. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  1916. this.photoList.push(endTakeTime); //最后拍一张
  1917. }
  1918. } else {
  1919. //小于15分钟,只拍前后各一张
  1920. if (photoNum == 1) {
  1921. //开头拍1张
  1922. this.photoList.push(0);
  1923. } else if (photoNum == 3) {
  1924. //拍2张
  1925. if (totalVideoTime <= 300) {
  1926. //小于5分钟
  1927. this.photoList.push(0); //开头拍一张
  1928. let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
  1929. this.photoList.push(endTakeTime);
  1930. } else {
  1931. this.photoList.push(0); //开头拍一张
  1932. let endMaxTime = totalVideoTime - 60;
  1933. let endMinTime = totalVideoTime - 300;
  1934. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  1935. this.photoList.push(endTakeTime); //最后1-5分钟拍一张
  1936. }
  1937. }
  1938. }
  1939. // for(let i=0;i<photoNum;i++){
  1940. // let s = this.randomNum(initSpace,initSpace+spaceTime)
  1941. // if(s>totalVideoTime){
  1942. // s = totalVideoTime-1
  1943. // }
  1944. // if(s<=5){
  1945. // s =5 //避免出现5秒内拍照时间
  1946. // }
  1947. // this.photoList.push(s)
  1948. // initSpace+=spaceTime
  1949. // }
  1950. // console.log(this.photoList, "随机拍照时间数组11", photoNum);
  1951. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  1952. }
  1953. // console.log(this.photoList, "随机拍照时间数组");
  1954. //兼容已有观看历史
  1955. for (let i = 0; i < this.photoList.length - 1; i++) {
  1956. if (
  1957. this.photoList[i] < duration &&
  1958. this.photoList[i + 1] > duration
  1959. ) {
  1960. this.photoIndex = i + 1;
  1961. break;
  1962. }
  1963. if (duration > this.photoList[this.photoList.length - 1]) {
  1964. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  1965. break;
  1966. }
  1967. }
  1968. }
  1969. },
  1970. getLiveUid(channelId) {
  1971. let self = this;
  1972. return new Promise((resolve) => {
  1973. let data = {
  1974. channelId: channelId,
  1975. orderGoodsId: this.orderGoodsId,
  1976. };
  1977. self.$api.polyvSign(data).then((res) => {
  1978. resolve(res.data.data);
  1979. });
  1980. });
  1981. },
  1982. timeEventLiving() {
  1983. if (plv != null) {
  1984. if (this.livePlay) {
  1985. this.liveDuration = this.liveDuration + 1; //每隔1秒
  1986. if (this.liveDuration == 2) {
  1987. //直播第2秒拍照
  1988. if (
  1989. this.goodsPhotographConfig && this.goodsPhotographConfig.livephotograph == 1 &&
  1990. this.channelItem.learning != 1 && this.photoHistoryList.length == 0
  1991. ) {
  1992. //开启直播拍照
  1993. this.openPhoto();
  1994. } else {
  1995. this.postStudyRecord(0);
  1996. }
  1997. }
  1998. }
  1999. }
  2000. },
  2001. playerLiveStatusChange(e) {
  2002. const status = e.detail.status;
  2003. if (status === "live") {
  2004. //开始播放
  2005. if (this.timer) {
  2006. clearInterval(this.timer);
  2007. }
  2008. this.livePlay = true;
  2009. this.timer = setInterval(this.timeEventLiving, 1000); //定时器
  2010. }
  2011. if (status === "end") {
  2012. this.hasStart = false;
  2013. if (this.livePlay) {
  2014. //只有播放过的结束才提交,避免未开播触发结束
  2015. this.postStudyRecord(1);
  2016. }
  2017. this.livePlay = false;
  2018. // 未开始
  2019. }
  2020. },
  2021. closePlv() {
  2022. if (plv) {
  2023. plv.destroy();
  2024. }
  2025. },
  2026. playChannel(item) {
  2027. if (this.timer) {
  2028. clearInterval(this.timer);
  2029. }
  2030. this.startStatus = true;
  2031. this.initLive();
  2032. },
  2033. setLiveOption(status) {
  2034. const { userId, channelId, recordFileSimpleModel, playbackEnabled } =
  2035. this.detail;
  2036. const playRecordFile =
  2037. playbackEnabled && recordFileSimpleModel && status === "end";
  2038. this.videoOption = {
  2039. mode: "live",
  2040. uid: this.liveObj.uid, //this.playChannelId egsxlptzdq
  2041. cid: this.playChannelId,
  2042. openId: this.userInfo.userAccount,
  2043. isAutoChange: false,
  2044. forceVideo: false,
  2045. };
  2046. },
  2047. async initLive() {
  2048. this.liveObj = await this.getLiveUid(this.playChannelId);
  2049. this.initLiveOk = true;
  2050. let optionsData = {};
  2051. optionsData.mode = "live";
  2052. optionsData.forceVideo = false;
  2053. optionsData.channelId = this.playChannelId; // 频道ID '2553128'
  2054. optionsData.openId = this.userInfo.userAccount; // 用户openId this.userInfo.userAccount 'oQ5eX5BCtSjkE1ct8CzvxGWgh0hQ'
  2055. optionsData.userId = this.liveObj.uid; // 2.0.0及以上版本的demo需要使用 userId 设置学员唯一id 'egsxlptzdq'
  2056. let self = this;
  2057. this.closePlv();
  2058. plv.init(optionsData).then(({ detail, chat }) => {
  2059. self.liveDetail = detail;
  2060. // 设置mode为live的videoOption
  2061. this.setLiveOption();
  2062. if (detail.isPPT) {
  2063. chat.on(chat.events.SLICESTART, () => {
  2064. // 开始直播
  2065. });
  2066. } else {
  2067. plv.api.getOrdinaryLiveStatus(detail.stream);
  2068. }
  2069. });
  2070. },
  2071. openSetting(res) {
  2072. console.log(res, 98);
  2073. },
  2074. getCameraSetting() {
  2075. const self = this;
  2076. wx.getSetting({
  2077. success: (res) => {
  2078. if (res.authSetting["scope.camera"]) {
  2079. // 用户已经授权
  2080. self.showSet = false;
  2081. this.prendreAutoCarme = false
  2082. } else {
  2083. this.prendreAutoCarme = true
  2084. // 用户还没有授权,向用户发起授权请求
  2085. wx.authorize({
  2086. scope: "scope.camera",
  2087. success:() =>{
  2088. // 用户同意授权
  2089. self.showSet = false;
  2090. this.prendreAutoCarme = false
  2091. },
  2092. fail:() => {
  2093. // 用户不同意授权
  2094. self.showSet = true;
  2095. },
  2096. });
  2097. }
  2098. },
  2099. fail: (res) => {},
  2100. });
  2101. },
  2102. studyNotice() {
  2103. this.noticeShow = true;
  2104. },
  2105. //播放笔记视频
  2106. async playNoteVideo(item) {
  2107. if (this.timer) {
  2108. clearInterval(this.timer);
  2109. }
  2110. if (this.vid) {
  2111. //切换视频
  2112. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2113. polyvPlayerContext.changeVid(item.recordingUrl);
  2114. } else {
  2115. this.vid = item.recordingUrl;
  2116. }
  2117. this.recordObj = { videoCurrentTime: item.noteSecond };
  2118. if (this.recordObj.videoCurrentTime) {
  2119. this.needSeek = true; //需要跳转到播放记录
  2120. }
  2121. this.startStatus = true;
  2122. //获取节笔记
  2123. this.getNoteList();
  2124. },
  2125. //正常播放视频
  2126. async playVideo(item) {
  2127. console.log(item.recordingUrl,'22222222', this.vid);
  2128. if (this.timer) {
  2129. clearInterval(this.timer);
  2130. }
  2131. if (this.vid) {
  2132. //切换视频
  2133. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2134. polyvPlayerContext && polyvPlayerContext.changeVid(item.recordingUrl);
  2135. } else {
  2136. this.vid = item.recordingUrl;
  2137. }
  2138. this.recordObj = null;
  2139. this.recordObj = await this.getRecordLast();
  2140. // console.log('this.recordObj:', this.recordObj)
  2141. this.needSeek = true; //跳转到播放记录
  2142. this.startStatus = true;
  2143. // 提交学习记录
  2144. this.postStudyRecord(0)
  2145. //获取节笔记
  2146. this.getNoteList();
  2147. },
  2148. getRecordLast() {
  2149. return new Promise((resolve) => {
  2150. let data = {
  2151. gradeId: this.gradeId || this.gradeId == 0 ? Number(this.gradeId) : null,
  2152. goodsId: this.goodsId || this.goodsId == 0 ? Number(this.goodsId) : null,
  2153. sectionId: this.playSectionId || 0,
  2154. courseId: this.courseId || this.courseId == 0 ? Number(this.courseId) : null,
  2155. chapterId: this.chapterId || 0,
  2156. moduleId: this.moduleId || 0,
  2157. orderGoodsId: this.orderGoodsId,
  2158. };
  2159. this.$api.recordLast(data).then((res) => {
  2160. resolve(res.data.data);
  2161. });
  2162. });
  2163. },
  2164. jumpNote(item) {
  2165. this.noteId = item.noteId;
  2166. //没视频播放
  2167. if (this.playSectionId == 0) {
  2168. this.$u.toast("即将跳到笔记位置");
  2169. this.$store.commit("setPlaySectionId", {
  2170. playSectionId: item.sectionId || item.menuId,
  2171. });
  2172. this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
  2173. this.playNoteVideo(item);
  2174. } else {
  2175. //正在看当前笔记视频
  2176. this.$u.toast("即将跳到笔记位置");
  2177. //跳到笔记时刻
  2178. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2179. polyvPlayerContext.seek(item.noteSecond);
  2180. polyvPlayerContext.play();
  2181. }
  2182. },
  2183. postNote() {
  2184. let self = this;
  2185. if (!(this.playSectionId > 0)) {
  2186. this.$u.toast("目前无播放视频");
  2187. return;
  2188. }
  2189. if (!this.noteValue) {
  2190. this.$u.toast("请输入内容");
  2191. return;
  2192. }
  2193. if (!this.gradeId) {
  2194. this.$u.toast("暂无班级数据");
  2195. return;
  2196. }
  2197. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2198. let noteDate = this.$method.getZeroTime();
  2199. let noteSecond = polyvPlayerContext.getCurrentTime();
  2200. if (!noteSecond) {
  2201. if (noteSecond == 0) {
  2202. //播放结束
  2203. noteSecond = polyvPlayerContext.getDuration();
  2204. }
  2205. if (!noteSecond) {
  2206. this.$u.toast("视频暂未开始");
  2207. return;
  2208. }
  2209. }
  2210. let data = {
  2211. gradeId: this.gradeId,
  2212. goodsId: this.goodsId,
  2213. sectionId: this.playSectionId,
  2214. courseId: this.courseId,
  2215. noteText: this.noteValue,
  2216. noteDate: noteDate,
  2217. noteSecond: noteSecond,
  2218. orderGoodsId: this.orderGoodsId,
  2219. };
  2220. this.$api.postNote(data).then((res) => {
  2221. if (res.data.code == 200) {
  2222. this.$u.toast("发布成功");
  2223. self.getNoteList();
  2224. this.noteValue = "";
  2225. }
  2226. });
  2227. },
  2228. getGradeInfo() {
  2229. let self = this;
  2230. this.$store.state.allowLoading = false;
  2231. this.$api.goodsGradeInfo(this.gradeId).then((res) => {
  2232. if (res.data.code == 200) {
  2233. self.gradeDetail = res.data.data;
  2234. if (self.needProfileModal) {
  2235. return;
  2236. }
  2237. if (self.gradeDetail.learningStatus == 2) {
  2238. uni.showModal({
  2239. showCancel: false,
  2240. confirmText: "确定",
  2241. content:
  2242. "当前课程正在申请中,正式开班后方可进行学习,请耐心等候!",
  2243. success: function (resultst) {
  2244. uni.navigateBack();
  2245. },
  2246. });
  2247. }
  2248. if (
  2249. self.gradeDetail.learningStatus == 3 &&
  2250. Number(self.gradeDetail.learningTimeStart) >
  2251. Number(new Date() / 1000)
  2252. ) {
  2253. uni.showModal({
  2254. showCancel: false,
  2255. cancelText: "返回",
  2256. content:
  2257. "当前课程正在申请中,正式开班后方可进行学习,请耐心等候!",
  2258. success: function (resultst) {
  2259. uni.navigateBack();
  2260. },
  2261. });
  2262. }
  2263. }
  2264. });
  2265. this.$store.state.allowLoading = true;
  2266. },
  2267. getNoteList() {
  2268. let self = this;
  2269. self.noteList = [];
  2270. let data = {
  2271. courseId: this.courseId,
  2272. gradeId: this.gradeId,
  2273. goodsId: this.goodsId,
  2274. orderGoodsId: this.orderGoodsId,
  2275. };
  2276. if (this.playSectionId > 0) {
  2277. data.sectionId = this.playSectionId;
  2278. }
  2279. this.$api.noteList(data).then((res) => {
  2280. if (res.data.code == 200) {
  2281. self.noteList = res.data.rows;
  2282. }
  2283. });
  2284. },
  2285. delAnswer(answerId) {
  2286. let self = this;
  2287. let data = { answerId: answerId, status: -1 ,orderGoodsId: this.orderGoodsId,};
  2288. this.$api.delAnswer(data).then((res) => {
  2289. if (res.data.code == 200) {
  2290. self.getAnswerList();
  2291. }
  2292. });
  2293. },
  2294. clearCtx() {
  2295. this.placeholder = "您可以在这里输入答疑内容";
  2296. this.ctxValue = "";
  2297. this.assignUserId = 0;
  2298. },
  2299. focusNote(event) {
  2300. this.bottomHeight = event.detail.height
  2301. },
  2302. blurNote() {
  2303. this.bottomHeight = 0
  2304. },
  2305. blur() {
  2306. this.bottomHeight = 0
  2307. this.clearTimer = setTimeout(() => {
  2308. this.ctxValue = ""
  2309. this.isFocus = false;
  2310. this.assignUserId = 0;
  2311. this.placeholder = '您可以在这里输入答疑内容';
  2312. },2000)
  2313. },
  2314. replyContent(item) {
  2315. this.isFocus = true;
  2316. this.assignUserId = item.userId;
  2317. this.placeholder = "@" + item.realname;
  2318. },
  2319. delContent(item) {
  2320. this.delAnswer(item.answerId);
  2321. },
  2322. postAnswer() {
  2323. let self = this;
  2324. let data = {
  2325. courseId: this.courseId,
  2326. answerText: this.ctxValue,
  2327. goodsId: this.goodsId,
  2328. orderGoodsId: this.orderGoodsId,
  2329. };
  2330. if (this.assignUserId > 0) {
  2331. data.assignUserId = this.assignUserId;
  2332. }
  2333. this.$api.postAnswer(data).then((res) => {
  2334. if (res.data.code == 200) {
  2335. this.$u.toast("发布成功");
  2336. self.getAnswerList();
  2337. this.isFocus = false;
  2338. this.placeholder = "您可以在这里输入答疑内容";
  2339. this.ctxValue = "";
  2340. this.assignUserId = 0;
  2341. }
  2342. });
  2343. },
  2344. postContent() {
  2345. if (!this.ctxValue || this.ctxValue == "") {
  2346. this.$u.toast("请输入内容");
  2347. return;
  2348. }
  2349. this.postAnswer();
  2350. },
  2351. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  2352. // console.log('学习记录接口的playSectionId', sectionId);
  2353. let currentTime = 0;
  2354. let PlayDuration = 0;
  2355. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2356. if (polyvPlayerContext) {
  2357. currentTime = polyvPlayerContext.getCurrentTime(); //总的视频播放时刻
  2358. PlayDuration = polyvPlayerContext.getVideoPlayDuration(); //本次看的时长
  2359. }
  2360. if (this.playChannelId > 0) {
  2361. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  2362. }
  2363. let self = this;
  2364. let data = {
  2365. fromPlat: 1, //来源平台 1小程序 2网站
  2366. photo: self.ossAvatarUrl,
  2367. sectionId: sectionId || 0,
  2368. goodsId: parseInt(self.goodsId),
  2369. courseId: parseInt(self.courseId),
  2370. orderGoodsId: this.orderGoodsId,
  2371. studyDuration: parseInt(
  2372. PlayDuration > 0 ? PlayDuration : self.studyDuration
  2373. ),
  2374. gradeId: parseInt(self.gradeId),
  2375. chapterId: this.chapterId || 0,
  2376. moduleId: this.moduleId || 0,
  2377. videoCurrentTime: parseInt(
  2378. currentTime > 0 ? currentTime : self.studyDuration
  2379. ),
  2380. };
  2381. if (this.ossAvatarUrl) {
  2382. data.similarity = this.compareFaceData // 相似度
  2383. }
  2384. if (status > 0) {
  2385. data.status = status;
  2386. }
  2387. // console.log("提交接口:", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
  2388. this.$api.studyRecord(data).then((res) => {
  2389. if (res.data.code == 200) {
  2390. if (status > 0) {
  2391. this.studyRecordMenuAllList()
  2392. let moduleId = this.moduleId || 0;
  2393. let chapterId = this.chapterId || 0;
  2394. let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
  2395. let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
  2396. uni.$emit("playNext" + playNextIdisRebuild, {
  2397. fromRebuild: this.isRebuild,
  2398. }); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
  2399. uni.$emit("playNext" + playNextId); //通知播放结束
  2400. }
  2401. self.ossAvatarUrl = "";
  2402. } else {
  2403. this.uploadLock = false;
  2404. uni.showToast({
  2405. icon: "none",
  2406. title: res.data.msg,
  2407. });
  2408. }
  2409. }).catch(err => {
  2410. this.studyRecordMenuAllList()
  2411. })
  2412. },
  2413. uploadFile(options, int) {
  2414. var self = this;
  2415. return new Promise((resolve, reject) => {
  2416. var data = {
  2417. imageStatus: int,
  2418. gradeId: this.gradeId,
  2419. orderGoodsId: this.orderGoodsId,
  2420. };
  2421. self.$api.aliyunpolicy(data).then((res) => {
  2422. if (res.data.code != 200) {
  2423. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  2424. return;
  2425. }
  2426. var ossToken = res.data.data.resultContent;
  2427. if (ossToken.host == null || ossToken.host == undefined) {
  2428. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  2429. return;
  2430. }
  2431. uni.uploadFile({
  2432. url: ossToken.host,
  2433. name: "file",
  2434. filePath: options,
  2435. fileType: "image",
  2436. header: {
  2437. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  2438. },
  2439. formData: {
  2440. key: ossToken.dir,
  2441. OSSAccessKeyId: ossToken.accessid,
  2442. policy: ossToken.policy,
  2443. Signature: ossToken.signature,
  2444. callback: ossToken.callback,
  2445. success_action_status: 200,
  2446. },
  2447. success: (result) => {
  2448. // if (result.statusCode === 200) {
  2449. this.$u.toast('上传成功')
  2450. self.ossAvatarUrl = ossToken.dir;
  2451. resolve();
  2452. // } else {
  2453. // uni.showToast({
  2454. // title: "上传失败",
  2455. // icon: "none",
  2456. // });
  2457. // this.openPhoto();
  2458. // return;
  2459. // }
  2460. },
  2461. fail: (error) => {
  2462. uni.showToast({
  2463. title: "上传接口报错,请重新拍照上传" + error,
  2464. icon: "none",
  2465. });
  2466. this.openPhoto();
  2467. return;
  2468. },
  2469. });
  2470. });
  2471. });
  2472. },
  2473. imageInfos() {
  2474. var self = this;
  2475. return new Promise((resolve, reject) => {
  2476. uni.getImageInfo({
  2477. src: self.avatarUrl,
  2478. success: async (res) => {
  2479. let canvasWidth = res.width; //图片原始长宽
  2480. let canvasHeight = res.height;
  2481. if (canvasWidth > 2000 || canvasHeight > 2000) {
  2482. uni.compressImage({
  2483. src: self.avatarUrl,
  2484. quality: 75,
  2485. width: "35%",
  2486. height: "35%",
  2487. success: async (rest) => {
  2488. const waitUpload = await self.uploadFile(
  2489. rest.tempFilePath,
  2490. 0
  2491. );
  2492. resolve(waitUpload);
  2493. },
  2494. });
  2495. } else if (canvasWidth > 1000 || canvasHeight > 1000) {
  2496. uni.compressImage({
  2497. src: self.avatarUrl,
  2498. quality: 75,
  2499. width: "50%",
  2500. height: "50%",
  2501. success: async (rest) => {
  2502. const waitUpload = await self.uploadFile(
  2503. rest.tempFilePath,
  2504. 0
  2505. );
  2506. resolve(waitUpload);
  2507. },
  2508. });
  2509. } else {
  2510. const waitUpload = await self.uploadFile(self.avatarUrl, 0);
  2511. resolve(waitUpload);
  2512. }
  2513. },
  2514. fail: (err) => {
  2515. this.$u.toast('图片上传失败')
  2516. }
  2517. });
  2518. });
  2519. },
  2520. timeEvent() {
  2521. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2522. if (polyvPlayerContext != null) {
  2523. this.playTime = polyvPlayerContext.getCurrentTime(); //播放时刻
  2524. // console.log('拍照啊', 789, this.photoHistoryList, 'this.photoList:', this.photoList)
  2525. //判断是否需要拍照
  2526. if (this.photoNum > 0) {
  2527. this.configPhoto();
  2528. let photoTime = 0; //获取拍照秒数
  2529. for (let i = 0; i < this.photoList.length; i++) {
  2530. photoTime = Number(this.photoList[i]); //获取拍照秒数
  2531. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  2532. //3秒区间内才触发拍照,避免拉动滚动条
  2533. if (
  2534. this.photoHistoryList.indexOf(i) < 0 &&
  2535. this.sectionItem.learning != 1
  2536. ) {
  2537. //不存在拍照历史,没有重修过,没有学过,则拍照
  2538. //启动拍照
  2539. //暂停
  2540. polyvPlayerContext.exitFullScreen();
  2541. polyvPlayerContext.pause();
  2542. if (uni.getStorageSync(`tabkePhotoShow${this.goodsId}`) == this.goodsId) {
  2543. this.photoIndex = i;
  2544. this.openPhoto();
  2545. } else {
  2546. this.popupPhotoShow = true
  2547. uni.setStorageSync(`tabkePhotoShow${this.goodsId}`, this.goodsId) // 本地缓存用来判断是否已经弹出过弹窗
  2548. }
  2549. }
  2550. }
  2551. }
  2552. }
  2553. }
  2554. },
  2555. closeToast() {
  2556. clearTimeout(this.toastTimer);
  2557. this.videoToastShow = false;
  2558. },
  2559. restart() {
  2560. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2561. polyvPlayerContext.seek(0);
  2562. clearTimeout(this.toastTimer);
  2563. this.videoToastShow = false;
  2564. },
  2565. // 新增用户视频学习日志
  2566. studyLog() {
  2567. this.$http({
  2568. url: '/user/study/log',
  2569. method: 'post',
  2570. data: {
  2571. goodsId: this.goodsId,
  2572. courseId: this.courseId,
  2573. moduleId: this.moduleId || 0,
  2574. chapterId: this.chapterId || 0,
  2575. sectionId: this.playSectionId || 0,
  2576. fromPlat: 1, //来源平台 1小程序 2PC网站
  2577. goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
  2578. orderGoodsId: this.orderGoodsId,
  2579. }
  2580. }).then((res) => {
  2581. })
  2582. },
  2583. onStateChange(newstate, oldstate) {
  2584. console.log('视频的开始播放事件', newstate.detail.newstate, this.needSeek)
  2585. if (newstate.detail.newstate == "playing") {
  2586. if (this.needSeek) {
  2587. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2588. if (this.recordObj.videoCurrentTime) {
  2589. polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
  2590. this.seekTime = this.$method.secondToDate(
  2591. this.recordObj.videoCurrentTime
  2592. );
  2593. this.videoToastShow = true;
  2594. this.toastTimer = setTimeout(() => {
  2595. this.videoToastShow = false;
  2596. }, 3000);
  2597. } else {
  2598. polyvPlayerContext.seek(1); //避免相同节继续播放
  2599. }
  2600. polyvPlayerContext.play();
  2601. this.needSeek = false;
  2602. // 新增用户视频学习日志
  2603. this.studyLog()
  2604. // 提交学习记录
  2605. }
  2606. //开始播放
  2607. if (this.timer) {
  2608. clearInterval(this.timer);
  2609. }
  2610. this.timer = setInterval(this.timeEvent, 1000); //定时器
  2611. }
  2612. if (newstate.detail.newstate == "pause") {
  2613. clearInterval(this.timer);
  2614. //暂停提交记录
  2615. /* this.ossAvatarUrl = ""
  2616. this.postStudyRecord() */
  2617. }
  2618. if (newstate.detail.newstate == "ended") {
  2619. clearInterval(this.timer);
  2620. uni.showToast({
  2621. icon: "none",
  2622. title: "播放完毕",
  2623. });
  2624. this.hasStart = false;
  2625. this.postStudyRecord(1);
  2626. this.nextSection()
  2627. // uni.$emit('playNext') //播放重修下一节
  2628. }
  2629. },
  2630. //播放下一节
  2631. nextSection(){
  2632. if(!this.menuAllList.length){
  2633. return
  2634. }
  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. let data = this.menuAllList[this.curPlayIndex+1];
  2642. if (!data) {
  2643. //第二个弹窗
  2644. uni.showModal({
  2645. title: '温馨提示',
  2646. content: '当前最后一节视频已学完 请检查所有章节是否学习完成?',
  2647. showCancel: false,
  2648. success: (res) => {
  2649. if (res.confirm) {
  2650. }
  2651. }
  2652. })
  2653. } else {
  2654. uni.showModal({
  2655. title: '温馨提示',
  2656. content: '当前节视频已学完,继续学习下一节?',
  2657. success: async (res) => {
  2658. if (res.confirm) {
  2659. this.moduleId = data.moduleId
  2660. this.chapterId = data.chapterId
  2661. this.sectionId = data.sectionId
  2662. if(data.sectionType == 1) { //录播
  2663. this.$store.commit("setPlaySectionId", { playSectionId: data.sectionId })
  2664. this.$store.commit("setPlayVID", { playVID: data.recordingUrl })
  2665. this.sectionItem = data;
  2666. await this.getPhotoLastRecord() // 获取拍照历史
  2667. this.playVideo(data)
  2668. } else if(data.sectionType == 2) { //直播
  2669. this.studyRecordGetLastLive();
  2670. } else if(data.sectionType == 3) { //回放
  2671. this.$store.commit("setPlaySectionId", { playSectionId: data.sectionId })
  2672. this.$store.commit("setPlayVID", { playVID: data.recordingUrl })
  2673. this.sectionItem = data
  2674. this.playVideo(data)
  2675. }
  2676. let playNextId = `moduleId${data.moduleId}chapterId${data.chapterId}sectionId${data.sectionId}`;
  2677. this.$store.commit("updatePlayNextId", playNextId);
  2678. this.updateChapterOpen(true)
  2679. this.reStart = false
  2680. this.getMenuList()
  2681. }
  2682. }
  2683. })
  2684. }
  2685. },
  2686. //拍照
  2687. openPhoto() {
  2688. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2689. if (polyvPlayerContext) {
  2690. polyvPlayerContext.exitFullScreen();
  2691. }
  2692. this.enableAutoRotation = false;
  2693. this.photoPopup = true;
  2694. this.isTaking = true;
  2695. uni.setKeepScreenOn({
  2696. keepScreenOn: true,
  2697. });
  2698. uni.authorize({
  2699. scope: "scope.camera",
  2700. success() {},
  2701. });
  2702. },
  2703. /**
  2704. * 人脸匹配
  2705. */
  2706. faceRecognition() {
  2707. return new Promise((resolve) => {
  2708. let fileSystem = uni.getFileSystemManager();
  2709. fileSystem.readFile({
  2710. filePath: `${this.avatarUrl}`,
  2711. encoding: "base64",
  2712. position: 0,
  2713. success: (res) => {
  2714. let base64 = "data:image/jpg;base64," + res.data;
  2715. console.log('base64Data人脸识别参数:', {
  2716. imageA: base64,
  2717. orderGoodsId: this.orderGoodsId,
  2718. gradeId: this.gradeId,
  2719. })
  2720. let timer = setTimeout(() => {
  2721. uni.showToast({
  2722. icon: "none",
  2723. title: '拍照超时,请重新拍照',
  2724. duration: 2000,
  2725. success: () => {
  2726. setTimeout(() => {
  2727. uni.navigateBack()
  2728. }, 1000)
  2729. }
  2730. })
  2731. }, 10 * 1000)
  2732. this.$api
  2733. .faceCertificationCompareFace({
  2734. imageA: base64,
  2735. orderGoodsId: this.orderGoodsId,
  2736. gradeId: this.gradeId,
  2737. })
  2738. .then((res) => {
  2739. clearTimeout(timer)
  2740. console.log(res, "人脸识别成功res");
  2741. resolve(res.data.data);
  2742. }).catch((err) => {
  2743. clearTimeout(timer)
  2744. // 当前网络延迟,
  2745. console.log('人脸识别错误:', err)
  2746. uni.showModal({
  2747. content: "当前网络延迟",
  2748. showCancel: false,
  2749. success: (resultst) => {
  2750. if (resultst.confirm) {
  2751. uni.navigateBack()
  2752. }
  2753. },
  2754. })
  2755. })
  2756. },
  2757. fail(err) {
  2758. // this.$u.toast('人脸识别错误!')
  2759. console.error(err, "err-----人脸识别错误");
  2760. },
  2761. });
  2762. });
  2763. },
  2764. // 确定拍照
  2765. async submit() {
  2766. if (this.uploadLock) {
  2767. return;
  2768. }
  2769. this.uploadLock = true;
  2770. let compareFaceData = await this.faceRecognition();
  2771. console.log(compareFaceData,'compareFaceData')
  2772. this.compareFaceData = compareFaceData
  2773. if (compareFaceData >= 80) {
  2774. const waitYS = await this.imageInfos();
  2775. this.postCoursePhotoRecord()
  2776. .then((res) => {
  2777. this.photoHistoryList.push(this.photoIndex);
  2778. this.postStudyRecord(); //提交记录
  2779. //恢复播放
  2780. uni.setKeepScreenOn({
  2781. keepScreenOn: false,
  2782. });
  2783. this.photoPopup = false;
  2784. this.uploadLock = false;
  2785. this.enableAutoRotation = true;
  2786. var polyvPlayerContext = this.selectComponent("#playerVideo");
  2787. if (polyvPlayerContext != null) {
  2788. polyvPlayerContext.play();
  2789. }
  2790. })
  2791. .catch((err) => {
  2792. uni.showToast({
  2793. title: "上传接口报错,请重新拍照上传" + err,
  2794. icon: "none",
  2795. });
  2796. this.uploadLock = false;
  2797. this.openPhoto();
  2798. });
  2799. } else {
  2800. uni.showToast({
  2801. title: "人脸匹配不通过,请重新拍照上传",
  2802. icon: "none",
  2803. duration: 2000,
  2804. });
  2805. setTimeout(() => {
  2806. this.uploadLock = false;
  2807. this.openPhoto();
  2808. }, 2000);
  2809. }
  2810. },
  2811. reTake() {
  2812. this.isTaking = true;
  2813. },
  2814. toTakePhoto() {
  2815. this.popupPhotoShow = false
  2816. this.openPhoto()
  2817. },
  2818. takePhTips() {
  2819. this.popupPhotoShow = true
  2820. this.isTaking = false
  2821. this.photoPopup = false
  2822. this.enableAutoRotation = false
  2823. },
  2824. //确认拍照
  2825. takePhoto() {
  2826. var self = this;
  2827. const ctx = uni.createCameraContext();
  2828. ctx.takePhoto({
  2829. quality: "high",
  2830. success: (res) => {
  2831. self.avatarUrl = res.tempImagePath;
  2832. this.isTaking = false;
  2833. },
  2834. fail: (err) => {
  2835. },
  2836. });
  2837. },
  2838. playError(e) {
  2839. console.log(e);
  2840. },
  2841. //拍照报错
  2842. error(e) {
  2843. console.log(e.detail);
  2844. },
  2845. //关闭相机
  2846. closePhoto() {
  2847. this.photoPopup = false;
  2848. self.enableAutoRotation = true;
  2849. },
  2850. /**
  2851. * 进入全屏
  2852. */
  2853. fullscreenchange(event) {
  2854. if (event.detail.direction == "vertical") {
  2855. this.navShow = true;
  2856. } else if (event.detail.direction == "horizontal") {
  2857. this.navShow = false;
  2858. }
  2859. },
  2860. getGoodsDetail() {
  2861. let self = this;
  2862. // '/goods/'+ data,
  2863. this.$api.goodsDetail(this.goodsId).then((res) => {
  2864. this.goodsData = res.data.data;
  2865. if(self.goodsData.buyNote) {
  2866. this.baseHandoutTipList()
  2867. }
  2868. self.gradeId = self.goodsData.gradeId;
  2869. this.courseBusiness(this.goodsData.businessId);
  2870. this.courseHandouts();
  2871. self.getMenuList();
  2872. self.getReMenuList(); //获取重修目录
  2873. setTimeout(function () {
  2874. if (!self.needProfileModal) {
  2875. self.getGradeInfo();
  2876. }
  2877. }, 500);
  2878. //获取节笔记
  2879. this.getNoteList();
  2880. if (self.goodsData.goodsPlayConfig) {
  2881. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  2882. if (self.goodsPlayConfig.autoPlay > 0) {
  2883. self.autoplay = true;
  2884. }
  2885. if (self.goodsPlayConfig.drag > 0) {
  2886. self.isAllowSeek = "yes";
  2887. }
  2888. if (self.goodsPlayConfig.speed > 0) {
  2889. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  2890. }
  2891. }
  2892. if (self.goodsData.goodsPhotographConfig) {
  2893. self.goodsPhotographConfig = JSON.parse(
  2894. self.goodsData.goodsPhotographConfig
  2895. );
  2896. if (self.goodsPhotographConfig.photoNum > 0) {
  2897. self.photoNum = self.goodsPhotographConfig.photoNum;
  2898. // console.log(self.photoNum, 777777);
  2899. }
  2900. }
  2901. });
  2902. },
  2903. startVideo() {
  2904. this.startStatus = true;
  2905. },
  2906. getAnswerList() {
  2907. let self = this;
  2908. this.$api
  2909. .answerList({ courseId: this.courseId, goodsId: this.goodsId,orderGoodsId: this.orderGoodsId, })
  2910. .then((res) => {
  2911. if (res.data.code == 200) {
  2912. self.answerList = res.data.rows;
  2913. }
  2914. });
  2915. },
  2916. getReMenuList() {
  2917. // console.log('重修的目录');
  2918. let self = this;
  2919. this.$api
  2920. .reMenuList({
  2921. orderGoodsId: this.orderGoodsId,
  2922. courseId: this.courseId,
  2923. rebuild: 1,
  2924. gradeId: this.gradeId,
  2925. })
  2926. .then((res) => {
  2927. if (res.data.code == 200) {
  2928. for (let i = 0; i < res.data.rows.length; i++) {
  2929. let item = res.data.rows[i];
  2930. item.down = true;
  2931. item.id = item.menuId;
  2932. item.name = item.menuName;
  2933. }
  2934. self.reMenuList = res.data.rows;
  2935. if (self.reMenuList.length > 0) {
  2936. this.showNotes = false;
  2937. self.list = [
  2938. {
  2939. name: "目录",
  2940. },
  2941. {
  2942. name: "讲义",
  2943. },
  2944. {
  2945. name: "笔记",
  2946. },
  2947. {
  2948. name: "答疑",
  2949. },
  2950. { name: "重修目录" },
  2951. ];
  2952. this.current = 0;
  2953. if (Object.keys(this.sectionItem).length) {
  2954. let playNextIdisRebuild = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}isRebuild`;
  2955. this.$store.commit("updatePlayNextId", playNextIdisRebuild);
  2956. }
  2957. } else {
  2958. if (Object.keys(this.sectionItem).length) {
  2959. let playNextId = `moduleId${this.sectionItem.moduleId}chapterId${this.sectionItem.chapterId}sectionId${this.sectionItem.sectionId}`;
  2960. this.$store.commit("updatePlayNextId", playNextId);
  2961. }
  2962. self.list = [
  2963. {
  2964. name: "目录",
  2965. },
  2966. {
  2967. name: "讲义",
  2968. },
  2969. {
  2970. name: "笔记",
  2971. },
  2972. {
  2973. name: "答疑",
  2974. },
  2975. ];
  2976. this.current = 0;
  2977. }
  2978. }
  2979. });
  2980. },
  2981. getMenuList() {
  2982. // console.log('menuList的目录');
  2983. let self = this;
  2984. // /course/menuList 查询课程目录结构列表
  2985. this.$api
  2986. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
  2987. .then((res) => {
  2988. if (res.data.code == 200) {
  2989. for (let i = 0; i < res.data.rows.length; i++) {
  2990. let item = res.data.rows[i];
  2991. item.down = true;
  2992. item.id = item.menuId;
  2993. item.name = item.menuName;
  2994. item.menuType = item.type;
  2995. }
  2996. self.menuList = res.data.rows;
  2997. this.reStart = true
  2998. for (let i = 0; i < res.data.rows.length; i++) {
  2999. if (res.data.rows[i].type == 1) {
  3000. // 模块
  3001. if (Object.keys(this.sectionItem).length) {
  3002. if (res.data.rows[i].menuId == this.sectionItem.moduleId) {
  3003. this.menuIndex = [i];
  3004. break;
  3005. }
  3006. } else {
  3007. this.menuIndex = [i];
  3008. break;
  3009. }
  3010. } else if (res.data.rows[i].type == 2) {
  3011. // 章
  3012. if (Object.keys(this.sectionItem).length) {
  3013. if (res.data.rows[i].menuId == this.sectionItem.chapterId && (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)) {
  3014. this.menuIndex = [i];
  3015. break;
  3016. }
  3017. } else {
  3018. this.menuIndex = [i];
  3019. break;
  3020. }
  3021. }
  3022. }
  3023. console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
  3024. }
  3025. });
  3026. },
  3027. courseDetail() {
  3028. let self = this;
  3029. // '/course/'+data,
  3030. this.$api.courseDetail(this.courseId).then((res) => {
  3031. if (res.data.code == 200) {
  3032. // if (res.data.data.educationName == "继续教育") {
  3033. this.$api
  3034. .lockLockAction({
  3035. action: "jxjy",
  3036. uuid:this.$method.getUuid()
  3037. })
  3038. .then((res) => {});
  3039. this.lockTimer = setInterval(() => {
  3040. this.$api
  3041. .lockLockAction({
  3042. action: "jxjy",
  3043. uuid:this.$method.getUuid()
  3044. })
  3045. .then((res) => {});
  3046. }, 10000);
  3047. // websocket.sendMsg("doCourse");
  3048. // }
  3049. self.detail = res.data.data;
  3050. }
  3051. });
  3052. },
  3053. open(item) {
  3054. item.showChildren = !item.showChildren;
  3055. },
  3056. change(index) {
  3057. this.current = index;
  3058. },
  3059. openDocument() {
  3060. this.downLoading = true
  3061. let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl);
  3062. uni.downloadFile({
  3063. url: url,
  3064. success: (res) => {
  3065. var filePath = res.tempFilePath;
  3066. uni.openDocument({
  3067. filePath: filePath,
  3068. showMenu: this.courseHandoutsData.canDownload == 1 ? true : false,
  3069. success: (res) => {
  3070. this.downLoading = false
  3071. uni.setStorageSync('current', this.current)
  3072. },
  3073. fail: (err) => {
  3074. this.downLoading = false
  3075. uni.showToast({
  3076. icon: "none",
  3077. title: "文档地址错误",
  3078. });
  3079. },
  3080. });
  3081. },
  3082. fail: (err) => {
  3083. this.downLoading = false
  3084. uni.showModal({
  3085. title: "提示",
  3086. content: "文档错误," + err.errMsg,
  3087. showCancel: false,
  3088. });
  3089. },
  3090. });
  3091. },
  3092. clickMulu() {
  3093. this.muluStyle = !this.muluStyle
  3094. }
  3095. },
  3096. };
  3097. </script>
  3098. <style lang="scss" scope>
  3099. @import './css/detail.scss';
  3100. .top {
  3101. &__header {
  3102. position:relative;
  3103. width:100%;
  3104. height:150rpx;
  3105. padding:24rpx 150rpx 24rpx 24rpx;
  3106. .img {
  3107. position:absolute;
  3108. left:0;
  3109. top:0;
  3110. width:100%;
  3111. }
  3112. .note {
  3113. position:relative;
  3114. z-index: 10;
  3115. font-size: 24rpx;
  3116. font-family: PingFang SC;
  3117. font-weight: bold;
  3118. color: #EFDBFF;
  3119. }
  3120. .title {
  3121. position:relative;
  3122. z-index: 10;
  3123. font-size: 26rpx;
  3124. font-family: PingFang SC;
  3125. font-weight: bold;
  3126. color: #FFFFFF;
  3127. }
  3128. }
  3129. }
  3130. #top {
  3131. position: relative;
  3132. z-index: 99;
  3133. }
  3134. .polyv_detail {
  3135. display: flex;
  3136. flex-direction: column;
  3137. height: 100vh;
  3138. position: relative;
  3139. top: 0;
  3140. left: 0;
  3141. .pops {
  3142. position: absolute;
  3143. top: 0;
  3144. left: 0;
  3145. background: #ccc;
  3146. opacity: 0.5;
  3147. width: 100%;
  3148. height: 300rpx;
  3149. z-index: 9999;
  3150. }
  3151. .box {
  3152. flex: 1;
  3153. overflow: hidden;
  3154. margin: 16rpx 16rpx 100rpx 16rpx;
  3155. .box_in {
  3156. height: 100%;
  3157. }
  3158. }
  3159. .first_ml {
  3160. margin: 16rpx 16rpx 16rpx 16rpx;
  3161. }
  3162. }
  3163. .btnSet {
  3164. width: 440rpx;
  3165. height: 80rpx;
  3166. background: #007aff;
  3167. border-radius: 40rpx;
  3168. color: #ffffff;
  3169. font-size: 28rpx;
  3170. line-height: 80rpx;
  3171. }
  3172. .btnReply {
  3173. width: 80rpx;
  3174. height: 40rpx;
  3175. background: #e3f0ff;
  3176. border-radius: 16rpx;
  3177. text-align: center;
  3178. color: #007aff;
  3179. }
  3180. .btnDel {
  3181. width: 80rpx;
  3182. height: 40rpx;
  3183. background: #ffedf0;
  3184. border-radius: 16rpx;
  3185. text-align: center;
  3186. color: #ff2d55;
  3187. }
  3188. .btnReply {
  3189. width: 80rpx;
  3190. height: 40rpx;
  3191. background: #e3f0ff;
  3192. border-radius: 16rpx;
  3193. font-size: 24rpx;
  3194. }
  3195. .lecture-box {
  3196. display: flex;
  3197. align-items: center;
  3198. height: 80rpx;
  3199. background: #ffffff;
  3200. border-radius: 16rpx 16rpx 16rpx 16rpx;
  3201. .title {
  3202. padding: 10rpx;
  3203. flex: 1;
  3204. overflow: hidden;
  3205. text-overflow: ellipsis;
  3206. white-space: nowrap;
  3207. color: #333;
  3208. font-weight: bold;
  3209. font-size: 32rpx;
  3210. }
  3211. .btn {
  3212. display: flex;
  3213. align-items: center;
  3214. justify-content: center;
  3215. width: 80rpx;
  3216. height: 80rpx;
  3217. background: #ffffff;
  3218. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
  3219. border-radius: 16rpx 16rpx 16rpx 16rpx;
  3220. }
  3221. @keyframes rotation{
  3222. from {-webkit-transform: rotate(0deg);}
  3223. to {-webkit-transform: rotate(360deg);}
  3224. }
  3225. .loading_down {
  3226. transform: rotate(360deg);
  3227. animation: rotation 3s linear infinite;
  3228. }
  3229. }
  3230. .lecture-content {
  3231. background: #fff;
  3232. margin-top: 10rpx;
  3233. padding: 10rpx;
  3234. border-radius: 16rpx;
  3235. }
  3236. .photoBox {
  3237. width: 100%;
  3238. // background-color: #ffffff;
  3239. // border-radius: 24px 24px 0px 0px;
  3240. .photoTop {
  3241. width: 100%;
  3242. height: 74rpx;
  3243. border-radius: 20px 20px 0px 0px;
  3244. background-color: #ffffff;
  3245. display: flex;
  3246. align-items: center;
  3247. justify-content: center;
  3248. padding: 0rpx 38rpx;
  3249. .sqzz {
  3250. width: 28rpx;
  3251. height: 28rpx;
  3252. display: flex;
  3253. align-items: center;
  3254. justify-content: center;
  3255. }
  3256. .centersq {
  3257. color: #333;
  3258. font-size: 30rpx;
  3259. font-weight: 500;
  3260. }
  3261. }
  3262. .photoCenter {
  3263. width: 750rpx;
  3264. height: 75vh;
  3265. position: relative;
  3266. .center_camera {
  3267. width: 100%;
  3268. height: 75vh;
  3269. position: fixed;
  3270. .head_take {
  3271. width: 100%;
  3272. height: 75vh;
  3273. display: flex;
  3274. flex-direction: column;
  3275. }
  3276. .headTake_up {
  3277. width: 100%;
  3278. height: 100rpx;
  3279. }
  3280. .headTake_minddle {
  3281. display: flex;
  3282. .min_img {
  3283. width: 500rpx;
  3284. height: 550rpx;
  3285. }
  3286. .min_left, .min_right {
  3287. flex: 1;
  3288. height: 550rpx;
  3289. }
  3290. }
  3291. .headTake_down {
  3292. width: 100%;
  3293. flex: 1;
  3294. }
  3295. .color {
  3296. background-color: #333;
  3297. opacity: 0.5;
  3298. }
  3299. }
  3300. .custom {
  3301. width: 750rpx;
  3302. height: 75vh;
  3303. position: absolute;
  3304. z-index: 1000;
  3305. top: 0;
  3306. left: 0;
  3307. image {
  3308. width: 100%;
  3309. height: 100%;
  3310. }
  3311. }
  3312. }
  3313. .btns {
  3314. display: flex;
  3315. .takePhoto_btn {
  3316. width: 100%;
  3317. display: flex;
  3318. align-items: center;
  3319. justify-content: space-between;
  3320. background: #A9A7A9;
  3321. padding: 40rpx 26rpx;
  3322. .middle_btn {
  3323. width: 120rpx;
  3324. height: 120rpx;
  3325. border-radius: 40rpx;
  3326. border: 4rpx solid #FFFFFF;
  3327. display: flex;
  3328. align-items: center;
  3329. justify-content: center;
  3330. }
  3331. .square {
  3332. width: 96rpx;
  3333. height: 96rpx;
  3334. background: #FFFFFF;
  3335. border-radius: 28rpx;
  3336. }
  3337. .rights {
  3338. font-size: 32rpx;
  3339. font-weight: 500;
  3340. color: #FFFFFF;
  3341. }
  3342. }
  3343. .btnResult {
  3344. height: 100rpx;
  3345. flex: 1;
  3346. background-color: #07c160;
  3347. text-align: center;
  3348. line-height: 100rpx;
  3349. color: #fff;
  3350. font-size: 32rpx;
  3351. font-weight: bold;
  3352. }
  3353. }
  3354. }
  3355. .chat_box {
  3356. display: flex;
  3357. padding: 20rpx;
  3358. justify-content: space-between;
  3359. }
  3360. .chat3 {
  3361. font-size: 30rpx;
  3362. font-family: PingFang SC;
  3363. font-weight: 500;
  3364. color: #666666;
  3365. margin-top: 10rpx;
  3366. }
  3367. .chat2 {
  3368. font-size: 20rpx;
  3369. font-family: PingFang SC;
  3370. font-weight: 500;
  3371. color: #999999;
  3372. margin-top: 10rpx;
  3373. }
  3374. .chat1 {
  3375. font-size: 24rpx;
  3376. font-family: PingFang SC;
  3377. font-weight: 500;
  3378. color: #333333;
  3379. }
  3380. .leftPadding {
  3381. margin-left: 8rpx;
  3382. }
  3383. .t2Content {
  3384. font-size: 24rpx;
  3385. font-family: PingFang SC;
  3386. font-weight: bold;
  3387. color: #999999;
  3388. line-height: 48rpx;
  3389. }
  3390. .tBox2 {
  3391. display: flex;
  3392. padding-top: 10rpx;
  3393. color: #333333;
  3394. font-size: 30rpx;
  3395. font-weight: 400;
  3396. }
  3397. .tBox {
  3398. display: flex;
  3399. align-items: center;
  3400. padding-top: 10rpx;
  3401. }
  3402. .title {
  3403. font-size: 24rpx;
  3404. color: #999999;
  3405. }
  3406. .Answering {
  3407. .answer_item {
  3408. &:nth-child(2) {
  3409. border-radius: 16rpx 16rpx 0rpx 0rpx;
  3410. }
  3411. &:nth-last-child(1) {
  3412. border-radius: 0rpx 0rpx 16rpx 16rpx;
  3413. }
  3414. }
  3415. }
  3416. .inputBottom {
  3417. position: fixed;
  3418. left: 0;
  3419. bottom: 0;
  3420. background: #ffffff;
  3421. height: 98rpx;
  3422. display: flex;
  3423. align-items: center;
  3424. width: 100%;
  3425. .flex_auto {
  3426. flex: 1;
  3427. margin-left: 10%;
  3428. // .input {
  3429. // height: 60rpx;
  3430. // }
  3431. }
  3432. .btn {
  3433. color: #007aff;
  3434. font-size: 30rpx;
  3435. font-weight: bold;
  3436. width: 15%;
  3437. text-align: center;
  3438. }
  3439. .input {
  3440. background: rgba(244, 244, 244, 0.98);
  3441. height: 60rpx;
  3442. border-radius: 24rpx;
  3443. margin-top: 12rpx;
  3444. }
  3445. }
  3446. .noteBox {
  3447. width: 100%;
  3448. background: #ffffff;
  3449. padding: 0rpx 10rpx 20rpx;
  3450. border-radius: 16rpx;
  3451. overflow: hidden;
  3452. .left_ti {
  3453. padding-top: 14rpx;
  3454. }
  3455. }
  3456. .dateBox {
  3457. width: 216rpx;
  3458. height: 48rpx;
  3459. background: #ffffff;
  3460. border-radius: 24rpx;
  3461. font-size: 24rpx;
  3462. color: #666666;
  3463. text-align: center;
  3464. line-height: 48rpx;
  3465. margin: 16rpx 0rpx 8rpx;
  3466. }
  3467. .t_content1 {
  3468. color: #007aff;
  3469. margin-left: 10rpx;
  3470. }
  3471. .tag1 {
  3472. border: 2rpx solid #007aff;
  3473. border-radius: 8rpx;
  3474. font-size: 20rpx;
  3475. color: #007aff;
  3476. padding: 5rpx;
  3477. }
  3478. .b_title {
  3479. color: #333333;
  3480. font-size: 30rpx;
  3481. font-weight: bold;
  3482. }
  3483. page {
  3484. background: #eaeef1;
  3485. }
  3486. .menuBox {
  3487. width: 100%;
  3488. background: #ffffff;
  3489. border-radius: 16rpx;
  3490. padding: 0rpx 20rpx;
  3491. margin-bottom: 20rpx;
  3492. }
  3493. .btnspric {
  3494. border-top: 1rpx solid #eee;
  3495. display: flex;
  3496. align-items: center;
  3497. justify-content: space-between;
  3498. height: 108rpx;
  3499. padding-left: 43rpx;
  3500. padding-right: 32rpx;
  3501. }
  3502. .btnspric > .lefprL {
  3503. font-size: 36rpx;
  3504. color: #0c141f;
  3505. font-weight: bold;
  3506. }
  3507. .btnspric > .lefprR {
  3508. padding: 0rpx 24rpx;
  3509. height: 60rpx;
  3510. line-height: 60rpx;
  3511. text-align: center;
  3512. color: #fff;
  3513. background: #32467b;
  3514. border-radius: 24rpx;
  3515. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  3516. }
  3517. .yhj,
  3518. .hdyhj {
  3519. padding: 24rpx 29rpx 24rpx 34rpx;
  3520. }
  3521. .yhj {
  3522. border-bottom: 16rpx solid #f9f9f9;
  3523. }
  3524. .yhjtit {
  3525. font-size: 30rpx;
  3526. color: #0c141f;
  3527. font-weight: 500;
  3528. margin-bottom: 14rpx;
  3529. }
  3530. .yhjList {
  3531. display: flex;
  3532. align-items: center;
  3533. justify-content: space-between;
  3534. margin-bottom: 14rpx;
  3535. }
  3536. .yhjList > .yhjLefts {
  3537. display: flex;
  3538. align-items: center;
  3539. }
  3540. .yhjLefts > .yhl {
  3541. color: #32467b;
  3542. font-size: 30rpx;
  3543. margin-right: 31rpx;
  3544. }
  3545. .yhjLefts > .yhbq {
  3546. font-size: 24rpx;
  3547. color: #ff9500;
  3548. border-radius: 18rpx;
  3549. background-color: rgba(255, 149, 0, 0.2);
  3550. border: 2rpx solid #ff9500;
  3551. height: 38rpx;
  3552. line-height: 38rpx;
  3553. padding: 0rpx 16rpx;
  3554. }
  3555. .ts {
  3556. font-size: 24rpx;
  3557. color: #999;
  3558. margin: 14rpx 0rpx;
  3559. padding-right: 29rpx;
  3560. padding-left: 34rpx;
  3561. }
  3562. .yh {
  3563. padding-top: 20rpx;
  3564. }
  3565. .yh > .yhtitle {
  3566. display: flex;
  3567. align-items: center;
  3568. justify-content: space-between;
  3569. padding-right: 29rpx;
  3570. padding-left: 34rpx;
  3571. }
  3572. .priceBxs {
  3573. display: flex;
  3574. align-items: center;
  3575. }
  3576. .priceBxs > .pricleft {
  3577. border-radius: 24rpx;
  3578. border: 1rpx solid #e91313;
  3579. background-color: rgba(233, 19, 19, 0.1);
  3580. padding: 0rpx 18rpx;
  3581. height: 49rpx;
  3582. line-height: 49rpx;
  3583. text-align: center;
  3584. font-size: 30rpx;
  3585. font-weight: 500;
  3586. color: #e91313;
  3587. margin-right: 13rpx;
  3588. }
  3589. .topBox {
  3590. padding: 32rpx 32rpx 24rpx;
  3591. border-bottom: 1rpx solid #eeeeee;
  3592. }
  3593. .topBox > .boldFonstType {
  3594. font-weight: 500;
  3595. font-size: 30rpx;
  3596. margin: 16rpx 0rpx 23rpx;
  3597. }
  3598. .topBox > .firstTopL {
  3599. display: flex;
  3600. align-items: center;
  3601. }
  3602. .topBox > .firstTopL > .imageBs {
  3603. width: 331rpx;
  3604. height: 160rpx;
  3605. border-radius: 6rpx;
  3606. overflow: hidden;
  3607. margin-right: 8rpx;
  3608. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  3609. }
  3610. .topBox > .firstTopL > .imageBs > image {
  3611. width: 100%;
  3612. height: 100%;
  3613. }
  3614. .topBox > .firstTopL > .textBs {
  3615. font-size: 30rpx;
  3616. font-weight: bold;
  3617. color: #0c141f;
  3618. }
  3619. .content {
  3620. padding: 24rpx;
  3621. text-align: left;
  3622. }
  3623. .catalogBox {
  3624. display: flex;
  3625. align-items: center;
  3626. flex-wrap: nowrap;
  3627. overflow-x: auto;
  3628. padding-left: 38rpx;
  3629. max-height: 305rpx;
  3630. overflow-y: auto;
  3631. transition: all 0.4s;
  3632. }
  3633. .catalogBox > .catalogA {
  3634. min-width: 200rpx;
  3635. height: 48rpx;
  3636. line-height: 48rpx;
  3637. // text-align: center;
  3638. border: 2rpx solid transparent;
  3639. white-space: nowrap;
  3640. text-overflow: ellipsis;
  3641. overflow: hidden;
  3642. word-break: break-all;
  3643. border-radius: 10rpx;
  3644. background: rgba(22, 119, 255, 0.05);
  3645. padding-left: 19rpx;
  3646. box-sizing: border-box;
  3647. padding-right: 15rpx;
  3648. margin-right: 16rpx;
  3649. margin-bottom: 20rpx;
  3650. margin-top: 15rpx;
  3651. font-size: 24rpx;
  3652. color: #666;
  3653. }
  3654. .catalogBox > .activesq {
  3655. border-color: #1677ff;
  3656. }
  3657. .changeCatalogBox {
  3658. display: block;
  3659. }
  3660. .catalogBox::-webkit-scrollbar {
  3661. display: none; /* Chrome Safari */
  3662. }
  3663. .price_t2 {
  3664. font-size: 18rpx;
  3665. font-family: PingFang SC;
  3666. font-weight: 500;
  3667. text-decoration: line-through;
  3668. color: #999999;
  3669. }
  3670. .price_t1 {
  3671. font-size: 33rpx;
  3672. font-family: PingFang SC;
  3673. font-weight: bold;
  3674. color: #e91313;
  3675. }
  3676. .sc_t {
  3677. font-size: 22rpx;
  3678. color: #000000;
  3679. }
  3680. .sc {
  3681. width: 29rpx;
  3682. height: 29rpx;
  3683. }
  3684. .buy {
  3685. width: 138rpx;
  3686. height: 48rpx;
  3687. line-height: 48rpx;
  3688. background: #32467b;
  3689. border-radius: 10rpx;
  3690. color: #ffffff;
  3691. font-size: 28rpx;
  3692. text-align: center;
  3693. vertical-align: middle;
  3694. position: absolute;
  3695. right: 30rpx;
  3696. }
  3697. .video_body {
  3698. padding-bottom: 96rpx;
  3699. }
  3700. .footer_tab {
  3701. position: fixed;
  3702. bottom: 0;
  3703. height: 96rpx;
  3704. width: 100%;
  3705. background-color: #ffffff;
  3706. }
  3707. .tj_box {
  3708. width: 50%;
  3709. display: inline-block;
  3710. text-align: center;
  3711. margin: 10rpx 0;
  3712. }
  3713. .teacher_t {
  3714. font-size: 24rpx;
  3715. font-family: PingFang SC;
  3716. font-weight: 400;
  3717. color: #666666;
  3718. line-height: 36rpx;
  3719. margin-left: 15rpx;
  3720. }
  3721. .teacher_img {
  3722. width: 87rpx;
  3723. height: 129rpx;
  3724. }
  3725. .t2 {
  3726. font-size: 24rpx;
  3727. font-family: PingFang SC;
  3728. color: #666666;
  3729. line-height: 36rpx;
  3730. margin: 15rpx;
  3731. }
  3732. .r_t2 {
  3733. width: 201rpx;
  3734. height: 49rpx;
  3735. background: rgba(22, 119, 255, 0.05);
  3736. border: 1rpx solid #32467b;
  3737. border-radius: 16rpx;
  3738. color: #666666;
  3739. font-size: 23rpx;
  3740. text-align: center;
  3741. display: flex;
  3742. align-items: center;
  3743. padding: 5rpx;
  3744. }
  3745. .scroll_box {
  3746. width: 100%;
  3747. height: 60rpx;
  3748. background: #ffffff;
  3749. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  3750. white-space: nowrap;
  3751. overflow: hidden;
  3752. margin: 15rpx 0;
  3753. }
  3754. .r_sliper {
  3755. padding: 0 20rpx;
  3756. }
  3757. .top_line {
  3758. width: 6rpx;
  3759. height: 22rpx;
  3760. background: #32467b;
  3761. margin-right: 10rpx;
  3762. }
  3763. .video_t2 {
  3764. font-size: 24rpx;
  3765. font-family: PingFang SC;
  3766. font-weight: 500;
  3767. color: #666666;
  3768. }
  3769. .video_play {
  3770. position: absolute;
  3771. width: 95rpx;
  3772. height: 95rpx;
  3773. top: 0;
  3774. left: 0;
  3775. right: 0;
  3776. bottom: 0;
  3777. margin: auto;
  3778. }
  3779. .video_box {
  3780. position: relative;
  3781. #playerVideo {
  3782. position: relative;
  3783. z-index: 99;
  3784. }
  3785. .video-toast {
  3786. position: absolute;
  3787. width: 686rpx;
  3788. height: 80rpx;
  3789. background: rgba(0, 0, 0, 0.6);
  3790. border-radius: 24rpx;
  3791. bottom: 100rpx;
  3792. left: 50%;
  3793. transform: translateX(-50%);
  3794. color: #fff;
  3795. display: flex;
  3796. font-size: 26rpx;
  3797. align-items: center;
  3798. overflow: visible;
  3799. &__text {
  3800. flex: 1;
  3801. margin-left: 40rpx;
  3802. }
  3803. &__btn {
  3804. width: 180rpx;
  3805. text-align: center;
  3806. border-left: 1rpx solid #fff;
  3807. }
  3808. }
  3809. .video-toast__close {
  3810. position: absolute;
  3811. right: 32rpx;
  3812. bottom: 184rpx;
  3813. width: 40rpx;
  3814. height: 40rpx;
  3815. line-height: 40rpx;
  3816. text-align: center;
  3817. background: rgba(0, 0, 0, 0.6);
  3818. border-radius: 50%;
  3819. color: rgba(255, 255, 255, 0.3);
  3820. }
  3821. }
  3822. .rotoct {
  3823. transform: rotate(90deg);
  3824. }
  3825. .slot-content {
  3826. padding: 0 20rpx;
  3827. }
  3828. .notice_modal {
  3829. .content {
  3830. width: 100%;
  3831. height: 100%;
  3832. padding: 56rpx 56rpx 56rpx 64rpx;
  3833. .title {
  3834. color: #222;
  3835. line-height: 40rpx;
  3836. font-size: 36rpx;
  3837. text-align: center;
  3838. font-weight: bold;
  3839. margin-bottom: 24rpx;
  3840. }
  3841. .text {
  3842. height: 340rpx;
  3843. line-height: 40rpx;
  3844. text-indent: 2em;
  3845. font-size: 32rpx;
  3846. color: #222;
  3847. }
  3848. .had_read {
  3849. width: 100%;
  3850. height: 88rpx;
  3851. line-height: 88rpx;
  3852. text-align: center;
  3853. background: #3577E8;
  3854. border-radius: 240rpx;
  3855. font-size: 32rpx;
  3856. font-weight: 500;
  3857. color: #fff;
  3858. margin-top: 20rpx;
  3859. &.gray {
  3860. background: #BBBEC5;
  3861. }
  3862. }
  3863. }
  3864. }
  3865. .full_mulu {
  3866. position: absolute;
  3867. top: 100rpx;
  3868. right: 20rpx;
  3869. width: 700rpx;
  3870. height: 515rpx;
  3871. color: #333;
  3872. display: flex;
  3873. align-items: center;
  3874. justify-content: space-between;
  3875. z-index: 99999;
  3876. .mulus {
  3877. width: 623rpx;
  3878. // height: 515rpx;
  3879. height: 400rpx;
  3880. overflow-y: scroll;
  3881. // overflow: scroll;
  3882. }
  3883. .mulu_box_in {
  3884. background-color: #b7b7b7;
  3885. border-radius: 16rpx;
  3886. // transition: all 0.5s;
  3887. &::after {
  3888. content: "";
  3889. width: 0;
  3890. height: 0;
  3891. position: absolute;
  3892. top: 235rpx;
  3893. right: 27px;
  3894. border-top: 16rpx solid transparent;
  3895. border-right: 16rpx solid transparent;
  3896. border-left: 16rpx solid #b7b7b7;
  3897. border-bottom: 16rpx solid transparent;
  3898. }
  3899. }
  3900. .mulu_box_out {
  3901. // visibility: hidden;
  3902. display: none;
  3903. }
  3904. .menuBox_mulu {
  3905. // width: 100%;
  3906. background: #ffffff;
  3907. border-radius: 16rpx;
  3908. padding: 0rpx 20rpx;
  3909. margin-bottom: 20rpx;
  3910. }
  3911. .ml_img {
  3912. position: absolute;
  3913. right: 0;
  3914. top: 100rpx;
  3915. }
  3916. .items {
  3917. width: 620rpx;
  3918. height: 100rpx;
  3919. border: 1rpx solid red;
  3920. }
  3921. }
  3922. </style>