courseDesc.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <view class="tabs-content" :style="{ paddingBottom : `${props.paddingBottom || 0}rpx` }">
  3. <view v-if="!isMember && payType!=='1'" class="pay-member" >
  4. <text>个人会员或单位会员免费,点击现在入会></text>
  5. </view>
  6. <image :src="content" v-if="showType === 'image'" style="width: 100%" mode="widthFix"></image>
  7. <u-parse :html="content" :selectable="true" v-else></u-parse>
  8. <!-- 课程简介-测试用,看能不能看到底部 -->
  9. </view>
  10. </template>
  11. <script setup>
  12. import {
  13. ref,
  14. defineProps
  15. } from 'vue'
  16. import { useAuthStore } from '@/store/authStore.js';
  17. import {
  18. onLoad,
  19. } from '@dcloudio/uni-app'
  20. const authStore = useAuthStore();
  21. const isMember = ref(false)
  22. const props = defineProps({
  23. paddingBottom: {
  24. type: Number,
  25. required: false,
  26. default: 10
  27. },
  28. showType :{
  29. type: String,
  30. required: true,
  31. default: "image"
  32. },
  33. content: {
  34. type: String,
  35. required: true,
  36. default: ""
  37. },
  38. payType: {
  39. type: String,
  40. required: true,
  41. default: "1"
  42. }
  43. });
  44. // const content = ref("<p>20名协会成员于10月15adhjshajdhsadsajdakshdjahjkd,骄傲的噶说的话吗,计划的哈手机号,很多看啥看,撒海空军的卡号是,按开机动画就撒开,安达市快点哈尽快,打火机客户打款,收获颇丰。此次活动增进了大家对科技前沿的认识。</p><img src='/static/notice/ditu.jpg' /><img src='/static/notice/ditu.jpg' /><img src='/static/notice/ditu.jpg' /><img src='/static/notice/ditu.jpg' />")
  45. onLoad(() => {
  46. isMember.value = authStore.userInfo.isMember == '0'? false : true;
  47. // initUser()
  48. })
  49. </script>
  50. <style lang="scss" scoped>
  51. .tabs-content{
  52. padding-top: 10rpx;
  53. height: inherit;
  54. position: relative;
  55. }
  56. .pay-member{
  57. color: red;
  58. // text-align: center;
  59. margin-bottom: 5rpx;
  60. font-size: 32rpx;
  61. }
  62. </style>