danyuanInfo.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view>
  3. <uni-popup ref="popupRef" :animation="true" :is-mask-click="false"
  4. mask-background-color="rgba(255, 255, 255, 0.1);" type="bottom">
  5. <view class="xuexi-dagang-page">
  6. <view class="dagang-title">
  7. <text>{{danyuanInfo.danyuanIntro}}</text>
  8. <icon @click="goUpPage"></icon>
  9. </view>
  10. <view class="xuexi-dagang-body">
  11. <!-- 您将学会 -->
  12. <view class="dagang-xh-box">
  13. <view class="xh-title">您将学会</view>
  14. <view class="xh-content-box">
  15. <view class="text-row" v-for="(item,index) in danyuanInfo.xuehui" :key="index">
  16. <icon></icon>
  17. <view class="text-content">{{item}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 学习大纲 -->
  22. <view class="dagang-content-box">
  23. <view class="dagang-content-title">学习大纲</view>
  24. <view class="dagang-item-list">
  25. <view class="dagang-content-item" v-for="(item,index) in danyuanInfo.dagangList"
  26. :key="index">
  27. <!-- 封面 -->
  28. <!-- <img :src="item.cover" /> -->
  29. <view>
  30. <view class="content-title">{{item.jieName}}</view>
  31. <view class="content-title">{{item.jieIntro}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </uni-popup>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. nextTick,
  44. ref
  45. } from 'vue';
  46. import {
  47. onLoad,
  48. onReady
  49. } from '@dcloudio/uni-app';
  50. import {
  51. getVideoAuth,
  52. getVideoAuthYk,
  53. videoWancheng
  54. } from "@/api/shipin.js"
  55. import {
  56. toast,
  57. convertTimeToSeconds
  58. } from "@/utils/common";
  59. import cacheManager from "@/utils/cacheManager.js";
  60. import * as httpApi from "@/api/chanpinZiRanPinDu.js";
  61. export default {
  62. data() {
  63. return {
  64. danyuanId: null,
  65. danyuanInfo: {
  66. danyuanId: '',
  67. dagangList: [],
  68. danyuanIntro: '',
  69. number: '',
  70. video: '',
  71. xuehui: [],
  72. },
  73. pageData: null, //上个页面获取的视频参数(视频id)
  74. playAuth: "", //播放凭证
  75. progressMarkers: [],
  76. hideFlag: 'show',
  77. videoId: "", //阿里云视频id
  78. seekTime: '',
  79. shipinTitle: '',
  80. }
  81. },
  82. onLoad(options) {
  83. this.init(options)
  84. },
  85. onHide() {
  86. this.hideFlag = 'hide'
  87. },
  88. onUnload() {
  89. this.hideFlag = 'hide'
  90. },
  91. methods: {
  92. goUpPage() {
  93. this.$refs.popupRef.close();
  94. this.$emit('close')
  95. },
  96. // 打开弹窗
  97. handleShow(danyuanId) {
  98. this.danyuanId = danyuanId;
  99. this.getDataInfo()
  100. },
  101. handleClose() {
  102. this.$refs.popupRef.close();
  103. },
  104. courseBjFun() {
  105. return 'static/images/course/couse-shuxue-bj.png'
  106. },
  107. courseIconFun() {
  108. return 'static/images/course/shuxue-icon.png'
  109. },
  110. getDataInfo() {
  111. httpApi.getPinduChanpinDanyuanInfo({
  112. danyuanId: this.danyuanId
  113. }).then(res => {
  114. // 重新赋值
  115. Object.assign(this.danyuanInfo, res.data)
  116. this.$refs.popupRef.open();
  117. })
  118. },
  119. init(options) {
  120. this.danyuanId = options.danyuanId;
  121. this.getDataInfo()
  122. },
  123. },
  124. }
  125. </script>