与牧同行-小程序用户端
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.

102 lines
4.3 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.viewCount}}</text>
  49. </view>
  50. </view>
  51. <!-- 创建时间卡片 -->
  52. <view class="info-item" wx:if="{{detailInfo.createdAt}}">
  53. <view class="info-icon">📅</view>
  54. <view class="info-content">
  55. <text class="info-label">创建时间</text>
  56. <text class="info-value">{{detailInfo.createdAt}}</text>
  57. </view>
  58. </view>
  59. <!-- 更新时间卡片 -->
  60. <view class="info-item" wx:if="{{detailInfo.updatedAt}}">
  61. <view class="info-icon">🔄</view>
  62. <view class="info-content">
  63. <text class="info-label">更新时间</text>
  64. <text class="info-value">{{detailInfo.updatedAt}}</text>
  65. </view>
  66. </view>
  67. <!-- 有效性状态卡片 - 使用优雅的徽章设计 -->
  68. <view class="info-item status-item" wx:if="{{detailInfo.isActive !== undefined}}">
  69. <view class="info-icon">⚡</view>
  70. <view class="info-content">
  71. <text class="info-label">状态</text>
  72. <view class="status-badge" style="background-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}}20; border-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};">
  73. <text class="status-dot" style="background-color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};"></text>
  74. <text class="status-text" style="color: {{detailInfo.isActive === 1 ? '#4CAF50' : '#9E9E9E'}};">{{detailInfo.isActive === 1 ? '有效' : '无效'}}</text>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 描述/备注区域(如果有remark字段) -->
  80. <view class="remark-section" wx:if="{{detailInfo.remark}}">
  81. <view class="remark-icon">📝</view>
  82. <view class="remark-content">{{detailInfo.remark}}</view>
  83. </view>
  84. <!-- 辅助信息:始终有效标识 -->
  85. <view class="always-valid" wx:if="{{detailInfo.isAlwaysValid === 1}}">
  86. <text class="valid-icon">✨</text>
  87. <text class="valid-text">长期有效</text>
  88. </view>
  89. </view>
  90. </view>