index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. <template>
  2. <view class="dashboard-container">
  3. <!-- 顶部 TopBar -->
  4. <view class="top-bar">
  5. <text class="greeting">农事有序,心里有数</text>
  6. <text class="top-sub-guide">从今天的田间环境开始</text>
  7. </view>
  8. <!-- 田间环境/天气区域 (降级为扁平状态块) -->
  9. <view class="environmental-status-block" @click="showWeatherDetail">
  10. <view class="status-main">
  11. <view class="main-info">
  12. <text class="main-text">{{ weatherData.infos.temperature }}° · {{ weatherData.infos.weather }}</text>
  13. <text class="fixed-subtitle">田间环境概览</text>
  14. </view>
  15. </view>
  16. <view class="metrics-row">
  17. <view class="metric-item">
  18. <text class="label">湿度</text>
  19. <text class="value">{{ weatherData.infos.humidity }}%</text>
  20. </view>
  21. <view class="metric-item">
  22. <text class="label">风力</text>
  23. <text class="value">{{ weatherData.infos.wind_power_v2 }}</text>
  24. </view>
  25. <view class="metric-item">
  26. <text class="label">气压</text>
  27. <text class="value">{{ weatherData.infos.air_pressure }} hPa</text>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- AI 主卡 -->
  32. <view class="card ai-card">
  33. <view class="ai-header">
  34. <view class="ai-pill">AI 农小禹</view>
  35. <text class="ai-subtitle">今天安排从这里开始</text>
  36. </view>
  37. <view class="ai-body">
  38. <text class="ai-title">{{ aiQuestion.title }}</text>
  39. <text class="ai-desc">问问 AI 农小禹,给你具体建议</text>
  40. </view>
  41. <view class="ai-footer">
  42. <view class="ai-cta">
  43. <u-button
  44. type="primary"
  45. color="#2F7D32"
  46. shape="round"
  47. :custom-style="{
  48. height: '60rpx',
  49. width: 'auto',
  50. minWidth: '200rpx',
  51. borderRadius: '30rpx',
  52. padding: '0 32rpx',
  53. fontSize: '28rpx',
  54. fontWeight: '600',
  55. margin: '0'
  56. }"
  57. @click="goToAI"
  58. >
  59. 立即提问
  60. <u-icon name="arrow-right" color="white" size="16" style="margin-left: 8rpx;"></u-icon>
  61. </u-button>
  62. </view>
  63. </view>
  64. <!-- 玻璃感噪点纹理 -->
  65. <view class="ai-texture"></view>
  66. </view>
  67. <!-- 农资精选 -->
  68. <view class="card">
  69. <view class="card-header">
  70. <view class="title-section">
  71. <view class="title-line"></view>
  72. <text class="card-title">农资精选</text>
  73. </view>
  74. <view class="more-btn" @click="goToMall">
  75. <text>去农资</text>
  76. <u-icon name="arrow-right" color="#3BB44A" size="14"></u-icon>
  77. </view>
  78. </view>
  79. <view class="products-grid">
  80. <view
  81. class="product-card"
  82. v-for="(product, index) in products"
  83. :key="index"
  84. @click="showProductDetail(product)"
  85. >
  86. <image
  87. :src="product.image"
  88. mode="aspectFill"
  89. class="product-image"
  90. lazy-load
  91. ></image>
  92. <view class="product-info">
  93. <text class="product-title">{{ product.title }}</text>
  94. <text class="product-desc">{{ product.desc }}</text>
  95. <view class="price-row">
  96. <text class="price">¥{{ product.price }}</text>
  97. <text class="unit">/{{ product.unit }}</text>
  98. </view>
  99. <u-button
  100. type="primary"
  101. color="linear-gradient(135deg, #3BB44A, #66CC6A)"
  102. size="mini"
  103. shape="round"
  104. >
  105. 了解更多
  106. </u-button>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 农技推荐 -->
  112. <view class="card">
  113. <view class="card-header">
  114. <view class="title-section">
  115. <view class="title-line"></view>
  116. <text class="card-title">农技推荐</text>
  117. </view>
  118. <view class="more-btn" @click="goToKnowledge">
  119. <text>更多</text>
  120. <u-icon name="arrow-right" color="#3BB44A" size="14"></u-icon>
  121. </view>
  122. </view>
  123. <view class="articles-list">
  124. <view
  125. class="article-card"
  126. v-for="(article, index) in articles"
  127. :key="index"
  128. @click="showArticleDetail(article)"
  129. >
  130. <view class="article-image-wrapper">
  131. <image
  132. :src="article.image"
  133. mode="aspectFill"
  134. class="article-image"
  135. lazy-load
  136. ></image>
  137. <view class="article-tag">文章</view>
  138. </view>
  139. <view class="article-info">
  140. <text class="article-title">{{ article.title }}</text>
  141. <text class="article-source">{{ article.source }}</text>
  142. <view class="article-stats">
  143. <u-icon name="eye" color="#999" size="12"></u-icon>
  144. <text class="read-count">{{ article.readCount }}</text>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. <!-- 天气详情弹窗 -->
  151. <u-popup
  152. :show="showWeatherPopup"
  153. mode="bottom"
  154. round="20"
  155. @close="showWeatherPopup = false"
  156. >
  157. <view class="popup-content">
  158. <view class="popup-header">
  159. <text class="popup-title">今日农事详情</text>
  160. <u-icon name="close" color="#999" size="20" @click="showWeatherPopup = false"></u-icon>
  161. </view>
  162. <view class="weather-detail">
  163. <view class="detail-item">
  164. <text class="detail-label">天气状况</text>
  165. <text class="detail-value">{{ weatherData.weatherText }}</text>
  166. </view>
  167. <view class="detail-item">
  168. <text class="detail-label">当前温度</text>
  169. <text class="detail-value">{{ weatherData.tempNow }}°C</text>
  170. </view>
  171. <view class="detail-item">
  172. <text class="detail-label">湿度</text>
  173. <text class="detail-value">{{ weatherData.humidity }}%</text>
  174. </view>
  175. <view class="detail-item">
  176. <text class="detail-label">风力</text>
  177. <text class="detail-value">{{ weatherData.windScale }}级</text>
  178. </view>
  179. <view class="detail-item">
  180. <text class="detail-label">降水量</text>
  181. <text class="detail-value">{{ weatherData.precipMm }}mm</text>
  182. </view>
  183. <view class="advice-detail">
  184. <text class="advice-label">今日建议:</text>
  185. <text class="advice-content">{{ weatherData.adviceText }}</text>
  186. </view>
  187. </view>
  188. <u-button
  189. type="primary"
  190. color="linear-gradient(135deg, #3BB44A, #66CC6A)"
  191. shape="round"
  192. @click="askAIAboutWeather"
  193. >
  194. 去问 AI
  195. </u-button>
  196. </view>
  197. </u-popup>
  198. <!-- 文章详情弹窗 -->
  199. <u-popup
  200. :show="showArticlePopup"
  201. mode="bottom"
  202. round="20"
  203. @close="showArticlePopup = false"
  204. >
  205. <view class="popup-content">
  206. <view class="popup-header">
  207. <text class="popup-title">文章详情</text>
  208. <u-icon name="close" color="#999" size="20" @click="showArticlePopup = false"></u-icon>
  209. </view>
  210. <view class="article-detail" v-if="currentArticle">
  211. <text class="article-detail-title">{{ currentArticle.title }}</text>
  212. <text class="article-detail-time">{{ currentArticle.time }}</text>
  213. <view class="article-detail-content">
  214. <text class="content-paragraph">{{ currentArticle.content }}</text>
  215. <text class="content-subtitle">主要要点:</text>
  216. <view class="content-list">
  217. <text class="list-item" v-for="(item, index) in currentArticle.points" :key="index">
  218. • {{ item }}
  219. </text>
  220. </view>
  221. </view>
  222. </view>
  223. <u-button
  224. type="primary"
  225. color="linear-gradient(135deg, #3BB44A, #66CC6A)"
  226. shape="round"
  227. @click="askAIAboutArticle"
  228. >
  229. 去问 AI
  230. </u-button>
  231. </view>
  232. </u-popup>
  233. </view>
  234. </template>
  235. <script setup>
  236. import { ref, reactive } from 'vue'
  237. // Mock 数据
  238. const weatherData = reactive({
  239. infos: {
  240. weather: "晴朗",
  241. temperature: 28,
  242. humidity: 65,
  243. wind_power_v2: "3级",
  244. air_pressure: 1008
  245. },
  246. update_time: "10:20" // 暗桩:保留字段供后续对接
  247. })
  248. const aiQuestions = [
  249. {
  250. title: '叶片发黄该从哪查?',
  251. recommend: '最近阴雨天多,管理要点?'
  252. },
  253. {
  254. title: '水稻分蘖期怎么管理?',
  255. recommend: '如何提高分蘖成穗率?'
  256. },
  257. {
  258. title: '玉米倒伏了怎么办?',
  259. recommend: '预防玉米倒伏的措施?'
  260. }
  261. ]
  262. const aiQuestion = ref(aiQuestions[0])
  263. const products = ref([
  264. {
  265. title: '优质玉米种子',
  266. desc: '高产抗病品种',
  267. price: '68',
  268. unit: '袋',
  269. image: '/static/images/products/corn-seeds-new.jpg'
  270. },
  271. {
  272. title: '有机肥料',
  273. desc: '纯天然环保',
  274. price: '128',
  275. unit: '袋',
  276. image: '/static/images/products/organic-fertilizer-new.jpg'
  277. },
  278. {
  279. title: '杀虫剂',
  280. desc: '广谱高效',
  281. price: '45',
  282. unit: '瓶',
  283. image: '/static/images/products/insecticide.jpg'
  284. },
  285. {
  286. title: '农用地膜',
  287. desc: '保湿保温',
  288. price: '89',
  289. unit: '卷',
  290. image: '/static/images/products/plastic-film.jpg'
  291. }
  292. ])
  293. const articles = ref([
  294. {
  295. title: '春季水稻种植技术要点',
  296. source: '农技知识',
  297. readCount: '1.2k',
  298. image: '/static/images/rice-farming/rice-field1.jpg',
  299. time: '2024-03-15',
  300. content: '春季是水稻种植的关键时期,需要掌握以下技术要点:首先,选择适宜的品种,根据当地气候条件选择抗病性强、产量高的品种。其次,做好秧田准备,确保土壤肥力充足,排水良好。',
  301. points: [
  302. '选择适宜品种,抗病高产',
  303. '秧田准备,土壤肥力充足',
  304. '合理密植,通风透光',
  305. '水肥管理,分蘖期关键'
  306. ]
  307. },
  308. {
  309. title: '玉米病虫害防治指南',
  310. source: '植保技术',
  311. readCount: '856',
  312. image: '/static/images/rice-farming/rice-field2.jpg',
  313. time: '2024-03-14',
  314. content: '玉米病虫害防治是确保产量的重要环节。常见的病虫害包括玉米螟、蚜虫、叶斑病等。防治应遵循"预防为主,综合防治"的原则。',
  315. points: [
  316. '定期巡查,早发现早处理',
  317. '生物防治与化学防治结合',
  318. '合理轮作,减少病虫害发生',
  319. '选择抗病品种,提高抗性'
  320. ]
  321. },
  322. {
  323. title: '现代农业机械化作业规范',
  324. source: '农机管理',
  325. readCount: '2.1k',
  326. image: '/static/images/rice-farming/rice-field3.jpg',
  327. time: '2024-03-13',
  328. content: '提升农业机械化作业水平是现代农业发展的必然要求。本规范涵盖了整地、播种、植保及收获等环节的机械化操作标准。',
  329. points: [
  330. '机具调试,状态良好',
  331. '标准化作业,保证质量',
  332. '安全生产,预防事故',
  333. '效率优化,降低成本'
  334. ]
  335. },
  336. {
  337. title: '土壤肥力提升与改良方案',
  338. source: '土肥管理',
  339. readCount: '1.5k',
  340. image: '/static/images/rice-farming/rice-field4.jpg',
  341. time: '2024-03-12',
  342. content: '健康的土壤是丰收的基础。通过增施有机肥、秸秆还田以及科学轮作,可以有效改善土壤结构,提升肥力水平。',
  343. points: [
  344. '测土配方,科学施肥',
  345. '增加有机质,改良结构',
  346. '酸碱度调理,平衡养分',
  347. '生态修复,持久肥力'
  348. ]
  349. }
  350. ])
  351. // 弹窗控制
  352. const showWeatherPopup = ref(false)
  353. const showArticlePopup = ref(false)
  354. const currentArticle = ref(null)
  355. // 方法
  356. const showTip = () => {
  357. uni.showToast({
  358. title: '建议先看今日农事,再去问 AI',
  359. icon: 'none',
  360. duration: 2000
  361. })
  362. }
  363. const showWeatherDetail = () => {
  364. showWeatherPopup.value = true
  365. }
  366. const showArticleDetail = (article) => {
  367. currentArticle.value = article
  368. showArticlePopup.value = true
  369. }
  370. const showProductDetail = (product) => {
  371. uni.showToast({
  372. title: '后续接入商品详情',
  373. icon: 'none',
  374. duration: 2000
  375. })
  376. }
  377. const goToAI = () => {
  378. uni.navigateTo({
  379. url: '/pages/knowledge/ai-chat/index'
  380. })
  381. }
  382. const goToMall = () => {
  383. uni.switchTab({
  384. url: '/pages/service/mall'
  385. })
  386. }
  387. const goToKnowledge = () => {
  388. uni.switchTab({
  389. url: '/pages/knowledge/index'
  390. })
  391. }
  392. const askAIAboutWeather = () => {
  393. showWeatherPopup.value = false
  394. uni.navigateTo({
  395. url: '/pages/knowledge/ai-chat/index?question=' + encodeURIComponent('今日天气适宜哪些农事活动?')
  396. })
  397. }
  398. const askAIAboutArticle = () => {
  399. showArticlePopup.value = false
  400. if (currentArticle.value) {
  401. uni.navigateTo({
  402. url: '/pages/knowledge/ai-chat/index?question=' + encodeURIComponent('关于' + currentArticle.value.title + '有什么建议?')
  403. })
  404. }
  405. }
  406. </script>
  407. <style lang="scss" scoped>
  408. .dashboard-container {
  409. padding: 24rpx;
  410. background-color: #F6FDF9;
  411. min-height: 100vh;
  412. }
  413. // 顶部 TopBar
  414. .top-bar {
  415. display: flex;
  416. flex-direction: column;
  417. justify-content: flex-start;
  418. align-items: flex-start;
  419. margin-bottom: 12rpx;
  420. padding: 0 8rpx;
  421. .greeting {
  422. font-size: 32rpx;
  423. font-weight: 600;
  424. color: #1A3026;
  425. letter-spacing: 1rpx;
  426. line-height: 1.4;
  427. }
  428. .top-sub-guide {
  429. font-size: 24rpx;
  430. color: rgba(0, 0, 0, 0.45);
  431. margin-top: 4rpx;
  432. }
  433. }
  434. // Card 基础样式(复用旧首页)
  435. .card {
  436. background: white;
  437. border-radius: 20rpx;
  438. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04), 0 1rpx 4rpx rgba(0, 0, 0, 0.02);
  439. margin-bottom: 24rpx;
  440. overflow: hidden;
  441. .card-header {
  442. display: flex;
  443. justify-content: space-between;
  444. align-items: center;
  445. padding: 24rpx 28rpx;
  446. border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  447. .title-section {
  448. display: flex;
  449. align-items: center;
  450. .title-line {
  451. width: 4rpx;
  452. height: 28rpx;
  453. border-radius: 0;
  454. background: linear-gradient(180deg, #3BB44A, #66CC6A);
  455. margin-right: 16rpx;
  456. }
  457. .card-title {
  458. font-size: 28rpx;
  459. font-weight: 600;
  460. color: #2C3E50;
  461. }
  462. }
  463. .tag {
  464. background: linear-gradient(135deg, #3BB44A, #66CC6A);
  465. color: white;
  466. font-size: 22rpx;
  467. padding: 6rpx 16rpx;
  468. border-radius: 16rpx;
  469. }
  470. .more-btn {
  471. display: flex;
  472. align-items: center;
  473. color: #3BB44A;
  474. font-size: 24rpx;
  475. text {
  476. margin-right: 6rpx;
  477. }
  478. }
  479. }
  480. }
  481. // 田间环境状态块 (降级为扁平化背景块)
  482. .environmental-status-block {
  483. position: relative;
  484. padding: 24rpx 28rpx;
  485. background: linear-gradient(135deg, #FFFFFF 0%, #F4FAF7 100%);
  486. border: 1rpx solid rgba(59, 180, 74, 0.08);
  487. border-radius: 24rpx;
  488. margin-bottom: 24rpx;
  489. overflow: hidden;
  490. .status-main {
  491. display: flex;
  492. justify-content: space-between;
  493. align-items: flex-end;
  494. margin-bottom: 20rpx;
  495. .main-info {
  496. display: flex;
  497. flex-direction: column;
  498. .main-text {
  499. font-size: 48rpx;
  500. font-weight: 800;
  501. color: #1A3026;
  502. line-height: 1;
  503. }
  504. .fixed-subtitle {
  505. font-size: 24rpx;
  506. color: #7A9086;
  507. margin-top: 8rpx;
  508. }
  509. }
  510. }
  511. .metrics-row {
  512. display: flex;
  513. justify-content: space-between;
  514. align-items: center;
  515. padding-top: 16rpx;
  516. border-top: 1rpx solid rgba(0, 0, 0, 0.03);
  517. .metric-item {
  518. flex: 1;
  519. display: flex;
  520. align-items: center;
  521. gap: 8rpx;
  522. .label {
  523. font-size: 22rpx;
  524. color: #8EAC9D;
  525. }
  526. .value {
  527. font-size: 24rpx;
  528. font-weight: 600;
  529. color: #2D4035;
  530. }
  531. }
  532. }
  533. }
  534. // AI 主卡
  535. .ai-card {
  536. position: relative;
  537. background: linear-gradient(135deg, rgba(59, 180, 74, 0.18), rgba(102, 204, 106, 0.10));
  538. border: 1rpx solid rgba(59, 180, 74, 0.08);
  539. border-radius: 20rpx;
  540. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04), 0 1rpx 4rpx rgba(0, 0, 0, 0.02);
  541. margin-bottom: 24rpx;
  542. overflow: hidden;
  543. transition: transform 0.2s ease, box-shadow 0.2s ease;
  544. &:active {
  545. transform: scale(0.99);
  546. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
  547. }
  548. // 多层背景光斑效果 (底层氛围)
  549. &::before {
  550. content: '';
  551. position: absolute;
  552. top: 0;
  553. left: 0;
  554. right: 0;
  555. bottom: 0;
  556. background:
  557. radial-gradient(circle at 85% 25%, rgba(59, 180, 74, 0.22), transparent 60%),
  558. radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.14), transparent 55%);
  559. pointer-events: none;
  560. z-index: 1;
  561. }
  562. // 抽象 AI 设计母题层 (右侧增强设计感)
  563. &::after {
  564. content: '';
  565. position: absolute;
  566. top: -20%;
  567. right: -10%;
  568. width: 80%;
  569. height: 140%;
  570. background:
  571. radial-gradient(circle at 75% 35%, rgba(59, 180, 74, 0.06) 0%, transparent 45%),
  572. radial-gradient(circle at 85% 65%, rgba(76, 175, 80, 0.04) 0%, transparent 40%),
  573. radial-gradient(circle at 60% 85%, rgba(59, 180, 74, 0.03) 0%, transparent 50%);
  574. filter: blur(30rpx);
  575. pointer-events: none;
  576. z-index: 2;
  577. }
  578. .ai-texture {
  579. position: absolute;
  580. top: 0;
  581. left: 0;
  582. right: 0;
  583. bottom: 0;
  584. background: repeating-linear-gradient(
  585. 45deg,
  586. transparent,
  587. transparent 2rpx,
  588. rgba(255, 255, 255, 0.03) 2rpx,
  589. rgba(255, 255, 255, 0.03) 4rpx
  590. );
  591. pointer-events: none;
  592. z-index: 2;
  593. opacity: 0.5;
  594. }
  595. .ai-header {
  596. position: relative;
  597. z-index: 3;
  598. display: flex;
  599. flex-direction: row;
  600. align-items: center;
  601. padding: 32rpx 28rpx 16rpx;
  602. .ai-pill {
  603. background: #FFFFFF;
  604. color: #3BB44A;
  605. font-size: 24rpx;
  606. font-weight: 600;
  607. padding: 8rpx 24rpx;
  608. border-radius: 40rpx;
  609. margin-right: 20rpx;
  610. margin-bottom: 0;
  611. }
  612. .ai-subtitle {
  613. font-size: 28rpx;
  614. color: #5C6A70;
  615. font-weight: 500;
  616. }
  617. }
  618. .ai-body {
  619. position: relative;
  620. z-index: 3;
  621. padding: 12rpx 28rpx 20rpx;
  622. .ai-title {
  623. font-size: 40rpx;
  624. font-weight: 700;
  625. color: #2C3E50;
  626. line-height: 1.3;
  627. margin-bottom: 12rpx;
  628. display: block;
  629. }
  630. .ai-desc {
  631. font-size: 26rpx;
  632. color: rgba(44, 62, 80, 0.6);
  633. line-height: 1.4;
  634. display: block;
  635. }
  636. }
  637. .ai-footer {
  638. position: relative;
  639. z-index: 3;
  640. display: flex;
  641. justify-content: flex-start;
  642. padding: 16rpx 28rpx 24rpx;
  643. .ai-cta {
  644. display: flex;
  645. align-items: center;
  646. }
  647. }
  648. }
  649. // 农资精选
  650. .products-grid {
  651. display: grid;
  652. grid-template-columns: repeat(2, 1fr);
  653. gap: 16rpx;
  654. padding: 16rpx;
  655. .product-card {
  656. background: white;
  657. border-radius: 16rpx;
  658. overflow: hidden;
  659. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  660. border: 1px solid rgba(0, 0, 0, 0.02);
  661. .product-image {
  662. width: 100%;
  663. height: 160rpx;
  664. background: #f5f5f5;
  665. }
  666. .product-info {
  667. padding: 16rpx;
  668. .product-title {
  669. font-size: 26rpx;
  670. font-weight: 600;
  671. color: #2C3E50;
  672. margin-bottom: 6rpx;
  673. overflow: hidden;
  674. text-overflow: ellipsis;
  675. white-space: nowrap;
  676. }
  677. .product-desc {
  678. font-size: 22rpx;
  679. color: #8C9396;
  680. margin-bottom: 12rpx;
  681. overflow: hidden;
  682. text-overflow: ellipsis;
  683. white-space: nowrap;
  684. }
  685. .price-row {
  686. display: flex;
  687. align-items: baseline;
  688. margin-bottom: 12rpx;
  689. .price {
  690. font-size: 32rpx;
  691. font-weight: 700;
  692. color: #3BB44A;
  693. }
  694. .unit {
  695. font-size: 22rpx;
  696. color: #8C9396;
  697. margin-left: 4rpx;
  698. }
  699. }
  700. }
  701. }
  702. }
  703. // 农技推荐
  704. .articles-list {
  705. padding: 16rpx;
  706. .article-card {
  707. display: flex;
  708. background: white;
  709. border-radius: 16rpx;
  710. overflow: hidden;
  711. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  712. border: 1px solid rgba(0, 0, 0, 0.02);
  713. margin-bottom: 16rpx;
  714. .article-image-wrapper {
  715. position: relative;
  716. width: 200rpx;
  717. height: 140rpx;
  718. flex-shrink: 0;
  719. .article-image {
  720. width: 100%;
  721. height: 100%;
  722. background: #f5f5f5;
  723. }
  724. .article-tag {
  725. position: absolute;
  726. top: 8rpx;
  727. left: 8rpx;
  728. background: #2196F3;
  729. color: white;
  730. font-size: 20rpx;
  731. padding: 4rpx 8rpx;
  732. border-radius: 6rpx;
  733. }
  734. }
  735. .article-info {
  736. flex: 1;
  737. padding: 16rpx;
  738. display: flex;
  739. flex-direction: column;
  740. justify-content: space-between;
  741. .article-title {
  742. font-size: 26rpx;
  743. font-weight: 600;
  744. color: #2C3E50;
  745. margin-bottom: 6rpx;
  746. overflow: hidden;
  747. text-overflow: ellipsis;
  748. display: -webkit-box;
  749. -webkit-line-clamp: 2;
  750. -webkit-box-orient: vertical;
  751. }
  752. .article-source {
  753. font-size: 22rpx;
  754. color: #8C9396;
  755. margin-bottom: 8rpx;
  756. }
  757. .article-stats {
  758. display: flex;
  759. align-items: center;
  760. .read-count {
  761. font-size: 22rpx;
  762. color: #999;
  763. margin-left: 6rpx;
  764. }
  765. }
  766. }
  767. }
  768. }
  769. // 弹窗样式
  770. .popup-content {
  771. padding: 32rpx;
  772. max-height: 80vh;
  773. overflow-y: auto;
  774. .popup-header {
  775. display: flex;
  776. justify-content: space-between;
  777. align-items: center;
  778. margin-bottom: 24rpx;
  779. .popup-title {
  780. font-size: 32rpx;
  781. font-weight: 600;
  782. color: #2C3E50;
  783. }
  784. }
  785. .weather-detail {
  786. margin-bottom: 32rpx;
  787. .detail-item {
  788. display: flex;
  789. justify-content: space-between;
  790. align-items: center;
  791. padding: 16rpx 0;
  792. border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  793. .detail-label {
  794. font-size: 26rpx;
  795. color: #8C9396;
  796. }
  797. .detail-value {
  798. font-size: 26rpx;
  799. font-weight: 600;
  800. color: #2C3E50;
  801. }
  802. }
  803. .advice-detail {
  804. margin-top: 24rpx;
  805. padding: 20rpx;
  806. background: rgba(59, 180, 74, 0.05);
  807. border-radius: 16rpx;
  808. .advice-label {
  809. font-size: 26rpx;
  810. font-weight: 600;
  811. color: #2C3E50;
  812. margin-bottom: 8rpx;
  813. }
  814. .advice-content {
  815. font-size: 26rpx;
  816. color: #2C3E50;
  817. line-height: 1.4;
  818. }
  819. }
  820. }
  821. .article-detail {
  822. margin-bottom: 32rpx;
  823. .article-detail-title {
  824. font-size: 32rpx;
  825. font-weight: 700;
  826. color: #2C3E50;
  827. margin-bottom: 12rpx;
  828. }
  829. .article-detail-time {
  830. font-size: 22rpx;
  831. color: #8C9396;
  832. margin-bottom: 24rpx;
  833. }
  834. .article-detail-content {
  835. .content-paragraph {
  836. font-size: 26rpx;
  837. color: #2C3E50;
  838. line-height: 1.6;
  839. margin-bottom: 20rpx;
  840. }
  841. .content-subtitle {
  842. font-size: 28rpx;
  843. font-weight: 600;
  844. color: #2C3E50;
  845. margin-bottom: 12rpx;
  846. }
  847. .content-list {
  848. .list-item {
  849. font-size: 26rpx;
  850. color: #2C3E50;
  851. line-height: 1.5;
  852. margin-bottom: 8rpx;
  853. }
  854. }
  855. }
  856. }
  857. }
  858. </style>