detail.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562
  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 == 2">
  77. <view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
  78. <view class="inputBottom">
  79. <view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
  80. <view style="width: 73%;height: 100%;padding: 10rpx 0;">
  81. <u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
  82. </view>
  83. <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
  84. </view>
  85. <view v-for="(item, index) in noteList" :key="index">
  86. <view class="dateBox">{{ $method.timestampToTime(item.dateNote) }}</view>
  87. <view class="noteBox">
  88. <view v-for="(item1, index1) in item.userNotes" :key="index1" style="margin-top: 30rpx;" @click="jumpNote(item1)">
  89. <view style="display: flex;">
  90. <view>
  91. <view>
  92. <image src="/static/icon/note2.png" v-if="noteId != item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  93. <image src="/static/icon/note1.png" v-if="noteId == item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  94. </view>
  95. <view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{ $method.secondToDate(item1.noteSecond) }}</view>
  96. </view>
  97. <view style="margin-left: 10rpx;">
  98. <view class="t2Content leftPadding">{{ item1.sectionName }}</view>
  99. <view class="tBox2">{{ item1.noteText }}</view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <!--答疑 -->
  107. <view v-show="current == 3">
  108. <view class="inputBottom">
  109. <view class="flex_auto">
  110. <u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
  111. </view>
  112. <view class="btn" @click="postContent">提交</view>
  113. </view>
  114. <view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
  115. <view class="chat_box" @click.stop="clearCtx">
  116. <view style="display: flex;">
  117. <view><image :src="$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
  118. <view style="margin-left: 15rpx;">
  119. <view class="chat1">{{ item.realname }}</view>
  120. <view class="chat2">{{ $method.timestampToTime(item.createTime) }}</view>
  121. <view class="chat3">
  122. <text v-if="item.assignUserId > 0">回复</text>
  123. <text v-if="item.assignUserId > 0" style="color: #007AFF;">@{{ item.assignRealname }}</text>
  124. {{ item.answerText }}
  125. </view>
  126. </view>
  127. </view>
  128. <view class="btnReply" @click.stop="replyContent(item)" v-if="item.userId != userInfo.userId">回复</view>
  129. <view v-else class="btnDel" @click.stop="delContent(item)">删除</view>
  130. </view>
  131. <u-line color="#D6D6DB" />
  132. </view>
  133. <view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
  134. </view>
  135. <!--目录 -->
  136. <view v-show="current == 4" >
  137. <view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
  138. <!--模块 -->
  139. <view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
  140. <!--章 -->
  141. <view v-if="item.type == 2">
  142. <courseChapter :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>
  143. </view>
  144. <!--节 -->
  145. <view v-if="item.type == 3">
  146. <courseSection :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 播放前拍照end -->
  152. <u-popup v-model="showSet" :mask-close-able="false" mode="center" border-radius="24">
  153. <view style="align-items:center;padding: 0 40rpx;display: flex;flex-direction: column;justify-content:center;">
  154. <view style="font-weight: bold;color: #333333;font-size: 30rpx;margin-top: 30rpx;">温馨提示</view>
  155. <view style="width: 457rpx;color: #666666;font-size: 30rpx;margin-top: 30rpx;">学习过程中需要拍照验证学员身份,
  156. 拍照功能需要使用您的相机。
  157. 是否授权使用?</view>
  158. <view style="margin: 40rpx 0;">
  159. <button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">去授权</button>
  160. </view>
  161. </view>
  162. </u-popup>
  163. <u-mask :show="photoPopup" >
  164. <!-- 播放前拍照start -->
  165. <view v-if="photoPopup" :mask-close-able="false" style="bottom: 0;position: fixed;width: 100%;z-index: 999;">
  166. <view class="photoBox">
  167. <view class="photoTop">
  168. <view class="sqzz" v-if="false"><u-icon name="close" color="#333333" size="30" @click="closePhoto"></u-icon></view>
  169. <view class="centersq">请正视手机屏幕</view>
  170. <view class="sqzz"></view>
  171. </view>
  172. <view class="photoCenter">
  173. <view style="width: 100%; height: 979rpx;position: fixed;" v-if="photoPopup">
  174. <camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%;" ></camera>
  175. </view>
  176. <view class="custom"><image src="@/pages2/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. console.log(this.gradeId,7512)
  354. if(this.gradeId>0){
  355. //提交完资料返回判断是否已开班
  356. this.getGradeInfo()
  357. }
  358. },
  359. onUnload() {
  360. if (this.playSectionId > 0) {
  361. //退出提交记录
  362. this.ossAvatarUrl = '';
  363. this.postStudyRecord();
  364. //清除正在播放的节ID
  365. this.$store.commit('setPlaySectionId', { playSectionId: 0 });
  366. //移除所有的事件监听器
  367. uni.$off();
  368. }
  369. },
  370. mounted() {
  371. uni.$on('changeSection', oldSectionId => {
  372. this.postStudyRecord(0, oldSectionId);
  373. });
  374. uni.$on('getSection', item => {
  375. this.playVideo(item);
  376. });
  377. uni.$on('levelId', item => {
  378. let arr = item.split('-');
  379. //点击节获取的各层级ID
  380. this.moduleId = arr[0];
  381. this.chapterId = arr[1];
  382. });
  383. },
  384. methods: {
  385. openSetting(res){
  386. console.log(res,98)
  387. },
  388. getCameraSetting () {
  389. const self = this
  390. wx.getSetting({
  391. success: res => {
  392. if (res.authSetting['scope.camera']) {
  393. // 用户已经授权
  394. self.showSet = false
  395. } else {
  396. // 用户还没有授权,向用户发起授权请求
  397. wx.authorize({
  398. scope: 'scope.camera',
  399. success() { // 用户同意授权
  400. self.showSet = false
  401. },
  402. fail() { // 用户不同意授权
  403. self.showSet = true
  404. /* wx.showToast({
  405. title: '摄像头授权失败',
  406. icon: 'none',
  407. duration: 3000
  408. }) */
  409. }
  410. })
  411. }
  412. },
  413. fail: res => {
  414. }
  415. })
  416. },
  417. openJY(){
  418. this.$u.toast('此功能正在开发中');
  419. },
  420. //播放笔记视频
  421. async playNoteVideo(item) {
  422. if (this.timer) {
  423. clearInterval(this.timer);
  424. }
  425. if (this.vid) {
  426. //切换视频
  427. var polyvPlayerContext = this.selectComponent('#playerVideo');
  428. polyvPlayerContext.changeVid(item.recordingUrl);
  429. } else {
  430. this.vid = item.recordingUrl;
  431. }
  432. this.recordObj = {studyDuration:item.noteSecond}
  433. if (this.recordObj.studyDuration) {
  434. this.needSeek = true; //需要跳转到播放记录
  435. }
  436. this.startStatus = true;
  437. //获取节笔记
  438. this.getNoteList();
  439. },
  440. //正常播放视频
  441. async playVideo(item) {
  442. if (this.timer) {
  443. clearInterval(this.timer);
  444. }
  445. if (this.vid) {
  446. //切换视频
  447. var polyvPlayerContext = this.selectComponent('#playerVideo');
  448. polyvPlayerContext.changeVid(item.recordingUrl);
  449. } else {
  450. this.vid = item.recordingUrl;
  451. }
  452. this.recordObj = await this.getRecordLast();
  453. if (this.recordObj.studyDuration) {
  454. this.needSeek = true; //需要跳转到播放记录
  455. }
  456. this.startStatus = true;
  457. //获取节笔记
  458. this.getNoteList();
  459. },
  460. getRecordLast() {
  461. let self = this;
  462. return new Promise(resolve => {
  463. let data = {
  464. gradeId: Number(self.gradeId),
  465. goodsId: Number(self.goodsId),
  466. sectionId: Number(self.playSectionId),
  467. courseId: Number(self.courseId)
  468. };
  469. self.$api.recordLast(data).then(res => {
  470. resolve(res.data.data);
  471. });
  472. });
  473. },
  474. jumpNote(item) {
  475. this.noteId = item.noteId;
  476. //没视频播放
  477. if(this.playSectionId==0){
  478. this.$u.toast('即将跳到笔记位置');
  479. this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
  480. this.playNoteVideo(item);
  481. }else{
  482. //正在看当前笔记视频
  483. this.$u.toast('即将跳到笔记位置');
  484. //跳到笔记时刻
  485. var polyvPlayerContext = this.selectComponent('#playerVideo');
  486. polyvPlayerContext.seek(item.noteSecond);
  487. polyvPlayerContext.play();
  488. }
  489. },
  490. postNote() {
  491. let self = this;
  492. if (!(this.playSectionId > 0)) {
  493. this.$u.toast('目前无播放视频');
  494. return;
  495. }
  496. if (!this.noteValue) {
  497. this.$u.toast('请输入内容');
  498. return;
  499. }
  500. if(!this.gradeId){
  501. this.$u.toast('暂无班级数据');
  502. return;
  503. }
  504. var polyvPlayerContext = this.selectComponent('#playerVideo');
  505. let noteDate = this.$method.getZeroTime();
  506. let noteSecond = polyvPlayerContext.getCurrentTime();
  507. console.log(noteSecond,698)
  508. if (!noteSecond) {
  509. if(noteSecond==0){
  510. //播放结束
  511. noteSecond = polyvPlayerContext.getDuration();
  512. console.log(noteSecond,63398)
  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. let PlayCurrentTime = polyvPlayerContext.getVideoPlayDuration();
  743. this.studyDuration = PlayCurrentTime;
  744. if (this.currentTime < PlayCurrentTime) {
  745. this.playTime += PlayCurrentTime - this.currentTime;
  746. this.currentTime = PlayCurrentTime;
  747. } else {
  748. this.currentTime = PlayCurrentTime;
  749. }
  750. //判断是否需要拍照
  751. if (this.intervalTimeList.length > this.intervalTimeIndex) {
  752. let photoTime = Number(this.intervalTimeList[this.intervalTimeIndex]) * 60; //获取拍照秒数
  753. if (photoTime < this.playTime) {
  754. //启动拍照
  755. //暂停
  756. polyvPlayerContext.exitFullScreen();
  757. polyvPlayerContext.pause();
  758. this.openPhoto();
  759. this.intervalTimeIndex++;
  760. }
  761. }
  762. }
  763. },
  764. onStateChange(newstate, oldstate) {
  765. if (newstate.detail.newstate == 'playing') {
  766. if (this.needSeek) {
  767. var polyvPlayerContext = this.selectComponent('#playerVideo');
  768. polyvPlayerContext.seek(this.recordObj.studyDuration);
  769. polyvPlayerContext.play();
  770. this.needSeek = false;
  771. }
  772. //开始播放
  773. if (this.timer) {
  774. clearInterval(this.timer);
  775. }
  776. this.timer = setInterval(this.timeEvent, 1500); //定时器
  777. }
  778. if (newstate.detail.newstate == 'pause') {
  779. //暂停提交记录
  780. /* this.ossAvatarUrl = ""
  781. this.postStudyRecord() */
  782. }
  783. if (newstate.detail.newstate == 'ended') {
  784. this.postStudyRecord(1);
  785. }
  786. },
  787. //拍照
  788. openPhoto() {
  789. this.photoPopup = true;
  790. uni.authorize({
  791. scope: 'scope.camera',
  792. success() {
  793. }
  794. })
  795. },
  796. async submit() {
  797. const waitYS = await this.imageInfos();
  798. this.postStudyRecord(); //提交记录
  799. //恢复播放
  800. var polyvPlayerContext = this.selectComponent('#playerVideo');
  801. if (polyvPlayerContext != null) {
  802. polyvPlayerContext.play();
  803. }
  804. console.log(this.ossAvatarUrl, '拍照完成456');
  805. },
  806. //确认拍照
  807. takePhoto() {
  808. var self = this;
  809. const ctx = uni.createCameraContext();
  810. ctx.takePhoto({
  811. quality: 'high',
  812. success: res => {
  813. console.log(res.tempImagePath);
  814. self.avatarUrl = res.tempImagePath;
  815. self.submit();
  816. self.photoPopup = false;
  817. },
  818. fail: err => {
  819. console.log(err);
  820. }
  821. });
  822. },
  823. //拍照报错
  824. error(e) {
  825. console.log(e.detail);
  826. },
  827. //关闭相机
  828. closePhoto() {
  829. this.photoPopup = false;
  830. },
  831. getGoodsDetail() {
  832. let self = this;
  833. this.$api.goodsDetail(this.goodsId).then(res => {
  834. self.goodsData = res.data.data;
  835. self.gradeId = self.goodsData.gradeId;
  836. console.log(self.gradeId, "班级ID");
  837. self.getMenuList();
  838. self.getReMenuList(); //获取重修目录
  839. setTimeout(function(){
  840. if(!self.needProfileModal){
  841. self.getGradeInfo()
  842. }
  843. },500)
  844. //获取节笔记
  845. this.getNoteList();
  846. if (self.goodsData.goodsPlayConfig) {
  847. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  848. if (self.goodsPlayConfig.autoPlay > 0) {
  849. self.autoplay = true;
  850. }
  851. if (self.goodsPlayConfig.drag > 0) {
  852. self.isAllowSeek = 'yes';
  853. }
  854. if (self.goodsPlayConfig.speed > 0) {
  855. self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
  856. }
  857. }
  858. if (self.goodsData.goodsPhotographConfig) {
  859. self.goodsPhotographConfig = JSON.parse(self.goodsData.goodsPhotographConfig);
  860. if (self.goodsPhotographConfig.intervalTime) {
  861. self.intervalTimeList = self.goodsPhotographConfig.intervalTime.split(',');
  862. }
  863. }
  864. });
  865. },
  866. startVideo() {
  867. this.startStatus = true;
  868. },
  869. getAnswerList() {
  870. let self = this;
  871. this.$api.answerList({ courseId: this.courseId }).then(res => {
  872. if (res.data.code == 200) {
  873. self.answerList = res.data.rows;
  874. }
  875. });
  876. },
  877. getReMenuList() {
  878. let self = this;
  879. this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
  880. if (res.data.code == 200) {
  881. for (let i = 0; i < res.data.rows.length; i++) {
  882. let item = res.data.rows[i];
  883. item.down = true;
  884. item.id = item.menuId;
  885. item.name = item.menuName;
  886. }
  887. self.reMenuList = res.data.rows;
  888. if(self.reMenuList.length>0){
  889. self.list = [
  890. {
  891. name: '目录'
  892. },
  893. {
  894. name: '讲义'
  895. },
  896. {
  897. name: '笔记'
  898. },
  899. {
  900. name: '答疑'
  901. },
  902. {name:'重修目录'}
  903. ];
  904. this.current = 0;
  905. } else {
  906. self.list = [
  907. {
  908. name: '目录'
  909. },
  910. {
  911. name: '讲义'
  912. },
  913. {
  914. name: '笔记'
  915. },
  916. {
  917. name: '答疑'
  918. }
  919. ];
  920. this.current = 0;
  921. }
  922. }
  923. });
  924. },
  925. getMenuList() {
  926. let self = this;
  927. this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
  928. if (res.data.code == 200) {
  929. for (let i = 0; i < res.data.rows.length; i++) {
  930. let item = res.data.rows[i];
  931. item.down = true;
  932. item.id = item.menuId;
  933. item.name = item.menuName;
  934. }
  935. self.menuList = res.data.rows;
  936. }
  937. });
  938. },
  939. courseDetail() {
  940. let self = this;
  941. this.$api.courseDetail(this.courseId).then(res => {
  942. if (res.data.code == 200) {
  943. self.detail = res.data.data;
  944. uni.setNavigationBarTitle({
  945. title:res.data.data.courseName || '课程详情'
  946. })
  947. }
  948. });
  949. },
  950. open(item) {
  951. item.showChildren = !item.showChildren;
  952. },
  953. change(index) {
  954. this.current = index;
  955. },
  956. openDocument() {
  957. console.log(111)
  958. uni.downloadFile({
  959. 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',
  960. success: function (res) {
  961. console.log(999)
  962. var filePath = res.tempFilePath;
  963. uni.openDocument({
  964. filePath: filePath,
  965. showMenu: true,
  966. success: function (res) {
  967. console.log(res,'打开文档成功');
  968. },
  969. fail:function(err) {
  970. console.log(err)
  971. }
  972. });
  973. }
  974. });
  975. }
  976. }
  977. };
  978. </script>
  979. <style lang="scss" scope>
  980. .btnSet{
  981. width: 440rpx;
  982. height: 80rpx;
  983. background: #007AFF;
  984. border-radius: 40rpx;
  985. color: #FFFFFF;
  986. font-size: 28rpx;
  987. line-height: 80rpx;
  988. }
  989. .btnReply {
  990. width: 80rpx;
  991. height: 40rpx;
  992. background: #e3f0ff;
  993. border-radius: 16rpx;
  994. text-align: center;
  995. color: #007aff;
  996. }
  997. .btnDel {
  998. width: 80rpx;
  999. height: 40rpx;
  1000. background: #ffedf0;
  1001. border-radius: 16rpx;
  1002. text-align: center;
  1003. color: #ff2d55;
  1004. }
  1005. .btnReply {
  1006. width: 80rpx;
  1007. height: 40rpx;
  1008. background: #e3f0ff;
  1009. border-radius: 16rpx;
  1010. font-size: 24rpx;
  1011. }
  1012. .lecture-box {
  1013. display: flex;
  1014. align-items: center;
  1015. height: 80rpx;
  1016. background: #FFFFFF;
  1017. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1018. .title {
  1019. padding:10rpx;
  1020. flex:1;
  1021. overflow: hidden;
  1022. text-overflow: ellipsis;
  1023. white-space: nowrap;
  1024. color:#333;
  1025. font-weight: bold;
  1026. font-size: 32rpx;
  1027. }
  1028. .btn {
  1029. display: flex;
  1030. align-items: center;
  1031. justify-content: center;
  1032. width:80rpx;
  1033. height:80rpx;
  1034. background: #FFFFFF;
  1035. box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0,0,0,0.1);
  1036. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1037. }
  1038. }
  1039. .lecture-content {
  1040. background:#fff;
  1041. margin-top:10rpx;
  1042. padding:10rpx;
  1043. border-radius:16rpx;
  1044. }
  1045. .photoBox {
  1046. background-color: #FFFFFF;
  1047. border-radius: 32px 32px 0px 0px;
  1048. .photoTop {
  1049. height: 74upx;
  1050. display: flex;
  1051. align-items: center;
  1052. justify-content: space-between;
  1053. padding: 0upx 38upx;
  1054. .sqzz {
  1055. width: 28upx;
  1056. height: 28upx;
  1057. display: flex;
  1058. align-items: center;
  1059. justify-content: center;
  1060. }
  1061. .centersq {
  1062. color: #333;
  1063. font-size: 30upx;
  1064. font-weight: 500;
  1065. }
  1066. }
  1067. .photoCenter {
  1068. width: 750upx;
  1069. height: 979upx;
  1070. position: relative;
  1071. .custom {
  1072. width: 750upx;
  1073. height: 979upx;
  1074. position: absolute;
  1075. z-index: 1000;
  1076. top: 0;
  1077. left: 0;
  1078. image {
  1079. width: 100%;
  1080. height: 100%;
  1081. }
  1082. }
  1083. }
  1084. .btnResult {
  1085. height: 100rpx;
  1086. width: 100%;
  1087. background-color: #07c160;
  1088. text-align: center;
  1089. line-height: 100upx;
  1090. color: #fff;
  1091. font-size: 32upx;
  1092. font-weight: bold;
  1093. }
  1094. }
  1095. .chat_box {
  1096. display: flex;
  1097. padding: 20rpx;
  1098. justify-content: space-between;
  1099. }
  1100. .chat3 {
  1101. font-size: 30rpx;
  1102. font-family: PingFang SC;
  1103. font-weight: 500;
  1104. color: #666666;
  1105. margin-top: 10rpx;
  1106. }
  1107. .chat2 {
  1108. font-size: 20rpx;
  1109. font-family: PingFang SC;
  1110. font-weight: 500;
  1111. color: #999999;
  1112. margin-top: 10rpx;
  1113. }
  1114. .chat1 {
  1115. font-size: 24rpx;
  1116. font-family: PingFang SC;
  1117. font-weight: 500;
  1118. color: #333333;
  1119. }
  1120. .leftPadding {
  1121. margin-left: 8rpx;
  1122. }
  1123. .t2Content {
  1124. font-size: 28rpx;
  1125. font-family: PingFang SC;
  1126. font-weight: bold;
  1127. color: #999999;
  1128. line-height: 48rpx;
  1129. }
  1130. .tBox2 {
  1131. display: flex;
  1132. padding-top: 10rpx;
  1133. color: #333333;
  1134. font-size: 30rpx;
  1135. }
  1136. .tBox {
  1137. display: flex;
  1138. align-items: center;
  1139. padding-top: 10rpx;
  1140. }
  1141. .title {
  1142. font-size: 24rpx;
  1143. color: #999999;
  1144. }
  1145. page {
  1146. padding-top: 10px;
  1147. padding-top: constant(safe-area-inset-top);
  1148. padding-top: env(safe-area-inset-top);
  1149. }
  1150. .inputBottom {
  1151. position: fixed;
  1152. left: 0;
  1153. bottom: 0;
  1154. background: #ffffff;
  1155. height: 98rpx;
  1156. display: flex;
  1157. align-items: center;
  1158. width: 100%;
  1159. .flex_auto {
  1160. flex:1;
  1161. margin-left: 10% ;
  1162. .input {
  1163. height:60rpx;
  1164. }
  1165. }
  1166. .btn {
  1167. color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;
  1168. }
  1169. }
  1170. .noteBox {
  1171. width: 100%;
  1172. background: #ffffff;
  1173. padding: 10rpx;
  1174. border-radius: 16rpx;
  1175. }
  1176. .dateBox {
  1177. width: 216rpx;
  1178. height: 48rpx;
  1179. background: #ffffff;
  1180. border-radius: 24rpx;
  1181. font-size: 24rpx;
  1182. color: #666666;
  1183. text-align: center;
  1184. line-height: 48rpx;
  1185. margin: 20rpx 0;
  1186. }
  1187. .t_content1 {
  1188. color: #007aff;
  1189. margin-left: 10rpx;
  1190. }
  1191. .tag1 {
  1192. border: 2rpx solid #007aff;
  1193. border-radius: 8rpx;
  1194. font-size: 20rpx;
  1195. color: #007aff;
  1196. padding: 5rpx;
  1197. }
  1198. .b_title {
  1199. color: #333333;
  1200. font-size: 30rpx;
  1201. font-weight: bold;
  1202. }
  1203. page {
  1204. background: #eaeef1;
  1205. }
  1206. .menuBox {
  1207. width: 100%;
  1208. background: #ffffff;
  1209. border-radius: 16rpx;
  1210. padding: 20rpx;
  1211. margin-bottom: 20rpx;
  1212. }
  1213. .btnspric {
  1214. border-top: 1rpx solid #eee;
  1215. display: flex;
  1216. align-items: center;
  1217. justify-content: space-between;
  1218. height: 108rpx;
  1219. padding-left: 43rpx;
  1220. padding-right: 32rpx;
  1221. }
  1222. .btnspric > .lefprL {
  1223. font-size: 36rpx;
  1224. color: #0c141f;
  1225. font-weight: bold;
  1226. }
  1227. .btnspric > .lefprR {
  1228. padding: 0rpx 24rpx;
  1229. height: 60rpx;
  1230. line-height: 60rpx;
  1231. text-align: center;
  1232. color: #fff;
  1233. background: #32467b;
  1234. border-radius: 24rpx;
  1235. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1236. }
  1237. .yhj,
  1238. .hdyhj {
  1239. padding: 24rpx 29rpx 24rpx 34rpx;
  1240. }
  1241. .yhj {
  1242. border-bottom: 16rpx solid #f9f9f9;
  1243. }
  1244. .yhjtit {
  1245. font-size: 30rpx;
  1246. color: #0c141f;
  1247. font-weight: 500;
  1248. margin-bottom: 14rpx;
  1249. }
  1250. .yhjList {
  1251. display: flex;
  1252. align-items: center;
  1253. justify-content: space-between;
  1254. margin-bottom: 14rpx;
  1255. }
  1256. .yhjList > .yhjLefts {
  1257. display: flex;
  1258. align-items: center;
  1259. }
  1260. .yhjLefts > .yhl {
  1261. color: #32467b;
  1262. font-size: 30rpx;
  1263. margin-right: 31rpx;
  1264. }
  1265. .yhjLefts > .yhbq {
  1266. font-size: 24rpx;
  1267. color: #ff9500;
  1268. border-radius: 18rpx;
  1269. background-color: rgba(255, 149, 0, 0.2);
  1270. border: 2rpx solid #ff9500;
  1271. height: 38rpx;
  1272. line-height: 38rpx;
  1273. padding: 0rpx 16rpx;
  1274. }
  1275. .ts {
  1276. font-size: 24rpx;
  1277. color: #999;
  1278. margin: 14rpx 0rpx;
  1279. padding-right: 29rpx;
  1280. padding-left: 34rpx;
  1281. }
  1282. .yh {
  1283. padding-top: 20rpx;
  1284. }
  1285. .yh > .yhtitle {
  1286. display: flex;
  1287. align-items: center;
  1288. justify-content: space-between;
  1289. padding-right: 29rpx;
  1290. padding-left: 34rpx;
  1291. }
  1292. .priceBxs {
  1293. display: flex;
  1294. align-items: center;
  1295. }
  1296. .priceBxs > .pricleft {
  1297. border-radius: 24rpx;
  1298. border: 1rpx solid #e91313;
  1299. background-color: rgba(233, 19, 19, 0.1);
  1300. padding: 0rpx 18rpx;
  1301. height: 49rpx;
  1302. line-height: 49rpx;
  1303. text-align: center;
  1304. font-size: 30rpx;
  1305. font-weight: 500;
  1306. color: #e91313;
  1307. margin-right: 13rpx;
  1308. }
  1309. .topBox {
  1310. padding: 32rpx 32rpx 24rpx;
  1311. border-bottom: 1rpx solid #eeeeee;
  1312. }
  1313. .topBox > .boldFonstType {
  1314. font-weight: 500;
  1315. font-size: 30rpx;
  1316. margin: 16rpx 0rpx 23rpx;
  1317. }
  1318. .topBox > .firstTopL {
  1319. display: flex;
  1320. align-items: center;
  1321. }
  1322. .topBox > .firstTopL > .imageBs {
  1323. width: 331rpx;
  1324. height: 160rpx;
  1325. border-radius: 6rpx;
  1326. overflow: hidden;
  1327. margin-right: 8rpx;
  1328. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  1329. }
  1330. .topBox > .firstTopL > .imageBs > image {
  1331. width: 100%;
  1332. height: 100%;
  1333. }
  1334. .topBox > .firstTopL > .textBs {
  1335. font-size: 30rpx;
  1336. font-weight: bold;
  1337. color: #0c141f;
  1338. }
  1339. .content {
  1340. padding: 24rpx;
  1341. text-align: left;
  1342. }
  1343. .catalogBox {
  1344. display: flex;
  1345. align-items: center;
  1346. flex-wrap: nowrap;
  1347. overflow-x: auto;
  1348. padding-left: 38rpx;
  1349. max-height: 305rpx;
  1350. overflow-y: auto;
  1351. transition: all 0.4s;
  1352. }
  1353. .catalogBox > .catalogA {
  1354. min-width: 200rpx;
  1355. height: 48rpx;
  1356. line-height: 48rpx;
  1357. // text-align: center;
  1358. border: 2rpx solid transparent;
  1359. white-space: nowrap;
  1360. text-overflow: ellipsis;
  1361. overflow: hidden;
  1362. word-break: break-all;
  1363. border-radius: 10rpx;
  1364. background: rgba(22, 119, 255, 0.05);
  1365. padding-left: 19rpx;
  1366. box-sizing: border-box;
  1367. padding-right: 15rpx;
  1368. margin-right: 16rpx;
  1369. margin-bottom: 20rpx;
  1370. margin-top: 15rpx;
  1371. font-size: 24rpx;
  1372. color: #666;
  1373. }
  1374. .catalogBox > .activesq {
  1375. border-color: #1677ff;
  1376. }
  1377. .changeCatalogBox {
  1378. display: block;
  1379. }
  1380. .catalogBox::-webkit-scrollbar {
  1381. display: none; /* Chrome Safari */
  1382. }
  1383. .box {
  1384. position: relative;
  1385. top: 650rpx;
  1386. padding-bottom: 88rpx;
  1387. margin: 20rpx;
  1388. }
  1389. .price_t2 {
  1390. font-size: 18rpx;
  1391. font-family: PingFang SC;
  1392. font-weight: 500;
  1393. text-decoration: line-through;
  1394. color: #999999;
  1395. }
  1396. .price_t1 {
  1397. font-size: 33rpx;
  1398. font-family: PingFang SC;
  1399. font-weight: bold;
  1400. color: #e91313;
  1401. }
  1402. .sc_t {
  1403. font-size: 22rpx;
  1404. color: #000000;
  1405. }
  1406. .sc {
  1407. width: 29rpx;
  1408. height: 29rpx;
  1409. }
  1410. .buy {
  1411. width: 138rpx;
  1412. height: 48rpx;
  1413. line-height: 48rpx;
  1414. background: #32467b;
  1415. border-radius: 10rpx;
  1416. color: #ffffff;
  1417. font-size: 28rpx;
  1418. text-align: center;
  1419. vertical-align: middle;
  1420. position: absolute;
  1421. right: 30rpx;
  1422. }
  1423. .video_body {
  1424. padding-bottom: 96rpx;
  1425. }
  1426. .footer_tab {
  1427. position: fixed;
  1428. bottom: 0;
  1429. height: 96rpx;
  1430. width: 100%;
  1431. background-color: #ffffff;
  1432. }
  1433. .tj_box {
  1434. width: 50%;
  1435. display: inline-block;
  1436. text-align: center;
  1437. margin: 10rpx 0;
  1438. }
  1439. .teacher_t {
  1440. font-size: 24rpx;
  1441. font-family: PingFang SC;
  1442. font-weight: 400;
  1443. color: #666666;
  1444. line-height: 36rpx;
  1445. margin-left: 15rpx;
  1446. }
  1447. .teacher_img {
  1448. width: 87rpx;
  1449. height: 129rpx;
  1450. }
  1451. .t2 {
  1452. font-size: 24rpx;
  1453. font-family: PingFang SC;
  1454. color: #666666;
  1455. line-height: 36rpx;
  1456. margin: 15rpx;
  1457. }
  1458. .r_t2 {
  1459. width: 201rpx;
  1460. height: 49rpx;
  1461. background: rgba(22, 119, 255, 0.05);
  1462. border: 1rpx solid #32467b;
  1463. border-radius: 16rpx;
  1464. color: #666666;
  1465. font-size: 23rpx;
  1466. text-align: center;
  1467. display: flex;
  1468. align-items: center;
  1469. padding: 5rpx;
  1470. }
  1471. .scroll_box {
  1472. width: 100%;
  1473. height: 60rpx;
  1474. background: #ffffff;
  1475. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  1476. white-space: nowrap;
  1477. overflow: hidden;
  1478. margin: 15rpx 0;
  1479. }
  1480. .r_sliper {
  1481. padding: 0 20rpx;
  1482. }
  1483. .top_line {
  1484. width: 6rpx;
  1485. height: 22rpx;
  1486. background: #32467b;
  1487. margin-right: 10rpx;
  1488. }
  1489. .video_t2 {
  1490. font-size: 24rpx;
  1491. font-family: PingFang SC;
  1492. font-weight: 500;
  1493. color: #666666;
  1494. }
  1495. .video_t1 {
  1496. height: 80rpx;
  1497. color: #333333;
  1498. line-height: 80rpx;
  1499. font-size: 30rpx;
  1500. font-family: PingFang SC;
  1501. font-weight: bold;
  1502. color: #333333;
  1503. overflow: hidden;
  1504. text-overflow: ellipsis;
  1505. white-space: nowrap;
  1506. }
  1507. .video_t1_t {
  1508. display: flex;
  1509. flex-direction: column;
  1510. height: 80rpx;
  1511. color: #333333;
  1512. text-align: center;
  1513. align-items: center;
  1514. border-left: solid 1px #d6d6db;
  1515. }
  1516. .video_play {
  1517. position: absolute;
  1518. width: 95rpx;
  1519. height: 95rpx;
  1520. top: 0;
  1521. left: 0;
  1522. right: 0;
  1523. bottom: 0;
  1524. margin: auto;
  1525. }
  1526. .video_box {
  1527. position: relative;
  1528. }
  1529. .rotoct {
  1530. transform: rotate(90deg);
  1531. }
  1532. </style>