detail.vue 37 KB

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