detail.vue 36 KB

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