detail.vue 37 KB

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