detail.vue 40 KB

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