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