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

219 lines
7.9 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <wxs module="tool" src="../../utils/tool.wxs"></wxs>
  2. <view class="home-container">
  3. <view class="box">
  4. <view class="orientation">
  5. <!-- 定位 -->
  6. <!-- <view class="orientation2">
  7. <image src="/pages/images/dw.png" mode="" />
  8. <view>{{county}}</view>
  9. </view> -->
  10. <!-- 行政区划 -->
  11. <view class="orientation3" bind:tap="bindXzqh">
  12. <image src="/pages/images/dw.png" mode="" />
  13. <view>{{user.name || '去选择'}}</view>
  14. </view>
  15. </view>
  16. <!-- AI问诊 -->
  17. <view class="Aidiagnosis" bind:tap="bindAI">
  18. <image src="/pages/images/aiwz.png" mode="" />
  19. </view>
  20. <!-- 轮播图区域-->
  21. <view class="swiper-container">
  22. <swiper class="custom-swiper" indicator-dots="{{false}}" indicator-color="rgba(255,255,255,0.4)" indicator-active-color="#4CAF50" autoplay="{{true}}" interval="5000" duration="500" circular="{{true}}" current="{{currentSwiper}}" bindchange="onSwiperChange" style="height: 360rpx;">
  23. <block wx:for="{{swiperList}}" wx:key="id">
  24. <swiper-item>
  25. <view class="swiper-item {{item.isActive ? 'active' : ''}}" data-value="{{item}}" catchtap="onSwiperTap">
  26. <image src="{{baseUrl+item.imageUrl}}" class="swiper-image" mode="aspectFill" />
  27. <view class="swiper-mask"></view>
  28. <view class="swiper-content">
  29. <text class="swiper-tag">{{item.adsType}}</text>
  30. <text class="swiper-title">{{item.title}}</text>
  31. <text class="swiper-desc">{{item.subtitle}}</text>
  32. </view>
  33. <view class="swiper-gradient"></view>
  34. </view>
  35. </swiper-item>
  36. </block>
  37. </swiper>
  38. <!-- 自定义指示器 -->
  39. <view class="custom-indicator">
  40. <block wx:for="{{swiperList}}" wx:key="id">
  41. <view class="indicator-dot {{currentSwiper === index ? 'active' : ''}}" data-index="{{index}}" bindtap="onIndicatorTap"></view>
  42. </block>
  43. </view>
  44. </view>
  45. <view class="kap">
  46. <!-- 卡片类型 -->
  47. <view class="card">
  48. <view class="card2" bind:tap="bindWsy">
  49. <view>问兽医</view>
  50. <view class="card2_1">智能匹配医生</view>
  51. <view class="card2_1">平均5分钟回复</view>
  52. </view>
  53. <view class="card3">
  54. <view class="card3_1 card3_kp" bind:tap="bindZj">
  55. <view>找专家</view>
  56. <view>智能匹配医生</view>
  57. </view>
  58. <view class="card3_2 card3_kp" bind:tap="bindYao">
  59. <view>去买药</view>
  60. <view>制定专业的治疗方案</view>
  61. </view>
  62. </view>
  63. </view>
  64. <!-- 知识库 -->
  65. <view class="repository">
  66. <view class="repository1_1 zsk" bind:tap="bindZsk">
  67. <view>养殖知识库</view>
  68. <view>快速查询养殖知识</view>
  69. </view>
  70. <view class="repository1_2 zsk" bind:tap="bindPx">
  71. <view>在线培训</view>
  72. <view>提高养殖技能</view>
  73. </view>
  74. <view class="repository1_3 zsk" bind:tap="bindJd">
  75. <view>政策解读</view>
  76. <view>提供政策指导</view>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 通知公告区域 -->
  81. <view class="notice-section">
  82. <view class="notice-header">
  83. <view class="notice-title">
  84. <text class="notice-icon">📢</text>
  85. <text class="notice-title-text">通知公告</text>
  86. </view>
  87. <view class="notice-more" bindtap="viewAllNotices">
  88. 更多 >
  89. </view>
  90. </view>
  91. <view class="notice-content">
  92. <swiper class="notice-swiper" vertical="{{true}}" autoplay="{{true}}" interval="4000" duration="800" circular="{{true}}" style="height: 160rpx;" bindchange="onNoticeSwiperChange">
  93. <block wx:for="{{noticeList}}" wx:key="id">
  94. <swiper-item>
  95. <view class="notice-item {{index === currentNotice ? 'highlight' : ''}}" data-id="{{item.id}}" catchtap="onNoticeTap">
  96. <view class="notice-item-header">
  97. <view class="notice-type-container">
  98. <text class="notice-type {{tool.type(item.warningLevel)}}">{{item.warningLevel}}</text>
  99. <text class="notice-badge" wx:if="{{item.isNew}}">NEW</text>
  100. </view>
  101. <text class="notice-time">{{item.createdTime}}</text>
  102. </view>
  103. <view class="notice-text-container">
  104. <text class="notice-text">{{item.title}}</text>
  105. <text class="notice-arrow">→</text>
  106. </view>
  107. </view>
  108. </swiper-item>
  109. </block>
  110. </swiper>
  111. </view>
  112. </view>
  113. <!-- 用户提问板块 -->
  114. <view class="user-question-section">
  115. <!-- 标题区域 -->
  116. <view class="question-header" bind:tap="bindwdlist">
  117. <view class="question-title">
  118. <view class="title-text">在线问答</view>
  119. <view class="title-sub">看看其他养殖户遇到的问题</view>
  120. </view>
  121. <view class="view-all" bindtap="viewAllQuestions">
  122. 查看全部
  123. </view>
  124. </view>
  125. <!-- 问题列表 -->
  126. <view class="question-card placeholder" wx:for="{{forum}}" bind:tap="bindTw" data-id="{{item.id}}">
  127. <view class="question-meta">
  128. <view class="question-tag">
  129. <text class="tag-text">{{item.title}}</text>
  130. </view>
  131. </view>
  132. <view class="question-info">
  133. <view class="user-info">
  134. <image src="{{baseUrl+item.avatar}}" class="user-avatar"></image>
  135. <view class="user-detail">
  136. <view class="user-name">{{item.nickName}}</view>
  137. </view>
  138. </view>
  139. <view class="time-info">
  140. {{item.createdAt}}
  141. </view>
  142. </view>
  143. <!-- 底部信息 -->
  144. <view class="post-footer">
  145. <view class="post-meta">
  146. <view class="meta-item">
  147. <image class="meta-icon" src="/pagesB/images/hf.png" mode="aspectFit"></image>
  148. <text class="meta-count">{{item.answerCount || 0}}</text>
  149. </view>
  150. <view class="meta-item">
  151. <image class="meta-icon" src="/pagesB/images/lll.png" mode="aspectFit"></image>
  152. <text class="meta-count">{{item.viewCount || 0}}</text>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <!-- 经验分享板块 -->
  159. <view class="user-question-section">
  160. <!-- 标题区域 -->
  161. <view class="question-header" >
  162. <view class="question-title">
  163. <view class="title-text1_1">经验分享</view>
  164. <view class="title-sub">分享自己养殖经验</view>
  165. </view>
  166. <view class="view-all1_1" bindtap="viewexperience">
  167. 查看全部
  168. </view>
  169. </view>
  170. <!-- 问题列表 -->
  171. <view class="question-card placeholder" wx:for="{{suffer}}" bind:tap="bindfx" data-id="{{item.id}}">
  172. <view class="question-meta">
  173. <view class="question-tag">
  174. <text class="tag-text">{{item.title}}</text>
  175. </view>
  176. </view>
  177. <view class="question-info">
  178. <view class="user-info">
  179. <image src="{{baseUrl+item.vetAvatar}}" class="user-avatar"></image>
  180. <view class="user-detail">
  181. <view class="user-name">{{item.vetName}}</view>
  182. </view>
  183. </view>
  184. <view class="time-info">
  185. {{item.publishTime}}
  186. </view>
  187. </view>
  188. <!-- 底部信息 -->
  189. <view class="post-footer">
  190. <view class="post-meta">
  191. <view class="meta-item">
  192. <image class="meta-icon" src="/pagesB/images/lll.png" mode="aspectFit"></image>
  193. <text class="meta-count">{{item.viewCount || 0}}</text>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. </view>