Просмотр исходного кода

demo版本新增农机知识库相关页面

jiuling 1 год назад
Родитель
Сommit
702b31ed2b
73 измененных файлов с 3867 добавлено и 89 удалено
  1. BIN
      .DS_Store
  2. 10 6
      .gitignore
  3. 771 0
      package-lock.json
  4. 12 0
      package.json
  5. 22 1
      pages.json
  6. 626 5
      pages/ai-chat/index.vue
  7. 782 0
      pages/knowledge/detail.vue
  8. 518 5
      pages/knowledge/index.vue
  9. BIN
      static/.DS_Store
  10. BIN
      static/icons/.DS_Store
  11. BIN
      static/icons/ai.png
  12. BIN
      static/icons/chat.png
  13. BIN
      static/icons/chat_off.png
  14. 1 0
      static/images/agriculture/backup.svg
  15. 6 0
      static/images/agriculture/rice-field1.svg
  16. 6 0
      static/images/agriculture/rice-field2.svg
  17. 6 0
      static/images/agriculture/rice-field3.svg
  18. 6 0
      static/images/agriculture/rice-field4.svg
  19. 6 0
      static/images/agriculture/rice-field5.svg
  20. 0 0
      static/images/article-cover.jpg
  21. 0 0
      static/images/chat-bg-pattern.png
  22. 21 0
      static/images/chat-bg-pattern.svg
  23. 0 0
      static/images/pattern-bg.png
  24. 1 0
      static/images/rice-farming/aerial-rice-field.jpg
  25. BIN
      static/images/rice-farming/rice-field1.jpg
  26. BIN
      static/images/rice-farming/rice-field2.jpg
  27. BIN
      static/images/rice-farming/rice-field3.jpg
  28. BIN
      static/images/rice-farming/rice-field4.jpg
  29. BIN
      static/images/rice-farming/rice-field5.jpg
  30. 1 0
      static/images/rice-farming/rice-harvest.jpg
  31. 1 0
      static/images/rice-farming/rice-seedlings.jpg
  32. 1 0
      static/images/rice-farming/terraced-rice-field.jpg
  33. 0 0
      static/images/rice-field1.jpg
  34. 0 0
      static/images/rice-field2.jpg
  35. 0 0
      static/images/rice-seedling.jpg
  36. 0 0
      static/images/robot-avatar.png
  37. 31 0
      static/images/robot-avatar.svg
  38. 0 0
      static/images/tmp/test.txt
  39. 0 0
      static/images/user-avatar.png
  40. 17 0
      static/images/user-avatar.svg
  41. 0 0
      static/images/video-cover.jpg
  42. 4 4
      unpackage/dist/cache/.vite/deps/_metadata.json
  43. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map
  44. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map
  45. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  46. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/about/index.js.map
  47. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/activity/index.js.map
  48. 0 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/ai-chat/index.js.map
  49. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/dashboard/index.js.map
  50. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/index.js.map
  51. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/field/index.js.map
  52. 0 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/knowledge/index.js.map
  53. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/machine/index.js.map
  54. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/more/index.js.map
  55. 1 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/privacy/index.js.map
  56. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/settings/index.js.map
  57. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/user/index.js.map
  58. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  59. 1 0
      unpackage/dist/dev/mp-weixin/app.json
  60. 8 2
      unpackage/dist/dev/mp-weixin/common/assets.js
  61. 73 23
      unpackage/dist/dev/mp-weixin/common/vendor.js
  62. 1 1
      unpackage/dist/dev/mp-weixin/pages/about/index.js
  63. 239 4
      unpackage/dist/dev/mp-weixin/pages/ai-chat/index.js
  64. 1 1
      unpackage/dist/dev/mp-weixin/pages/ai-chat/index.json
  65. 0 1
      unpackage/dist/dev/mp-weixin/pages/ai-chat/index.wxml
  66. 276 3
      unpackage/dist/dev/mp-weixin/pages/ai-chat/index.wxss
  67. 170 5
      unpackage/dist/dev/mp-weixin/pages/knowledge/index.js
  68. 0 1
      unpackage/dist/dev/mp-weixin/pages/knowledge/index.wxml
  69. 235 3
      unpackage/dist/dev/mp-weixin/pages/knowledge/index.wxss
  70. 1 1
      unpackage/dist/dev/mp-weixin/pages/user/index.js
  71. 4 13
      unpackage/dist/dev/mp-weixin/project.config.json
  72. BIN
      unpackage/dist/dev/mp-weixin/static/.DS_Store
  73. BIN
      unpackage/dist/dev/mp-weixin/static/icons/.DS_Store

+ 10 - 6
.gitignore

@@ -1,7 +1,11 @@
+# OSX
+#
 .DS_Store
-.hbuilderx
-*.log
-unpackage
-sitemap.json
-.prettierrc.cjs
-.hbuilderx
+node_modules/
+
+#Intellij idea
+.idea/
+/idea/
+.vscode/
+/unpackage/**
+.hbuilderx/launch.json

+ 771 - 0
package-lock.json

@@ -0,0 +1,771 @@
+{
+  "name": "nongxiaoyu",
+  "version": "1.0.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "nongxiaoyu",
+      "version": "1.0.0",
+      "license": "ISC",
+      "dependencies": {
+        "vue": "^3.3.4",
+        "vue-router": "^4.2.4"
+      },
+      "devDependencies": {
+        "@vitejs/plugin-vue": "^4.2.3",
+        "vite": "^4.4.9"
+      }
+    },
+    "node_modules/@babel/helper-string-parser": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+      "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/helper-validator-identifier": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
+      "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/parser": {
+      "version": "7.27.2",
+      "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.27.2.tgz",
+      "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==",
+      "dependencies": {
+        "@babel/types": "^7.27.1"
+      },
+      "bin": {
+        "parser": "bin/babel-parser.js"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@babel/types": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.27.1.tgz",
+      "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==",
+      "dependencies": {
+        "@babel/helper-string-parser": "^7.27.1",
+        "@babel/helper-validator-identifier": "^7.27.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@esbuild/android-arm": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+      "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/android-arm64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+      "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/android-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+      "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/darwin-arm64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+      "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/darwin-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+      "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/freebsd-arm64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+      "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/freebsd-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+      "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-arm": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+      "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-arm64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+      "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-ia32": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+      "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-loong64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+      "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-mips64el": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+      "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+      "cpu": [
+        "mips64el"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-ppc64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+      "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-riscv64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+      "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-s390x": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+      "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/linux-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+      "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/netbsd-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+      "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/openbsd-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+      "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/sunos-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+      "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "sunos"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/win32-arm64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+      "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/win32-ia32": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+      "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild/win32-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+      "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@jridgewell/sourcemap-codec": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+      "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
+    },
+    "node_modules/@vitejs/plugin-vue": {
+      "version": "4.6.2",
+      "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz",
+      "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==",
+      "dev": true,
+      "engines": {
+        "node": "^14.18.0 || >=16.0.0"
+      },
+      "peerDependencies": {
+        "vite": "^4.0.0 || ^5.0.0",
+        "vue": "^3.2.25"
+      }
+    },
+    "node_modules/@vue/compiler-core": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.14.tgz",
+      "integrity": "sha512-k7qMHMbKvoCXIxPhquKQVw3Twid3Kg4s7+oYURxLGRd56LiuHJVrvFKI4fm2AM3c8apqODPfVJGoh8nePbXMRA==",
+      "dependencies": {
+        "@babel/parser": "^7.27.2",
+        "@vue/shared": "3.5.14",
+        "entities": "^4.5.0",
+        "estree-walker": "^2.0.2",
+        "source-map-js": "^1.2.1"
+      }
+    },
+    "node_modules/@vue/compiler-dom": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.14.tgz",
+      "integrity": "sha512-1aOCSqxGOea5I80U2hQJvXYpPm/aXo95xL/m/mMhgyPUsKe9jhjwWpziNAw7tYRnbz1I61rd9Mld4W9KmmRoug==",
+      "dependencies": {
+        "@vue/compiler-core": "3.5.14",
+        "@vue/shared": "3.5.14"
+      }
+    },
+    "node_modules/@vue/compiler-sfc": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.14.tgz",
+      "integrity": "sha512-9T6m/9mMr81Lj58JpzsiSIjBgv2LiVoWjIVa7kuXHICUi8LiDSIotMpPRXYJsXKqyARrzjT24NAwttrMnMaCXA==",
+      "dependencies": {
+        "@babel/parser": "^7.27.2",
+        "@vue/compiler-core": "3.5.14",
+        "@vue/compiler-dom": "3.5.14",
+        "@vue/compiler-ssr": "3.5.14",
+        "@vue/shared": "3.5.14",
+        "estree-walker": "^2.0.2",
+        "magic-string": "^0.30.17",
+        "postcss": "^8.5.3",
+        "source-map-js": "^1.2.1"
+      }
+    },
+    "node_modules/@vue/compiler-ssr": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.14.tgz",
+      "integrity": "sha512-Y0G7PcBxr1yllnHuS/NxNCSPWnRGH4Ogrp0tsLA5QemDZuJLs99YjAKQ7KqkHE0vCg4QTKlQzXLKCMF7WPSl7Q==",
+      "dependencies": {
+        "@vue/compiler-dom": "3.5.14",
+        "@vue/shared": "3.5.14"
+      }
+    },
+    "node_modules/@vue/devtools-api": {
+      "version": "6.6.4",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
+      "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g=="
+    },
+    "node_modules/@vue/reactivity": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.14.tgz",
+      "integrity": "sha512-7cK1Hp343Fu/SUCCO52vCabjvsYu7ZkOqyYu7bXV9P2yyfjUMUXHZafEbq244sP7gf+EZEz+77QixBTuEqkQQw==",
+      "dependencies": {
+        "@vue/shared": "3.5.14"
+      }
+    },
+    "node_modules/@vue/runtime-core": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.14.tgz",
+      "integrity": "sha512-w9JWEANwHXNgieAhxPpEpJa+0V5G0hz3NmjAZwlOebtfKyp2hKxKF0+qSh0Xs6/PhfGihuSdqMprMVcQU/E6ag==",
+      "dependencies": {
+        "@vue/reactivity": "3.5.14",
+        "@vue/shared": "3.5.14"
+      }
+    },
+    "node_modules/@vue/runtime-dom": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.14.tgz",
+      "integrity": "sha512-lCfR++IakeI35TVR80QgOelsUIdcKjd65rWAMfdSlCYnaEY5t3hYwru7vvcWaqmrK+LpI7ZDDYiGU5V3xjMacw==",
+      "dependencies": {
+        "@vue/reactivity": "3.5.14",
+        "@vue/runtime-core": "3.5.14",
+        "@vue/shared": "3.5.14",
+        "csstype": "^3.1.3"
+      }
+    },
+    "node_modules/@vue/server-renderer": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.14.tgz",
+      "integrity": "sha512-Rf/ISLqokIvcySIYnv3tNWq40PLpNLDLSJwwVWzG6MNtyIhfbcrAxo5ZL9nARJhqjZyWWa40oRb2IDuejeuv6w==",
+      "dependencies": {
+        "@vue/compiler-ssr": "3.5.14",
+        "@vue/shared": "3.5.14"
+      },
+      "peerDependencies": {
+        "vue": "3.5.14"
+      }
+    },
+    "node_modules/@vue/shared": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.14.tgz",
+      "integrity": "sha512-oXTwNxVfc9EtP1zzXAlSlgARLXNC84frFYkS0HHz0h3E4WZSP9sywqjqzGCP9Y34M8ipNmd380pVgmMuwELDyQ=="
+    },
+    "node_modules/csstype": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
+      "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="
+    },
+    "node_modules/entities": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
+      "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+      "engines": {
+        "node": ">=0.12"
+      },
+      "funding": {
+        "url": "https://github.com/fb55/entities?sponsor=1"
+      }
+    },
+    "node_modules/esbuild": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.20.tgz",
+      "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+      "dev": true,
+      "hasInstallScript": true,
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "optionalDependencies": {
+        "@esbuild/android-arm": "0.18.20",
+        "@esbuild/android-arm64": "0.18.20",
+        "@esbuild/android-x64": "0.18.20",
+        "@esbuild/darwin-arm64": "0.18.20",
+        "@esbuild/darwin-x64": "0.18.20",
+        "@esbuild/freebsd-arm64": "0.18.20",
+        "@esbuild/freebsd-x64": "0.18.20",
+        "@esbuild/linux-arm": "0.18.20",
+        "@esbuild/linux-arm64": "0.18.20",
+        "@esbuild/linux-ia32": "0.18.20",
+        "@esbuild/linux-loong64": "0.18.20",
+        "@esbuild/linux-mips64el": "0.18.20",
+        "@esbuild/linux-ppc64": "0.18.20",
+        "@esbuild/linux-riscv64": "0.18.20",
+        "@esbuild/linux-s390x": "0.18.20",
+        "@esbuild/linux-x64": "0.18.20",
+        "@esbuild/netbsd-x64": "0.18.20",
+        "@esbuild/openbsd-x64": "0.18.20",
+        "@esbuild/sunos-x64": "0.18.20",
+        "@esbuild/win32-arm64": "0.18.20",
+        "@esbuild/win32-ia32": "0.18.20",
+        "@esbuild/win32-x64": "0.18.20"
+      }
+    },
+    "node_modules/estree-walker": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+      "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+    },
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+      }
+    },
+    "node_modules/magic-string": {
+      "version": "0.30.17",
+      "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
+      "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0"
+      }
+    },
+    "node_modules/nanoid": {
+      "version": "3.3.11",
+      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
+      "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "bin": {
+        "nanoid": "bin/nanoid.cjs"
+      },
+      "engines": {
+        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+      }
+    },
+    "node_modules/picocolors": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+      "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="
+    },
+    "node_modules/postcss": {
+      "version": "8.5.3",
+      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz",
+      "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
+      "funding": [
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/postcss/"
+        },
+        {
+          "type": "tidelift",
+          "url": "https://tidelift.com/funding/github/npm/postcss"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "dependencies": {
+        "nanoid": "^3.3.8",
+        "picocolors": "^1.1.1",
+        "source-map-js": "^1.2.1"
+      },
+      "engines": {
+        "node": "^10 || ^12 || >=14"
+      }
+    },
+    "node_modules/rollup": {
+      "version": "3.29.5",
+      "resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.29.5.tgz",
+      "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==",
+      "dev": true,
+      "bin": {
+        "rollup": "dist/bin/rollup"
+      },
+      "engines": {
+        "node": ">=14.18.0",
+        "npm": ">=8.0.0"
+      },
+      "optionalDependencies": {
+        "fsevents": "~2.3.2"
+      }
+    },
+    "node_modules/source-map-js": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
+      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/vite": {
+      "version": "4.5.14",
+      "resolved": "https://registry.npmmirror.com/vite/-/vite-4.5.14.tgz",
+      "integrity": "sha512-+v57oAaoYNnO3hIu5Z/tJRZjq5aHM2zDve9YZ8HngVHbhk66RStobhb1sqPMIPEleV6cNKYK4eGrAbE9Ulbl2g==",
+      "dev": true,
+      "dependencies": {
+        "esbuild": "^0.18.10",
+        "postcss": "^8.4.27",
+        "rollup": "^3.27.1"
+      },
+      "bin": {
+        "vite": "bin/vite.js"
+      },
+      "engines": {
+        "node": "^14.18.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/vitejs/vite?sponsor=1"
+      },
+      "optionalDependencies": {
+        "fsevents": "~2.3.2"
+      },
+      "peerDependencies": {
+        "@types/node": ">= 14",
+        "less": "*",
+        "lightningcss": "^1.21.0",
+        "sass": "*",
+        "stylus": "*",
+        "sugarss": "*",
+        "terser": "^5.4.0"
+      },
+      "peerDependenciesMeta": {
+        "@types/node": {
+          "optional": true
+        },
+        "less": {
+          "optional": true
+        },
+        "lightningcss": {
+          "optional": true
+        },
+        "sass": {
+          "optional": true
+        },
+        "stylus": {
+          "optional": true
+        },
+        "sugarss": {
+          "optional": true
+        },
+        "terser": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/vue": {
+      "version": "3.5.14",
+      "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.14.tgz",
+      "integrity": "sha512-LbOm50/vZFG6Mhy6KscQYXZMQ0LMCC/y40HDJPPvGFQ+i/lUH+PJHR6C3assgOQiXdl6tAfsXHbXYVBZZu65ew==",
+      "dependencies": {
+        "@vue/compiler-dom": "3.5.14",
+        "@vue/compiler-sfc": "3.5.14",
+        "@vue/runtime-dom": "3.5.14",
+        "@vue/server-renderer": "3.5.14",
+        "@vue/shared": "3.5.14"
+      },
+      "peerDependencies": {
+        "typescript": "*"
+      },
+      "peerDependenciesMeta": {
+        "typescript": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/vue-router": {
+      "version": "4.5.1",
+      "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.1.tgz",
+      "integrity": "sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==",
+      "dependencies": {
+        "@vue/devtools-api": "^6.6.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/posva"
+      },
+      "peerDependencies": {
+        "vue": "^3.2.0"
+      }
+    }
+  }
+}

+ 12 - 0
package.json

@@ -0,0 +1,12 @@
+{
+  "name": "nongxiaoyu",
+  "version": "1.0.0",
+  "description": "",
+  "main": "main.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC"
+}

+ 22 - 1
pages.json

@@ -24,6 +24,27 @@
         "navigationBarTitleText": "农业知识"
       }
     },
+    {
+      "path": "pages/knowledge/detail",
+      "style": {
+        "navigationBarTitleText": "农业知识",
+        "h5": {
+          "navigationStyle": "custom"
+        },
+        "app-plus": {
+          "titleNView": {
+            "buttons": [{
+              "type": "back",
+              "background": "transparent"
+            }]
+          }
+        },
+        "mp-weixin": {
+          "navigationBarBackgroundColor": "#ffffff",
+          "navigationBarTextStyle": "black"
+        }
+      }
+    },
     {
       "path": "pages/user/index",
       "style": {
@@ -39,7 +60,7 @@
     {
       "path": "pages/ai-chat/index",
       "style": {
-        "navigationBarTitleText": "AI问答"
+        "navigationBarTitleText": "问农小禹"
       }
     },
     {

+ 626 - 5
pages/ai-chat/index.vue

@@ -1,15 +1,636 @@
 <template>
   <view class="container">
-    AI 问答页面(待开发)
+    <!-- 聊天记录区域 -->
+    <scroll-view 
+      class="chat-container" 
+      scroll-y 
+      :scroll-top="scrollTop"
+      :scroll-with-animation="true"
+      @scroll="onScroll"
+      :style="{ 
+        height: `calc(100vh - ${inputHeight}px)`,
+        marginTop: '0'
+      }"
+    >
+      <view class="chat-list">
+        <view 
+          v-for="(message, index) in chatMessages" 
+          :key="index" 
+          class="message-item"
+          :class="{ 'message-ai': message.sender === 'ai', 'message-user': message.sender === 'user' }"
+        >
+          <!-- AI消息 -->
+          <template v-if="message.sender === 'ai'">
+            <view class="avatar-container">
+              <image class="avatar" src="/static/icons/ai.png" mode="aspectFill"></image>
+            </view>
+            <view class="message-content">
+              <view class="message-bubble ai-bubble" :class="{'typing': message.isTyping, 'welcome': message.isWelcome || index === 0}">
+                <view v-if="message.isTyping" class="typing-indicator">
+                  <view class="typing-dot"></view>
+                  <view class="typing-dot"></view>
+                  <view class="typing-dot"></view>
+                </view>
+                <text v-else class="message-text" :class="{'highlight': containsKeywords(message.content)}">{{ message.content }}</text>
+              </view>
+              <text class="message-time">{{ message.time }}</text>
+            </view>
+          </template>
+          
+          <!-- 用户消息 -->
+          <template v-else>
+            <view class="message-content user-content">
+              <text class="message-time">{{ message.time }}</text>
+              <view class="message-bubble user-bubble">
+                <text class="message-text">{{ message.content }}</text>
+              </view>
+            </view>
+            <view class="avatar-container">
+              <image class="avatar" src="/static/images/user-avatar.svg" mode="aspectFill"></image>
+            </view>
+          </template>
+        </view>
+      </view>
+    </scroll-view>
+    
+    <!-- 底部输入区 -->
+    <view class="input-container" :style="{ paddingBottom: `${isIOS ? safeAreaBottom : 20}rpx` }">
+      <!-- 问题建议区 -->
+      <scroll-view 
+        v-if="chatMessages.length <= 3 && !inputMessage" 
+        class="suggested-questions" 
+        scroll-x
+      >
+        <view 
+          v-for="(question, index) in suggestedQuestions" 
+          :key="index"
+          class="question-chip"
+          @click="useQuestion(question)"
+        >
+          <text>{{ question }}</text>
+        </view>
+      </scroll-view>
+      
+      <view class="input-wrapper">
+        <textarea 
+          class="message-input" 
+          v-model="inputMessage" 
+          placeholder="请输入您的问题..." 
+          maxlength="300"
+          @confirm="submitQuestion"
+          confirm-type="send"
+          @focus="onInputFocus"
+          :disabled="isProcessing"
+          auto-height
+          :maxlength="300"
+          :style="{ maxHeight: '120rpx' }"
+        />
+              <view 
+        class="send-button" 
+        :class="{ 'disabled': !inputMessage.trim() || isProcessing }"
+        @click="submitQuestion"
+        hover-class="button-hover"
+      >
+        <image 
+          class="send-icon-image" 
+          :src="inputMessage.trim() && !isProcessing ? '/static/icons/chat.png' : '/static/icons/chat_off.png'" 
+          mode="aspectFit"
+        ></image>
+      </view>
+      </view>
+    </view>
   </view>
 </template>
 
-<script setup>
+<script>
+export default {
+  data() {
+    return {
+      inputMessage: '',
+      chatMessages: [
+        {
+          sender: 'ai',
+          content: '您好!我是农小禹,您的智能农业助手🌱 我可以帮您解答农业种植、病虫害防治、农产品管理等方面的问题。有什么可以帮助您的吗?',
+          time: this.getFormattedTime(new Date(Date.now() - 3600000)), // 1小时前
+          timestamp: Date.now() - 3600000,
+          isWelcome: true
+        },
+        {
+          sender: 'user',
+          content: '南方现在适合种什么蔬菜?',
+          time: this.getFormattedTime(new Date(Date.now() - 60000)), // 1分钟前
+          timestamp: Date.now() - 60000
+        },
+        {
+          sender: 'ai',
+          content: '您可以考虑种植以下蔬菜:\n\n1. 空心菜:耐热耐湿,生长快速\n2. 丝瓜:适应性强,产量高\n3. 茄子:耐热性好,病虫害较少\n4. 辣椒:喜温喜光,南方气候适宜\n5. 秋葵:抗病性强,营养价值高\n\n记得注意排水和通风,南方雨水多,做好防涝措施。建议早晚浇水,避开中午高温时段。',
+          time: this.getFormattedTime(new Date()),
+          timestamp: Date.now()
+        }
+      ],
+      scrollTop: 0,
+      inputHeight: 120, // 单位px
+      scrollTimer: null,
+      isProcessing: false, // 是否正在处理请求
+      suggestedQuestions: [
+        '水稻插秧后如何管理?',
+        '果树夏季修剪技巧?',
+        '如何防治蔬菜常见病虫害?',
+        '农药使用注意事项?',
+        '有机肥和化肥怎么搭配使用?'
+      ],
+      statusBarHeight: 20, // 默认值,会在mounted中获取真实值
+      safeAreaBottom: 34, // 默认值,会在mounted中获取真实值
+      isIOS: false, // 是否是iOS设备
+      lastMessageDate: '' // 上一条消息的日期,用于判断是否显示日期分割线
+    }
+  },
+  // 设置页面标题
+  onNavigationBarButtonTap(e) {
+    console.log("导航栏按钮点击:", e);
+  },
+  mounted() {
+    // 获取系统信息
+    const systemInfo = uni.getSystemInfoSync();
+    this.statusBarHeight = systemInfo.statusBarHeight || 20;
+    this.isIOS = systemInfo.platform === 'ios';
+    this.safeAreaBottom = systemInfo.safeAreaInsets ? (systemInfo.safeAreaInsets.bottom || 0) : 0;
+    
+    // 初始化消息
+    this.initMessages();
+    
+    // 滚动到底部
+    this.$nextTick(() => {
+      this.scrollToBottom();
+    });
+  },
+  methods: {
+    onInputFocus() {
+      // 输入框获取焦点时,确保滚动到底部
+      this.$nextTick(() => {
+        this.scrollToBottom();
+      });
+    },
+    scrollToBottom() {
+      // 使用nextTick确保DOM更新后再滚动
+      this.$nextTick(() => {
+        const query = uni.createSelectorQuery().in(this);
+        query.select('.chat-list').boundingClientRect(data => {
+          if (data) {
+            this.scrollTop = data.height + 1000; // 加上足够大的值确保滚动到底部
+            
+            // 在H5环境下,还可以使用以下方法确保滚动到底部
+            if (this.isH5) {
+              setTimeout(() => {
+                const scrollEl = document.querySelector('.chat-container');
+                if (scrollEl) {
+                  scrollEl.scrollTop = scrollEl.scrollHeight;
+                }
+              }, 100);
+            }
+          }
+        }).exec();
+      });
+    },
+    onScroll(e) {
+      // 可以添加滚动事件处理
+    },
+    getCurrentTime() {
+      return this.getFormattedTime(new Date());
+    },
+    getFormattedTime(date) {
+      const hours = date.getHours().toString().padStart(2, '0');
+      const minutes = date.getMinutes().toString().padStart(2, '0');
+      return `${hours}:${minutes}`;
+    },
+    submitQuestion() {
+      if (!this.inputMessage.trim() || this.isProcessing) return;
+      
+      this.isProcessing = true;
+      
+      // 添加用户消息
+      this.chatMessages.push({
+        sender: 'user',
+        content: this.inputMessage,
+        time: this.getCurrentTime()
+      });
+      
+      const userQuestion = this.inputMessage;
+      this.inputMessage = '';
+      
+      // 滚动到底部
+      this.scrollToBottom();
+      
+      // 先添加一个"正在输入"的消息
+      this.chatMessages.push({
+        sender: 'ai',
+        content: '正在思考...',
+        time: this.getCurrentTime(),
+        isTyping: true
+      });
+      
+      // 模拟AI回复(实际项目中替换为API调用)
+      setTimeout(() => {
+        // 删除"正在输入"消息
+        this.chatMessages.pop();
+        
+        // 模拟回复
+        let aiResponse = "感谢您的提问!作为您的农技助理,我很高兴能帮助您解决农业相关问题。您询问的内容我已收到,我们团队正在研究适合的解决方案。";
+        
+        if (userQuestion.includes('水稻')) {
+          aiResponse = "水稻种植需要注意水肥管理和病虫害防治。目前南方地区水稻插秧时间已到,建议您选择抗病性强的品种,如'中优84'。插秧后7天开始浅水促根,分蘖期保持3-5cm水层。";
+        } else if (userQuestion.includes('蔬菜')) {
+          aiResponse = "夏季蔬菜种植需注意遮阳和水分管理。建议种植耐热品种如空心菜、苋菜、茄子等。可以采用遮阳网减少强光照射,早晚浇水避开高温时段。";
+        } else if (userQuestion.includes('果树')) {
+          aiResponse = "果树现在应注意夏季修剪和病虫害防治。柑橘类果树可以进行夏季修剪,去除徒长枝和内膛枝。同时注意柑橘黄龙病和炭疽病的预防,建议定期喷施药剂保护。";
+        }
+        
+        this.chatMessages.push({
+          sender: 'ai',
+          content: aiResponse,
+          time: this.getCurrentTime()
+        });
+        
+        this.scrollToBottom();
+        this.isProcessing = false;
+      }, 2000);
+    },
+    useQuestion(question) {
+      this.inputMessage = question;
+    },
+    containsKeywords(text) {
+      const keywords = ['水稻', '小麦', '玉米', '病虫害', '农药', '化肥', '有机肥', '种植技术'];
+      return keywords.some(keyword => text.includes(keyword));
+    },
+    formatMessage(text) {
+      // 将文本中的换行符转换为<br>标签
+      return text.replace(/\n/g, '<br>');
+    },
+    initMessages() {
+      // 确保消息有时间戳
+      this.chatMessages.forEach(msg => {
+        if (!msg.timestamp) {
+          msg.timestamp = new Date().getTime();
+        }
+      });
+      
+      // 按时间排序
+      this.chatMessages.sort((a, b) => a.timestamp - b.timestamp);
+    },
+    showDateSeparator(index) {
+      // 判断是否需要显示日期分割线
+      if (index === 0) return true;
+      
+      const currentMsg = this.chatMessages[index];
+      const prevMsg = this.chatMessages[index - 1];
+      
+      // 如果两条消息相隔超过30分钟,或者是不同日期,显示日期分割线
+      return this.isDifferentDay(currentMsg.timestamp, prevMsg.timestamp) || 
+             (currentMsg.timestamp - prevMsg.timestamp > 30 * 60 * 1000);
+    },
+    isDifferentDay(timestamp1, timestamp2) {
+      const date1 = new Date(timestamp1);
+      const date2 = new Date(timestamp2);
+      
+      return date1.getDate() !== date2.getDate() || 
+             date1.getMonth() !== date2.getMonth() || 
+             date1.getFullYear() !== date2.getFullYear();
+    },
+    formatDateSeparator(timestamp) {
+      const now = new Date();
+      const msgDate = new Date(timestamp);
+      
+      // 今天
+      if (this.isSameDay(msgDate, now)) {
+        return '今天 ' + this.getFormattedTime(msgDate);
+      }
+      
+      // 昨天
+      const yesterday = new Date(now);
+      yesterday.setDate(now.getDate() - 1);
+      if (this.isSameDay(msgDate, yesterday)) {
+        return '昨天 ' + this.getFormattedTime(msgDate);
+      }
+      
+      // 一周内
+      const oneWeekAgo = new Date(now);
+      oneWeekAgo.setDate(now.getDate() - 7);
+      if (msgDate >= oneWeekAgo) {
+        const weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+        return weekdays[msgDate.getDay()] + ' ' + this.getFormattedTime(msgDate);
+      }
+      
+      // 其他日期
+      return msgDate.getFullYear() + '年' + (msgDate.getMonth() + 1) + '月' + msgDate.getDate() + '日 ' + this.getFormattedTime(msgDate);
+    },
+    isSameDay(date1, date2) {
+      return date1.getDate() === date2.getDate() && 
+             date1.getMonth() === date2.getMonth() && 
+             date1.getFullYear() === date2.getFullYear();
+    }
+  }
+}
 </script>
 
-<style scoped>
+<style>
+/* 容器样式 */
 .container {
-  padding: 40rpx;
-  font-size: 32rpx;
+  position: relative;
+  min-height: 100vh;
+  background-color: #f5f5f5;
+  overflow: hidden; /* 防止内容溢出 */
+}
+
+/* 聊天容器 */
+.chat-container {
+  padding: 20rpx 30rpx;
+  box-sizing: border-box;
+  background-color: #f8f8f8;
+  background-image: url('/static/images/chat-bg-pattern.png');
+  background-size: 300rpx;
+  background-blend-mode: overlay;
+  background-opacity: 0.05;
+  -webkit-overflow-scrolling: touch; /* 增强iOS滚动体验 */
+}
+
+.chat-list {
+  padding-bottom: 30rpx;
+}
+
+/* 消息项 */
+.message-item {
+  display: flex;
+  margin-bottom: 30rpx;
+  position: relative;
+}
+
+.message-ai {
+  justify-content: flex-start;
+}
+
+.message-user {
+  justify-content: flex-end;
+}
+
+/* 头像 */
+.avatar-container {
+  width: 90rpx;
+  height: 90rpx;
+  flex-shrink: 0;
+}
+
+.avatar {
+  width: 90rpx;
+  height: 90rpx;
+  border-radius: 50%;
+  background-color: #e0e0e0;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+  object-fit: cover;
+}
+
+/* 消息内容 */
+.message-content {
+  max-width: 70%;
+  margin: 0 20rpx;
+  display: flex;
+  flex-direction: column;
+}
+
+.user-content {
+  align-items: flex-end;
+}
+
+.message-bubble {
+  padding: 24rpx;
+  border-radius: 24rpx;
+  position: relative;
+  margin-bottom: 10rpx;
+  word-wrap: break-word;
+  min-width: 80rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
+  transition: all 0.3s ease;
+  max-width: 100%;
+}
+
+.ai-bubble {
+  background-color: #e8f5e9;
+  border-top-left-radius: 4rpx;
+}
+
+.user-bubble {
+  background-color: #e3f2fd;
+  border-top-right-radius: 4rpx;
+}
+
+.message-text {
+  font-size: 28rpx;
+  color: #333;
+  line-height: 1.5;
+  word-break: break-all;
+}
+
+.message-time {
+  font-size: 22rpx;
+  color: #999;
+}
+
+/* 输入区域 */
+.input-container {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background-color: #fff;
+  padding: 20rpx 30rpx;
+  box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
+  display: flex;
+  flex-direction: column;
+  z-index: 10;
+}
+
+.input-wrapper {
+  display: flex;
+  align-items: flex-end;
+}
+
+.message-input {
+  flex: 1;
+  min-height: 70rpx;
+  max-height: 120rpx;
+  border-radius: 35rpx;
+  background-color: #f5f5f5;
+  padding: 15rpx 30rpx;
+  font-size: 28rpx;
+  color: #333;
+  border: 1rpx solid #e0e0e0;
+  line-height: 1.4;
+}
+
+.send-button {
+  margin-left: 16rpx;
+  width: 76rpx;
+  height: 76rpx;
+  border-radius: 50%;
+  background-color: transparent;
+  background-image: none;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transition: all 0.2s ease;
+  position: relative;
+  align-self: center;
+}
+
+.send-button.disabled {
+  background-color: transparent;
+  background-image: none;
+  opacity: 1;
+}
+
+.button-hover {
+  transform: scale(0.95);
+}
+
+@keyframes pulse {
+  0% { transform: scale(1); }
+  50% { transform: scale(0.95); }
+  100% { transform: scale(1); }
+}
+
+.send-button:active:not(.disabled) {
+  animation: pulse 0.3s ease-in-out;
+}
+
+/* 删除或注释掉之前的样式 */
+.send-icon {
+  display: none;
+}
+
+.send-icon:before {
+  display: none;
+}
+
+.send-icon-text {
+  display: none;
+}
+
+/* 推荐问题区域 */
+.suggested-questions {
+  display: flex;
+  white-space: nowrap;
+  margin-bottom: 15rpx;
+  padding: 5rpx 0;
+}
+
+.question-chip {
+  display: inline-block;
+  padding: 12rpx 20rpx;
+  margin-right: 15rpx;
+  background-color: #e8f5e9;
+  color: #4CAF50;
+  font-size: 24rpx;
+  border-radius: 30rpx;
+  border: 1rpx solid #a5d6a7;
+}
+
+/* AI正在输入的样式 */
+.message-bubble.ai-bubble.typing {
+  background-color: #f0f0f0;
+}
+
+.typing-indicator {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 40rpx;
+  padding: 0 20rpx;
+}
+
+.typing-dot {
+  width: 10rpx;
+  height: 10rpx;
+  margin: 0 5rpx;
+  background-color: #4CAF50;
+  border-radius: 50%;
+  opacity: 0.5;
+  animation: typingAnimation 1.4s infinite both;
+}
+
+.typing-dot:nth-child(2) {
+  animation-delay: 0.2s;
+}
+
+.typing-dot:nth-child(3) {
+  animation-delay: 0.4s;
+}
+
+@keyframes typingAnimation {
+  0% { opacity: 0.3; transform: translateY(0); }
+  50% { opacity: 1; transform: translateY(-5rpx); }
+  100% { opacity: 0.3; transform: translateY(0); }
+}
+
+/* 关键词高亮 */
+.message-text.highlight {
+  color: #2E7D32;
+  font-weight: 500;
+}
+
+/* 欢迎消息特殊样式 */
+.welcome {
+  background-color: #e3f2fd !important;
+  border-left: none !important;
+  border-radius: 24rpx !important;
+}
+
+/* 日期分割线样式 */
+.date-separator {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 20rpx 0;
+}
+
+.date-separator text {
+  background-color: rgba(0, 0, 0, 0.1);
+  color: #666;
+  font-size: 24rpx;
+  padding: 4rpx 20rpx;
+  border-radius: 20rpx;
+}
+
+/* 纸飞机图标 */
+.plane-svg {
+  display: none;
+}
+
+.send-icon-image {
+  width: 76rpx;
+  height: 76rpx;
+}
+
+.material-icon {
+  font-family: 'Material Icons';
+  font-weight: normal;
+  font-style: normal;
+  font-size: 48rpx;
+  line-height: 1;
+  letter-spacing: normal;
+  text-transform: none;
+  display: inline-block;
+  white-space: nowrap;
+  word-wrap: normal;
+  direction: ltr;
+  -webkit-font-smoothing: antialiased;
+  color: white;
+}
+
+/* 删除不需要的导航栏样式 */
+.custom-navbar {
+  display: none;
+}
+
+.navbar-bg, .navbar-content, .navbar-left, .navbar-title, .navbar-right, .back-icon, .arrow-left {
+  display: none;
 }
 </style>

+ 782 - 0
pages/knowledge/detail.vue

@@ -0,0 +1,782 @@
+<template>
+  <view class="container">
+    <!-- H5环境自定义导航栏 -->
+    <view class="h5-custom-navbar" v-if="isH5">
+      <view class="h5-navbar-left" @click="goBack">
+        <view class="h5-back-icon">
+          <view class="h5-arrow-left"></view>
+        </view>
+      </view>
+      <text class="h5-navbar-title">农业知识</text>
+      <view class="h5-navbar-right"></view>
+    </view>
+    
+    <!-- 文章内容区 -->
+    <view class="article-container" :style="isH5 ? 'margin-top: 90rpx;' : ''">
+      <!-- 封面图轮播 -->
+      <swiper class="cover-swiper" 
+        indicator-dots 
+        autoplay 
+        circular
+        interval="3000"
+        duration="500"
+        indicator-active-color="#4CAF50" 
+        indicator-color="rgba(255,255,255,0.5)"
+        @change="handleSwiperChange">
+        <swiper-item v-for="(slide, index) in carouselImages" :key="index">
+          <view class="swiper-item-container" :style="{ backgroundColor: slide.color }">
+            <view class="pattern-overlay"></view>
+            <view class="agri-icon" v-html="slide.icon"></view>
+            <view class="swiper-overlay">
+              <text class="swiper-title">{{ slide.title }}</text>
+              <text class="swiper-subtitle">{{ slide.subtitle }}</text>
+            </view>
+          </view>
+        </swiper-item>
+      </swiper>
+      <view class="swiper-counter">
+        <text>{{ currentSwiperIndex + 1 }}/{{ carouselImages.length }}</text>
+      </view>
+      
+      <!-- 标题及元信息 -->
+      <view class="article-header">
+        <text class="article-title">水稻高产栽培技术指南</text>
+        <view class="article-meta">
+          <text class="source">农业技术研究院</text>
+          <text class="dot">·</text>
+          <text class="date">2024-05-25</text>
+          <view class="views">
+            <text class="view-icon">&#xe614;</text>
+            <text class="view-count">3542</text>
+          </view>
+        </view>
+      </view>
+      
+      <!-- 文章正文 -->
+      <view class="article-content">
+        <view class="content-section">
+          <text class="paragraph">
+            水稻是我国最重要的粮食作物之一,提高水稻产量对保障国家粮食安全具有重要意义。本文将详细介绍水稻高产栽培的关键技术要点,帮助农户实现增产增收。
+          </text>
+        </view>
+        
+        <view class="content-section">
+          <text class="section-title">一、选种与育苗</text>
+          <text class="paragraph">
+            选用适合当地气候条件和土壤特性的优质稻种非常重要。推荐选择抗病性强、适应性广的品种,如"中优84"、"甬优12"等。在育苗过程中,需控制好温度、湿度,使用优质基质,确保秧苗健壮。
+          </text>
+          <view class="section-image">
+            <view class="color-image" style="background-color: #8BC34A;">
+              <text class="image-label">水稻优质种子</text>
+            </view>
+          </view>
+        </view>
+        
+        <view class="content-section">
+          <text class="section-title">二、水肥管理</text>
+          <text class="paragraph">
+            水稻生长对水分需求较高,但不同生长期对水分的需求不同。插秧后需浅水促根,分蘖期间歇灌溉,抽穗期保持水层,成熟期控制排水。肥料使用应遵循"控氮、增磷、补钾"原则。
+          </text>
+          <view class="section-image">
+            <view class="color-image" style="background-color: #4CAF50;">
+              <text class="image-label">水稻秧苗培育</text>
+            </view>
+          </view>
+        </view>
+        
+        <view class="content-section">
+          <text class="section-title">三、病虫害防治</text>
+          <text class="paragraph">
+            常见病害有稻瘟病、纹枯病、稻曲病等,虫害有稻飞虱、稻纵卷叶螟等。建议采用"预防为主,综合防治"的方法,适时喷洒药剂,加强田间管理。
+          </text>
+          <view class="note-box">
+            <text class="note-title">【注意事项】</text>
+            <text class="note-content">
+              农药使用需遵循安全间隔期规定,减少农药残留,确保水稻品质安全。选择晴天无风时喷药,穿戴好防护装备。
+            </text>
+          </view>
+          <view class="section-image">
+            <view class="color-image" style="background-color: #7CB342;">
+              <text class="image-label">病虫害防治</text>
+            </view>
+          </view>
+        </view>
+        
+        <view class="content-section">
+          <text class="section-title">四、收获与储存</text>
+          <text class="paragraph">
+            水稻成熟度达到85%以上时即可收割。收割后应及时晾晒至含水量14%以下,再进行储存。储存环境应保持干燥、通风、无虫害。
+          </text>
+          <view class="section-image">
+            <view class="color-image" style="background-color: #689F38;">
+              <text class="image-label">水稻收获与储存</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      
+      <!-- 视频示例 -->
+      <view class="video-container">
+        <view class="video-poster">
+          <view class="video-color-bg" style="background-color: #33691E;">
+            <view class="video-pattern"></view>
+            <text class="video-label">视频教学</text>
+          </view>
+          <view class="play-button">
+            <view class="triangle-play"></view>
+          </view>
+          <text class="video-duration">12:30</text>
+        </view>
+        <text class="video-title">水稻高产技术实操演示</text>
+      </view>
+    </view>
+    
+    <!-- 底部功能区 -->
+    <view class="footer-action">
+      <view class="action-button like" @click="handleLike">
+        <view class="action-icon-wrapper">
+          <text v-if="articleInfo.liked" class="material-icon">&#xe87d;</text>
+          <text v-else class="material-icon">&#xe87e;</text>
+        </view>
+        <text class="action-text">点赞</text>
+      </view>
+      <view class="action-button collect" @click="handleCollect">
+        <view class="action-icon-wrapper">
+          <text v-if="articleInfo.collected" class="material-icon">&#xe838;</text>
+          <text v-else class="material-icon">&#xe83a;</text>
+        </view>
+        <text class="action-text">收藏</text>
+      </view>
+      <view class="action-button share" @click="handleShare">
+        <view class="action-icon-wrapper">
+          <text class="material-icon">&#xe80d;</text>
+        </view>
+        <text class="action-text">分享</text>
+      </view>
+    </view>
+    
+    <!-- 返回顶部 -->
+    <view class="back-to-top" @click="scrollToTop">
+      <view class="top-arrow"></view>
+      <text class="top-text">顶部</text>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      title: "农业知识",
+      articleInfo: {
+        id: '1',
+        title: '水稻高产栽培技术指南',
+        source: '农业技术研究院',
+        publishDate: '2024-05-25',
+        views: 3542,
+        liked: false,
+        collected: false
+      },
+      carouselImages: [
+        // 使用内联颜色块代替图片,确保正常显示
+        {
+          color: '#8BC34A',
+          title: '水稻高产栽培技术 - 1',
+          subtitle: '绿色农业科技',
+          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z"></path><path d="M12 6a1 1 0 0 0-1 1v5a1 1 0 0 0 .55.89l4 2a1 1 0 0 0 .9-1.78L13 11.28V7a1 1 0 0 0-1-1z"></path></svg>'
+        },
+        {
+          color: '#4CAF50',
+          title: '水稻高产栽培技术 - 2',
+          subtitle: '提高水稻产量的关键',
+          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12h-4 M17 12l-3-3 M17 12l-3 3 M3 6h10 M13 6l-3-3 M13 6l-3 3 M3 18h10 M13 18l-3-3 M13 18l-3 3"></path></svg>'
+        },
+        {
+          color: '#7CB342',
+          title: '水稻高产栽培技术 - 3',
+          subtitle: '科学种植方法',
+          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v18h18"></path><path d="M18.5 3a2.5 2.5 0 0 1 0 5H12v6.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9"></path></svg>'
+        },
+        {
+          color: '#689F38',
+          title: '水稻高产栽培技术 - 4',
+          subtitle: '现代农业技术',
+          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v8"></path><path d="M5 10l3.5 3.5"></path><path d="M19 10l-3.5 3.5"></path><path d="M6.44 20l2.26-2.26a5 5 0 0 1 6.6 0L17.56 20"></path></svg>'
+        },
+        {
+          color: '#33691E',
+          title: '水稻高产栽培技术 - 5',
+          subtitle: '农民增收的保障',
+          icon: '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22a10 10 0 1 1 10-10 10 10 0 0 1-10 10z"></path><path d="M12 8v8"></path><path d="M8 12h8"></path></svg>'
+        }
+      ],
+      currentSwiperIndex: 0,
+      isH5: false // 是否是H5环境
+    }
+  },
+  onLoad() {
+    // 检测是否在H5环境中运行
+    // #ifdef H5
+    this.isH5 = true;
+    // #endif
+    
+    // 设置导航栏标题
+    uni.setNavigationBarTitle({
+      title: '农业知识'
+    });
+  },
+  onNavigationBarButtonTap(e) {
+    if (e.index === 0) {
+      this.goBack();
+    }
+  },
+  methods: {
+    goBack() {
+      uni.navigateBack();
+    },
+    scrollToTop() {
+      uni.pageScrollTo({
+        scrollTop: 0,
+        duration: 300
+      });
+    },
+    handleLike() {
+      this.articleInfo.liked = !this.articleInfo.liked;
+      // TODO: 调用接口更新点赞状态
+    },
+    handleCollect() {
+      this.articleInfo.collected = !this.articleInfo.collected;
+      // TODO: 调用接口更新收藏状态
+    },
+    handleShare() {
+      uni.showShareMenu({
+        withShareTicket: true,
+        menus: ['shareAppMessage', 'shareTimeline']
+      });
+    },
+    handleSwiperChange(e) {
+      this.currentSwiperIndex = e.detail.current;
+    }
+  }
+}
+</script>
+
+<style>
+/* 字体图标 */
+@font-face {
+  font-family: 'iconfont';
+  src: url('https://at.alicdn.com/t/font_3442238_cosd6rj55jg.ttf') format('truetype');
+}
+
+@font-face {
+  font-family: 'Material Icons';
+  font-style: normal;
+  font-weight: 400;
+  src: url(https://fonts.gstatic.com/s/materialicons/v139/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
+}
+
+.icon, .view-icon, .play-icon, .action-icon, .top-icon {
+  font-family: 'iconfont';
+}
+
+.material-icon {
+  font-family: 'Material Icons';
+  font-weight: normal;
+  font-style: normal;
+  font-size: 50rpx;
+  line-height: 1;
+  letter-spacing: normal;
+  text-transform: none;
+  display: inline-block;
+  white-space: nowrap;
+  word-wrap: normal;
+  direction: ltr;
+  -webkit-font-smoothing: antialiased;
+  color: #4CAF50;
+}
+
+/* 容器样式 */
+.container {
+  background-color: #f8f8f8;
+  min-height: 100vh;
+  position: relative;
+  padding-bottom: 120rpx;
+}
+
+/* 删除自定义导航栏样式 */
+.custom-navbar {
+  display: none;
+}
+
+.navbar-left, .back-icon, .navbar-title, .navbar-right, .arrow-left {
+  display: none;
+}
+
+/* 文章容器 */
+.article-container {
+  background-color: #fff;
+  border-radius: 0;
+  overflow: hidden;
+}
+
+/* 封面图轮播 */
+.cover-swiper {
+  width: 100%;
+  height: 420rpx;
+  position: relative;
+}
+
+.swiper-item-container {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 0;
+}
+
+.swiper-image {
+  width: 100%;
+  height: 100%;
+  display: block;
+}
+
+.swiper-overlay {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  padding: 40rpx 30rpx;
+  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-end;
+  align-items: flex-start;
+  color: #fff;
+}
+
+.swiper-title {
+  font-size: 42rpx;
+  font-weight: bold;
+  margin-bottom: 10rpx;
+  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
+}
+
+.swiper-subtitle {
+  font-size: 28rpx;
+  opacity: 0.9;
+  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
+}
+
+/* 文章头部信息 */
+.article-header {
+  padding: 30rpx 30rpx 0;
+}
+
+.article-title {
+  font-size: 42rpx;
+  font-weight: bold;
+  color: #333;
+  line-height: 1.4;
+  margin-bottom: 20rpx;
+}
+
+.article-meta {
+  display: flex;
+  align-items: center;
+  margin-bottom: 40rpx;
+}
+
+.source {
+  font-size: 24rpx;
+  color: #666;
+}
+
+.dot {
+  margin: 0 10rpx;
+  color: #999;
+}
+
+.date {
+  font-size: 24rpx;
+  color: #999;
+}
+
+.views {
+  margin-left: auto;
+  display: flex;
+  align-items: center;
+}
+
+.view-icon {
+  font-size: 24rpx;
+  color: #999;
+  margin-right: 6rpx;
+}
+
+.view-count {
+  font-size: 24rpx;
+  color: #999;
+}
+
+/* 文章内容 */
+.article-content {
+  padding: 0 30rpx 40rpx;
+}
+
+.content-section {
+  margin-bottom: 40rpx;
+}
+
+.section-title {
+  font-size: 34rpx;
+  font-weight: bold;
+  color: #2e7d32;
+  margin-bottom: 20rpx;
+  display: block;
+}
+
+.paragraph {
+  font-size: 30rpx;
+  line-height: 1.8;
+  color: #333;
+  margin-bottom: 20rpx;
+  display: block;
+}
+
+.content-image {
+  width: 100%;
+  margin: 20rpx 0;
+  border-radius: 12rpx;
+}
+
+.image-caption {
+  font-size: 24rpx;
+  color: #999;
+  text-align: center;
+  display: block;
+  margin-top: 10rpx;
+}
+
+/* 注意事项盒子 */
+.note-box {
+  background-color: #f1f8e9;
+  border-left: 8rpx solid #8bc34a;
+  padding: 20rpx;
+  border-radius: 8rpx;
+  margin: 20rpx 0;
+}
+
+.note-title {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #558b2f;
+  margin-bottom: 10rpx;
+  display: block;
+}
+
+.note-content {
+  font-size: 26rpx;
+  line-height: 1.6;
+  color: #689f38;
+  display: block;
+}
+
+/* 视频容器 */
+.video-container {
+  margin: 0 30rpx 40rpx;
+  border-radius: 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+
+.video-poster {
+  position: relative;
+  width: 100%;
+  height: 380rpx;
+}
+
+.video-color-bg {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 0;
+}
+
+.video-pattern {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  opacity: 0.1;
+  background-image: 
+    linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, 
+    rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
+  background-size: 50px 50px;
+}
+
+.video-label {
+  color: white;
+  font-size: 32rpx;
+  font-weight: bold;
+  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
+  z-index: 5;
+}
+
+.play-button {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 120rpx;
+  height: 120rpx;
+  background-color: rgba(0, 0, 0, 0.6);
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 10;
+  box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.3);
+  border: 4rpx solid rgba(255, 255, 255, 0.8);
+}
+
+.triangle-play {
+  width: 0;
+  height: 0;
+  border-top: 26rpx solid transparent;
+  border-bottom: 26rpx solid transparent;
+  border-left: 40rpx solid #fff;
+  margin-left: 10rpx;
+}
+
+.video-duration {
+  position: absolute;
+  bottom: 20rpx;
+  right: 20rpx;
+  padding: 6rpx 12rpx;
+  background-color: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  font-size: 22rpx;
+  border-radius: 4rpx;
+}
+
+.video-title {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  padding: 20rpx;
+  display: block;
+}
+
+/* 底部功能区 */
+.footer-action {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  height: 100rpx;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
+  z-index: 99;
+}
+
+.action-button {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 10rpx 0;
+}
+
+.action-icon-wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 6rpx;
+}
+
+.action-text {
+  font-size: 24rpx;
+  color: #4CAF50;
+  font-weight: 500;
+}
+
+.action-button:active {
+  opacity: 0.7;
+}
+
+/* 返回顶部按钮 */
+.back-to-top {
+  position: fixed;
+  right: 30rpx;
+  bottom: 120rpx;
+  width: 100rpx;
+  height: 100rpx;
+  background-color: rgba(46, 125, 50, 0.9);
+  border-radius: 50%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  z-index: 99;
+}
+
+.top-arrow {
+  width: 20rpx;
+  height: 20rpx;
+  border-top: 4rpx solid #fff;
+  border-left: 4rpx solid #fff;
+  transform: rotate(45deg);
+  margin-bottom: 6rpx;
+}
+
+.top-text {
+  color: #fff;
+  font-size: 22rpx;
+}
+
+.swiper-counter {
+  position: absolute;
+  top: 110rpx;
+  right: 30rpx;
+  padding: 6rpx 12rpx;
+  background-color: rgba(0, 0, 0, 0.5);
+  color: #fff;
+  font-size: 22rpx;
+  border-radius: 20rpx;
+  z-index: 10;
+}
+
+.pattern-overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  opacity: 0.1;
+  background-image: 
+    linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, 
+    rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
+  background-size: 50px 50px;
+}
+
+.agri-icon {
+  position: absolute;
+  top: 40%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  opacity: 0.8;
+  width: 120rpx;
+  height: 120rpx;
+  z-index: 5;
+}
+
+.agri-icon svg {
+  width: 100%;
+  height: 100%;
+  stroke-width: 1.5;
+}
+
+.section-image {
+  margin: 20rpx 0;
+  width: 100%;
+}
+
+.color-image {
+  width: 100%;
+  height: 300rpx;
+  border-radius: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+  overflow: hidden;
+}
+
+.color-image::before {
+  content: "";
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-image: 
+    linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, 
+    rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
+  background-size: 50px 50px;
+  opacity: 0.2;
+}
+
+.image-label {
+  color: white;
+  font-size: 32rpx;
+  font-weight: bold;
+  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
+  z-index: 5;
+}
+
+/* 删除浮动返回按钮样式 */
+.float-back-button, .float-back-icon {
+  display: none;
+}
+
+/* H5导航栏样式 */
+.h5-custom-navbar {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  height: 90rpx;
+  background-color: #fff;
+  display: flex;
+  align-items: center;
+  padding: 0 30rpx;
+  z-index: 100;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.h5-navbar-left {
+  width: 80rpx;
+  height: 80rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.h5-back-icon {
+  font-size: 40rpx;
+  color: #333;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.h5-navbar-title {
+  flex: 1;
+  text-align: center;
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.h5-navbar-right {
+  width: 60rpx;
+}
+
+.h5-arrow-left {
+  width: 24rpx;
+  height: 24rpx;
+  border-top: 4rpx solid #333;
+  border-left: 4rpx solid #333;
+  transform: rotate(-45deg);
+}
+</style> 

+ 518 - 5
pages/knowledge/index.vue

@@ -1,15 +1,528 @@
 <template>
-  <view class="container">
-    农业知识页面(待开发)
+  <view class="page-container">
+    <!-- 顶部标签导航 -->
+    <view class="header-tabs">
+      <view 
+        class="tab-item" 
+        :class="{ active: currentTab === 0 }" 
+        @click="handleTabChange(0)"
+      >
+        <text>农技知识</text>
+        <view class="tab-line" :class="{ active: currentTab === 0 }"></view>
+      </view>
+      <view 
+        class="tab-item" 
+        :class="{ active: currentTab === 1 }" 
+        @click="handleTabChange(1)"
+      >
+        <text>政策解读</text>
+        <view class="tab-line" :class="{ active: currentTab === 1 }"></view>
+      </view>
+    </view>
+
+    <!-- 内容区域 -->
+    <scroll-view
+      scroll-y
+      class="content-container"
+      @scrolltolower="loadMore"
+      @refresherrefresh="onRefresh"
+      refresher-enabled
+      :refresher-triggered="isRefreshing"
+    >
+      <!-- 主内容区域 -->
+      <view class="cards-section">
+        <!-- 农技知识内容 -->
+        <block v-if="currentTab === 0">
+          <navigator 
+            class="content-card"
+            v-for="(item, index) in techList"
+            :key="index"
+            :url="`/pages/knowledge/detail?id=${item.id}&type=tech`"
+            hover-class="card-hover"
+          >
+            <view class="content-thumbnail">
+              <image 
+                :src="item.image" 
+                mode="aspectFill"
+                class="thumbnail-image"
+                lazy-load
+              />
+              <!-- 仅视频类型显示时长和播放按钮 -->
+              <template v-if="item.contentType === 'video'">
+                <view class="video-duration">{{ item.duration || '35:56' }}</view>
+                <view class="play-button">
+                  <view class="play-icon"></view>
+                </view>
+                <view class="content-type-tag video">视频</view>
+              </template>
+              <!-- 文章类型显示标签 -->
+              <template v-else>
+                <view class="content-type-tag article">文章</view>
+              </template>
+            </view>
+            <view class="content-info">
+              <text class="content-title">{{ item.title }}</text>
+              <view class="info-row">
+                <text class="source-name">{{ item.source || '中国农业科技' }}</text>
+                <view class="view-count">
+                  <text class="iconfont icon-eye"></text>
+                  <text>已读 {{ item.viewCount }}</text>
+                </view>
+              </view>
+            </view>
+          </navigator>
+        </block>
+
+        <!-- 政策解读内容 -->
+        <block v-if="currentTab === 1">
+          <navigator 
+            class="content-card"
+            v-for="(item, index) in policyList"
+            :key="index"
+            :url="`/pages/knowledge/detail?id=${item.id}&type=policy`"
+            hover-class="card-hover"
+          >
+            <view class="content-thumbnail">
+              <image 
+                :src="item.image" 
+                mode="aspectFill"
+                class="thumbnail-image"
+                lazy-load
+              />
+              <!-- 仅视频类型显示时长和播放按钮 -->
+              <template v-if="item.contentType === 'video'">
+                <view class="video-duration">{{ item.duration || '28:32' }}</view>
+                <view class="play-button">
+                  <view class="play-icon"></view>
+                </view>
+                <view class="content-type-tag video">视频</view>
+              </template>
+              <!-- 文章类型显示标签 -->
+              <template v-else>
+                <view class="content-type-tag article">文章</view>
+              </template>
+            </view>
+            <view class="content-info">
+              <text class="content-title">{{ item.title }}</text>
+              <view class="info-row">
+                <text class="source-name">{{ item.source || '农业部官方' }}</text>
+                <view class="view-count">
+                  <text class="iconfont icon-eye"></text>
+                  <text>已读 {{ item.viewCount }}</text>
+                </view>
+              </view>
+            </view>
+          </navigator>
+        </block>
+
+        <!-- 无数据状态 -->
+        <view class="empty-state" v-if="(currentTab === 0 && techList.length === 0) || (currentTab === 1 && policyList.length === 0)">
+          <image src="/static/images/empty.png" mode="aspectFit" class="empty-image"></image>
+          <text class="empty-text">暂无数据</text>
+        </view>
+      </view>
+
+      <!-- 底部安全区域 -->
+      <view style="height: 120rpx;"></view>
+    </scroll-view>
+
+    <!-- AI问答悬浮按钮 -->
+    <view class="assistant-btn" @click="navigateToAI" hover-class="btn-hover">
+      <image src="/static/icons/ai.png" class="assistant-icon" mode="aspectFit"></image>
+      <text class="btn-text">问农小禹</text>
+    </view>
   </view>
 </template>
 
 <script setup>
+import { ref, onMounted } from 'vue'
+
+// 当前标签
+const currentTab = ref(0)
+
+// 农技知识列表
+const techList = ref([
+  {
+    id: 1,
+    title: '水稻高产栽培技术指南',
+    description: '详解水稻种植关键技术要点,包括育苗、插秧、水肥管理等全过程技术要领',
+    viewCount: '289',
+    image: 'https://img.freepik.com/free-photo/rice-field-with-beautiful-sky_74190-7490.jpg',
+    type: '农技',
+    contentType: 'article', // 标记为文章类型
+    source: '农业技术研究院'
+  },
+  {
+    id: 2,
+    title: '果树病虫害防治方案视频教学',
+    description: '常见果树病虫害的识别方法、防治时期、用药指导,助您果园增产增收',
+    viewCount: '856',
+    image: 'https://img.freepik.com/free-photo/apple-tree-with-ripe-red-apples_1150-9301.jpg',
+    type: '农技',
+    contentType: 'video', // 标记为视频类型
+    duration: '15:32',
+    source: '中国农业科技'
+  },
+  {
+    id: 3,
+    title: '科学施肥技术指南',
+    description: '解析不同作物的施肥特点,平衡施肥技术,提高肥料利用率',
+    viewCount: '667',
+    image: 'https://img.freepik.com/free-photo/farmer-holding-chemical-fertilizer-field_1150-7167.jpg',
+    type: '农技',
+    contentType: 'article', // 标记为文章类型
+    source: '农业知识库'
+  }
+])
+
+// 政策解读列表
+const policyList = ref([
+  {
+    id: 1,
+    title: '2024年农业补贴政策要点解读',
+    description: '最新农业补贴政策要点解读,包括种粮补贴、农机补贴等各项补贴申请指南',
+    viewCount: '2,341',
+    date: '05-23',
+    image: 'https://img.freepik.com/free-photo/modern-agricultural-machinery-field_1157-46386.jpg',
+    type: '政策',
+    contentType: 'article', // 标记为文章类型
+    source: '农业部官方'
+  },
+  {
+    id: 2,
+    title: '农业保险政策专家解析视频',
+    description: '农业保险覆盖范围扩大,新增多项保障内容,理赔流程优化',
+    viewCount: '1,856',
+    date: '05-22',
+    image: 'https://img.freepik.com/free-photo/farmer-working-field_1157-46384.jpg',
+    type: '政策',
+    contentType: 'video', // 标记为视频类型
+    duration: '28:45',
+    source: '农业部政策宣讲'
+  },
+  {
+    id: 3,
+    title: '绿色种植认证办理指南',
+    description: '绿色种植认证最新申请流程及注意事项说明',
+    viewCount: '1,667',
+    date: '05-21',
+    image: 'https://img.freepik.com/free-photo/organic-farm-harvest_1157-46078.jpg',
+    type: '政策',
+    contentType: 'article', // 标记为文章类型
+    source: '农业部认证中心'
+  }
+])
+
+// 刷新加载状态
+const isRefreshing = ref(false)
+
+// 处理Tab切换
+const handleTabChange = (index) => {
+  currentTab.value = index
+  console.log('Tab changed to:', index)
+}
+
+// 下拉刷新
+const onRefresh = async () => {
+  isRefreshing.value = true
+  try {
+    await new Promise(resolve => setTimeout(resolve, 1000))
+    // 模拟刷新数据
+    if (currentTab.value === 0) {
+      // 刷新农技知识数据
+      console.log('刷新农技知识数据')
+    } else {
+      // 刷新政策解读数据
+      console.log('刷新政策解读数据')
+    }
+  } finally {
+    isRefreshing.value = false
+  }
+}
+
+// 加载更多
+const loadMore = () => {
+  console.log('Loading more content')
+  // 模拟加载更多数据
+  if (currentTab.value === 0) {
+    // 加载更多农技知识数据
+    console.log('加载更多农技知识数据')
+  } else {
+    // 加载更多政策解读数据
+    console.log('加载更多政策解读数据')
+  }
+}
+
+// 跳转AI问答
+const navigateToAI = () => {
+  uni.navigateTo({
+    url: '/pages/ai-chat/index'
+  })
+}
+
+onMounted(() => {
+  console.log('Page mounted, current tab:', currentTab.value)
+})
 </script>
 
 <style scoped>
-.container {
-  padding: 40rpx;
-  font-size: 32rpx;
+/* 引入字体图标 */
+@font-face {
+  font-family: 'iconfont';
+  src: url('//at.alicdn.com/t/font_3266846_kxscvlm9qpp.woff2') format('woff2');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 22rpx;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-robot:before {
+  content: "\e64b";
+}
+
+.icon-eye:before {
+  content: "\e614";
+}
+
+/* 页面容器 */
+.page-container {
+  min-height: 100vh;
+  background-color: #f7f8fa;
+  position: relative;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+}
+
+/* 头部标签样式 */
+.header-tabs {
+  display: flex;
+  background-color: #fff;
+  padding: 0 30rpx;
+  position: relative;
+  border-bottom: 1rpx solid #f2f2f2;
+}
+
+.tab-item {
+  position: relative;
+  padding: 20rpx 30rpx;
+  margin-right: 50rpx;
+  font-size: 30rpx;
+  color: #666;
+  transition: all 0.3s ease;
+}
+
+.tab-item.active {
+  color: #333;
+  font-weight: 600;
+}
+
+.tab-line {
+  position: absolute;
+  bottom: 0;
+  left: 50%;
+  width: 0;
+  height: 6rpx;
+  background-color: #4dc971;
+  border-radius: 3rpx;
+  transition: all 0.3s ease;
+  transform: translateX(-50%);
+}
+
+.tab-line.active {
+  width: 40rpx;
+}
+
+/* 内容区域样式 */
+.content-container {
+  height: calc(100vh - 88rpx);
+  box-sizing: border-box;
+}
+
+.cards-section {
+  padding: 12rpx;
+}
+
+/* 内容卡片通用样式 */
+.content-card {
+  background-color: #fff;
+  border-radius: 16rpx;
+  margin-bottom: 24rpx;
+  overflow: hidden;
+  transition: all 0.2s ease;
+  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
+  position: relative;
+}
+
+.card-hover {
+  transform: translateY(-2rpx);
+  box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.12);
+}
+
+/* 缩略图 */
+.content-thumbnail {
+  position: relative;
+  width: 100%;
+  height: 300rpx;
+  background-color: #f0f0f0;
+}
+
+.thumbnail-image {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+/* 播放按钮 */
+.play-button {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 70rpx;
+  height: 70rpx;
+  background-color: rgba(0, 0, 0, 0.5);
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 2;
+}
+
+.play-icon {
+  width: 0;
+  height: 0;
+  border-style: solid;
+  border-width: 9rpx 0 9rpx 16rpx;
+  border-color: transparent transparent transparent #ffffff;
+  margin-left: 4rpx;
+}
+
+/* 视频时长 */
+.video-duration {
+  position: absolute;
+  bottom: 10rpx;
+  right: 10rpx;
+  padding: 3rpx 8rpx;
+  background-color: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  font-size: 18rpx;
+  border-radius: 10rpx;
+}
+
+/* 内容类型标签 */
+.content-type-tag {
+  position: absolute;
+  top: 10rpx;
+  left: 10rpx;
+  padding: 4rpx 10rpx;
+  font-size: 20rpx;
+  border-radius: 6rpx;
+  z-index: 2;
+}
+
+.content-type-tag.video {
+  background-color: #4dc971;
+  color: #fff;
+}
+
+.content-type-tag.article {
+  background-color: #3498db;
+  color: #fff;
+}
+
+/* 内容信息 */
+.content-info {
+  padding: 16rpx;
+  position: relative;
+}
+
+.content-title {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #333;
+  line-height: 1.4;
+  margin-bottom: 10rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+}
+
+.source-name {
+  color: #999;
+  font-size: 22rpx;
+}
+
+.info-row {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.view-count {
+  color: #c0c0c0;
+  font-size: 20rpx;
+  display: flex;
+  align-items: center;
+}
+
+.view-count .iconfont {
+  margin-right: 4rpx;
+}
+
+/* 空状态 */
+.empty-state {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 120rpx 0;
+}
+
+.empty-image {
+  width: 180rpx;
+  height: 180rpx;
+  margin-bottom: 16rpx;
+}
+
+.empty-text {
+  font-size: 26rpx;
+  color: #999;
+}
+
+/* AI按钮 */
+.assistant-btn {
+  position: fixed;
+  right: 30rpx;
+  bottom: 100rpx;
+  height: 80rpx;
+  border-radius: 40rpx;
+  background: linear-gradient(135deg, #42b983, #3db160);
+  display: flex;
+  align-items: center;
+  padding: 0 24rpx;
+  box-shadow: 0 6rpx 20rpx rgba(66, 185, 131, 0.35);
+  z-index: 99;
+  transition: all 0.25s ease;
+}
+
+.assistant-icon {
+  width: 68rpx;
+  height: 68rpx;
+  margin-right: 10rpx;
+}
+
+.btn-hover {
+  transform: scale(1.05);
+  box-shadow: 0 8rpx 24rpx rgba(66, 185, 131, 0.45);
+}
+
+.btn-text {
+  font-size: 28rpx;
+  color: #fff;
+  font-weight: 500;
 }
 </style>

BIN
static/.DS_Store


BIN
static/icons/.DS_Store


BIN
static/icons/ai.png


BIN
static/icons/chat.png


BIN
static/icons/chat_off.png


+ 1 - 0
static/images/agriculture/backup.svg

@@ -0,0 +1 @@
+<svg width='1200' height='800' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' fill='#8BC34A'/><text x='600' y='400' font-family='Arial' font-size='60' text-anchor='middle' fill='white'>水稻高产栽培技术 - 备用图片</text></svg>

+ 6 - 0
static/images/agriculture/rice-field1.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
+  <rect width="100%" height="100%" fill="#8BC34A"/>
+  <text x="600" y="400" font-family="Arial" font-size="60" text-anchor="middle" fill="white">水稻高产栽培技术 - 1</text>
+  <text x="600" y="480" font-family="Arial" font-size="36" text-anchor="middle" fill="white">绿色稻田图片1</text>
+</svg> 

+ 6 - 0
static/images/agriculture/rice-field2.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
+  <rect width="100%" height="100%" fill="#4CAF50"/>
+  <text x="600" y="400" font-family="Arial" font-size="60" text-anchor="middle" fill="white">水稻高产栽培技术 - 2</text>
+  <text x="600" y="480" font-family="Arial" font-size="36" text-anchor="middle" fill="white">绿色稻田图片2</text>
+</svg> 

+ 6 - 0
static/images/agriculture/rice-field3.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
+  <rect width="100%" height="100%" fill="#7CB342"/>
+  <text x="600" y="400" font-family="Arial" font-size="60" text-anchor="middle" fill="white">水稻高产栽培技术 - 3</text>
+  <text x="600" y="480" font-family="Arial" font-size="36" text-anchor="middle" fill="white">绿色稻田图片3</text>
+</svg> 

+ 6 - 0
static/images/agriculture/rice-field4.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
+  <rect width="100%" height="100%" fill="#689F38"/>
+  <text x="600" y="400" font-family="Arial" font-size="60" text-anchor="middle" fill="white">水稻高产栽培技术 - 4</text>
+  <text x="600" y="480" font-family="Arial" font-size="36" text-anchor="middle" fill="white">绿色稻田图片4</text>
+</svg> 

+ 6 - 0
static/images/agriculture/rice-field5.svg

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
+  <rect width="100%" height="100%" fill="#33691E"/>
+  <text x="600" y="400" font-family="Arial" font-size="60" text-anchor="middle" fill="white">水稻高产栽培技术 - 5</text>
+  <text x="600" y="480" font-family="Arial" font-size="36" text-anchor="middle" fill="white">绿色稻田图片5</text>
+</svg> 

+ 0 - 0
static/images/article-cover.jpg


+ 0 - 0
static/images/chat-bg-pattern.png


+ 21 - 0
static/images/chat-bg-pattern.svg

@@ -0,0 +1,21 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
+  <defs>
+    <pattern id="pattern" width="100" height="100" patternUnits="userSpaceOnUse">
+      <!-- 小麦图案 -->
+      <path d="M10,50 Q20,40 10,30 M10,30 L5,25 M10,30 L15,25" stroke="#E8F5E9" stroke-width="1" fill="none" />
+      <path d="M30,80 Q40,70 30,60 M30,60 L25,55 M30,60 L35,55" stroke="#E8F5E9" stroke-width="1" fill="none" />
+      
+      <!-- 水稻图案 -->
+      <path d="M70,20 Q80,10 90,20 M90,20 L95,15 M90,20 L85,15" stroke="#E8F5E9" stroke-width="1" fill="none" />
+      <path d="M50,90 Q60,80 70,90 M70,90 L75,85 M70,90 L65,85" stroke="#E8F5E9" stroke-width="1" fill="none" />
+      
+      <!-- 简单叶子图案 -->
+      <path d="M20,10 C25,5 30,5 35,10 C30,15 25,15 20,10 Z" fill="#E8F5E9" opacity="0.3" />
+      <path d="M60,40 C65,35 70,35 75,40 C70,45 65,45 60,40 Z" fill="#E8F5E9" opacity="0.3" />
+      <path d="M80,60 C85,55 90,55 95,60 C90,65 85,65 80,60 Z" fill="#E8F5E9" opacity="0.3" />
+      <path d="M40,90 C45,85 50,85 55,90 C50,95 45,95 40,90 Z" fill="#E8F5E9" opacity="0.3" />
+    </pattern>
+  </defs>
+  
+  <rect width="100" height="100" fill="url(#pattern)" />
+</svg> 

+ 0 - 0
static/images/pattern-bg.png


+ 1 - 0
static/images/rice-farming/aerial-rice-field.jpg

@@ -0,0 +1 @@
+<html><body>404</body></html>

BIN
static/images/rice-farming/rice-field1.jpg


BIN
static/images/rice-farming/rice-field2.jpg


BIN
static/images/rice-farming/rice-field3.jpg


BIN
static/images/rice-farming/rice-field4.jpg


BIN
static/images/rice-farming/rice-field5.jpg


+ 1 - 0
static/images/rice-farming/rice-harvest.jpg

@@ -0,0 +1 @@
+<html><body>404</body></html>

+ 1 - 0
static/images/rice-farming/rice-seedlings.jpg

@@ -0,0 +1 @@
+<html><body>404</body></html>

+ 1 - 0
static/images/rice-farming/terraced-rice-field.jpg

@@ -0,0 +1 @@
+<html><body>404</body></html>

+ 0 - 0
static/images/rice-field1.jpg


+ 0 - 0
static/images/rice-field2.jpg


+ 0 - 0
static/images/rice-seedling.jpg


+ 0 - 0
static/images/robot-avatar.png


+ 31 - 0
static/images/robot-avatar.svg

@@ -0,0 +1,31 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
+  <!-- 头部 -->
+  <circle cx="50" cy="50" r="45" fill="#4CAF50" />
+  <circle cx="50" cy="50" r="40" fill="#81C784" />
+  
+  <!-- 眼睛 -->
+  <circle cx="35" cy="40" r="8" fill="white" />
+  <circle cx="65" cy="40" r="8" fill="white" />
+  <circle cx="35" cy="40" r="4" fill="#333" />
+  <circle cx="65" cy="40" r="4" fill="#333" />
+  <circle cx="36" cy="38" r="2" fill="white" />
+  <circle cx="66" cy="38" r="2" fill="white" />
+  
+  <!-- 嘴巴 -->
+  <path d="M35,65 Q50,75 65,65" stroke="#333" stroke-width="3" fill="none" />
+  
+  <!-- 天线 -->
+  <line x1="40" y1="15" x2="40" y2="25" stroke="#333" stroke-width="3" />
+  <line x1="60" y1="15" x2="60" y2="25" stroke="#333" stroke-width="3" />
+  <circle cx="40" cy="12" r="4" fill="#FF5722" />
+  <circle cx="60" cy="12" r="4" fill="#FF5722" />
+  
+  <!-- 耳朵/侧面元素 -->
+  <rect x="10" y="40" width="5" height="15" rx="2" fill="#388E3C" />
+  <rect x="85" y="40" width="5" height="15" rx="2" fill="#388E3C" />
+  
+  <!-- 小装饰 -->
+  <rect x="40" y="80" width="20" height="5" rx="2" fill="#388E3C" />
+  <circle cx="30" cy="80" r="3" fill="#81C784" />
+  <circle cx="70" cy="80" r="3" fill="#81C784" />
+</svg> 

+ 0 - 0
static/images/tmp/test.txt


+ 0 - 0
static/images/user-avatar.png


+ 17 - 0
static/images/user-avatar.svg

@@ -0,0 +1,17 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
+  <!-- 背景圆形 -->
+  <circle cx="50" cy="50" r="50" fill="#E0E0E0" />
+  
+  <!-- 人物上半身轮廓 -->
+  <circle cx="50" cy="42" r="20" fill="#9E9E9E" />
+  
+  <!-- 人物下半身轮廓 -->
+  <path d="M20,90 Q50,110 80,90 L80,85 Q50,100 20,85 Z" fill="#9E9E9E" />
+  
+  <!-- 脖子连接 -->
+  <rect x="40" y="58" width="20" height="10" fill="#9E9E9E" />
+  
+  <!-- 肩部 -->
+  <path d="M40,65 Q30,70 25,85 L30,87 Q35,75 40,70 Z" fill="#9E9E9E" />
+  <path d="M60,65 Q70,70 75,85 L70,87 Q65,75 60,70 Z" fill="#9E9E9E" />
+</svg> 

+ 0 - 0
static/images/video-cover.jpg


+ 4 - 4
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,8 +1,8 @@
 {
-  "hash": "f7d4af5f",
-  "configHash": "a00e2214",
-  "lockfileHash": "e3b0c442",
-  "browserHash": "447d1d7a",
+  "hash": "dc9bb7cf",
+  "configHash": "c96d15e7",
+  "lockfileHash": "ae64393a",
+  "browserHash": "72be7abf",
   "optimized": {},
   "chunks": {}
 }

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map

@@ -1 +1 @@
-{"version":3,"file":"app.js","sources":["main.js"],"sourcesContent":["import App from './App.vue'\nimport { createSSRApp } from 'vue'\n\nexport function createApp() {\n  const app = createSSRApp(App)\n  return {\n    app\n  }\n}\n"],"names":["createSSRApp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,YAAY;AAC1B,QAAM,MAAMA,cAAY,aAAC,GAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;AAEA,YAAY,IAAI,MAAM,MAAM;;"}
+{"version":3,"file":"app.js","sources":["main.js"],"sourcesContent":["import App from './App.vue'\nimport { createSSRApp } from 'vue'\n\nexport function createApp() {\n  const app = createSSRApp(App)\n  return {\n    app\n  }\n}\n"],"names":["createSSRApp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,YAAY;AAC1B,QAAM,MAAMA,cAAY,aAAC,GAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;AAEA,YAAY,IAAI,MAAM,MAAM;;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map

@@ -1 +1 @@
-{"version":3,"file":"assets.js","sources":["../../../../../../../static/images/default-avatar.png","../../../../../../../static/images/logo.png"],"sourcesContent":["export default \"/static/images/default-avatar.png\"","export default \"/static/images/logo.png\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,aAAA;;;"}
+{"version":3,"file":"assets.js","sources":["../../../../../../../static/images/empty.png","static/icons/ai.png","../../../../../../../static/images/default-avatar.png","static/images/user-avatar.svg","../../../../../../../static/images/logo.png"],"sourcesContent":["export default \"/static/images/empty.png\"","export default \"__VITE_ASSET__0e731508__\"","export default \"/static/images/default-avatar.png\"","export default \"__VITE_ASSET__565b8f1d__\"","export default \"/static/images/logo.png\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;"}

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/about/index.js.map


+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/activity/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/activity/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/activity/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"index.js","sources":["pages/activity/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/activity/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/ai-chat/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/dashboard/index.js.map


+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/device/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/device/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/device/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"index.js","sources":["pages/device/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/device/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/field/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/field/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/field/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"index.js","sources":["pages/field/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/field/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/knowledge/index.js.map


+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/machine/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/machine/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/machine/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"index.js","sources":["pages/machine/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/machine/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/more/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/more/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/more/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"index.js","sources":["pages/more/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/more/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/privacy/index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["pages/privacy/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/code/pages/privacy/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["MiniProgramPage"],"mappings":";;;;;;;;;AACA,GAAG,WAAWA,SAAe;"}
+{"version":3,"file":"index.js","sources":["pages/privacy/index.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/yawuga/工作项目/合和智行项目/项目资料/农小禹/nongxiaoyu/pages/privacy/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["MiniProgramPage"],"mappings":";;;;;;;;;AACA,GAAG,WAAWA,SAAe;"}

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/settings/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/user/index.js.map


+ 1 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -6,6 +6,7 @@ if (!Math) {
   "./pages/activity/index.js";
   "./pages/device/index.js";
   "./pages/knowledge/index.js";
+  "./pages/knowledge/detail.js";
   "./pages/user/index.js";
   "./pages/machine/index.js";
   "./pages/ai-chat/index.js";

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -4,6 +4,7 @@
     "pages/activity/index",
     "pages/device/index",
     "pages/knowledge/index",
+    "pages/knowledge/detail",
     "pages/user/index",
     "pages/machine/index",
     "pages/ai-chat/index",

+ 8 - 2
unpackage/dist/dev/mp-weixin/common/assets.js

@@ -1,6 +1,12 @@
 "use strict";
+const _imports_0$3 = "/static/images/empty.png";
+const _imports_0$2 = "/static/icons/ai.png";
 const _imports_0$1 = "/static/images/default-avatar.png";
+const _imports_1 = "/static/images/user-avatar.svg";
 const _imports_0 = "/static/images/logo.png";
-exports._imports_0 = _imports_0$1;
-exports._imports_0$1 = _imports_0;
+exports._imports_0 = _imports_0$2;
+exports._imports_0$1 = _imports_0$3;
+exports._imports_0$2 = _imports_0$1;
+exports._imports_0$3 = _imports_0;
+exports._imports_1 = _imports_1;
 //# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map

+ 73 - 23
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -68,8 +68,8 @@ const capitalize = cacheStringFunction((str) => {
   return str.charAt(0).toUpperCase() + str.slice(1);
 });
 const toHandlerKey = cacheStringFunction((str) => {
-  const s = str ? `on${capitalize(str)}` : ``;
-  return s;
+  const s2 = str ? `on${capitalize(str)}` : ``;
+  return s2;
 });
 const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
 const invokeArrayFns$1 = (fns, arg) => {
@@ -88,6 +88,36 @@ const looseToNumber = (val) => {
   const n = parseFloat(val);
   return isNaN(n) ? val : n;
 };
+function normalizeStyle(value) {
+  if (isArray(value)) {
+    const res = {};
+    for (let i = 0; i < value.length; i++) {
+      const item = value[i];
+      const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
+      if (normalized) {
+        for (const key in normalized) {
+          res[key] = normalized[key];
+        }
+      }
+    }
+    return res;
+  } else if (isString(value) || isObject(value)) {
+    return value;
+  }
+}
+const listDelimiterRE = /;(?![^(]*\))/g;
+const propertyDelimiterRE = /:([^]+)/;
+const styleCommentRE = /\/\*[^]*?\*\//g;
+function parseStringStyle(cssText) {
+  const ret = {};
+  cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
+    if (item) {
+      const tmp = item.split(propertyDelimiterRE);
+      tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
+    }
+  });
+  return ret;
+}
 const toDisplayString = (val) => {
   return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
 };
@@ -354,8 +384,8 @@ const E = function() {
 E.prototype = {
   _id: 1,
   on: function(name, callback, ctx) {
-    var e = this.e || (this.e = {});
-    (e[name] || (e[name] = [])).push({
+    var e2 = this.e || (this.e = {});
+    (e2[name] || (e2[name] = [])).push({
       fn: callback,
       ctx,
       _id: this._id
@@ -382,8 +412,8 @@ E.prototype = {
     return this;
   },
   off: function(name, event) {
-    var e = this.e || (this.e = {});
-    var evts = e[name];
+    var e2 = this.e || (this.e = {});
+    var evts = e2[name];
     var liveEvents = [];
     if (evts && event) {
       for (var i = evts.length - 1; i >= 0; i--) {
@@ -394,7 +424,7 @@ E.prototype = {
       }
       liveEvents = evts;
     }
-    liveEvents.length ? e[name] = liveEvents : delete e[name];
+    liveEvents.length ? e2[name] = liveEvents : delete e2[name];
     return this;
   }
 };
@@ -5017,6 +5047,22 @@ function getCreateApp() {
     return my[method];
   }
 }
+function stringifyStyle(value) {
+  if (isString(value)) {
+    return value;
+  }
+  return stringify(normalizeStyle(value));
+}
+function stringify(styles) {
+  let ret = "";
+  if (!styles || isString(styles)) {
+    return ret;
+  }
+  for (const key in styles) {
+    ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
+  }
+  return ret;
+}
 function vOn(value, key) {
   const instance = getCurrentInstance();
   const ctx = instance.ctx;
@@ -5145,6 +5191,8 @@ function vFor(source, renderItem) {
 }
 const o = (value, key) => vOn(value, key);
 const f = (source, renderItem) => vFor(source, renderItem);
+const s = (value) => stringifyStyle(value);
+const e = (target, ...sources) => extend(target, ...sources);
 const t = (val) => toDisplayString(val);
 const p = (props) => renderProps(props);
 function createApp$1(rootComponent, rootProps = null) {
@@ -5285,8 +5333,8 @@ function tryCatch(fn) {
   return function() {
     try {
       return fn.apply(fn, arguments);
-    } catch (e) {
-      console.error(e);
+    } catch (e2) {
+      console.error(e2);
     }
   };
 }
@@ -5750,7 +5798,7 @@ let enabled;
 function normalizePushMessage(message) {
   try {
     return JSON.parse(message);
-  } catch (e) {
+  } catch (e2) {
   }
   return message;
 }
@@ -6073,9 +6121,9 @@ function populateParameters(fromRes, toRes) {
     appVersion: "1.0.0",
     appVersionCode: "100",
     appLanguage: getAppLanguage(hostLanguage),
-    uniCompileVersion: "4.64",
-    uniCompilerVersion: "4.64",
-    uniRuntimeVersion: "4.64",
+    uniCompileVersion: "4.66",
+    uniCompilerVersion: "4.66",
+    uniRuntimeVersion: "4.66",
     uniPlatform: "mp-weixin",
     deviceBrand,
     deviceModel: model,
@@ -6224,9 +6272,9 @@ const getAppBaseInfo = {
       appLanguage: getAppLanguage(hostLanguage),
       isUniAppX: false,
       uniPlatform: "mp-weixin",
-      uniCompileVersion: "4.64",
-      uniCompilerVersion: "4.64",
-      uniRuntimeVersion: "4.64"
+      uniCompileVersion: "4.66",
+      uniCompilerVersion: "4.66",
+      uniRuntimeVersion: "4.66"
     };
     extend(toRes, parameters);
   }
@@ -6493,15 +6541,15 @@ function tryConnectSocket(host2, port, id) {
       });
       resolve2(null);
     }, SOCKET_TIMEOUT);
-    socket.onOpen((e) => {
+    socket.onOpen((e2) => {
       clearTimeout(timer);
       resolve2(socket);
     });
-    socket.onClose((e) => {
+    socket.onClose((e2) => {
       clearTimeout(timer);
       resolve2(null);
     });
-    socket.onError((e) => {
+    socket.onError((e2) => {
       clearTimeout(timer);
       resolve2(null);
     });
@@ -6598,7 +6646,7 @@ function formatMessage(type, args) {
       type,
       args: formatArgs(args)
     };
-  } catch (e) {
+  } catch (e2) {
   }
   return {
     type,
@@ -6626,7 +6674,7 @@ function formatArg(arg, depth = 0) {
     case "object":
       try {
         return formatObject(arg, depth);
-      } catch (e) {
+      } catch (e2) {
         return {
           type: "object",
           value: {
@@ -6966,9 +7014,9 @@ function isConsoleWritable() {
   return isWritable;
 }
 function initRuntimeSocketService() {
-  const hosts = "127.0.0.1,172.20.10.11";
+  const hosts = "127.0.0.1,192.168.0.114";
   const port = "8090";
-  const id = "mp-weixin_2zmRhg";
+  const id = "mp-weixin_pjnm_O";
   const lazy = typeof swan !== "undefined";
   let restoreError = lazy ? () => {
   } : initOnError();
@@ -7921,6 +7969,7 @@ const onShow = /* @__PURE__ */ createHook(ON_SHOW);
 exports._export_sfc = _export_sfc;
 exports.computed = computed;
 exports.createSSRApp = createSSRApp;
+exports.e = e;
 exports.f = f;
 exports.index = index;
 exports.o = o;
@@ -7929,5 +7978,6 @@ exports.onShow = onShow;
 exports.p = p;
 exports.ref = ref;
 exports.resolveComponent = resolveComponent;
+exports.s = s;
 exports.t = t;
 //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/about/index.js

@@ -26,7 +26,7 @@ const _sfc_main = {
     };
     return (_ctx, _cache) => {
       return {
-        a: common_assets._imports_0$1,
+        a: common_assets._imports_0$3,
         b: common_vendor.t(version.value),
         c: common_vendor.o(($event) => copyText("www.nongxiaoyu.com")),
         d: common_vendor.o(makePhoneCall),

+ 239 - 4
unpackage/dist/dev/mp-weixin/pages/ai-chat/index.js

@@ -1,9 +1,244 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
-  return {};
+const common_assets = require("../../common/assets.js");
+const _sfc_main = {
+  data() {
+    return {
+      inputMessage: "",
+      chatMessages: [
+        {
+          sender: "ai",
+          content: "您好!我是农小禹,您的智能农业助手🌱 我可以帮您解答农业种植、病虫害防治、农产品管理等方面的问题。有什么可以帮助您的吗?",
+          time: this.getFormattedTime(new Date(Date.now() - 36e5)),
+          // 1小时前
+          timestamp: Date.now() - 36e5,
+          isWelcome: true
+        },
+        {
+          sender: "user",
+          content: "南方现在适合种什么蔬菜?",
+          time: this.getFormattedTime(new Date(Date.now() - 6e4)),
+          // 1分钟前
+          timestamp: Date.now() - 6e4
+        },
+        {
+          sender: "ai",
+          content: "您可以考虑种植以下蔬菜:\n\n1. 空心菜:耐热耐湿,生长快速\n2. 丝瓜:适应性强,产量高\n3. 茄子:耐热性好,病虫害较少\n4. 辣椒:喜温喜光,南方气候适宜\n5. 秋葵:抗病性强,营养价值高\n\n记得注意排水和通风,南方雨水多,做好防涝措施。建议早晚浇水,避开中午高温时段。",
+          time: this.getFormattedTime(/* @__PURE__ */ new Date()),
+          timestamp: Date.now()
+        }
+      ],
+      scrollTop: 0,
+      inputHeight: 120,
+      // 单位px
+      scrollTimer: null,
+      isProcessing: false,
+      // 是否正在处理请求
+      suggestedQuestions: [
+        "水稻插秧后如何管理?",
+        "果树夏季修剪技巧?",
+        "如何防治蔬菜常见病虫害?",
+        "农药使用注意事项?",
+        "有机肥和化肥怎么搭配使用?"
+      ],
+      statusBarHeight: 20,
+      // 默认值,会在mounted中获取真实值
+      safeAreaBottom: 34,
+      // 默认值,会在mounted中获取真实值
+      isIOS: false,
+      // 是否是iOS设备
+      lastMessageDate: ""
+      // 上一条消息的日期,用于判断是否显示日期分割线
+    };
+  },
+  // 设置页面标题
+  onNavigationBarButtonTap(e) {
+    common_vendor.index.__f__("log", "at pages/ai-chat/index.vue:150", "导航栏按钮点击:", e);
+  },
+  mounted() {
+    const systemInfo = common_vendor.index.getSystemInfoSync();
+    this.statusBarHeight = systemInfo.statusBarHeight || 20;
+    this.isIOS = systemInfo.platform === "ios";
+    this.safeAreaBottom = systemInfo.safeAreaInsets ? systemInfo.safeAreaInsets.bottom || 0 : 0;
+    this.initMessages();
+    this.$nextTick(() => {
+      this.scrollToBottom();
+    });
+  },
+  methods: {
+    onInputFocus() {
+      this.$nextTick(() => {
+        this.scrollToBottom();
+      });
+    },
+    scrollToBottom() {
+      this.$nextTick(() => {
+        const query = common_vendor.index.createSelectorQuery().in(this);
+        query.select(".chat-list").boundingClientRect((data) => {
+          if (data) {
+            this.scrollTop = data.height + 1e3;
+            if (this.isH5) {
+              setTimeout(() => {
+                const scrollEl = document.querySelector(".chat-container");
+                if (scrollEl) {
+                  scrollEl.scrollTop = scrollEl.scrollHeight;
+                }
+              }, 100);
+            }
+          }
+        }).exec();
+      });
+    },
+    onScroll(e) {
+    },
+    getCurrentTime() {
+      return this.getFormattedTime(/* @__PURE__ */ new Date());
+    },
+    getFormattedTime(date) {
+      const hours = date.getHours().toString().padStart(2, "0");
+      const minutes = date.getMinutes().toString().padStart(2, "0");
+      return `${hours}:${minutes}`;
+    },
+    submitQuestion() {
+      if (!this.inputMessage.trim() || this.isProcessing)
+        return;
+      this.isProcessing = true;
+      this.chatMessages.push({
+        sender: "user",
+        content: this.inputMessage,
+        time: this.getCurrentTime()
+      });
+      const userQuestion = this.inputMessage;
+      this.inputMessage = "";
+      this.scrollToBottom();
+      this.chatMessages.push({
+        sender: "ai",
+        content: "正在思考...",
+        time: this.getCurrentTime(),
+        isTyping: true
+      });
+      setTimeout(() => {
+        this.chatMessages.pop();
+        let aiResponse = "感谢您的提问!作为您的农技助理,我很高兴能帮助您解决农业相关问题。您询问的内容我已收到,我们团队正在研究适合的解决方案。";
+        if (userQuestion.includes("水稻")) {
+          aiResponse = "水稻种植需要注意水肥管理和病虫害防治。目前南方地区水稻插秧时间已到,建议您选择抗病性强的品种,如'中优84'。插秧后7天开始浅水促根,分蘖期保持3-5cm水层。";
+        } else if (userQuestion.includes("蔬菜")) {
+          aiResponse = "夏季蔬菜种植需注意遮阳和水分管理。建议种植耐热品种如空心菜、苋菜、茄子等。可以采用遮阳网减少强光照射,早晚浇水避开高温时段。";
+        } else if (userQuestion.includes("果树")) {
+          aiResponse = "果树现在应注意夏季修剪和病虫害防治。柑橘类果树可以进行夏季修剪,去除徒长枝和内膛枝。同时注意柑橘黄龙病和炭疽病的预防,建议定期喷施药剂保护。";
+        }
+        this.chatMessages.push({
+          sender: "ai",
+          content: aiResponse,
+          time: this.getCurrentTime()
+        });
+        this.scrollToBottom();
+        this.isProcessing = false;
+      }, 2e3);
+    },
+    useQuestion(question) {
+      this.inputMessage = question;
+    },
+    containsKeywords(text) {
+      const keywords = ["水稻", "小麦", "玉米", "病虫害", "农药", "化肥", "有机肥", "种植技术"];
+      return keywords.some((keyword) => text.includes(keyword));
+    },
+    formatMessage(text) {
+      return text.replace(/\n/g, "<br>");
+    },
+    initMessages() {
+      this.chatMessages.forEach((msg) => {
+        if (!msg.timestamp) {
+          msg.timestamp = (/* @__PURE__ */ new Date()).getTime();
+        }
+      });
+      this.chatMessages.sort((a, b) => a.timestamp - b.timestamp);
+    },
+    showDateSeparator(index) {
+      if (index === 0)
+        return true;
+      const currentMsg = this.chatMessages[index];
+      const prevMsg = this.chatMessages[index - 1];
+      return this.isDifferentDay(currentMsg.timestamp, prevMsg.timestamp) || currentMsg.timestamp - prevMsg.timestamp > 30 * 60 * 1e3;
+    },
+    isDifferentDay(timestamp1, timestamp2) {
+      const date1 = new Date(timestamp1);
+      const date2 = new Date(timestamp2);
+      return date1.getDate() !== date2.getDate() || date1.getMonth() !== date2.getMonth() || date1.getFullYear() !== date2.getFullYear();
+    },
+    formatDateSeparator(timestamp) {
+      const now = /* @__PURE__ */ new Date();
+      const msgDate = new Date(timestamp);
+      if (this.isSameDay(msgDate, now)) {
+        return "今天 " + this.getFormattedTime(msgDate);
+      }
+      const yesterday = new Date(now);
+      yesterday.setDate(now.getDate() - 1);
+      if (this.isSameDay(msgDate, yesterday)) {
+        return "昨天 " + this.getFormattedTime(msgDate);
+      }
+      const oneWeekAgo = new Date(now);
+      oneWeekAgo.setDate(now.getDate() - 7);
+      if (msgDate >= oneWeekAgo) {
+        const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+        return weekdays[msgDate.getDay()] + " " + this.getFormattedTime(msgDate);
+      }
+      return msgDate.getFullYear() + "年" + (msgDate.getMonth() + 1) + "月" + msgDate.getDate() + "日 " + this.getFormattedTime(msgDate);
+    },
+    isSameDay(date1, date2) {
+      return date1.getDate() === date2.getDate() && date1.getMonth() === date2.getMonth() && date1.getFullYear() === date2.getFullYear();
+    }
+  }
+};
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return common_vendor.e({
+    a: common_vendor.f($data.chatMessages, (message, index, i0) => {
+      return common_vendor.e({
+        a: message.sender === "ai"
+      }, message.sender === "ai" ? common_vendor.e({
+        b: common_assets._imports_0,
+        c: message.isTyping
+      }, message.isTyping ? {} : {
+        d: common_vendor.t(message.content),
+        e: $options.containsKeywords(message.content) ? 1 : ""
+      }, {
+        f: message.isTyping ? 1 : "",
+        g: message.isWelcome || index === 0 ? 1 : "",
+        h: common_vendor.t(message.time)
+      }) : {
+        i: common_vendor.t(message.time),
+        j: common_vendor.t(message.content),
+        k: common_assets._imports_1
+      }, {
+        l: index,
+        m: message.sender === "ai" ? 1 : "",
+        n: message.sender === "user" ? 1 : ""
+      });
+    }),
+    b: $data.scrollTop,
+    c: common_vendor.o((...args) => $options.onScroll && $options.onScroll(...args)),
+    d: `calc(100vh - ${$data.inputHeight}px)`,
+    e: $data.chatMessages.length <= 3 && !$data.inputMessage
+  }, $data.chatMessages.length <= 3 && !$data.inputMessage ? {
+    f: common_vendor.f($data.suggestedQuestions, (question, index, i0) => {
+      return {
+        a: common_vendor.t(question),
+        b: index,
+        c: common_vendor.o(($event) => $options.useQuestion(question), index)
+      };
+    })
+  } : {}, {
+    g: common_vendor.o((...args) => $options.submitQuestion && $options.submitQuestion(...args)),
+    h: common_vendor.o((...args) => $options.onInputFocus && $options.onInputFocus(...args)),
+    i: $data.isProcessing,
+    j: $data.inputMessage,
+    k: common_vendor.o(($event) => $data.inputMessage = $event.detail.value),
+    l: $data.inputMessage.trim() && !$data.isProcessing ? "/static/icons/chat.png" : "/static/icons/chat_off.png",
+    m: !$data.inputMessage.trim() || $data.isProcessing ? 1 : "",
+    n: common_vendor.o((...args) => $options.submitQuestion && $options.submitQuestion(...args)),
+    o: `${$data.isIOS ? $data.safeAreaBottom : 20}rpx`
+  });
 }
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9edadb70"]]);
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
 wx.createPage(MiniProgramPage);
 //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/ai-chat/index.js.map

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/ai-chat/index.json

@@ -1,4 +1,4 @@
 {
-  "navigationBarTitleText": "AI问答",
+  "navigationBarTitleText": "问农小禹",
   "usingComponents": {}
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/ai-chat/index.wxml


+ 276 - 3
unpackage/dist/dev/mp-weixin/pages/ai-chat/index.wxss

@@ -1,5 +1,278 @@
 
-.container.data-v-9edadb70 {
-  padding: 40rpx;
-  font-size: 32rpx;
+/* 容器样式 */
+.container {
+  position: relative;
+  min-height: 100vh;
+  background-color: #f5f5f5;
+  overflow: hidden; /* 防止内容溢出 */
+}
+
+/* 聊天容器 */
+.chat-container {
+  padding: 20rpx 30rpx;
+  box-sizing: border-box;
+  background-color: #f8f8f8;
+  background-image: url('data:image/png;base64,');
+  background-size: 300rpx;
+  background-blend-mode: overlay;
+  background-opacity: 0.05;
+  -webkit-overflow-scrolling: touch; /* 增强iOS滚动体验 */
+}
+.chat-list {
+  padding-bottom: 30rpx;
+}
+
+/* 消息项 */
+.message-item {
+  display: flex;
+  margin-bottom: 30rpx;
+  position: relative;
+}
+.message-ai {
+  justify-content: flex-start;
+}
+.message-user {
+  justify-content: flex-end;
+}
+
+/* 头像 */
+.avatar-container {
+  width: 90rpx;
+  height: 90rpx;
+  flex-shrink: 0;
+}
+.avatar {
+  width: 90rpx;
+  height: 90rpx;
+  border-radius: 50%;
+  background-color: #e0e0e0;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
+  object-fit: cover;
+}
+
+/* 消息内容 */
+.message-content {
+  max-width: 70%;
+  margin: 0 20rpx;
+  display: flex;
+  flex-direction: column;
+}
+.user-content {
+  align-items: flex-end;
+}
+.message-bubble {
+  padding: 24rpx;
+  border-radius: 24rpx;
+  position: relative;
+  margin-bottom: 10rpx;
+  word-wrap: break-word;
+  min-width: 80rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
+  transition: all 0.3s ease;
+  max-width: 100%;
+}
+.ai-bubble {
+  background-color: #e8f5e9;
+  border-top-left-radius: 4rpx;
+}
+.user-bubble {
+  background-color: #e3f2fd;
+  border-top-right-radius: 4rpx;
+}
+.message-text {
+  font-size: 28rpx;
+  color: #333;
+  line-height: 1.5;
+  word-break: break-all;
+}
+.message-time {
+  font-size: 22rpx;
+  color: #999;
+}
+
+/* 输入区域 */
+.input-container {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background-color: #fff;
+  padding: 20rpx 30rpx;
+  box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
+  display: flex;
+  flex-direction: column;
+  z-index: 10;
+}
+.input-wrapper {
+  display: flex;
+  align-items: flex-end;
+}
+.message-input {
+  flex: 1;
+  min-height: 70rpx;
+  max-height: 120rpx;
+  border-radius: 35rpx;
+  background-color: #f5f5f5;
+  padding: 15rpx 30rpx;
+  font-size: 28rpx;
+  color: #333;
+  border: 1rpx solid #e0e0e0;
+  line-height: 1.4;
+}
+.send-button {
+  margin-left: 16rpx;
+  width: 76rpx;
+  height: 76rpx;
+  border-radius: 50%;
+  background-color: transparent;
+  background-image: none;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  transition: all 0.2s ease;
+  position: relative;
+  align-self: center;
+}
+.send-button.disabled {
+  background-color: transparent;
+  background-image: none;
+  opacity: 1;
+}
+.button-hover {
+  transform: scale(0.95);
+}
+@keyframes pulse {
+0% { transform: scale(1);
+}
+50% { transform: scale(0.95);
+}
+100% { transform: scale(1);
+}
+}
+.send-button:active:not(.disabled) {
+  animation: pulse 0.3s ease-in-out;
+}
+
+/* 删除或注释掉之前的样式 */
+.send-icon {
+  display: none;
+}
+.send-icon:before {
+  display: none;
+}
+.send-icon-text {
+  display: none;
+}
+
+/* 推荐问题区域 */
+.suggested-questions {
+  display: flex;
+  white-space: nowrap;
+  margin-bottom: 15rpx;
+  padding: 5rpx 0;
+}
+.question-chip {
+  display: inline-block;
+  padding: 12rpx 20rpx;
+  margin-right: 15rpx;
+  background-color: #e8f5e9;
+  color: #4CAF50;
+  font-size: 24rpx;
+  border-radius: 30rpx;
+  border: 1rpx solid #a5d6a7;
+}
+
+/* AI正在输入的样式 */
+.message-bubble.ai-bubble.typing {
+  background-color: #f0f0f0;
+}
+.typing-indicator {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 40rpx;
+  padding: 0 20rpx;
+}
+.typing-dot {
+  width: 10rpx;
+  height: 10rpx;
+  margin: 0 5rpx;
+  background-color: #4CAF50;
+  border-radius: 50%;
+  opacity: 0.5;
+  animation: typingAnimation 1.4s infinite both;
+}
+.typing-dot:nth-child(2) {
+  animation-delay: 0.2s;
+}
+.typing-dot:nth-child(3) {
+  animation-delay: 0.4s;
+}
+@keyframes typingAnimation {
+0% { opacity: 0.3; transform: translateY(0);
+}
+50% { opacity: 1; transform: translateY(-5rpx);
+}
+100% { opacity: 0.3; transform: translateY(0);
+}
+}
+
+/* 关键词高亮 */
+.message-text.highlight {
+  color: #2E7D32;
+  font-weight: 500;
+}
+
+/* 欢迎消息特殊样式 */
+.welcome {
+  background-color: #e3f2fd !important;
+  border-left: none !important;
+  border-radius: 24rpx !important;
+}
+
+/* 日期分割线样式 */
+.date-separator {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 20rpx 0;
+}
+.date-separator text {
+  background-color: rgba(0, 0, 0, 0.1);
+  color: #666;
+  font-size: 24rpx;
+  padding: 4rpx 20rpx;
+  border-radius: 20rpx;
+}
+
+/* 纸飞机图标 */
+.plane-svg {
+  display: none;
+}
+.send-icon-image {
+  width: 76rpx;
+  height: 76rpx;
+}
+.material-icon {
+  font-family: 'Material Icons';
+  font-weight: normal;
+  font-style: normal;
+  font-size: 48rpx;
+  line-height: 1;
+  letter-spacing: normal;
+  text-transform: none;
+  display: inline-block;
+  white-space: nowrap;
+  word-wrap: normal;
+  direction: ltr;
+  -webkit-font-smoothing: antialiased;
+  color: white;
+}
+
+/* 删除不需要的导航栏样式 */
+.custom-navbar {
+  display: none;
+}
+.navbar-bg, .navbar-content, .navbar-left, .navbar-title, .navbar-right, .back-icon, .arrow-left {
+  display: none;
 }

+ 170 - 5
unpackage/dist/dev/mp-weixin/pages/knowledge/index.js

@@ -1,9 +1,174 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
-  return {};
-}
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-502b983e"]]);
+const common_assets = require("../../common/assets.js");
+const _sfc_main = {
+  __name: "index",
+  setup(__props) {
+    const currentTab = common_vendor.ref(0);
+    const techList = common_vendor.ref([
+      {
+        id: 1,
+        title: "水稻高产栽培技术指南",
+        description: "详解水稻种植关键技术要点,包括育苗、插秧、水肥管理等全过程技术要领",
+        viewCount: "289",
+        image: "https://img.freepik.com/free-photo/rice-field-with-beautiful-sky_74190-7490.jpg",
+        type: "农技",
+        contentType: "article",
+        // 标记为文章类型
+        source: "农业技术研究院"
+      },
+      {
+        id: 2,
+        title: "果树病虫害防治方案视频教学",
+        description: "常见果树病虫害的识别方法、防治时期、用药指导,助您果园增产增收",
+        viewCount: "856",
+        image: "https://img.freepik.com/free-photo/apple-tree-with-ripe-red-apples_1150-9301.jpg",
+        type: "农技",
+        contentType: "video",
+        // 标记为视频类型
+        duration: "15:32",
+        source: "中国农业科技"
+      },
+      {
+        id: 3,
+        title: "科学施肥技术指南",
+        description: "解析不同作物的施肥特点,平衡施肥技术,提高肥料利用率",
+        viewCount: "667",
+        image: "https://img.freepik.com/free-photo/farmer-holding-chemical-fertilizer-field_1150-7167.jpg",
+        type: "农技",
+        contentType: "article",
+        // 标记为文章类型
+        source: "农业知识库"
+      }
+    ]);
+    const policyList = common_vendor.ref([
+      {
+        id: 1,
+        title: "2024年农业补贴政策要点解读",
+        description: "最新农业补贴政策要点解读,包括种粮补贴、农机补贴等各项补贴申请指南",
+        viewCount: "2,341",
+        date: "05-23",
+        image: "https://img.freepik.com/free-photo/modern-agricultural-machinery-field_1157-46386.jpg",
+        type: "政策",
+        contentType: "article",
+        // 标记为文章类型
+        source: "农业部官方"
+      },
+      {
+        id: 2,
+        title: "农业保险政策专家解析视频",
+        description: "农业保险覆盖范围扩大,新增多项保障内容,理赔流程优化",
+        viewCount: "1,856",
+        date: "05-22",
+        image: "https://img.freepik.com/free-photo/farmer-working-field_1157-46384.jpg",
+        type: "政策",
+        contentType: "video",
+        // 标记为视频类型
+        duration: "28:45",
+        source: "农业部政策宣讲"
+      },
+      {
+        id: 3,
+        title: "绿色种植认证办理指南",
+        description: "绿色种植认证最新申请流程及注意事项说明",
+        viewCount: "1,667",
+        date: "05-21",
+        image: "https://img.freepik.com/free-photo/organic-farm-harvest_1157-46078.jpg",
+        type: "政策",
+        contentType: "article",
+        // 标记为文章类型
+        source: "农业部认证中心"
+      }
+    ]);
+    const isRefreshing = common_vendor.ref(false);
+    const handleTabChange = (index) => {
+      currentTab.value = index;
+      common_vendor.index.__f__("log", "at pages/knowledge/index.vue:222", "Tab changed to:", index);
+    };
+    const onRefresh = async () => {
+      isRefreshing.value = true;
+      try {
+        await new Promise((resolve) => setTimeout(resolve, 1e3));
+        if (currentTab.value === 0) {
+          common_vendor.index.__f__("log", "at pages/knowledge/index.vue:233", "刷新农技知识数据");
+        } else {
+          common_vendor.index.__f__("log", "at pages/knowledge/index.vue:236", "刷新政策解读数据");
+        }
+      } finally {
+        isRefreshing.value = false;
+      }
+    };
+    const loadMore = () => {
+      common_vendor.index.__f__("log", "at pages/knowledge/index.vue:245", "Loading more content");
+      if (currentTab.value === 0) {
+        common_vendor.index.__f__("log", "at pages/knowledge/index.vue:249", "加载更多农技知识数据");
+      } else {
+        common_vendor.index.__f__("log", "at pages/knowledge/index.vue:252", "加载更多政策解读数据");
+      }
+    };
+    const navigateToAI = () => {
+      common_vendor.index.navigateTo({
+        url: "/pages/ai-chat/index"
+      });
+    };
+    common_vendor.onMounted(() => {
+      common_vendor.index.__f__("log", "at pages/knowledge/index.vue:264", "Page mounted, current tab:", currentTab.value);
+    });
+    return (_ctx, _cache) => {
+      return common_vendor.e({
+        a: currentTab.value === 0 ? 1 : "",
+        b: currentTab.value === 0 ? 1 : "",
+        c: common_vendor.o(($event) => handleTabChange(0)),
+        d: currentTab.value === 1 ? 1 : "",
+        e: currentTab.value === 1 ? 1 : "",
+        f: common_vendor.o(($event) => handleTabChange(1)),
+        g: currentTab.value === 0
+      }, currentTab.value === 0 ? {
+        h: common_vendor.f(techList.value, (item, index, i0) => {
+          return common_vendor.e({
+            a: item.image,
+            b: item.contentType === "video"
+          }, item.contentType === "video" ? {
+            c: common_vendor.t(item.duration || "35:56")
+          } : {}, {
+            d: common_vendor.t(item.title),
+            e: common_vendor.t(item.source || "中国农业科技"),
+            f: common_vendor.t(item.viewCount),
+            g: index,
+            h: `/pages/knowledge/detail?id=${item.id}&type=tech`
+          });
+        })
+      } : {}, {
+        i: currentTab.value === 1
+      }, currentTab.value === 1 ? {
+        j: common_vendor.f(policyList.value, (item, index, i0) => {
+          return common_vendor.e({
+            a: item.image,
+            b: item.contentType === "video"
+          }, item.contentType === "video" ? {
+            c: common_vendor.t(item.duration || "28:32")
+          } : {}, {
+            d: common_vendor.t(item.title),
+            e: common_vendor.t(item.source || "农业部官方"),
+            f: common_vendor.t(item.viewCount),
+            g: index,
+            h: `/pages/knowledge/detail?id=${item.id}&type=policy`
+          });
+        })
+      } : {}, {
+        k: currentTab.value === 0 && techList.value.length === 0 || currentTab.value === 1 && policyList.value.length === 0
+      }, currentTab.value === 0 && techList.value.length === 0 || currentTab.value === 1 && policyList.value.length === 0 ? {
+        l: common_assets._imports_0$1
+      } : {}, {
+        m: common_vendor.o(loadMore),
+        n: common_vendor.o(onRefresh),
+        o: isRefreshing.value,
+        p: common_assets._imports_0,
+        q: common_vendor.o(navigateToAI)
+      });
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-502b983e"]]);
 wx.createPage(MiniProgramPage);
 //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/knowledge/index.js.map

Разница между файлами не показана из-за своего большого размера
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/knowledge/index.wxml


+ 235 - 3
unpackage/dist/dev/mp-weixin/pages/knowledge/index.wxss

@@ -1,5 +1,237 @@
 
-.container.data-v-502b983e {
-  padding: 40rpx;
-  font-size: 32rpx;
+/* 引入字体图标 */
+@font-face {
+  font-family: 'iconfont';
+  src: url('//at.alicdn.com/t/font_3266846_kxscvlm9qpp.woff2') format('woff2');
+}
+.iconfont.data-v-502b983e {
+  font-family: "iconfont" !important;
+  font-size: 22rpx;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.icon-robot.data-v-502b983e:before {
+  content: "\e64b";
+}
+.icon-eye.data-v-502b983e:before {
+  content: "\e614";
+}
+
+/* 页面容器 */
+.page-container.data-v-502b983e {
+  min-height: 100vh;
+  background-color: #f7f8fa;
+  position: relative;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+}
+
+/* 头部标签样式 */
+.header-tabs.data-v-502b983e {
+  display: flex;
+  background-color: #fff;
+  padding: 0 30rpx;
+  position: relative;
+  border-bottom: 1rpx solid #f2f2f2;
+}
+.tab-item.data-v-502b983e {
+  position: relative;
+  padding: 20rpx 30rpx;
+  margin-right: 50rpx;
+  font-size: 30rpx;
+  color: #666;
+  transition: all 0.3s ease;
+}
+.tab-item.active.data-v-502b983e {
+  color: #333;
+  font-weight: 600;
+}
+.tab-line.data-v-502b983e {
+  position: absolute;
+  bottom: 0;
+  left: 50%;
+  width: 0;
+  height: 6rpx;
+  background-color: #4dc971;
+  border-radius: 3rpx;
+  transition: all 0.3s ease;
+  transform: translateX(-50%);
+}
+.tab-line.active.data-v-502b983e {
+  width: 40rpx;
+}
+
+/* 内容区域样式 */
+.content-container.data-v-502b983e {
+  height: calc(100vh - 88rpx);
+  box-sizing: border-box;
+}
+.cards-section.data-v-502b983e {
+  padding: 12rpx;
+}
+
+/* 内容卡片通用样式 */
+.content-card.data-v-502b983e {
+  background-color: #fff;
+  border-radius: 16rpx;
+  margin-bottom: 24rpx;
+  overflow: hidden;
+  transition: all 0.2s ease;
+  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
+  position: relative;
+}
+.card-hover.data-v-502b983e {
+  transform: translateY(-2rpx);
+  box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.12);
+}
+
+/* 缩略图 */
+.content-thumbnail.data-v-502b983e {
+  position: relative;
+  width: 100%;
+  height: 300rpx;
+  background-color: #f0f0f0;
+}
+.thumbnail-image.data-v-502b983e {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+
+/* 播放按钮 */
+.play-button.data-v-502b983e {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 70rpx;
+  height: 70rpx;
+  background-color: rgba(0, 0, 0, 0.5);
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 2;
+}
+.play-icon.data-v-502b983e {
+  width: 0;
+  height: 0;
+  border-style: solid;
+  border-width: 9rpx 0 9rpx 16rpx;
+  border-color: transparent transparent transparent #ffffff;
+  margin-left: 4rpx;
+}
+
+/* 视频时长 */
+.video-duration.data-v-502b983e {
+  position: absolute;
+  bottom: 10rpx;
+  right: 10rpx;
+  padding: 3rpx 8rpx;
+  background-color: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  font-size: 18rpx;
+  border-radius: 10rpx;
+}
+
+/* 内容类型标签 */
+.content-type-tag.data-v-502b983e {
+  position: absolute;
+  top: 10rpx;
+  left: 10rpx;
+  padding: 4rpx 10rpx;
+  font-size: 20rpx;
+  border-radius: 6rpx;
+  z-index: 2;
+}
+.content-type-tag.video.data-v-502b983e {
+  background-color: #4dc971;
+  color: #fff;
+}
+.content-type-tag.article.data-v-502b983e {
+  background-color: #3498db;
+  color: #fff;
+}
+
+/* 内容信息 */
+.content-info.data-v-502b983e {
+  padding: 16rpx;
+  position: relative;
+}
+.content-title.data-v-502b983e {
+  font-size: 30rpx;
+  font-weight: 600;
+  color: #333;
+  line-height: 1.4;
+  margin-bottom: 10rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+}
+.source-name.data-v-502b983e {
+  color: #999;
+  font-size: 22rpx;
+}
+.info-row.data-v-502b983e {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.view-count.data-v-502b983e {
+  color: #c0c0c0;
+  font-size: 20rpx;
+  display: flex;
+  align-items: center;
+}
+.view-count .iconfont.data-v-502b983e {
+  margin-right: 4rpx;
+}
+
+/* 空状态 */
+.empty-state.data-v-502b983e {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 120rpx 0;
+}
+.empty-image.data-v-502b983e {
+  width: 180rpx;
+  height: 180rpx;
+  margin-bottom: 16rpx;
+}
+.empty-text.data-v-502b983e {
+  font-size: 26rpx;
+  color: #999;
+}
+
+/* AI按钮 */
+.assistant-btn.data-v-502b983e {
+  position: fixed;
+  right: 30rpx;
+  bottom: 100rpx;
+  height: 80rpx;
+  border-radius: 40rpx;
+  background: linear-gradient(135deg, #42b983, #3db160);
+  display: flex;
+  align-items: center;
+  padding: 0 24rpx;
+  box-shadow: 0 6rpx 20rpx rgba(66, 185, 131, 0.35);
+  z-index: 99;
+  transition: all 0.25s ease;
+}
+.assistant-icon.data-v-502b983e {
+  width: 68rpx;
+  height: 68rpx;
+  margin-right: 10rpx;
+}
+.btn-hover.data-v-502b983e {
+  transform: scale(1.05);
+  box-shadow: 0 8rpx 24rpx rgba(66, 185, 131, 0.45);
+}
+.btn-text.data-v-502b983e {
+  font-size: 28rpx;
+  color: #fff;
+  font-weight: 500;
 }

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/user/index.js

@@ -76,7 +76,7 @@ const _sfc_main = {
 };
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return {
-    a: common_assets._imports_0,
+    a: common_assets._imports_0$2,
     b: common_vendor.o((...args) => $options.navigateToPlots && $options.navigateToPlots(...args)),
     c: common_vendor.t($data.plotInfo.total),
     d: common_vendor.t($data.plotInfo.active),

+ 4 - 13
unpackage/dist/dev/mp-weixin/project.config.json

@@ -11,27 +11,18 @@
     "minified": false,
     "newFeature": true,
     "bigPackageSizeSupport": true,
-    "ignoreUploadUnusedFiles": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
-    }
+    },
+    "ignoreUploadUnusedFiles": true
   },
   "compileType": "miniprogram",
   "libVersion": "3.8.3",
+  "appid": "touristappid",
   "projectname": "nongxiaoyu",
-  "condition": {
-    "miniprogram": {
-      "list": [
-        {
-          "name": "pages/user/index",
-          "pathName": "pages/user/index",
-          "query": ""
-        }
-      ]
-    }
-  },
+  "condition": {},
   "editorSetting": {
     "tabIndent": "insertSpaces",
     "tabSize": 2

BIN
unpackage/dist/dev/mp-weixin/static/.DS_Store


BIN
unpackage/dist/dev/mp-weixin/static/icons/.DS_Store


Некоторые файлы не были показаны из-за большого количества измененных файлов