courseDesc.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="tabs-content" :style="{ paddingBottom : `${props.paddingBottom || 0}rpx` }">
  3. <view v-if="!isMember && payType==='2' && !hasBuy" class="pay-member" @click="toJoin">
  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. computed
  16. } from 'vue'
  17. import {
  18. useAuthStore
  19. } from '@/store/authStore.js';
  20. import {
  21. onLoad,
  22. } from '@dcloudio/uni-app'
  23. const authStore = useAuthStore();
  24. const isMember = computed(()=>{
  25. return authStore.userInfo.isMember == '0' ? false : true
  26. })
  27. const props = defineProps({
  28. paddingBottom: {
  29. type: Number,
  30. required: false,
  31. default: 10
  32. },
  33. showType: {
  34. type: String,
  35. required: true,
  36. default: "image"
  37. },
  38. content: {
  39. type: String,
  40. required: true,
  41. default: ""
  42. },
  43. payType: {
  44. type: String,
  45. required: true,
  46. default: "1"
  47. },
  48. hasBuy: {
  49. type: Boolean,
  50. required: true,
  51. default: false
  52. }
  53. });
  54. const toJoin = () =>{
  55. uni.navigateTo({
  56. url: '/pages/joinClub/joinClub'
  57. })
  58. }
  59. // 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' />")
  60. </script>
  61. <style lang="scss" scoped>
  62. .tabs-content {
  63. padding-top: 10rpx;
  64. height: inherit;
  65. position: relative;
  66. }
  67. .pay-member {
  68. color: red;
  69. // text-align: center;
  70. margin-bottom: 5rpx;
  71. font-size: 32rpx;
  72. }
  73. </style>