detail.vue 40 KB

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