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

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