detail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <template>
  2. <view>
  3. <view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
  4. <view class="video_box">
  5. <image
  6. src="https://cdn.uviewui.com/uview/swiper/3.jpg"
  7. style="width: 100%;height: 460rpx;"
  8. ></image>
  9. <image v-if="!startStatus" class="video_play" src="/static/play.png" @click="startVideo"></image>
  10. </view>
  11. <view >
  12. <u-row>
  13. <u-col span="10" >
  14. <view class="video_t1">{{detail.courseName}}</view>
  15. </u-col>
  16. <u-col span="2">
  17. <view class="video_t1_t">
  18. <image src="/static/icon/jy_icon.png" style="width: 40rpx;height: 40rpx;"></image>
  19. 讲义
  20. </view>
  21. </u-col>
  22. </u-row>
  23. </view>
  24. <u-line color="#D6D6DB" />
  25. <view>
  26. <view style="width: 240px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="80" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
  27. </view>
  28. <u-line color="#D6D6DB" />
  29. </view>
  30. <view class="box" >
  31. <!--目录 -->
  32. <view v-show="current==0">
  33. <view class="menuBox" v-for="(item, index) in menuList">
  34. <!--模块 -->
  35. <view v-if="item.type==1">
  36. <courseModule :menuItem="item"></courseModule>
  37. </view>
  38. <!--章 -->
  39. <view v-if="item.type==2">
  40. <courseChapter :menuItem="item"></courseChapter>
  41. </view>
  42. <!--节 -->
  43. <view v-if="item.type==3">
  44. <courseSection :menuItem="item"></courseSection>
  45. </view>
  46. </view>
  47. </view>
  48. <!--笔记 -->
  49. <view v-show="current==1">
  50. <view class="inputBottom" >
  51. <view style="width: 10%;">
  52. <image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  53. </view>
  54. <view style="width: 73%;height: 88rpx;margin-bottom: 15rpx;">
  55. <u-input height="78" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="value" />
  56. </view>
  57. <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;">
  58. 提交
  59. </view>
  60. </view>
  61. <view v-for="(item, index) in menuList">
  62. <view class="dateBox">2021年10月30日</view>
  63. <view class="noteBox">
  64. <view class="tBox">
  65. <image src="/static/icon/note1.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  66. <view class="title leftPadding">施工承发包模式-施工合同与物资采购合同</view>
  67. </view>
  68. <view class="tBox2">
  69. <view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">00:20</view>
  70. <view class="t2Content leftPadding">
  71. 这是一段用户记录的笔记本文,当内容过长时
  72. 需要换行,完整显示文字内容。
  73. </view>
  74. </view>
  75. <view class="tBox">
  76. <image src="/static/icon/note2.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
  77. <view class="title leftPadding">施工承发包模式-施工合同与物资采购合同</view>
  78. </view>
  79. <view style="margin-left: 97rpx;" class="t2Content leftPadding">
  80. 这是一段用户记录的笔记本文,当内容过长时
  81. 需要换行,完整显示文字内容。
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. <!--答疑 -->
  87. <view v-show="current==2">
  88. <view class="inputBottom">
  89. <view style="width: 73%;height: 88rpx;margin-bottom: 15rpx;margin-left: 10% ;">
  90. <u-input height="78" fixed="true" placeholder="您可以在这里输入答疑内容" type="textarea" :custom-style="inputStyle" v-model="value" />
  91. </view>
  92. <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;">
  93. 提交
  94. </view>
  95. </view>
  96. <view v-for="(item, index) in menuList" style="background-color: #FFFFFF;">
  97. <view class="chat_box" >
  98. <view>
  99. <image src="https://file-dev.xyyxt.net/oss/images/avatar/20210623/1624414559368_44562477.png" style="width: 64rpx;height: 64rpx;"></image>
  100. </view>
  101. <view style="margin-left: 15rpx;">
  102. <view class="chat1">倪虹洁</view>
  103. <view class="chat2">2021/10/31 09:36:23</view>
  104. <view class="chat3">老师的课讲得太棒了!</view>
  105. </view>
  106. </view>
  107. <u-line color="#D6D6DB" />
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </template>
  113. <script>
  114. import courseModule from '@/pages2/components/course/courseModule.vue';
  115. import courseChapter from '@/pages2/components/course/courseChapter.vue';
  116. import courseSection from '@/pages2/components/course/courseSection.vue';
  117. import { mapGetters } from 'vuex';
  118. export default {
  119. components: {
  120. courseModule,
  121. courseChapter,
  122. courseSection
  123. },
  124. data() {
  125. return {
  126. detail:{},
  127. courseId:0,
  128. placeholder:"您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记",
  129. inputStyle:{
  130. background: 'rgba(244, 244, 244, 0.98)',
  131. borderRadius: '24rpx',
  132. padding: '8rpx',
  133. marginBottom: '10rpx'
  134. },
  135. playbackRate: [0.5, 0.8, 1.0],
  136. list: [
  137. {
  138. name: '目录'
  139. },
  140. {
  141. name: '笔记'
  142. },
  143. {
  144. name: '答疑'
  145. }
  146. ],
  147. menuList:[
  148. {
  149. list:[{
  150. showChildren:false,
  151. children:[1,2,3]
  152. },{
  153. showChildren:false,
  154. children:[1]
  155. },{
  156. showChildren:false,
  157. children:[1,2]
  158. }],
  159. type:1
  160. },{
  161. type:2,
  162. showChildren:false,
  163. list:[{
  164. },{
  165. },{
  166. }],
  167. },{
  168. type:3,
  169. list:[{},{}]
  170. }
  171. ],
  172. current:0,
  173. menuList:[]
  174. };
  175. },
  176. onUnload() {
  177. },
  178. computed: { ...mapGetters(['userInfo']) },
  179. onLoad(option) {
  180. this.courseId = option.id
  181. this.courseDetail()
  182. this.getMenuList()
  183. console.log(this.courseId,66)
  184. },
  185. onShow() {
  186. },
  187. methods: {
  188. getMenuList() {
  189. let self = this
  190. this.$api.menuList({courseId:this.courseId}).then(res => {
  191. if(res.data.code==200){
  192. for(let i=0;i<res.data.rows.length;i++){
  193. let item = res.data.rows[i]
  194. item.down = true
  195. item.id = item.menuId
  196. item.name = item.menuName
  197. }
  198. self.menuList = res.data.rows
  199. }
  200. });
  201. },
  202. courseDetail() {
  203. let self = this
  204. this.$api.courseDetail(this.courseId).then(res => {
  205. if(res.data.code==200){
  206. self.detail = res.data.data
  207. }
  208. });
  209. },
  210. open(item){
  211. item.showChildren = !item.showChildren
  212. },
  213. change(index){
  214. this.current = index;
  215. }
  216. }
  217. };
  218. </script>
  219. <style scope>
  220. .chat_box{
  221. display: flex;
  222. padding: 20rpx;
  223. }
  224. .chat3{
  225. font-size: 30rpx;
  226. font-family: PingFang SC;
  227. font-weight: 500;
  228. color: #666666;
  229. margin-top: 10rpx;
  230. }
  231. .chat2{
  232. font-size: 20rpx;
  233. font-family: PingFang SC;
  234. font-weight: 500;
  235. color: #999999;
  236. margin-top: 10rpx;
  237. }
  238. .chat1{
  239. font-size: 24rpx;
  240. font-family: PingFang SC;
  241. font-weight: 500;
  242. color: #333333;
  243. }
  244. .leftPadding{
  245. margin-left: 8rpx;
  246. }
  247. .t2Content{
  248. font-size: 30rpx;
  249. font-family: PingFang SC;
  250. font-weight: bold;
  251. color: #333333;
  252. line-height: 48rpx;
  253. }
  254. .tBox2{
  255. display: flex;
  256. padding-top: 10rpx;
  257. }
  258. .tBox{
  259. display: flex;
  260. align-items: center;
  261. padding-top: 10rpx;
  262. }
  263. .title{
  264. font-size: 24rpx;
  265. color: #999999;
  266. }
  267. page{
  268. padding-top: 10px;
  269. padding-top: constant(safe-area-inset-top);
  270. padding-top: env(safe-area-inset-top);
  271. }
  272. .inputBottom{
  273. position: fixed;
  274. left: 0;
  275. bottom: 0;
  276. background: #FFFFFF;
  277. height: 98rpx;
  278. display: flex;
  279. align-items: center;
  280. width: 100%;
  281. }
  282. .noteBox{
  283. width: 100%;
  284. background: #FFFFFF;
  285. border-radius: 16rpx;
  286. padding: 10rpx;
  287. }
  288. .dateBox{
  289. width: 216rpx;
  290. height: 48rpx;
  291. background: #FFFFFF;
  292. border-radius: 24rpx;
  293. font-size: 24rpx;
  294. color: #666666;
  295. text-align: center;
  296. line-height: 48rpx;
  297. margin: 20rpx 0;
  298. }
  299. .t_content1{
  300. color: #007AFF;
  301. margin-left: 10rpx;
  302. }
  303. .tag1{
  304. border: 2rpx solid #007AFF;
  305. border-radius: 8rpx;
  306. font-size: 20rpx;
  307. color: #007AFF;
  308. padding: 5rpx;
  309. }
  310. .b_title{
  311. color: #333333;
  312. font-size: 30rpx;
  313. font-weight: bold;
  314. }
  315. page {
  316. background: #EAEEF1;
  317. }
  318. .menuBox{
  319. width: 100%;
  320. background: #FFFFFF;
  321. border-radius: 16rpx;
  322. padding: 20rpx;
  323. margin-bottom: 20rpx;
  324. }
  325. .btnspric {
  326. border-top: 1rpx solid #eee;
  327. display: flex;
  328. align-items: center;
  329. justify-content: space-between;
  330. height: 108rpx;
  331. padding-left: 43rpx;
  332. padding-right: 32rpx;
  333. }
  334. .btnspric > .lefprL {
  335. font-size: 36rpx;
  336. color: #0c141f;
  337. font-weight: bold;
  338. }
  339. .btnspric > .lefprR {
  340. padding: 0rpx 24rpx;
  341. height: 60rpx;
  342. line-height: 60rpx;
  343. text-align: center;
  344. color: #fff;
  345. background: #32467b;
  346. border-radius: 24rpx;
  347. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  348. }
  349. .yhj,
  350. .hdyhj {
  351. padding: 24rpx 29rpx 24rpx 34rpx;
  352. }
  353. .yhj {
  354. border-bottom: 16rpx solid #f9f9f9;
  355. }
  356. .yhjtit {
  357. font-size: 30rpx;
  358. color: #0c141f;
  359. font-weight: 500;
  360. margin-bottom: 14rpx;
  361. }
  362. .yhjList {
  363. display: flex;
  364. align-items: center;
  365. justify-content: space-between;
  366. margin-bottom: 14rpx;
  367. }
  368. .yhjList > .yhjLefts {
  369. display: flex;
  370. align-items: center;
  371. }
  372. .yhjLefts > .yhl {
  373. color: #32467b;
  374. font-size: 30rpx;
  375. margin-right: 31rpx;
  376. }
  377. .yhjLefts > .yhbq {
  378. font-size: 24rpx;
  379. color: #ff9500;
  380. border-radius: 18rpx;
  381. background-color: rgba(255, 149, 0, 0.2);
  382. border: 2rpx solid #ff9500;
  383. height: 38rpx;
  384. line-height: 38rpx;
  385. padding: 0rpx 16rpx;
  386. }
  387. .ts {
  388. font-size: 24rpx;
  389. color: #999;
  390. margin: 14rpx 0rpx;
  391. padding-right: 29rpx;
  392. padding-left: 34rpx;
  393. }
  394. .yh {
  395. padding-top: 20rpx;
  396. }
  397. .yh > .yhtitle {
  398. display: flex;
  399. align-items: center;
  400. justify-content: space-between;
  401. padding-right: 29rpx;
  402. padding-left: 34rpx;
  403. }
  404. .priceBxs {
  405. display: flex;
  406. align-items: center;
  407. }
  408. .priceBxs > .pricleft {
  409. border-radius: 24rpx;
  410. border: 1rpx solid #e91313;
  411. background-color: rgba(233, 19, 19, 0.1);
  412. padding: 0rpx 18rpx;
  413. height: 49rpx;
  414. line-height: 49rpx;
  415. text-align: center;
  416. font-size: 30rpx;
  417. font-weight: 500;
  418. color: #e91313;
  419. margin-right: 13rpx;
  420. }
  421. .topBox {
  422. padding: 32rpx 32rpx 24rpx;
  423. border-bottom: 1rpx solid #eeeeee;
  424. }
  425. .topBox > .boldFonstType {
  426. font-weight: 500;
  427. font-size: 30rpx;
  428. margin: 16rpx 0rpx 23rpx;
  429. }
  430. .topBox > .firstTopL {
  431. display: flex;
  432. align-items: center;
  433. }
  434. .topBox > .firstTopL > .imageBs {
  435. width: 331rpx;
  436. height: 160rpx;
  437. border-radius: 6rpx;
  438. overflow: hidden;
  439. margin-right: 8rpx;
  440. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  441. }
  442. .topBox > .firstTopL > .imageBs > image {
  443. width: 100%;
  444. height: 100%;
  445. }
  446. .topBox > .firstTopL > .textBs {
  447. font-size: 30rpx;
  448. font-weight: bold;
  449. color: #0c141f;
  450. }
  451. .content {
  452. padding: 24rpx;
  453. text-align: left;
  454. }
  455. .catalogBox {
  456. display: flex;
  457. align-items: center;
  458. flex-wrap: nowrap;
  459. overflow-x: auto;
  460. padding-left: 38rpx;
  461. max-height: 305rpx;
  462. overflow-y: auto;
  463. transition: all 0.4s;
  464. }
  465. .catalogBox > .catalogA {
  466. min-width: 200rpx;
  467. height: 48rpx;
  468. line-height: 48rpx;
  469. // text-align: center;
  470. border: 2rpx solid transparent;
  471. white-space: nowrap;
  472. text-overflow: ellipsis;
  473. overflow: hidden;
  474. word-break: break-all;
  475. border-radius: 10rpx;
  476. background: rgba(22, 119, 255, 0.05);
  477. padding-left: 19rpx;
  478. box-sizing: border-box;
  479. padding-right: 15rpx;
  480. margin-right: 16rpx;
  481. margin-bottom: 20rpx;
  482. margin-top: 15rpx;
  483. font-size: 24rpx;
  484. color: #666;
  485. }
  486. .catalogBox > .activesq {
  487. border-color: #1677ff;
  488. }
  489. .changeCatalogBox {
  490. display: block;
  491. }
  492. .catalogBox::-webkit-scrollbar {
  493. display: none; /* Chrome Safari */
  494. }
  495. .box {
  496. position: relative;
  497. top: 650rpx;
  498. padding-bottom: 88rpx;
  499. margin: 20rpx;
  500. }
  501. .price_t2 {
  502. font-size: 18rpx;
  503. font-family: PingFang SC;
  504. font-weight: 500;
  505. text-decoration: line-through;
  506. color: #999999;
  507. }
  508. .price_t1 {
  509. font-size: 33rpx;
  510. font-family: PingFang SC;
  511. font-weight: bold;
  512. color: #e91313;
  513. }
  514. .sc_t {
  515. font-size: 22rpx;
  516. color: #000000;
  517. }
  518. .sc {
  519. width: 29rpx;
  520. height: 29rpx;
  521. }
  522. .buy {
  523. width: 138rpx;
  524. height: 48rpx;
  525. line-height: 48rpx;
  526. background: #32467b;
  527. border-radius: 10rpx;
  528. color: #ffffff;
  529. font-size: 28rpx;
  530. text-align: center;
  531. vertical-align: middle;
  532. position: absolute;
  533. right: 30rpx;
  534. }
  535. .video_body {
  536. padding-bottom: 96rpx;
  537. }
  538. .footer_tab {
  539. position: fixed;
  540. bottom: 0;
  541. height: 96rpx;
  542. width: 100%;
  543. background-color: #ffffff;
  544. }
  545. .tj_box {
  546. width: 50%;
  547. display: inline-block;
  548. text-align: center;
  549. margin: 10rpx 0;
  550. }
  551. .teacher_t {
  552. font-size: 24rpx;
  553. font-family: PingFang SC;
  554. font-weight: 400;
  555. color: #666666;
  556. line-height: 36rpx;
  557. margin-left: 15rpx;
  558. }
  559. .teacher_img {
  560. width: 87rpx;
  561. height: 129rpx;
  562. }
  563. .t2 {
  564. font-size: 24rpx;
  565. font-family: PingFang SC;
  566. color: #666666;
  567. line-height: 36rpx;
  568. margin: 15rpx;
  569. }
  570. .r_t2 {
  571. width: 201rpx;
  572. height: 49rpx;
  573. background: rgba(22, 119, 255, 0.05);
  574. border: 1rpx solid #32467b;
  575. border-radius: 16rpx;
  576. color: #666666;
  577. font-size: 23rpx;
  578. text-align: center;
  579. display: flex;
  580. align-items: center;
  581. padding: 5rpx;
  582. }
  583. .scroll_box {
  584. width: 100%;
  585. height: 60rpx;
  586. background: #ffffff;
  587. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  588. white-space: nowrap;
  589. overflow: hidden;
  590. margin: 15rpx 0;
  591. }
  592. .r_sliper {
  593. padding: 0 20rpx;
  594. }
  595. .top_line {
  596. width: 6rpx;
  597. height: 22rpx;
  598. background: #32467b;
  599. margin-right: 10rpx;
  600. }
  601. .video_t2 {
  602. font-size: 24rpx;
  603. font-family: PingFang SC;
  604. font-weight: 500;
  605. color: #666666;
  606. }
  607. .video_t1 {
  608. height: 80rpx;
  609. color: #333333;
  610. line-height: 80rpx;
  611. font-size: 30rpx;
  612. font-family: PingFang SC;
  613. font-weight: bold;
  614. color: #333333;
  615. }
  616. .video_t1_t{
  617. display: flex;
  618. flex-direction: column;
  619. height: 80rpx;
  620. color: #333333;
  621. text-align: center;
  622. align-items: center;
  623. border-left: solid 1px #D6D6DB;
  624. }
  625. .video_play {
  626. position: absolute;
  627. width: 95rpx;
  628. height: 95rpx;
  629. top: 0;
  630. left: 0;
  631. right: 0;
  632. bottom: 0;
  633. margin: auto;
  634. }
  635. .video_box {
  636. position: relative;
  637. }
  638. .rotoct {
  639. transform: rotate(90deg);
  640. }
  641. </style>