detail.vue 34 KB

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