detail.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571
  1. <template>
  2. <view>
  3. <view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;top: 0;" id="top">
  4. <view class="video_box" v-if="!startStatus">
  5. <image :src="$method.splitImgHost(detail.coverUrl)" style="width: 100%;height: 460rpx;"></image>
  6. <image v-if="false" class="video_play" src="/static/play.png" @click="startVideo"></image>
  7. </view>
  8. <view v-else class="video_box" style="width: 100%;height: 460rpx;">
  9. <polyv-player
  10. id="playerVideo"
  11. playerId="playerVideo"
  12. height="460rpx"
  13. :vid="vid"
  14. :showSettingBtn="true"
  15. :enablePlayGesture="true"
  16. @statechange="onStateChange"
  17. :autoplay="autoplay"
  18. :isAllowSeek="isAllowSeek"
  19. :playbackRate="playbackRate"
  20. :startTime="startTime"
  21. ></polyv-player>
  22. </view>
  23. <view>
  24. <u-row>
  25. <u-col span="10">
  26. <view class="video_t1">{{ detail.courseName }}</view>
  27. </u-col>
  28. <u-col span="2" v-if="false">
  29. <view class="video_t1_t" @click="openJY">
  30. <image src="/static/icon/jy_icon.png" style="width: 40rpx;height: 40rpx;"></image>
  31. 讲义
  32. </view>
  33. </u-col>
  34. </u-row>
  35. </view>
  36. <u-line color="#D6D6DB" />
  37. <view style="display: flex;justify-content: center;">
  38. <view><u-tabs :list="list" font-size="24" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
  39. </view>
  40. <u-line color="#D6D6DB" />
  41. </view>
  42. <view class="box">
  43. <!--目录 -->
  44. <view v-show="current == 0">
  45. <view class="menuBox" v-for="(item, index) in menuList" :key="index">
  46. <!--模块 -->
  47. <view v-if="item.type == 1"><courseModule :learningOrder="businessData.goodsLearningOrder" :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
  48. <!--章 -->
  49. <view v-if="item.type == 2"><courseChapter :learningOrder="businessData.goodsLearningOrder" :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
  50. <!--节 -->
  51. <view v-if="item.type == 3"><courseSection :learningOrder="businessData.goodsLearningOrder" :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
  52. </view>
  53. </view>
  54. <!--讲义 -->
  55. <view v-show="current == 1">
  56. <view class="lecture-box">
  57. <view class="title">
  58. 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略
  59. </view>
  60. <view class="btn" @click="openDocument">
  61. <u-icon name="download" color="#007AFF" size="40"></u-icon>
  62. </view>
  63. </view>
  64. <view class="lecture-content">
  65. <rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
  66. </view>
  67. <view class="inputBottom">
  68. <view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
  69. <view style="width: 73%;height: 100%;padding: 10rpx 0;">
  70. <u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
  71. </view>
  72. <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
  73. </view>
  74. </view>
  75. <!--笔记 -->
  76. <view v-show="current == 2">
  77. <view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
  78. <view class="inputBottom">
  79. <view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
  80. <view style="width: 73%;height: 100%;padding: 10rpx 0;">
  81. <u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
  82. </view>
  83. <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
  84. </view>
  85. <view v-for="(item, index) in noteList" :key="index">
  86. <view class="dateBox">{{ $method.timestampToTime(item.dateNote) }}</view>
  87. <view class="noteBox">
  88. <view v-for="(item1, index1) in item.userNotes" :key="index1" style="margin-top: 30rpx;" @click="jumpNote(item1)">
  89. <view style="display: flex;">
  90. <view>
  91. <view>
  92. <image src="/static/icon/note2.png" v-if="noteId != item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  93. <image src="/static/icon/note1.png" v-if="noteId == item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  94. </view>
  95. <view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{ $method.secondToDate(item1.noteSecond) }}</view>
  96. </view>
  97. <view style="margin-left: 10rpx;">
  98. <view class="t2Content leftPadding">{{ item1.sectionName }}</view>
  99. <view class="tBox2">{{ item1.noteText }}</view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <!--答疑 -->
  107. <view v-show="current == 3">
  108. <view class="inputBottom">
  109. <view class="flex_auto">
  110. <u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
  111. </view>
  112. <view class="btn" @click="postContent">提交</view>
  113. </view>
  114. <view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
  115. <view class="chat_box" @click.stop="clearCtx">
  116. <view style="display: flex;">
  117. <view><image :src="$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
  118. <view style="margin-left: 15rpx;">
  119. <view class="chat1">{{ item.realname }}</view>
  120. <view class="chat2">{{ $method.timestampToTime(item.createTime) }}</view>
  121. <view class="chat3">
  122. <text v-if="item.assignUserId > 0">回复</text>
  123. <text v-if="item.assignUserId > 0" style="color: #007AFF;">@{{ item.assignRealname }}</text>
  124. {{ item.answerText }}
  125. </view>
  126. </view>
  127. </view>
  128. <view class="btnReply" @click.stop="replyContent(item)" v-if="item.userId != userInfo.userId">回复</view>
  129. <view v-else class="btnDel" @click.stop="delContent(item)">删除</view>
  130. </view>
  131. <u-line color="#D6D6DB" />
  132. </view>
  133. <view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
  134. </view>
  135. <!--目录 -->
  136. <view v-show="current == 4" >
  137. <view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
  138. <!--模块 -->
  139. <view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
  140. <!--章 -->
  141. <view v-if="item.type == 2">
  142. <courseChapter :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>
  143. </view>
  144. <!--节 -->
  145. <view v-if="item.type == 3">
  146. <courseSection :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 播放前拍照end -->
  152. <u-popup v-model="showSet" :mask-close-able="false" mode="center" border-radius="24">
  153. <view style="align-items:center;padding: 0 40rpx;display: flex;flex-direction: column;justify-content:center;">
  154. <view style="font-weight: bold;color: #333333;font-size: 30rpx;margin-top: 30rpx;">温馨提示</view>
  155. <view style="width: 457rpx;color: #666666;font-size: 30rpx;margin-top: 30rpx;">学习过程中需要拍照验证学员身份,
  156. 拍照功能需要使用您的相机。
  157. 是否授权使用?</view>
  158. <view style="margin: 40rpx 0;">
  159. <button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">去授权</button>
  160. </view>
  161. </view>
  162. </u-popup>
  163. <u-mask :show="photoPopup" >
  164. <!-- 播放前拍照start -->
  165. <view v-if="photoPopup" :mask-close-able="false" style="bottom: 0;position: fixed;width: 100%;z-index: 999;">
  166. <view class="photoBox">
  167. <view class="photoTop">
  168. <view class="sqzz" v-if="false"><u-icon name="close" color="#333333" size="30" @click="closePhoto"></u-icon></view>
  169. <view class="centersq">请正视手机屏幕</view>
  170. <view class="sqzz"></view>
  171. </view>
  172. <view class="photoCenter">
  173. <view style="width: 100%; height: 979rpx;position: fixed;" v-if="photoPopup">
  174. <camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%;" ></camera>
  175. </view>
  176. <view class="custom"><image src="/static/zhezhao.png" mode=""></image></view>
  177. </view>
  178. <view class="btnResult" @click="takePhoto">拍照</view>
  179. </view>
  180. </view>
  181. </u-mask>
  182. </view>
  183. </template>
  184. <script>
  185. import courseModule from '@/components/course/courseModule.vue';
  186. import courseChapter from '@/components/course/courseChapter.vue';
  187. import courseSection from '@/components/course/courseSection.vue';
  188. import { mapGetters } from 'vuex';
  189. export default {
  190. components: {
  191. courseModule,
  192. courseChapter,
  193. courseSection
  194. },
  195. data() {
  196. return {
  197. showSet:false,
  198. startStatus: false,
  199. detail: {},
  200. courseId: 0,
  201. placeholder: '您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记',
  202. inputStyle: {
  203. background: 'rgba(244, 244, 244, 0.98)',
  204. borderRadius: '24rpx',
  205. padding: '8rpx',
  206. marginBottom: '10rpx'
  207. },
  208. list: [],
  209. menuList: [],
  210. current: 0,
  211. vid: '',
  212. goodsId: 0,
  213. goodsData: {},
  214. photoPopup: false,
  215. goodsPlayConfig: null,
  216. autoplay: false,
  217. isAllowSeek: 'no',
  218. playbackRate: [1.0],
  219. timer: null,
  220. goodsPhotographConfig: null,
  221. intervalTimeList: [], // 间隔拍照时长
  222. intervalTimeIndex: 0, //当前处于哪个时间段拍照
  223. playTime: 0, //页面播放时长,不含暂停
  224. currentTime: 0,
  225. avatarUrl: '',
  226. ossAvatarUrl: '',
  227. studyDuration: 0, // 当前视频时长
  228. gradeId: 0,
  229. chapterId: 0,
  230. moduleId: 0,
  231. reMenuList: [],
  232. answerList: [],
  233. assignUserId: 0,
  234. placeholder: '您可以在这里输入答疑内容',
  235. ctxValue: '',
  236. noteList: [],
  237. noteValue: '',
  238. noteId: 0,
  239. recordObj: 0,
  240. gradeDetail:{},
  241. businessData:{},
  242. needSeek: false, //第一次播放是否需要跳转
  243. needProfileModal:false //是否需要资料审核弹框
  244. };
  245. },
  246. computed: { ...mapGetters(['userInfo', 'playSectionId']) },
  247. onLoad(option) {
  248. this.courseId = Number(option.id);
  249. this.goodsId = Number(option.goodsId);
  250. this.courseDetail();
  251. this.getGoodsDetail();
  252. this.getAnswerList();
  253. let noteSecond = Number(option.noteSecond);
  254. if(noteSecond>0){
  255. //我的消息跳过来,播放节
  256. let item = {
  257. sectionId:Number(option.sectionId),
  258. recordingUrl:option.recordingUrl,
  259. noteSecond:noteSecond
  260. }
  261. this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
  262. this.playNoteVideo(item);
  263. }
  264. },
  265. onShow() {
  266. var self = this;
  267. //相机授权
  268. this.getCameraSetting()
  269. this.$api.getbaseprofiletplists({ goodsId: self.goodsId }).then(res => {
  270. if (res.data.code === 200 && res.data.rows.length) {
  271. if (res.data.rows[0].keyValue) {
  272. self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
  273. if (result.data.code === 200) {
  274. if (!result.data.data || (result.data.data.status === 3 && result.data.data.changeStatus === 1)) {
  275. if (!result.data.data) {
  276. self.needProfileModal = true
  277. uni.showModal({
  278. content: '请前往填写资料',
  279. cancelText: '返回',
  280. success: function(resultst) {
  281. if (resultst.confirm) {
  282. self.$navTo.togo('/pages2/verify/input', {
  283. id: self.goodsId
  284. });
  285. }
  286. if (resultst.cancel) {
  287. uni.navigateBack();
  288. }
  289. }
  290. });
  291. } else {
  292. self.needProfileModal = true
  293. uni.showModal({
  294. content: '资料审核不通过,请前往重新填写',
  295. cancelText: '返回',
  296. success: function(resultst) {
  297. if (resultst.confirm) {
  298. self.$navTo.togo('/pages2/verify/input', {
  299. id: self.goodsId
  300. });
  301. }
  302. if (resultst.cancel) {
  303. uni.navigateBack();
  304. }
  305. }
  306. });
  307. }
  308. } else if (result.data.data.status === 1 && res.data.rows[0].keyValue2) {
  309. self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId }).then(k => {
  310. if (k.data.code === 200) {
  311. if (!k.data.data || (k.data.data.status === 3 && k.data.data.changeStatus === 1)) {
  312. if (!k.data.data) {
  313. self.needProfileModal = true
  314. uni.showModal({
  315. cancelText: '返回',
  316. content: '请前往填写盖章资料',
  317. success: function(resultst) {
  318. if (resultst.confirm) {
  319. self.$navTo.togo('/pages2/verify/input2', {
  320. id: self.goodsId
  321. });
  322. }
  323. if (resultst.cancel) {
  324. uni.navigateBack();
  325. }
  326. }
  327. });
  328. } else {
  329. self.needProfileModal = true
  330. uni.showModal({
  331. cancelText: '返回',
  332. content: '资料盖章审核不通过,请前往重新填写',
  333. success: function(resultst) {
  334. if (resultst.confirm) {
  335. self.$navTo.togo('/pages2/verify/input2', {
  336. id: self.goodsId
  337. });
  338. }
  339. if (resultst.cancel) {
  340. uni.navigateBack();
  341. }
  342. }
  343. });
  344. }
  345. }
  346. }
  347. });
  348. }
  349. }
  350. });
  351. }
  352. }
  353. });
  354. if(this.gradeId>0){
  355. //提交完资料返回判断是否已开班
  356. this.getGradeInfo()
  357. }
  358. },
  359. onUnload() {
  360. if (this.playSectionId > 0) {
  361. //退出提交记录
  362. this.ossAvatarUrl = '';
  363. this.postStudyRecord();
  364. }
  365. //清除正在播放的节ID
  366. this.$store.commit('setPlaySectionId', { playSectionId: 0 });
  367. //移除所有的事件监听器
  368. uni.$off();
  369. if (this.timer) {
  370. clearInterval(this.timer);
  371. }
  372. },
  373. mounted() {
  374. uni.$on('changeSection', oldSectionId => {
  375. this.postStudyRecord(0, oldSectionId);
  376. });
  377. uni.$on('getSection', item => {
  378. this.playVideo(item);
  379. });
  380. uni.$on('levelId', item => {
  381. let arr = item.split('-');
  382. //点击节获取的各层级ID
  383. this.moduleId = arr[0];
  384. this.chapterId = arr[1];
  385. });
  386. },
  387. methods: {
  388. courseBusiness(){
  389. this.$api.courseBusiness(this.goodsData.businessId).then(res => {
  390. this.businessData = res.data.data;
  391. })
  392. },
  393. openSetting(res){
  394. console.log(res,98)
  395. },
  396. getCameraSetting () {
  397. const self = this
  398. wx.getSetting({
  399. success: res => {
  400. if (res.authSetting['scope.camera']) {
  401. // 用户已经授权
  402. self.showSet = false
  403. } else {
  404. // 用户还没有授权,向用户发起授权请求
  405. wx.authorize({
  406. scope: 'scope.camera',
  407. success() { // 用户同意授权
  408. self.showSet = false
  409. },
  410. fail() { // 用户不同意授权
  411. self.showSet = true
  412. /* wx.showToast({
  413. title: '摄像头授权失败',
  414. icon: 'none',
  415. duration: 3000
  416. }) */
  417. }
  418. })
  419. }
  420. },
  421. fail: res => {
  422. }
  423. })
  424. },
  425. openJY(){
  426. this.$u.toast('此功能正在开发中');
  427. },
  428. //播放笔记视频
  429. async playNoteVideo(item) {
  430. if (this.timer) {
  431. clearInterval(this.timer);
  432. }
  433. if (this.vid) {
  434. //切换视频
  435. var polyvPlayerContext = this.selectComponent('#playerVideo');
  436. polyvPlayerContext.changeVid(item.recordingUrl);
  437. } else {
  438. this.vid = item.recordingUrl;
  439. }
  440. this.recordObj = {studyDuration:item.noteSecond}
  441. if (this.recordObj.studyDuration) {
  442. this.needSeek = true; //需要跳转到播放记录
  443. }
  444. this.startStatus = true;
  445. //获取节笔记
  446. this.getNoteList();
  447. },
  448. //正常播放视频
  449. async playVideo(item) {
  450. if (this.timer) {
  451. clearInterval(this.timer);
  452. }
  453. if (this.vid) {
  454. //切换视频
  455. var polyvPlayerContext = this.selectComponent('#playerVideo');
  456. polyvPlayerContext.changeVid(item.recordingUrl);
  457. } else {
  458. this.vid = item.recordingUrl;
  459. }
  460. this.recordObj = await this.getRecordLast();
  461. if (this.recordObj.studyDuration) {
  462. this.needSeek = true; //需要跳转到播放记录
  463. }
  464. this.startStatus = true;
  465. //获取节笔记
  466. this.getNoteList();
  467. },
  468. getRecordLast() {
  469. let self = this;
  470. return new Promise(resolve => {
  471. let data = {
  472. gradeId: Number(self.gradeId),
  473. goodsId: Number(self.goodsId),
  474. sectionId: Number(self.playSectionId),
  475. courseId: Number(self.courseId)
  476. };
  477. self.$api.recordLast(data).then(res => {
  478. resolve(res.data.data);
  479. });
  480. });
  481. },
  482. jumpNote(item) {
  483. this.noteId = item.noteId;
  484. //没视频播放
  485. if(this.playSectionId==0){
  486. this.$u.toast('即将跳到笔记位置');
  487. this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
  488. this.playNoteVideo(item);
  489. }else{
  490. //正在看当前笔记视频
  491. this.$u.toast('即将跳到笔记位置');
  492. //跳到笔记时刻
  493. var polyvPlayerContext = this.selectComponent('#playerVideo');
  494. polyvPlayerContext.seek(item.noteSecond);
  495. polyvPlayerContext.play();
  496. }
  497. },
  498. postNote() {
  499. let self = this;
  500. if (!(this.playSectionId > 0)) {
  501. this.$u.toast('目前无播放视频');
  502. return;
  503. }
  504. if (!this.noteValue) {
  505. this.$u.toast('请输入内容');
  506. return;
  507. }
  508. if(!this.gradeId){
  509. this.$u.toast('暂无班级数据');
  510. return;
  511. }
  512. var polyvPlayerContext = this.selectComponent('#playerVideo');
  513. let noteDate = this.$method.getZeroTime();
  514. let noteSecond = polyvPlayerContext.getCurrentTime();
  515. if (!noteSecond) {
  516. if(noteSecond==0){
  517. //播放结束
  518. noteSecond = polyvPlayerContext.getDuration();
  519. }
  520. if(!noteSecond){
  521. this.$u.toast('视频暂未开始');
  522. return;
  523. }
  524. }
  525. let data = {
  526. gradeId: this.gradeId,
  527. goodsId: this.goodsId,
  528. sectionId: this.playSectionId,
  529. courseId: this.courseId,
  530. noteText: this.noteValue,
  531. noteDate: noteDate,
  532. noteSecond: noteSecond
  533. };
  534. this.$api.postNote(data).then(res => {
  535. if (res.data.code == 200) {
  536. this.$u.toast('发布成功');
  537. self.getNoteList();
  538. this.noteValue = '';
  539. }
  540. });
  541. },
  542. getGradeInfo() {
  543. let self = this;
  544. this.$store.state.allowLoading = false;
  545. this.$api.goodsGradeInfo(this.gradeId).then(res => {
  546. if (res.data.code == 200) {
  547. self.gradeDetail = res.data.data;
  548. if(self.gradeDetail.learningStatus==2){
  549. uni.showModal({
  550. showCancel:false,
  551. cancelText: '返回',
  552. content: '当前课程正在申请中,请耐心等待',
  553. success: function(resultst) {
  554. uni.navigateBack();
  555. }
  556. });
  557. }
  558. if(self.gradeDetail.learningStatus==3&&(Number(self.gradeDetail.learningTimeStart)>Number((new Date())/1000))){
  559. uni.showModal({
  560. showCancel:false,
  561. cancelText: '返回',
  562. content: '当前课程正在申请中,请耐心等待',
  563. success: function(resultst) {
  564. uni.navigateBack();
  565. }
  566. });
  567. }
  568. }
  569. });
  570. this.$store.state.allowLoading = true;
  571. },
  572. getNoteList() {
  573. let self = this;
  574. self.noteList = [];
  575. let data = { courseId: this.courseId, gradeId: this.gradeId, goodsId: this.goodsId }
  576. if(this.playSectionId>0){
  577. data.sectionId = this.playSectionId
  578. }
  579. this.$api.noteList(data).then(res => {
  580. if (res.data.code == 200) {
  581. self.noteList = res.data.rows;
  582. }
  583. });
  584. },
  585. delAnswer(answerId) {
  586. let self = this;
  587. let data = { answerId: answerId, status: -1 };
  588. this.$api.delAnswer(data).then(res => {
  589. if (res.data.code == 200) {
  590. self.getAnswerList();
  591. }
  592. });
  593. },
  594. clearCtx() {
  595. console.log(4234);
  596. this.placeholder = '您可以在这里输入答疑内容';
  597. this.ctxValue = '';
  598. this.assignUserId = 0;
  599. },
  600. replyContent(item) {
  601. this.assignUserId = item.userId;
  602. this.placeholder = '@' + item.realname;
  603. },
  604. delContent(item) {
  605. this.delAnswer(item.answerId);
  606. },
  607. postAnswer() {
  608. let self = this;
  609. let data = { courseId: this.courseId, answerText: this.ctxValue };
  610. if (this.assignUserId > 0) {
  611. data.assignUserId = this.assignUserId;
  612. }
  613. this.$api.postAnswer(data).then(res => {
  614. if (res.data.code == 200) {
  615. this.$u.toast('发布成功');
  616. self.getAnswerList();
  617. this.placeholder = '您可以在这里输入答疑内容';
  618. this.ctxValue = '';
  619. this.assignUserId = 0;
  620. }
  621. });
  622. },
  623. postContent() {
  624. if (!this.ctxValue||this.ctxValue=='') {
  625. this.$u.toast('请输入内容');
  626. return
  627. }
  628. this.postAnswer();
  629. },
  630. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  631. let currentTime = 0;
  632. var polyvPlayerContext = this.selectComponent('#playerVideo');
  633. if (polyvPlayerContext) {
  634. currentTime = polyvPlayerContext.getCurrentTime();
  635. }
  636. let self = this;
  637. console.log(self.ossAvatarUrl,"准备提交,照片地址")
  638. let data = {
  639. photo: self.ossAvatarUrl,
  640. sectionId: parseInt(sectionId),
  641. goodsId: parseInt(self.goodsId),
  642. courseId: parseInt(self.courseId),
  643. studyDuration: parseInt(currentTime > 0 ? currentTime : self.studyDuration),
  644. gradeId: parseInt(self.gradeId),
  645. chapterId: parseInt(self.chapterId),
  646. moduleId: parseInt(self.moduleId)
  647. };
  648. if (data.studyDuration <= 5) {
  649. //5秒内不上传记录
  650. return;
  651. }
  652. if (status > 0) {
  653. data.status = status;
  654. }
  655. console.log('提交接口', data);
  656. this.$api.studyRecord(data).then(res => {
  657. self.ossAvatarUrl = ''
  658. console.log(res);
  659. });
  660. },
  661. uploadFile(options, int) {
  662. var self = this;
  663. return new Promise((resolve, reject) => {
  664. var data = {
  665. imageStatus: int
  666. };
  667. self.$api.aliyunpolicy(data).then(res => {
  668. if (res.data.code != 200) {
  669. self.$method.showToast('签名错误' + JSON.stringify(res.data));
  670. return;
  671. }
  672. var ossToken = res.data.data.resultContent;
  673. if (ossToken.host == null || ossToken.host == undefined) {
  674. self.$method.showToast('上传路径报错' + JSON.stringify(res.data));
  675. return;
  676. }
  677. uni.uploadFile({
  678. url: ossToken.host,
  679. name: 'file',
  680. filePath: options,
  681. fileType: 'image',
  682. header: {
  683. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  684. },
  685. formData: {
  686. key: ossToken.dir,
  687. OSSAccessKeyId: ossToken.accessid,
  688. policy: ossToken.policy,
  689. Signature: ossToken.signature,
  690. callback: ossToken.callback,
  691. success_action_status: 200
  692. },
  693. success: result => {
  694. if (result.statusCode === 200) {
  695. self.ossAvatarUrl = ossToken.dir;
  696. resolve();
  697. } else {
  698. uni.showToast({
  699. title: '上传失败',
  700. icon: 'none'
  701. });
  702. return;
  703. }
  704. },
  705. fail: error => {
  706. uni.showToast({
  707. title: '上传接口报错' + error,
  708. icon: 'none'
  709. });
  710. return;
  711. }
  712. });
  713. });
  714. });
  715. },
  716. imageInfos() {
  717. var self = this;
  718. return new Promise((resolve, reject) => {
  719. uni.getImageInfo({
  720. src: self.avatarUrl,
  721. success: async res => {
  722. let canvasWidth = res.width; //图片原始长宽
  723. let canvasHeight = res.height;
  724. if (canvasWidth > 1000 || canvasHeight > 1000) {
  725. uni.compressImage({
  726. src: self.avatarUrl,
  727. quality: 75,
  728. width: '50%',
  729. height: '50%',
  730. success: async rest => {
  731. const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
  732. resolve();
  733. }
  734. });
  735. } else {
  736. console.log('无需压缩');
  737. const waitUpload = await self.uploadFile(self.avatarUrl, 0);
  738. resolve();
  739. }
  740. }
  741. });
  742. });
  743. },
  744. timeEvent() {
  745. let self = this;
  746. var polyvPlayerContext = this.selectComponent('#playerVideo');
  747. if (polyvPlayerContext != null) {
  748. console.log(polyvPlayerContext.getCurrentTime(),759)
  749. let PlayCurrentTime = polyvPlayerContext.getVideoPlayDuration();
  750. this.studyDuration = PlayCurrentTime;
  751. if (this.currentTime < PlayCurrentTime) {
  752. this.playTime += PlayCurrentTime - this.currentTime;
  753. this.currentTime = PlayCurrentTime;
  754. } else {
  755. this.currentTime = PlayCurrentTime;
  756. }
  757. //判断是否需要拍照
  758. if (this.intervalTimeList.length > this.intervalTimeIndex) {
  759. let photoTime = Number(this.intervalTimeList[this.intervalTimeIndex]) * 60; //获取拍照秒数
  760. if (photoTime < this.playTime) {
  761. //启动拍照
  762. //暂停
  763. polyvPlayerContext.exitFullScreen();
  764. polyvPlayerContext.pause();
  765. this.openPhoto();
  766. this.intervalTimeIndex++;
  767. }
  768. }
  769. }
  770. },
  771. onStateChange(newstate, oldstate) {
  772. if (newstate.detail.newstate == 'playing') {
  773. if (this.needSeek) {
  774. var polyvPlayerContext = this.selectComponent('#playerVideo');
  775. polyvPlayerContext.seek(this.recordObj.studyDuration);
  776. polyvPlayerContext.play();
  777. this.needSeek = false;
  778. }
  779. //开始播放
  780. if (this.timer) {
  781. clearInterval(this.timer);
  782. }
  783. this.timer = setInterval(this.timeEvent, 1500); //定时器
  784. }
  785. if (newstate.detail.newstate == 'pause') {
  786. //暂停提交记录
  787. /* this.ossAvatarUrl = ""
  788. this.postStudyRecord() */
  789. }
  790. if (newstate.detail.newstate == 'ended') {
  791. this.postStudyRecord(1);
  792. }
  793. },
  794. //拍照
  795. openPhoto() {
  796. this.photoPopup = true;
  797. uni.authorize({
  798. scope: 'scope.camera',
  799. success() {
  800. }
  801. })
  802. },
  803. async submit() {
  804. const waitYS = await this.imageInfos();
  805. this.postStudyRecord(); //提交记录
  806. //恢复播放
  807. var polyvPlayerContext = this.selectComponent('#playerVideo');
  808. if (polyvPlayerContext != null) {
  809. polyvPlayerContext.play();
  810. }
  811. console.log(this.ossAvatarUrl, '拍照完成456');
  812. },
  813. //确认拍照
  814. takePhoto() {
  815. var self = this;
  816. const ctx = uni.createCameraContext();
  817. ctx.takePhoto({
  818. quality: 'high',
  819. success: res => {
  820. console.log(res.tempImagePath);
  821. self.avatarUrl = res.tempImagePath;
  822. self.submit();
  823. self.photoPopup = false;
  824. },
  825. fail: err => {
  826. console.log(err);
  827. }
  828. });
  829. },
  830. //拍照报错
  831. error(e) {
  832. console.log(e.detail);
  833. },
  834. //关闭相机
  835. closePhoto() {
  836. this.photoPopup = false;
  837. },
  838. getGoodsDetail() {
  839. let self = this;
  840. this.$api.goodsDetail(this.goodsId).then(res => {
  841. self.goodsData = res.data.data;
  842. self.gradeId = self.goodsData.gradeId;
  843. self.courseBusiness();
  844. console.log(self.gradeId, "班级ID");
  845. self.getMenuList();
  846. self.getReMenuList(); //获取重修目录
  847. setTimeout(function(){
  848. if(!self.needProfileModal){
  849. self.getGradeInfo()
  850. }
  851. },500)
  852. //获取节笔记
  853. this.getNoteList();
  854. if (self.goodsData.goodsPlayConfig) {
  855. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  856. if (self.goodsPlayConfig.autoPlay > 0) {
  857. self.autoplay = true;
  858. }
  859. if (self.goodsPlayConfig.drag > 0) {
  860. self.isAllowSeek = 'yes';
  861. }
  862. if (self.goodsPlayConfig.speed > 0) {
  863. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  864. }
  865. }
  866. if (self.goodsData.goodsPhotographConfig) {
  867. self.goodsPhotographConfig = JSON.parse(self.goodsData.goodsPhotographConfig);
  868. if (self.goodsPhotographConfig.intervalTime) {
  869. self.intervalTimeList = self.goodsPhotographConfig.intervalTime.split(',');
  870. }
  871. }
  872. });
  873. },
  874. startVideo() {
  875. this.startStatus = true;
  876. },
  877. getAnswerList() {
  878. let self = this;
  879. this.$api.answerList({ courseId: this.courseId }).then(res => {
  880. if (res.data.code == 200) {
  881. self.answerList = res.data.rows;
  882. }
  883. });
  884. },
  885. getReMenuList() {
  886. let self = this;
  887. this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
  888. if (res.data.code == 200) {
  889. console.log(9999)
  890. for (let i = 0; i < res.data.rows.length; i++) {
  891. let item = res.data.rows[i];
  892. item.down = true;
  893. item.id = item.menuId;
  894. item.name = item.menuName;
  895. }
  896. self.reMenuList = res.data.rows;
  897. if(self.reMenuList.length>0){
  898. self.list = [
  899. {
  900. name: '目录'
  901. },
  902. {
  903. name: '讲义'
  904. },
  905. {
  906. name: '笔记'
  907. },
  908. {
  909. name: '答疑'
  910. },
  911. {name:'重修目录'}
  912. ];
  913. this.current = 0;
  914. } else {
  915. self.list = [
  916. {
  917. name: '目录'
  918. },
  919. {
  920. name: '讲义'
  921. },
  922. {
  923. name: '笔记'
  924. },
  925. {
  926. name: '答疑'
  927. }
  928. ];
  929. this.current = 0;
  930. }
  931. }
  932. });
  933. },
  934. getMenuList() {
  935. let self = this;
  936. this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
  937. if (res.data.code == 200) {
  938. for (let i = 0; i < res.data.rows.length; i++) {
  939. let item = res.data.rows[i];
  940. item.down = true;
  941. item.id = item.menuId;
  942. item.name = item.menuName;
  943. }
  944. self.menuList = res.data.rows;
  945. }
  946. });
  947. },
  948. courseDetail() {
  949. let self = this;
  950. this.$api.courseDetail(this.courseId).then(res => {
  951. if (res.data.code == 200) {
  952. self.detail = res.data.data;
  953. uni.setNavigationBarTitle({
  954. title:res.data.data.courseName || '课程详情'
  955. })
  956. }
  957. });
  958. },
  959. open(item) {
  960. item.showChildren = !item.showChildren;
  961. },
  962. change(index) {
  963. this.current = index;
  964. },
  965. openDocument() {
  966. console.log(111)
  967. uni.downloadFile({
  968. url: 'https://gw.alipayobjects.com/os/bmw-prod/c134022a-1088-47e2-bb76-a33ec0519101.pdf?spm=a2c4g.11186623.0.0.cf863d1fUcFiPN&file=c134022a-1088-47e2-bb76-a33ec0519101.pdf',
  969. success: function (res) {
  970. console.log(999)
  971. var filePath = res.tempFilePath;
  972. uni.openDocument({
  973. filePath: filePath,
  974. showMenu: true,
  975. success: function (res) {
  976. console.log(res,'打开文档成功');
  977. },
  978. fail:function(err) {
  979. console.log(err)
  980. }
  981. });
  982. }
  983. });
  984. }
  985. }
  986. };
  987. </script>
  988. <style lang="scss" scope>
  989. .btnSet{
  990. width: 440rpx;
  991. height: 80rpx;
  992. background: #007AFF;
  993. border-radius: 40rpx;
  994. color: #FFFFFF;
  995. font-size: 28rpx;
  996. line-height: 80rpx;
  997. }
  998. .btnReply {
  999. width: 80rpx;
  1000. height: 40rpx;
  1001. background: #e3f0ff;
  1002. border-radius: 16rpx;
  1003. text-align: center;
  1004. color: #007aff;
  1005. }
  1006. .btnDel {
  1007. width: 80rpx;
  1008. height: 40rpx;
  1009. background: #ffedf0;
  1010. border-radius: 16rpx;
  1011. text-align: center;
  1012. color: #ff2d55;
  1013. }
  1014. .btnReply {
  1015. width: 80rpx;
  1016. height: 40rpx;
  1017. background: #e3f0ff;
  1018. border-radius: 16rpx;
  1019. font-size: 24rpx;
  1020. }
  1021. .lecture-box {
  1022. display: flex;
  1023. align-items: center;
  1024. height: 80rpx;
  1025. background: #FFFFFF;
  1026. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1027. .title {
  1028. padding:10rpx;
  1029. flex:1;
  1030. overflow: hidden;
  1031. text-overflow: ellipsis;
  1032. white-space: nowrap;
  1033. color:#333;
  1034. font-weight: bold;
  1035. font-size: 32rpx;
  1036. }
  1037. .btn {
  1038. display: flex;
  1039. align-items: center;
  1040. justify-content: center;
  1041. width:80rpx;
  1042. height:80rpx;
  1043. background: #FFFFFF;
  1044. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0,0,0,0.1);
  1045. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1046. }
  1047. }
  1048. .lecture-content {
  1049. background:#fff;
  1050. margin-top:10rpx;
  1051. padding:10rpx;
  1052. border-radius:16rpx;
  1053. }
  1054. .photoBox {
  1055. background-color: #FFFFFF;
  1056. border-radius: 32px 32px 0px 0px;
  1057. .photoTop {
  1058. height: 74upx;
  1059. display: flex;
  1060. align-items: center;
  1061. justify-content: space-between;
  1062. padding: 0upx 38upx;
  1063. .sqzz {
  1064. width: 28upx;
  1065. height: 28upx;
  1066. display: flex;
  1067. align-items: center;
  1068. justify-content: center;
  1069. }
  1070. .centersq {
  1071. color: #333;
  1072. font-size: 30upx;
  1073. font-weight: 500;
  1074. }
  1075. }
  1076. .photoCenter {
  1077. width: 750upx;
  1078. height: 979upx;
  1079. position: relative;
  1080. .custom {
  1081. width: 750upx;
  1082. height: 979upx;
  1083. position: absolute;
  1084. z-index: 1000;
  1085. top: 0;
  1086. left: 0;
  1087. image {
  1088. width: 100%;
  1089. height: 100%;
  1090. }
  1091. }
  1092. }
  1093. .btnResult {
  1094. height: 100rpx;
  1095. width: 100%;
  1096. background-color: #07c160;
  1097. text-align: center;
  1098. line-height: 100upx;
  1099. color: #fff;
  1100. font-size: 32upx;
  1101. font-weight: bold;
  1102. }
  1103. }
  1104. .chat_box {
  1105. display: flex;
  1106. padding: 20rpx;
  1107. justify-content: space-between;
  1108. }
  1109. .chat3 {
  1110. font-size: 30rpx;
  1111. font-family: PingFang SC;
  1112. font-weight: 500;
  1113. color: #666666;
  1114. margin-top: 10rpx;
  1115. }
  1116. .chat2 {
  1117. font-size: 20rpx;
  1118. font-family: PingFang SC;
  1119. font-weight: 500;
  1120. color: #999999;
  1121. margin-top: 10rpx;
  1122. }
  1123. .chat1 {
  1124. font-size: 24rpx;
  1125. font-family: PingFang SC;
  1126. font-weight: 500;
  1127. color: #333333;
  1128. }
  1129. .leftPadding {
  1130. margin-left: 8rpx;
  1131. }
  1132. .t2Content {
  1133. font-size: 28rpx;
  1134. font-family: PingFang SC;
  1135. font-weight: bold;
  1136. color: #999999;
  1137. line-height: 48rpx;
  1138. }
  1139. .tBox2 {
  1140. display: flex;
  1141. padding-top: 10rpx;
  1142. color: #333333;
  1143. font-size: 30rpx;
  1144. }
  1145. .tBox {
  1146. display: flex;
  1147. align-items: center;
  1148. padding-top: 10rpx;
  1149. }
  1150. .title {
  1151. font-size: 24rpx;
  1152. color: #999999;
  1153. }
  1154. page {
  1155. padding-top: 10px;
  1156. padding-top: constant(safe-area-inset-top);
  1157. padding-top: env(safe-area-inset-top);
  1158. }
  1159. .inputBottom {
  1160. position: fixed;
  1161. left: 0;
  1162. bottom: 0;
  1163. background: #ffffff;
  1164. height: 98rpx;
  1165. display: flex;
  1166. align-items: center;
  1167. width: 100%;
  1168. .flex_auto {
  1169. flex:1;
  1170. margin-left: 10% ;
  1171. .input {
  1172. height:60rpx;
  1173. }
  1174. }
  1175. .btn {
  1176. color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;
  1177. }
  1178. }
  1179. .noteBox {
  1180. width: 100%;
  1181. background: #ffffff;
  1182. padding: 10rpx;
  1183. border-radius: 16rpx;
  1184. }
  1185. .dateBox {
  1186. width: 216rpx;
  1187. height: 48rpx;
  1188. background: #ffffff;
  1189. border-radius: 24rpx;
  1190. font-size: 24rpx;
  1191. color: #666666;
  1192. text-align: center;
  1193. line-height: 48rpx;
  1194. margin: 20rpx 0;
  1195. }
  1196. .t_content1 {
  1197. color: #007aff;
  1198. margin-left: 10rpx;
  1199. }
  1200. .tag1 {
  1201. border: 2rpx solid #007aff;
  1202. border-radius: 8rpx;
  1203. font-size: 20rpx;
  1204. color: #007aff;
  1205. padding: 5rpx;
  1206. }
  1207. .b_title {
  1208. color: #333333;
  1209. font-size: 30rpx;
  1210. font-weight: bold;
  1211. }
  1212. page {
  1213. background: #eaeef1;
  1214. }
  1215. .menuBox {
  1216. width: 100%;
  1217. background: #ffffff;
  1218. border-radius: 16rpx;
  1219. padding: 20rpx;
  1220. margin-bottom: 20rpx;
  1221. }
  1222. .btnspric {
  1223. border-top: 1rpx solid #eee;
  1224. display: flex;
  1225. align-items: center;
  1226. justify-content: space-between;
  1227. height: 108rpx;
  1228. padding-left: 43rpx;
  1229. padding-right: 32rpx;
  1230. }
  1231. .btnspric > .lefprL {
  1232. font-size: 36rpx;
  1233. color: #0c141f;
  1234. font-weight: bold;
  1235. }
  1236. .btnspric > .lefprR {
  1237. padding: 0rpx 24rpx;
  1238. height: 60rpx;
  1239. line-height: 60rpx;
  1240. text-align: center;
  1241. color: #fff;
  1242. background: #32467b;
  1243. border-radius: 24rpx;
  1244. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1245. }
  1246. .yhj,
  1247. .hdyhj {
  1248. padding: 24rpx 29rpx 24rpx 34rpx;
  1249. }
  1250. .yhj {
  1251. border-bottom: 16rpx solid #f9f9f9;
  1252. }
  1253. .yhjtit {
  1254. font-size: 30rpx;
  1255. color: #0c141f;
  1256. font-weight: 500;
  1257. margin-bottom: 14rpx;
  1258. }
  1259. .yhjList {
  1260. display: flex;
  1261. align-items: center;
  1262. justify-content: space-between;
  1263. margin-bottom: 14rpx;
  1264. }
  1265. .yhjList > .yhjLefts {
  1266. display: flex;
  1267. align-items: center;
  1268. }
  1269. .yhjLefts > .yhl {
  1270. color: #32467b;
  1271. font-size: 30rpx;
  1272. margin-right: 31rpx;
  1273. }
  1274. .yhjLefts > .yhbq {
  1275. font-size: 24rpx;
  1276. color: #ff9500;
  1277. border-radius: 18rpx;
  1278. background-color: rgba(255, 149, 0, 0.2);
  1279. border: 2rpx solid #ff9500;
  1280. height: 38rpx;
  1281. line-height: 38rpx;
  1282. padding: 0rpx 16rpx;
  1283. }
  1284. .ts {
  1285. font-size: 24rpx;
  1286. color: #999;
  1287. margin: 14rpx 0rpx;
  1288. padding-right: 29rpx;
  1289. padding-left: 34rpx;
  1290. }
  1291. .yh {
  1292. padding-top: 20rpx;
  1293. }
  1294. .yh > .yhtitle {
  1295. display: flex;
  1296. align-items: center;
  1297. justify-content: space-between;
  1298. padding-right: 29rpx;
  1299. padding-left: 34rpx;
  1300. }
  1301. .priceBxs {
  1302. display: flex;
  1303. align-items: center;
  1304. }
  1305. .priceBxs > .pricleft {
  1306. border-radius: 24rpx;
  1307. border: 1rpx solid #e91313;
  1308. background-color: rgba(233, 19, 19, 0.1);
  1309. padding: 0rpx 18rpx;
  1310. height: 49rpx;
  1311. line-height: 49rpx;
  1312. text-align: center;
  1313. font-size: 30rpx;
  1314. font-weight: 500;
  1315. color: #e91313;
  1316. margin-right: 13rpx;
  1317. }
  1318. .topBox {
  1319. padding: 32rpx 32rpx 24rpx;
  1320. border-bottom: 1rpx solid #eeeeee;
  1321. }
  1322. .topBox > .boldFonstType {
  1323. font-weight: 500;
  1324. font-size: 30rpx;
  1325. margin: 16rpx 0rpx 23rpx;
  1326. }
  1327. .topBox > .firstTopL {
  1328. display: flex;
  1329. align-items: center;
  1330. }
  1331. .topBox > .firstTopL > .imageBs {
  1332. width: 331rpx;
  1333. height: 160rpx;
  1334. border-radius: 6rpx;
  1335. overflow: hidden;
  1336. margin-right: 8rpx;
  1337. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  1338. }
  1339. .topBox > .firstTopL > .imageBs > image {
  1340. width: 100%;
  1341. height: 100%;
  1342. }
  1343. .topBox > .firstTopL > .textBs {
  1344. font-size: 30rpx;
  1345. font-weight: bold;
  1346. color: #0c141f;
  1347. }
  1348. .content {
  1349. padding: 24rpx;
  1350. text-align: left;
  1351. }
  1352. .catalogBox {
  1353. display: flex;
  1354. align-items: center;
  1355. flex-wrap: nowrap;
  1356. overflow-x: auto;
  1357. padding-left: 38rpx;
  1358. max-height: 305rpx;
  1359. overflow-y: auto;
  1360. transition: all 0.4s;
  1361. }
  1362. .catalogBox > .catalogA {
  1363. min-width: 200rpx;
  1364. height: 48rpx;
  1365. line-height: 48rpx;
  1366. // text-align: center;
  1367. border: 2rpx solid transparent;
  1368. white-space: nowrap;
  1369. text-overflow: ellipsis;
  1370. overflow: hidden;
  1371. word-break: break-all;
  1372. border-radius: 10rpx;
  1373. background: rgba(22, 119, 255, 0.05);
  1374. padding-left: 19rpx;
  1375. box-sizing: border-box;
  1376. padding-right: 15rpx;
  1377. margin-right: 16rpx;
  1378. margin-bottom: 20rpx;
  1379. margin-top: 15rpx;
  1380. font-size: 24rpx;
  1381. color: #666;
  1382. }
  1383. .catalogBox > .activesq {
  1384. border-color: #1677ff;
  1385. }
  1386. .changeCatalogBox {
  1387. display: block;
  1388. }
  1389. .catalogBox::-webkit-scrollbar {
  1390. display: none; /* Chrome Safari */
  1391. }
  1392. .box {
  1393. position: relative;
  1394. top: 650rpx;
  1395. padding-bottom: 88rpx;
  1396. margin: 20rpx;
  1397. }
  1398. .price_t2 {
  1399. font-size: 18rpx;
  1400. font-family: PingFang SC;
  1401. font-weight: 500;
  1402. text-decoration: line-through;
  1403. color: #999999;
  1404. }
  1405. .price_t1 {
  1406. font-size: 33rpx;
  1407. font-family: PingFang SC;
  1408. font-weight: bold;
  1409. color: #e91313;
  1410. }
  1411. .sc_t {
  1412. font-size: 22rpx;
  1413. color: #000000;
  1414. }
  1415. .sc {
  1416. width: 29rpx;
  1417. height: 29rpx;
  1418. }
  1419. .buy {
  1420. width: 138rpx;
  1421. height: 48rpx;
  1422. line-height: 48rpx;
  1423. background: #32467b;
  1424. border-radius: 10rpx;
  1425. color: #ffffff;
  1426. font-size: 28rpx;
  1427. text-align: center;
  1428. vertical-align: middle;
  1429. position: absolute;
  1430. right: 30rpx;
  1431. }
  1432. .video_body {
  1433. padding-bottom: 96rpx;
  1434. }
  1435. .footer_tab {
  1436. position: fixed;
  1437. bottom: 0;
  1438. height: 96rpx;
  1439. width: 100%;
  1440. background-color: #ffffff;
  1441. }
  1442. .tj_box {
  1443. width: 50%;
  1444. display: inline-block;
  1445. text-align: center;
  1446. margin: 10rpx 0;
  1447. }
  1448. .teacher_t {
  1449. font-size: 24rpx;
  1450. font-family: PingFang SC;
  1451. font-weight: 400;
  1452. color: #666666;
  1453. line-height: 36rpx;
  1454. margin-left: 15rpx;
  1455. }
  1456. .teacher_img {
  1457. width: 87rpx;
  1458. height: 129rpx;
  1459. }
  1460. .t2 {
  1461. font-size: 24rpx;
  1462. font-family: PingFang SC;
  1463. color: #666666;
  1464. line-height: 36rpx;
  1465. margin: 15rpx;
  1466. }
  1467. .r_t2 {
  1468. width: 201rpx;
  1469. height: 49rpx;
  1470. background: rgba(22, 119, 255, 0.05);
  1471. border: 1rpx solid #32467b;
  1472. border-radius: 16rpx;
  1473. color: #666666;
  1474. font-size: 23rpx;
  1475. text-align: center;
  1476. display: flex;
  1477. align-items: center;
  1478. padding: 5rpx;
  1479. }
  1480. .scroll_box {
  1481. width: 100%;
  1482. height: 60rpx;
  1483. background: #ffffff;
  1484. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1485. white-space: nowrap;
  1486. overflow: hidden;
  1487. margin: 15rpx 0;
  1488. }
  1489. .r_sliper {
  1490. padding: 0 20rpx;
  1491. }
  1492. .top_line {
  1493. width: 6rpx;
  1494. height: 22rpx;
  1495. background: #32467b;
  1496. margin-right: 10rpx;
  1497. }
  1498. .video_t2 {
  1499. font-size: 24rpx;
  1500. font-family: PingFang SC;
  1501. font-weight: 500;
  1502. color: #666666;
  1503. }
  1504. .video_t1 {
  1505. height: 80rpx;
  1506. color: #333333;
  1507. line-height: 80rpx;
  1508. font-size: 30rpx;
  1509. font-family: PingFang SC;
  1510. font-weight: bold;
  1511. color: #333333;
  1512. overflow: hidden;
  1513. text-overflow: ellipsis;
  1514. white-space: nowrap;
  1515. }
  1516. .video_t1_t {
  1517. display: flex;
  1518. flex-direction: column;
  1519. height: 80rpx;
  1520. color: #333333;
  1521. text-align: center;
  1522. align-items: center;
  1523. border-left: solid 1px #d6d6db;
  1524. }
  1525. .video_play {
  1526. position: absolute;
  1527. width: 95rpx;
  1528. height: 95rpx;
  1529. top: 0;
  1530. left: 0;
  1531. right: 0;
  1532. bottom: 0;
  1533. margin: auto;
  1534. }
  1535. .video_box {
  1536. position: relative;
  1537. }
  1538. .rotoct {
  1539. transform: rotate(90deg);
  1540. }
  1541. </style>