diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..9295f12
Binary files /dev/null and b/.DS_Store differ
diff --git a/app.json b/app.json
index d9ad8de..9d49623 100644
--- a/app.json
+++ b/app.json
@@ -28,8 +28,8 @@
"text": "我的花园"
},
{
- "iconPath": "static/img/home.png",
- "selectedIconPath": "static/img/home1.png",
+ "iconPath": "static/img/clock.png",
+ "selectedIconPath": "static/img/clock1.png",
"pagePath": "pages/today/index",
"iconSize": 48,
"text": "今日农事"
diff --git a/app.wxss b/app.wxss
index a69bbf2..69e52a8 100644
--- a/app.wxss
+++ b/app.wxss
@@ -3,7 +3,7 @@ page {
--td-brand-color: #4FAB5F;
--td-brand-color-active: #4FAB5F;
color: #373737;
- background: white;
+ background: #F6F6F6;
}
diff --git a/components/count-picker/index.js b/components/count-picker/index.js
index 3b11d93..a38fd1e 100644
--- a/components/count-picker/index.js
+++ b/components/count-picker/index.js
@@ -57,6 +57,7 @@ Component({
},
confirm(e) {
const value = e.detail.value[0]
+ console.log(e);
this.setData({
result: value,
visible:false
diff --git a/pages/about/index.js b/pages/about/index.js
index 9d97241..1c6bd5b 100644
--- a/pages/about/index.js
+++ b/pages/about/index.js
@@ -20,6 +20,12 @@ Page({
}
},
+ goHome(){
+ wx.switchTab({
+ url: '../index/index',
+ })
+ },
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/pages/about/index.json b/pages/about/index.json
index 8835af0..9575c66 100644
--- a/pages/about/index.json
+++ b/pages/about/index.json
@@ -1,3 +1,4 @@
{
+ "navigationBarTitleText": "农事提醒",
"usingComponents": {}
}
\ No newline at end of file
diff --git a/pages/about/index.wxml b/pages/about/index.wxml
index e418144..cd4b266 100644
--- a/pages/about/index.wxml
+++ b/pages/about/index.wxml
@@ -4,13 +4,17 @@
- 养花小技巧-植趣
+ 植趣 ZeeQ
-
- 关注公众号,接收浇水、施肥等日程提醒
+
+ 关注公众号,接收浇水、施肥等农事提醒
系统会根据您添加的花卉,自动生成浇水、施肥、修剪等提醒,您需要通过长按上面的二维码识别并关注我们的公众号,确保能接收消息提醒。
+
+
+ 返回我的花园
+
\ No newline at end of file
diff --git a/pages/add/index.js b/pages/add/index.js
index e6da50c..c3165c2 100644
--- a/pages/add/index.js
+++ b/pages/add/index.js
@@ -19,7 +19,17 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
+ this.fetchHotList()
+ },
+ fetchHotList(){
+ const data ={ current:1,pageSize:20,isHot:1}
+ api('/library/list','POST',data,'json').then(res => {
+ if (res.code === 200){
+ const list = res.data.list
+ this.setData({hotList:list})
+ }
+ })
},
search(e){
diff --git a/pages/add/index.wxml b/pages/add/index.wxml
index f45b33a..421eda8 100644
--- a/pages/add/index.wxml
+++ b/pages/add/index.wxml
@@ -7,9 +7,9 @@
热门植物
-
-
-
+
+
+
{{item.name}}
@@ -21,7 +21,7 @@
-
+
{{item.name}}
{{item.aliases}}
diff --git a/pages/add/index.wxss b/pages/add/index.wxss
index 547657c..a6e3b3b 100644
--- a/pages/add/index.wxss
+++ b/pages/add/index.wxss
@@ -1,4 +1,7 @@
/* pages/add/index.wxss */
+page{
+ background-color: white;
+}
.card {
margin: 16rpx;
diff --git a/pages/add/info.wxml b/pages/add/info.wxml
index 9a1c2ca..edd4875 100644
--- a/pages/add/info.wxml
+++ b/pages/add/info.wxml
@@ -3,7 +3,7 @@
-
+
@@ -35,61 +35,17 @@
-
- 浇水
-
+
+ {{item.name}}
+
- 每{{info.careSchedules[season].wateringCycle}}天一次
-
-
-
-
- 施肥
-
-
-
- 每{{info.careSchedules[season].liquidFertilizerCycle}}天一次
- 液体肥料
+
+ 每{{item.cycleDays}}天一次
+
+ {{item.desc}}
+
-
-
-
- 每{{info.careSchedules[season].slowReleaseFertilizerCycle}}天一次
- 缓释肥
-
-
- 推荐肥料
-
-
-
- {{info.careSchedules[season].suitableFertilizer}}
-
-
-
-
-
-
-
- 修剪
-
-
-
- 每{{info.careSchedules[season].pruningCycle}}天一次
- 抵御病虫害、生长茂盛
-
-
-
-
-
- 旋转
-
-
-
- 每{{info.careSchedules[season].rotationCycle}}天一次
- 株形匀称
-
-
@@ -102,7 +58,24 @@
最佳光照
+
+
+ 温度
+
+ 适应温度
+
+ {{info.hardyTempMin}} ℃
+ ~
+ {{info.hardyTempMax}} ℃
+
+ 最佳温度
+
+ {{info.optimalTempMin}} ℃
+ ~
+ {{info.optimalTempMax}} ℃
+
+
@@ -172,7 +145,6 @@
获取养护日程
- 立即拥有
\ No newline at end of file
diff --git a/pages/index/edit.js b/pages/index/edit.js
index eaffa31..bfcdc6a 100644
--- a/pages/index/edit.js
+++ b/pages/index/edit.js
@@ -26,7 +26,7 @@ Page({
api('/plant/detail','GET',{id: this.data.id}).then(res => {
if (res.code === 200){
const tmp = res.data
- tmp.farms.suitableFertilizer = tmp.farms.suitableFertilizer.split(',')
+ tmp.farms.suitableFertilizer = tmp.pestsDiseases.split(',')
if (tmp.ossList.length >0 ){
tmp.pic = tmp.ossList[0].url
}
@@ -47,10 +47,7 @@ Page({
},
updateFarms(e){
const value = e.detail.value
- console.log(value);
- const user = wx.getStorageSync('user')
- var data = {id: this.data.info.farms.id,plantId: this.data.info.farms.plantId,userId:user.id}
- data[value.prop] = value.value
+ var data = {id: value.prop,cycleDays: value.value}
api('/plant/updateFarm','POST',data,'json').then(res => {
if (res.code === 200){
wx.showToast({
@@ -83,14 +80,14 @@ Page({
success: res => {
var data = JSON.parse(res.data);
if (data.code === 200) {
- const params = {ossIds:[data.data.file.id],plantId: _this.data.info.farms.plantId}
+ const params = {ossIds:[data.data.file.id],plantId: _this.data.info.id}
api('/plant/uploadImg','POST',params,'json').then(res => {
if (res.code === 200){
wx.showToast({
icon:'success',
title: res.msg,
})
- this.fetchInfo()
+ _this.fetchInfo()
}else {
wx.showModal({
content: res.msg
diff --git a/pages/index/edit.wxml b/pages/index/edit.wxml
index f4fa08b..cbf3eb1 100644
--- a/pages/index/edit.wxml
+++ b/pages/index/edit.wxml
@@ -32,11 +32,7 @@
-
-
-
-
-
+
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index be59762..6995d66 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -19,13 +19,16 @@
-
- {{item.name}}
- {{item.latinName}}
+
+
+ {{item.name}}
+ 健康
+
+ 已养护2天
-
+
-
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index e267556..ae258f9 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -16,10 +16,8 @@
.pic{
width: 150rpx;
+ min-width: 150rpx;
height: 150rpx;
border-radius: 16rpx;
}
-.row {
- background-color: #F6F8FE;
-}
\ No newline at end of file
diff --git a/pages/index/info.js b/pages/index/info.js
index 6924277..7362270 100644
--- a/pages/index/info.js
+++ b/pages/index/info.js
@@ -16,7 +16,6 @@ Page({
*/
onLoad(options) {
this.setData({id:options.id})
- this.fetchInfo()
},
fetchInfo(){
@@ -24,7 +23,7 @@ Page({
api('/plant/detail','GET',data).then(res => {
if (res.code === 200){
const tmp = res.data
- tmp.farms.suitableFertilizer = tmp.farms.suitableFertilizer.split(',')
+ tmp.farms.suitableFertilizer = tmp.pestsDiseases.split(',')
if (tmp.ossList.length >0 ){
tmp.pic = tmp.ossList[0].url
tmp.picList = tmp.ossList.map(sub => sub.url)
@@ -42,7 +41,7 @@ Page({
addFarmLog(e){
const item = e.currentTarget.dataset.item
- const data = {id:item.id,plantId:item.plantId, title:item.title,remark:'测试',status:2}
+ const data = {id:item.id,plantId:item.plantId, name:item.name,remark:'测试',status:2}
api('/plant/addRecord','POST',data,'json').then(res => {
if (res.code === 200){
wx.showToast({
@@ -74,7 +73,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
-
+ this.fetchInfo()
},
/**
diff --git a/pages/index/info.wxml b/pages/index/info.wxml
index bb42bb0..f8994e0 100644
--- a/pages/index/info.wxml
+++ b/pages/index/info.wxml
@@ -43,18 +43,19 @@
今日任务
-
+
- {{item.title}}
- 每{{info.farms.wateringCycle}}天一次
+ {{item.name}}
+
未完成
完成
逾期
+ 已跳过
@@ -77,7 +78,7 @@
养护提示
- {{info.farms.desc}}
+ {{info.growthHabit}}
diff --git a/pages/today/index.js b/pages/today/index.js
index 33bbdc2..a651db7 100644
--- a/pages/today/index.js
+++ b/pages/today/index.js
@@ -56,10 +56,28 @@ Page({
}
})
},
-
+ goInfo(e){
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '../index/info?id=' + id,
+ })
+ },
+ skip(e){
+ const item = e.currentTarget.dataset.item
+ const data = {id:item.id,plantId:item.plantId, name:item.name,remark:'测试',status:4}
+ api('/plant/addRecord','POST',data,'json').then(res => {
+ if (res.code === 200){
+ wx.showToast({
+ icon:'success',
+ title: res.msg,
+ })
+ this.fetchInfo()
+ }
+ })
+ },
addFarmLog(e){
const item = e.currentTarget.dataset.item
- const data = {id:item.id,plantId:item.plantId, title:item.title,remark:'测试',status:2}
+ const data = {id:item.id,plantId:item.plantId, name:item.name,remark:'测试',status:2}
api('/plant/addRecord','POST',data,'json').then(res => {
if (res.code === 200){
wx.showToast({
diff --git a/pages/today/index.wxml b/pages/today/index.wxml
index 8d6fa43..2bc21a1 100644
--- a/pages/today/index.wxml
+++ b/pages/today/index.wxml
@@ -10,25 +10,23 @@
-
- 今日任务
-
-
+
-
+
- {{sub.title}}
+ {{sub.name}}
{{item.name}}
+
未完成
完成
逾期
-
+ 已跳过
diff --git a/static/.DS_Store b/static/.DS_Store
new file mode 100644
index 0000000..8b63e28
Binary files /dev/null and b/static/.DS_Store differ
diff --git a/static/img/clock.png b/static/img/clock.png
new file mode 100644
index 0000000..2bc085f
Binary files /dev/null and b/static/img/clock.png differ
diff --git a/static/img/clock1.png b/static/img/clock1.png
new file mode 100644
index 0000000..3afdd7f
Binary files /dev/null and b/static/img/clock1.png differ