detail.vue 36 KB

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