detail-content-card.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!-- 产品详情:描述卡片 -->
  2. <template>
  3. <view class="detail-content-card bg-white ss-m-x-20 ss-p-t-20">
  4. <view class="card-header ss-flex ss-col-center ss-m-b-30 ss-m-l-20">
  5. <view class="line"></view>
  6. <view class="title ss-m-l-20 ss-m-r-20">详情</view>
  7. </view>
  8. <view class="card-content">
  9. <template v-if="goodsInfo.userHtml">
  10. <!-- #ifdef H5 -->
  11. <iframe :src="goodsInfo.userHtml" style="width: 100%; height: calc(100vh - 94px); border: none;"></iframe>
  12. <!-- #endif -->
  13. <!-- #ifdef MP-WEIXIN -->
  14. <web-view :src="goodsInfo.userHtml" style="width: 100%; height: 100%;"></web-view>
  15. <!-- #endif -->
  16. </template>
  17. <template v-else>
  18. <view style="padding: 10px;" v-html="content"></view>
  19. </template>
  20. </view>
  21. </view>
  22. </template>
  23. <script setup>
  24. import sheep from '@/sheep';
  25. const { safeAreaInsets } = sheep.$platform.device;
  26. const props = defineProps({
  27. content: {
  28. type: String,
  29. default: '',
  30. },
  31. goodsInfo: {
  32. type: Object,
  33. default: {},
  34. },
  35. });
  36. </script>
  37. <style lang="scss" scoped>
  38. .detail-content-card {
  39. .card-header {
  40. .line {
  41. width: 6rpx;
  42. height: 30rpx;
  43. background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
  44. border-radius: 3rpx;
  45. }
  46. .title {
  47. font-size: 30rpx;
  48. font-weight: bold;
  49. }
  50. .des {
  51. font-size: 24rpx;
  52. color: $dark-9;
  53. }
  54. .more-btn {
  55. font-size: 24rpx;
  56. color: var(--ui-BG-Main);
  57. }
  58. }
  59. }
  60. </style>