detail.vue 120 KB

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