detail.vue 36 KB

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