detail-content-card.vue 1.6 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: 800rpx; overflow: auto;"></web-view> -->
  15. <!-- #endif -->
  16. </template>
  17. <template v-else>
  18. <!-- {{ content }} -->
  19. <view style="padding: 10px;" v-html="content"></view>
  20. </template>
  21. </view>
  22. </view>
  23. </template>
  24. <script setup>
  25. import sheep from '@/sheep';
  26. const { safeAreaInsets } = sheep.$platform.device;
  27. const props = defineProps({
  28. content: {
  29. type: String,
  30. default: '',
  31. },
  32. goodsInfo: {
  33. type: Object,
  34. default: {},
  35. },
  36. });
  37. </script>
  38. <style lang="scss" scoped>
  39. .detail-content-card {
  40. .card-header {
  41. .line {
  42. width: 6rpx;
  43. height: 30rpx;
  44. background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%);
  45. border-radius: 3rpx;
  46. }
  47. .title {
  48. font-size: 30rpx;
  49. font-weight: bold;
  50. }
  51. .des {
  52. font-size: 24rpx;
  53. color: $dark-9;
  54. }
  55. .more-btn {
  56. font-size: 24rpx;
  57. color: var(--ui-BG-Main);
  58. }
  59. }
  60. }
  61. </style>