keynote.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <template>
  2. <view >
  3. <view class="video_body">
  4. <view class="video_box">
  5. <image :src="$method.splitImgHost(detail.coverUrl)" style="width: 100%;height: 460rpx;"></image>
  6. </view>
  7. <view>
  8. <u-row >
  9. <u-col span="8" offset="1">
  10. <view class="video_t1">
  11. {{detail.name}}
  12. </view>
  13. </u-col>
  14. <u-col span="3">
  15. <view class="price_num">
  16. ¥{{detail.price}}
  17. </view>
  18. </u-col>
  19. </u-row>
  20. </view>
  21. <view>
  22. <u-tabs :list="list" font-size="24" bar-width="110" :current="current" @change="change" active-color="#32467B"></u-tabs>
  23. </view>
  24. <u-line color="#D6D6DB" />
  25. <view v-if="current==0">
  26. <!-- 重点考点介绍-->
  27. <view style="margin-top: 15rpx;">
  28. <u-row >
  29. <u-col span="9" >
  30. <view class="video_t2" style="display: flex;align-items: center;">
  31. <view class="top_line"></view>
  32. 重点考点介绍
  33. </view>
  34. </u-col>
  35. </u-row>
  36. <view class="text_box">
  37. <u-parse :html="detail.introduction"></u-parse>
  38. </view>
  39. </view>
  40. <u-line color="#D6D6DB" />
  41. </view>
  42. <!-- 出题名师-->
  43. <view v-if="current<=1">
  44. <view style="margin: 15rpx 0;">
  45. <u-row >
  46. <u-col span="8" >
  47. <view class="video_t2" style="display: flex;align-items: center;">
  48. <view class="top_line"></view>
  49. 出题名师
  50. </view>
  51. </u-col>
  52. </u-row>
  53. <view v-for="(item,index) in teacherList" :key="index">
  54. <u-row >
  55. <view style="margin: 25rpx;display: flex;">
  56. <view >
  57. <image :src="$method.splitImgHost(item.avatar)" class="teacher_img"></image>
  58. </view>
  59. <view class="teacher_t">
  60. {{item.introduce}}
  61. </view>
  62. </view>
  63. </u-row>
  64. </view>
  65. </view>
  66. <u-line color="#D6D6DB" />
  67. </view>
  68. <!-- 相关推荐-->
  69. <view style="margin: 15rpx 0;">
  70. <u-row >
  71. <u-col span="8" >
  72. <view class="video_t2" style="display: flex;align-items: center;">
  73. <view class="top_line"></view>
  74. 相关推荐
  75. </view>
  76. </u-col>
  77. </u-row>
  78. <view style="margin: 10rpx;">
  79. <view class="tj_box" v-for="(item,index) in recommendList" :key="index" @click="jumpDetail(item)">
  80. <image :src="$method.splitImgHost(item.coverUrl)" style="width: 320rpx;height: 160rpx;"></image>
  81. <view style="font-size: 24rpx;color: #666666;text-align: left;">
  82. {{item.name}}
  83. </view>
  84. <view>
  85. <u-row >
  86. <u-col span="6" >
  87. <view style="margin-left: 20rpx;">
  88. <image src="/static/people.png" style="width: 20rpx;height: 20rpx;"></image>
  89. <text style="color: #999999;font-size: 20rpx;margin-left: 10rpx;">2023</text>
  90. </view>
  91. </u-col>
  92. <u-col span="6" text-align="right">
  93. <text style="color: #E91313;font-size: 16rpx;margin-left: 8rpx;">
  94. 活动价
  95. </text>
  96. <text style="color: #E91313;font-size: 24rpx;font-weight: bold;">
  97. ¥{{item.price}}
  98. </text>
  99. </u-col>
  100. </u-row>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="footer_tab">
  107. <u-line color="#D6D6DB" />
  108. <view style="height: 100%;display: flex;align-items: center;position: relative;">
  109. <view style="text-align: center;margin-left: 30rpx;">
  110. <image src="/static/sc.png" class="sc"></image>
  111. <view class="sc_t">收藏</view>
  112. </view>
  113. <view class="buy" @click="jumpRead">
  114. 开始阅读
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </template>
  120. <script>
  121. export default {
  122. data() {
  123. return {
  124. list: [{
  125. name: '重点考点介绍'
  126. }, {
  127. name: '出题名师',
  128. }, {
  129. name: '相关推荐',
  130. }],
  131. current: 0,
  132. id:0,
  133. detail:{},
  134. teacherList:[],
  135. recommendList:[]
  136. }
  137. },
  138. onLoad(option) {
  139. this.id = option.id
  140. this.getDetail()
  141. this.noteRecommendList({fileId:this.id})
  142. },
  143. onShow(){
  144. },
  145. methods: {
  146. jumpDetail(item) {
  147. this.$navTo.togo('/pages2/course/keynote', {
  148. id:item.fileId
  149. });
  150. },
  151. getDetail(){
  152. let self = this
  153. this.$api.noteInfo(this.id).then(res => {
  154. self.detail = res.data.data
  155. if(self.detail.teacherIds&&self.detail.teacherIds!=''){
  156. let param = {
  157. teacherIds : self.detail.teacherIds
  158. }
  159. self.getTeacherList(param);
  160. }
  161. })
  162. },
  163. getTeacherList(param){
  164. let self = this
  165. this.$api.teacherList(param).then(res => {
  166. self.teacherList = res.data.rows
  167. })
  168. },
  169. noteRecommendList(param){
  170. let self = this
  171. this.$api.noteRecommendList(param).then(res => {
  172. self.recommendList = res.data.data
  173. })
  174. },
  175. change(index) {
  176. this.current = index;
  177. },
  178. jumpRead(){
  179. if(!this.$method.isLogin()){
  180. this.$navTo.togo('/pages/login/login');
  181. }else{
  182. let url = this.$method.splitImgHost(this.detail.fileUrls)
  183. console.log(url)
  184. uni.downloadFile({
  185. url:url,
  186. success(res){
  187. console.log(res)
  188. let data = res.tempFilePath;
  189. uni.openDocument({
  190. filePath:data,
  191. fileType:'pdf'
  192. })
  193. }
  194. })
  195. // this.$navTo.togo('/pages2/payment/payment', {})
  196. // this.$navTo.togo('/pages2/course/read', {})
  197. }
  198. }
  199. },
  200. }
  201. </script>
  202. <style>
  203. ::-webkit-scrollbar{
  204. width: 0;
  205. height: 0;
  206. color: transparent;
  207. }
  208. </style>
  209. <style scope>
  210. .text_box{
  211. font-size: 24rpx;
  212. font-family: PingFang SC;
  213. font-weight: 400;
  214. color: #666666;
  215. line-height: 36rpx;
  216. padding: 20rpx;
  217. }
  218. .price_num{
  219. font-size: 24rpx;
  220. font-family: PingFang SC;
  221. font-weight: bold;
  222. color: #E91313;
  223. }
  224. .price_t2{
  225. font-size: 18rpx;
  226. font-family: PingFang SC;
  227. font-weight: 500;
  228. text-decoration: line-through;
  229. color: #999999;
  230. }
  231. .price_t1{
  232. font-size: 33rpx;
  233. font-family: PingFang SC;
  234. font-weight: bold;
  235. color: #E91313;
  236. }
  237. .sc_t{
  238. font-size: 22rpx;
  239. color: #000000;
  240. }
  241. .sc{
  242. width: 29rpx ;
  243. height: 29rpx;
  244. }
  245. .buy{
  246. width: 138rpx;
  247. height: 48rpx;
  248. line-height: 48rpx;
  249. background: #32467B;
  250. border-radius: 10rpx;
  251. color: #FFFFFF;
  252. font-size: 28rpx;
  253. text-align: center;
  254. vertical-align: middle;
  255. position: absolute;
  256. right: 30rpx;
  257. }
  258. .video_body{
  259. padding-bottom: 96rpx;
  260. }
  261. .footer_tab{
  262. position:fixed;
  263. bottom:0;
  264. height: 96rpx;
  265. width: 100%;
  266. background-color: #FFFFFF;
  267. }
  268. .tj_box{
  269. width: 50%;
  270. display: inline-block;
  271. text-align: center;
  272. margin: 10rpx 0;
  273. }
  274. .teacher_t{
  275. font-size: 24rpx;
  276. font-family: PingFang SC;
  277. font-weight: 400;
  278. color: #666666;
  279. line-height: 36rpx;
  280. margin-left: 15rpx;
  281. }
  282. .teacher_img{
  283. width: 87rpx;
  284. height: 129rpx;
  285. }
  286. .t2{
  287. font-size: 24rpx;
  288. font-family: PingFang SC;
  289. color: #666666;
  290. line-height: 36rpx;
  291. margin: 15rpx;
  292. }
  293. .r_t2{
  294. width: 201rpx;
  295. height: 49rpx;
  296. background: rgba(22, 119, 255, 0.05);
  297. border: 1rpx solid #32467B;
  298. border-radius: 16rpx;
  299. color: #666666;
  300. font-size: 23rpx;
  301. text-align: center;
  302. display: flex;
  303. align-items: center;
  304. padding: 5rpx;
  305. }
  306. .scroll_box{
  307. width: 100%;
  308. height: 60rpx;
  309. background: #FFFFFF;
  310. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  311. white-space:nowrap;
  312. overflow: hidden;
  313. margin: 15rpx 0;
  314. }
  315. .r_sliper{
  316. padding: 0 20rpx;
  317. }
  318. .top_line{
  319. width: 6rpx;
  320. height: 22rpx;
  321. background: #32467B;
  322. margin-right: 10rpx;
  323. }
  324. .video_t2{
  325. font-size: 24rpx;
  326. font-family: PingFang SC;
  327. font-weight: 500;
  328. color: #666666;
  329. }
  330. .video_t1{
  331. font-size: 28rpx;
  332. font-family: PingFang SC;
  333. font-weight: bold;
  334. color: #333333;
  335. }
  336. .video_play{
  337. position:absolute;
  338. width: 95rpx;
  339. height: 95rpx;
  340. top:0;
  341. left:0;
  342. right:0;
  343. bottom:0;
  344. margin:auto;
  345. }
  346. .video_box{
  347. position: relative;
  348. }
  349. page {
  350. background: #FFFFFF;
  351. }
  352. </style>