detail - 副本.vue 39 KB

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