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. playbackRate: [0.5, 0.8, 1.0],
  188. list: [
  189. {
  190. name: '目录'
  191. },
  192. {
  193. name: '笔记'
  194. },
  195. {
  196. name: '答疑'
  197. }
  198. ],
  199. menuList: [],
  200. current: 0,
  201. vid: '',
  202. goodsId: 0,
  203. goodsData: {},
  204. photoPopup: false,
  205. goodsPlayConfig: null,
  206. autoplay: false,
  207. isAllowSeek: 'no',
  208. playbackRate: [1.0],
  209. timer: null,
  210. goodsPhotographConfig: null,
  211. intervalTimeList: [], // 间隔拍照时长
  212. intervalTimeIndex: 0, //当前处于哪个时间段拍照
  213. playTime: 0, //页面播放时长,不含暂停
  214. currentTime: 0,
  215. avatarUrl: '',
  216. ossAvatarUrl: '',
  217. studyDuration: 0, // 当前视频时长
  218. gradeId: 0,
  219. chapterId: 0,
  220. moduleId: 0,
  221. reMenuList: [],
  222. answerList: [],
  223. assignUserId: 0,
  224. placeholder: '您可以在这里输入答疑内容',
  225. ctxValue: '',
  226. noteList: [],
  227. noteValue: '',
  228. noteId: 0,
  229. recordObj: 0,
  230. gradeDetail:{},
  231. needSeek: false, //第一次播放是否需要跳转
  232. needProfileModal:false //是否需要资料审核弹框
  233. };
  234. },
  235. computed: { ...mapGetters(['userInfo', 'playSectionId']) },
  236. onLoad(option) {
  237. this.courseId = Number(option.id);
  238. this.goodsId = Number(option.goodsId);
  239. this.courseDetail();
  240. this.getGoodsDetail();
  241. this.getAnswerList();
  242. let noteSecond = Number(option.noteSecond);
  243. if(noteSecond>0){
  244. //我的消息跳过来,播放节
  245. let item = {
  246. sectionId:Number(option.sectionId),
  247. recordingUrl:option.recordingUrl,
  248. noteSecond:noteSecond
  249. }
  250. this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
  251. this.playNoteVideo(item);
  252. }
  253. },
  254. onShow() {
  255. var self = this;
  256. //相机授权
  257. this.getCameraSetting()
  258. this.$api.getbaseprofiletplists({ goodsId: self.goodsId }).then(res => {
  259. if (res.data.code === 200 && res.data.rows.length) {
  260. if (res.data.rows[0].keyValue) {
  261. self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
  262. if (result.data.code === 200) {
  263. if (!result.data.data || (result.data.data.status === 3 && result.data.data.changeStatus === 1)) {
  264. if (!result.data.data) {
  265. self.needProfileModal = true
  266. uni.showModal({
  267. content: '请前往填写资料',
  268. cancelText: '返回',
  269. success: function(resultst) {
  270. if (resultst.confirm) {
  271. self.$navTo.togo('/pages2/verify/input', {
  272. id: self.goodsId
  273. });
  274. }
  275. if (resultst.cancel) {
  276. uni.navigateBack();
  277. }
  278. }
  279. });
  280. } else {
  281. self.needProfileModal = true
  282. uni.showModal({
  283. content: '资料审核不通过,请前往重新填写',
  284. cancelText: '返回',
  285. success: function(resultst) {
  286. if (resultst.confirm) {
  287. self.$navTo.togo('/pages2/verify/input', {
  288. id: self.goodsId
  289. });
  290. }
  291. if (resultst.cancel) {
  292. uni.navigateBack();
  293. }
  294. }
  295. });
  296. }
  297. } else if (result.data.data.status === 1 && res.data.rows[0].keyValue2) {
  298. self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId }).then(k => {
  299. if (k.data.code === 200) {
  300. if (!k.data.data || (k.data.data.status === 3 && k.data.data.changeStatus === 1)) {
  301. if (!k.data.data) {
  302. self.needProfileModal = true
  303. uni.showModal({
  304. cancelText: '返回',
  305. content: '请前往填写盖章资料',
  306. success: function(resultst) {
  307. if (resultst.confirm) {
  308. self.$navTo.togo('/pages2/verify/input2', {
  309. id: self.goodsId
  310. });
  311. }
  312. if (resultst.cancel) {
  313. uni.navigateBack();
  314. }
  315. }
  316. });
  317. } else {
  318. self.needProfileModal = true
  319. uni.showModal({
  320. cancelText: '返回',
  321. content: '资料盖章审核不通过,请前往重新填写',
  322. success: function(resultst) {
  323. if (resultst.confirm) {
  324. self.$navTo.togo('/pages2/verify/input2', {
  325. id: self.goodsId
  326. });
  327. }
  328. if (resultst.cancel) {
  329. uni.navigateBack();
  330. }
  331. }
  332. });
  333. }
  334. }
  335. }
  336. });
  337. }
  338. }
  339. });
  340. }
  341. }
  342. });
  343. console.log(this.gradeId,7512)
  344. if(this.gradeId>0){
  345. //提交完资料返回判断是否已开班
  346. this.getGradeInfo()
  347. }
  348. },
  349. onUnload() {
  350. if (this.playSectionId > 0) {
  351. //退出提交记录
  352. this.ossAvatarUrl = '';
  353. this.postStudyRecord();
  354. //清除正在播放的节ID
  355. this.$store.commit('setPlaySectionId', { playSectionId: 0 });
  356. //移除所有的事件监听器
  357. uni.$off();
  358. }
  359. },
  360. mounted() {
  361. uni.$on('changeSection', oldSectionId => {
  362. this.postStudyRecord(0, oldSectionId);
  363. });
  364. uni.$on('getSection', item => {
  365. this.playVideo(item);
  366. });
  367. uni.$on('levelId', item => {
  368. let arr = item.split('-');
  369. //点击节获取的各层级ID
  370. this.moduleId = arr[0];
  371. this.chapterId = arr[1];
  372. });
  373. },
  374. methods: {
  375. openSetting(res){
  376. console.log(res,98)
  377. },
  378. getCameraSetting () {
  379. const self = this
  380. wx.getSetting({
  381. success: res => {
  382. if (res.authSetting['scope.camera']) {
  383. // 用户已经授权
  384. self.showSet = false
  385. } else {
  386. // 用户还没有授权,向用户发起授权请求
  387. wx.authorize({
  388. scope: 'scope.camera',
  389. success() { // 用户同意授权
  390. self.showSet = false
  391. },
  392. fail() { // 用户不同意授权
  393. self.showSet = true
  394. /* wx.showToast({
  395. title: '摄像头授权失败',
  396. icon: 'none',
  397. duration: 3000
  398. }) */
  399. }
  400. })
  401. }
  402. },
  403. fail: res => {
  404. }
  405. })
  406. },
  407. openJY(){
  408. this.$u.toast('此功能正在开发中');
  409. },
  410. //播放笔记视频
  411. async playNoteVideo(item) {
  412. if (this.timer) {
  413. clearInterval(this.timer);
  414. }
  415. if (this.vid) {
  416. //切换视频
  417. var polyvPlayerContext = this.selectComponent('#playerVideo');
  418. polyvPlayerContext.changeVid(item.recordingUrl);
  419. } else {
  420. this.vid = item.recordingUrl;
  421. }
  422. this.recordObj = {studyDuration:item.noteSecond}
  423. if (this.recordObj.studyDuration) {
  424. this.needSeek = true; //需要跳转到播放记录
  425. }
  426. this.startStatus = true;
  427. //获取节笔记
  428. this.getNoteList();
  429. },
  430. //正常播放视频
  431. async playVideo(item) {
  432. if (this.timer) {
  433. clearInterval(this.timer);
  434. }
  435. if (this.vid) {
  436. //切换视频
  437. var polyvPlayerContext = this.selectComponent('#playerVideo');
  438. polyvPlayerContext.changeVid(item.recordingUrl);
  439. } else {
  440. this.vid = item.recordingUrl;
  441. }
  442. this.recordObj = await this.getRecordLast();
  443. if (this.recordObj.studyDuration) {
  444. this.needSeek = true; //需要跳转到播放记录
  445. }
  446. console.log(this.startTime, 789);
  447. this.startStatus = true;
  448. //获取节笔记
  449. this.getNoteList();
  450. },
  451. getRecordLast() {
  452. let self = this;
  453. return new Promise(resolve => {
  454. let data = {
  455. gradeId: Number(self.gradeId),
  456. goodsId: Number(self.goodsId),
  457. sectionId: Number(self.playSectionId),
  458. courseId: Number(self.courseId)
  459. };
  460. self.$api.recordLast(data).then(res => {
  461. resolve(res.data.data);
  462. });
  463. });
  464. },
  465. jumpNote(item) {
  466. this.noteId = item.noteId;
  467. //没视频播放
  468. if(this.playSectionId==0){
  469. this.$u.toast('即将跳到笔记位置');
  470. this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
  471. this.playNoteVideo(item);
  472. }else{
  473. //正在看当前笔记视频
  474. this.$u.toast('即将跳到笔记位置');
  475. //跳到笔记时刻
  476. var polyvPlayerContext = this.selectComponent('#playerVideo');
  477. polyvPlayerContext.seek(item.noteSecond);
  478. polyvPlayerContext.play();
  479. }
  480. },
  481. postNote() {
  482. let self = this;
  483. if (!(this.playSectionId > 0)) {
  484. this.$u.toast('目前无播放视频');
  485. return;
  486. }
  487. if (!this.noteValue) {
  488. this.$u.toast('请输入内容');
  489. return;
  490. }
  491. var polyvPlayerContext = this.selectComponent('#playerVideo');
  492. let noteDate = this.$method.getZeroTime();
  493. let noteSecond = polyvPlayerContext.getCurrentTime();
  494. console.log(noteSecond,698)
  495. if (!noteSecond) {
  496. if(noteSecond==0){
  497. //播放结束
  498. noteSecond = polyvPlayerContext.getDuration();
  499. console.log(noteSecond,63398)
  500. }
  501. if(!noteSecond){
  502. this.$u.toast('视频暂未开始');
  503. return;
  504. }
  505. }
  506. let data = {
  507. gradeId: this.gradeId,
  508. goodsId: this.goodsId,
  509. sectionId: this.playSectionId,
  510. courseId: this.courseId,
  511. noteText: this.noteValue,
  512. noteDate: noteDate,
  513. noteSecond: noteSecond
  514. };
  515. this.$api.postNote(data).then(res => {
  516. if (res.data.code == 200) {
  517. this.$u.toast('发布成功');
  518. self.getNoteList();
  519. this.noteValue = '';
  520. }
  521. });
  522. },
  523. getGradeInfo() {
  524. let self = this;
  525. this.$store.state.allowLoading = false;
  526. this.$api.goodsGradeInfo(this.gradeId).then(res => {
  527. if (res.data.code == 200) {
  528. self.gradeDetail = res.data.data;
  529. console.log(self.needProfileModal,61189)
  530. if(self.gradeDetail.learningStatus==2){
  531. uni.showModal({
  532. showCancel:false,
  533. cancelText: '返回',
  534. content: '当前课程正在申请中,请耐心等待',
  535. success: function(resultst) {
  536. uni.navigateBack();
  537. }
  538. });
  539. }
  540. if(self.gradeDetail.learningStatus==3&&(Number(self.gradeDetail.learningTimeStart)>Number((new Date())/1000))){
  541. uni.showModal({
  542. showCancel:false,
  543. cancelText: '返回',
  544. content: '当前课程正在申请中,请耐心等待',
  545. success: function(resultst) {
  546. uni.navigateBack();
  547. }
  548. });
  549. }
  550. }
  551. });
  552. this.$store.state.allowLoading = true;
  553. },
  554. getNoteList() {
  555. let self = this;
  556. self.noteList = [];
  557. let data = { courseId: this.courseId, gradeId: this.gradeId, goodsId: this.goodsId }
  558. if(this.playSectionId>0){
  559. data.sectionId = this.playSectionId
  560. }
  561. this.$api.noteList(data).then(res => {
  562. if (res.data.code == 200) {
  563. self.noteList = res.data.rows;
  564. }
  565. });
  566. },
  567. delAnswer(answerId) {
  568. let self = this;
  569. let data = { answerId: answerId, status: -1 };
  570. this.$api.delAnswer(data).then(res => {
  571. if (res.data.code == 200) {
  572. self.getAnswerList();
  573. }
  574. });
  575. },
  576. clearCtx() {
  577. console.log(4234);
  578. this.placeholder = '您可以在这里输入答疑内容';
  579. this.ctxValue = '';
  580. this.assignUserId = 0;
  581. },
  582. replyContent(item) {
  583. this.assignUserId = item.userId;
  584. this.placeholder = '@' + item.realname;
  585. },
  586. delContent(item) {
  587. this.delAnswer(item.answerId);
  588. },
  589. postAnswer() {
  590. let self = this;
  591. let data = { courseId: this.courseId, answerText: this.ctxValue };
  592. if (this.assignUserId > 0) {
  593. data.assignUserId = this.assignUserId;
  594. }
  595. this.$api.postAnswer(data).then(res => {
  596. if (res.data.code == 200) {
  597. this.$u.toast('发布成功');
  598. self.getAnswerList();
  599. this.placeholder = '您可以在这里输入答疑内容';
  600. this.ctxValue = '';
  601. this.assignUserId = 0;
  602. }
  603. });
  604. },
  605. postContent() {
  606. if (!this.ctxValue||this.ctxValue=='') {
  607. this.$u.toast('请输入内容');
  608. return
  609. }
  610. this.postAnswer();
  611. },
  612. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  613. let currentTime = 0;
  614. var polyvPlayerContext = this.selectComponent('#playerVideo');
  615. if (polyvPlayerContext) {
  616. currentTime = polyvPlayerContext.getCurrentTime();
  617. }
  618. let self = this;
  619. console.log(self.ossAvatarUrl,"准备提交,照片地址")
  620. let data = {
  621. photo: self.ossAvatarUrl,
  622. sectionId: parseInt(sectionId),
  623. goodsId: parseInt(self.goodsId),
  624. courseId: parseInt(self.courseId),
  625. studyDuration: parseInt(currentTime > 0 ? currentTime : self.studyDuration),
  626. gradeId: parseInt(self.gradeId),
  627. chapterId: parseInt(self.chapterId),
  628. moduleId: parseInt(self.moduleId)
  629. };
  630. if (data.studyDuration <= 5) {
  631. //5秒内不上传记录
  632. return;
  633. }
  634. if (status > 0) {
  635. data.status = status;
  636. }
  637. console.log('提交接口', data);
  638. this.$api.studyRecord(data).then(res => {
  639. self.ossAvatarUrl = ''
  640. console.log(res);
  641. });
  642. },
  643. uploadFile(options, int) {
  644. var self = this;
  645. return new Promise((resolve, reject) => {
  646. var data = {
  647. imageStatus: int
  648. };
  649. self.$api.aliyunpolicy(data).then(res => {
  650. if (res.data.code != 200) {
  651. self.$method.showToast('签名错误' + JSON.stringify(res.data));
  652. return;
  653. }
  654. var ossToken = res.data.data.resultContent;
  655. if (ossToken.host == null || ossToken.host == undefined) {
  656. self.$method.showToast('上传路径报错' + JSON.stringify(res.data));
  657. return;
  658. }
  659. uni.uploadFile({
  660. url: ossToken.host,
  661. name: 'file',
  662. filePath: options,
  663. fileType: 'image',
  664. header: {
  665. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  666. },
  667. formData: {
  668. key: ossToken.dir,
  669. OSSAccessKeyId: ossToken.accessid,
  670. policy: ossToken.policy,
  671. Signature: ossToken.signature,
  672. callback: ossToken.callback,
  673. success_action_status: 200
  674. },
  675. success: result => {
  676. if (result.statusCode === 200) {
  677. self.ossAvatarUrl = ossToken.dir;
  678. resolve();
  679. } else {
  680. uni.showToast({
  681. title: '上传失败',
  682. icon: 'none'
  683. });
  684. return;
  685. }
  686. },
  687. fail: error => {
  688. uni.showToast({
  689. title: '上传接口报错' + error,
  690. icon: 'none'
  691. });
  692. return;
  693. }
  694. });
  695. });
  696. });
  697. },
  698. imageInfos() {
  699. var self = this;
  700. return new Promise((resolve, reject) => {
  701. uni.getImageInfo({
  702. src: self.avatarUrl,
  703. success: async res => {
  704. let canvasWidth = res.width; //图片原始长宽
  705. let canvasHeight = res.height;
  706. if (canvasWidth > 1000 || canvasHeight > 1000) {
  707. uni.compressImage({
  708. src: self.avatarUrl,
  709. quality: 75,
  710. width: '50%',
  711. height: '50%',
  712. success: async rest => {
  713. const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
  714. resolve();
  715. }
  716. });
  717. } else {
  718. console.log('无需压缩');
  719. const waitUpload = await self.uploadFile(self.avatarUrl, 0);
  720. resolve();
  721. }
  722. }
  723. });
  724. });
  725. },
  726. timeEvent() {
  727. let self = this;
  728. var polyvPlayerContext = this.selectComponent('#playerVideo');
  729. if (polyvPlayerContext != null) {
  730. let PlayCurrentTime = polyvPlayerContext.getVideoPlayDuration();
  731. this.studyDuration = PlayCurrentTime;
  732. if (this.currentTime < PlayCurrentTime) {
  733. this.playTime += PlayCurrentTime - this.currentTime;
  734. this.currentTime = PlayCurrentTime;
  735. } else {
  736. this.currentTime = PlayCurrentTime;
  737. }
  738. //判断是否需要拍照
  739. if (this.intervalTimeList.length > this.intervalTimeIndex) {
  740. let photoTime = Number(this.intervalTimeList[this.intervalTimeIndex]) * 60; //获取拍照秒数
  741. if (photoTime < this.playTime) {
  742. //启动拍照
  743. //暂停
  744. polyvPlayerContext.exitFullScreen();
  745. polyvPlayerContext.pause();
  746. this.openPhoto();
  747. this.intervalTimeIndex++;
  748. }
  749. }
  750. }
  751. },
  752. onStateChange(newstate, oldstate) {
  753. if (newstate.detail.newstate == 'playing') {
  754. if (this.needSeek) {
  755. var polyvPlayerContext = this.selectComponent('#playerVideo');
  756. polyvPlayerContext.seek(this.recordObj.studyDuration);
  757. polyvPlayerContext.play();
  758. this.needSeek = false;
  759. }
  760. //开始播放
  761. if (this.timer) {
  762. clearInterval(this.timer);
  763. }
  764. this.timer = setInterval(this.timeEvent, 1500); //定时器
  765. }
  766. if (newstate.detail.newstate == 'pause') {
  767. //暂停提交记录
  768. /* this.ossAvatarUrl = ""
  769. this.postStudyRecord() */
  770. }
  771. if (newstate.detail.newstate == 'ended') {
  772. this.postStudyRecord(1);
  773. }
  774. },
  775. //拍照
  776. openPhoto() {
  777. this.photoPopup = true;
  778. uni.authorize({
  779. scope: 'scope.camera',
  780. success() {
  781. }
  782. })
  783. },
  784. async submit() {
  785. const waitYS = await this.imageInfos();
  786. this.postStudyRecord(); //提交记录
  787. //恢复播放
  788. var polyvPlayerContext = this.selectComponent('#playerVideo');
  789. if (polyvPlayerContext != null) {
  790. polyvPlayerContext.play();
  791. }
  792. console.log(this.ossAvatarUrl, '拍照完成456');
  793. },
  794. //确认拍照
  795. takePhoto() {
  796. var self = this;
  797. const ctx = uni.createCameraContext();
  798. ctx.takePhoto({
  799. quality: 'high',
  800. success: res => {
  801. console.log(res.tempImagePath);
  802. self.avatarUrl = res.tempImagePath;
  803. self.submit();
  804. self.photoPopup = false;
  805. },
  806. fail: err => {
  807. console.log(err);
  808. }
  809. });
  810. },
  811. //拍照报错
  812. error(e) {
  813. console.log(e.detail);
  814. },
  815. //关闭相机
  816. closePhoto() {
  817. this.photoPopup = false;
  818. },
  819. getGoodsDetail() {
  820. let self = this;
  821. this.$api.goodsDetail(this.goodsId).then(res => {
  822. self.goodsData = res.data.data;
  823. self.gradeId = self.goodsData.gradeId;
  824. console.log(self.gradeId, 698);
  825. self.getMenuList();
  826. self.getReMenuList(); //获取重修目录
  827. setTimeout(function(){
  828. if(!self.needProfileModal){
  829. self.getGradeInfo()
  830. }
  831. },500)
  832. //获取节笔记
  833. this.getNoteList();
  834. if (self.goodsData.goodsPlayConfig) {
  835. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  836. if (self.goodsPlayConfig.autoPlay > 0) {
  837. self.autoplay = true;
  838. }
  839. if (self.goodsPlayConfig.drag > 0) {
  840. self.isAllowSeek = 'yes';
  841. }
  842. if (self.goodsPlayConfig.speed > 0) {
  843. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  844. }
  845. }
  846. if (self.goodsData.goodsPhotographConfig) {
  847. self.goodsPhotographConfig = JSON.parse(self.goodsData.goodsPhotographConfig);
  848. if (self.goodsPhotographConfig.intervalTime) {
  849. self.intervalTimeList = self.goodsPhotographConfig.intervalTime.split(',');
  850. }
  851. }
  852. });
  853. },
  854. startVideo() {
  855. this.startStatus = true;
  856. },
  857. getAnswerList() {
  858. let self = this;
  859. this.$api.answerList({ courseId: this.courseId }).then(res => {
  860. if (res.data.code == 200) {
  861. self.answerList = res.data.rows;
  862. }
  863. });
  864. },
  865. getReMenuList() {
  866. let self = this;
  867. this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
  868. if (res.data.code == 200) {
  869. for (let i = 0; i < res.data.rows.length; i++) {
  870. let item = res.data.rows[i];
  871. item.down = true;
  872. item.id = item.menuId;
  873. item.name = item.menuName;
  874. }
  875. self.reMenuList = res.data.rows;
  876. if(self.reMenuList.length>0){
  877. self.list.push({name:'重修目录'})
  878. }
  879. }
  880. });
  881. },
  882. getMenuList() {
  883. let self = this;
  884. this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
  885. if (res.data.code == 200) {
  886. for (let i = 0; i < res.data.rows.length; i++) {
  887. let item = res.data.rows[i];
  888. item.down = true;
  889. item.id = item.menuId;
  890. item.name = item.menuName;
  891. }
  892. self.menuList = res.data.rows;
  893. }
  894. });
  895. },
  896. courseDetail() {
  897. let self = this;
  898. this.$api.courseDetail(this.courseId).then(res => {
  899. if (res.data.code == 200) {
  900. self.detail = res.data.data;
  901. self.gradeId = self.detail.gradeId;
  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>