与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
4.6 KiB

  1. <view class="carousel-detail-container" style="--bg-color: {{detailInfo.bgColor || '#F8F9FA'}};">
  2. <!-- 沉浸式头部,带渐变遮罩和返回按钮 -->
  3. <view class="hero-section">
  4. <image
  5. class="hero-image"
  6. src="{{baseUrl + detailInfo.imageUrl}}"
  7. mode="aspectFill"
  8. binderror="imageLoadError"
  9. ></image>
  10. <view class="hero-overlay" style="background: linear-gradient(to bottom, transparent 30%, {{detailInfo.bgColor || '#F8F9FA'}} 90%);"></view>
  11. <!-- 返回按钮 -->
  12. <view class="nav-back glass" bindtap="goBack">
  13. <text class="iconfont icon-back">←</text>
  14. </view>
  15. <!-- 页面标题 - 仅在需要时显示 -->
  16. <view class="page-title glass" wx:if="{{detailInfo.adsType}}">
  17. <text>{{detailInfo.adsType}}</text>
  18. </view>
  19. </view>
  20. <!-- 主要内容卡片 -->
  21. <view class="content-card" animation="{{cardAnimation}}" style="--text-color: {{detailInfo.textColor || '#2E7D32'}};">
  22. <!-- 标题区域 -->
  23. <view class="title-section">
  24. <text class="main-title" style="color: {{detailInfo.textColor || '#1A1A1A'}};">{{detailInfo.title || '无标题'}}</text>
  25. <text class="sub-title">{{detailInfo.subtitle || '暂无副标题'}}</text>
  26. </view>
  27. <!-- 装饰分割线 -->
  28. <view class="divider">
  29. <view class="divider-line" style="background-color: {{detailInfo.textColor || '#2E7D32'}};"></view>
  30. <view class="divider-dot" style="background-color: {{detailInfo.textColor || '#2E7D32'}};"></view>
  31. <view class="divider-line" style="background-color: {{detailInfo.textColor || '#2E7D32'}};"></view>
  32. </view>
  33. <!-- 信息网格 -->
  34. <view class="info-grid">
  35. <!-- 尺寸信息卡片 -->
  36. <view class="info-item" wx:if="{{detailInfo.imageSize}}">
  37. <view class="info-icon">📐</view>
  38. <view class="info-content">
  39. <text class="info-label">图片尺寸</text>
  40. <text class="info-value">{{detailInfo.imageSize}}</text>
  41. </view>
  42. </view>
  43. <!-- 展示次数卡片 -->
  44. <view class="info-item" wx:if="{{detailInfo.displayCount !== undefined}}">
  45. <view class="info-icon">👁️</view>
  46. <view class="info-content">
  47. <text class="info-label">展示次数</text>
  48. <text class="info-value">{{detailInfo.displayCount}}</text>
  49. </view>
  50. </view>
  51. <!-- 点击次数卡片 -->
  52. <view class="info-item" wx:if="{{detailInfo.clickCount !== undefined}}">
  53. <view class="info-icon">🖱️</view>
  54. <view class="info-content">
  55. <text class="info-label">点击次数</text>
  56. <text class="info-value">{{detailInfo.clickCount}}</text>
  57. </view>
  58. </view>
  59. <!-- 创建时间卡片 -->
  60. <view class="info-item" wx:if="{{detailInfo.createdAt}}">
  61. <view class="info-icon">📅</view>
  62. <view class="info-content">
  63. <text class="info-label">创建时间</text>
  64. <text class="info-value">{{detailInfo.createdAt}}</text>
  65. </view>
  66. </view>
  67. <!-- 更新时间卡片 -->
  68. <view class="info-item" wx:if="{{detailInfo.updatedAt}}">
  69. <view class="info-icon">🔄</view>
  70. <view class="info-content">
  71. <text class="info-label">更新时间</text>
  72. <text class="info-value">{{detailInfo.updatedAt}}</text>
  73. </view>
  74. </view>
  75. <!-- 有效性状态卡片 - 使用优雅的徽章设计 -->
  76. <view class="info-item status-item" wx:if="{{detailInfo.isActive !== undefined}}">
  77. <view class="info-icon">⚡</view>
  78. <view class="info-content">
  79. <text class="info-label">状态</text>
  80. <view class="status-badge" style="background-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}}20; border-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};">
  81. <text class="status-dot" style="background-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};"></text>
  82. <text class="status-text" style="color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};">{{detailInfo.isActive === 1 ? '有效' : '无效'}}</text>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. <!-- 描述/备注区域(如果有remark字段) -->
  88. <view class="remark-section" wx:if="{{detailInfo.remark}}">
  89. <view class="remark-icon">📝</view>
  90. <view class="remark-content">{{detailInfo.remark}}</view>
  91. </view>
  92. <!-- 辅助信息:始终有效标识 -->
  93. <view class="always-valid" wx:if="{{detailInfo.isAlwaysValid === 1}}">
  94. <text class="valid-icon">✨</text>
  95. <text class="valid-text">长期有效</text>
  96. </view>
  97. </view>
  98. </view>