diff --git a/App.vue b/App.vue index 62a55bb..4a3379e 100644 --- a/App.vue +++ b/App.vue @@ -1,7 +1,7 @@ + + \ No newline at end of file diff --git a/pages.json b/pages.json index 6dca859..5a74b59 100644 --- a/pages.json +++ b/pages.json @@ -18,13 +18,7 @@ "navigationBarBackgroundColor": "#feb048", "navigationBarTextStyle": "white" } - }, { - "path": "pages/index/index", - "style": { - "navigationStyle": "custom", - "enablePullDownRefresh": true - } - }, + }, // 和撒旦发射点恢复健康快点发货速度较快live harvest { "path": "pages/landDetail/index", diff --git a/pages/addPlant/select_address_n.nvue b/pages/addPlant/select_address_n.nvue index 60fadfe..ff60250 100644 --- a/pages/addPlant/select_address_n.nvue +++ b/pages/addPlant/select_address_n.nvue @@ -155,14 +155,14 @@ } - \ No newline at end of file diff --git a/pages/index/manager.vue b/pages/index/manager.vue index 565f0a6..8e1164c 100644 --- a/pages/index/manager.vue +++ b/pages/index/manager.vue @@ -31,12 +31,19 @@ + - diff --git a/pages/plantAdmin/breedDetail.vue b/pages/plantAdmin/breedDetail.vue index 81fa9c5..5debaaa 100644 --- a/pages/plantAdmin/breedDetail.vue +++ b/pages/plantAdmin/breedDetail.vue @@ -12,7 +12,7 @@ - @@ -171,8 +171,8 @@ id: typeID.value, }).then((res) => { if (res.code == 1) { + res.data.pic = JSON.parse(res.data.pic||'[]'); Object.assign(dataobj, res.data); - console.log(dataobj); } }); }; diff --git a/pages/plantAdmin/houseDetail.vue b/pages/plantAdmin/houseDetail.vue index 886eefa..00b2bcc 100644 --- a/pages/plantAdmin/houseDetail.vue +++ b/pages/plantAdmin/houseDetail.vue @@ -12,7 +12,7 @@ - @@ -36,7 +36,7 @@ - @@ -223,6 +223,7 @@ id: typeID.value, }).then((res) => { if (res.code == 1) { + res.data.pic = JSON.parse(res.data.pic||'[]') Object.assign(dataobj, res.data); } }); @@ -236,10 +237,12 @@ page_size: 3 }).then((res) => { if (res.code == 1) { - dataList.splice(0, dataList.length, ...res.data.lists); - dataList.forEach(item => { - item.showCode = false + res.data.lists = res.data.lists.map(item => { + item.showCode = false; + item.pic = JSON.parse(item.pic||'[]'); + return item }) + dataList.splice(0, dataList.length, ...res.data.lists); // console.log(dataList) } }); diff --git a/pages/plantAdmin/moreBreed.vue b/pages/plantAdmin/moreBreed.vue index af87c31..142af09 100644 --- a/pages/plantAdmin/moreBreed.vue +++ b/pages/plantAdmin/moreBreed.vue @@ -6,7 +6,7 @@ - @@ -118,10 +118,12 @@ page_size: where.value.page_size }).then((res) => { if (res.code == 1) { - dataList.splice(0, dataList.length, ...res.data.lists); - dataList.forEach(item => { - item.showCode = false + res.data.lists = res.data.lists.map(item => { + item.showCode = false; + item.pic = JSON.parse(item.pic||'[]'); + return item }) + dataList.splice(0, dataList.length, ...res.data.lists); // console.log(dataList) } }); diff --git a/pages/plantAdmin/moreFeed.vue b/pages/plantAdmin/moreFeed.vue index d971ff1..16446eb 100644 --- a/pages/plantAdmin/moreFeed.vue +++ b/pages/plantAdmin/moreFeed.vue @@ -10,8 +10,8 @@ - - + + 操作类型: {{'喂食'}} @@ -93,12 +93,37 @@ url }) } - const navFeed = (e) => { - if (e.type_name == '喂食') navTo(`/pages/feedDetail/feedDetail?id=1`) - if (e.type_name == '喂水') navTo(`/pages/feedDetail/waterDetail?id=1`) - if (e.type_name == '消毒') navTo(`/pages/feedDetail/sterilizeDetail?id=1`) - if (e.type_name == '疫苗') navTo(`/pages/feedDetail/vaccineDetail?id=1`) - if (e.type_name == '驱虫') navTo(`/pages/feedDetail/expellingDetail?id=1`) + const navFeed = (item, index) => { + if(index==0) uni.navigateTo({ + url: `/pages/feedDetail/feedDetail`, + success: (res) => { + res.eventChannel.emit('setDatasItem', item); + } + }) + if(index==1) uni.navigateTo({ + url: `/pages/feedDetail/waterDetail`, + success: (res) => { + res.eventChannel.emit('setDatasItem', item); + } + }) + if(index==2) uni.navigateTo({ + url: `/pages/feedDetail/sterilizeDetail`, + success: (res) => { + res.eventChannel.emit('setDatasItem', item); + } + }) + if(index==3) uni.navigateTo({ + url: `/pages/feedDetail/vaccineDetail`, + success: (res) => { + res.eventChannel.emit('setDatasItem', item); + } + }) + if(index==4) uni.navigateTo({ + url: `/pages/feedDetail/expellingDetail`, + success: (res) => { + res.eventChannel.emit('setDatasItem', item); + } + }) } diff --git a/static/img/ADL.png b/static/img/ADL.png deleted file mode 100644 index 1acfad2..0000000 Binary files a/static/img/ADL.png and /dev/null differ diff --git a/static/img/AHL.png b/static/img/AHL.png deleted file mode 100644 index 1acfad2..0000000 Binary files a/static/img/AHL.png and /dev/null differ diff --git a/static/img/AQHL.png b/static/img/AQHL.png deleted file mode 100644 index 237eac8..0000000 Binary files a/static/img/AQHL.png and /dev/null differ diff --git a/static/img/CO2.png b/static/img/CO2.png deleted file mode 100644 index 95288fd..0000000 Binary files a/static/img/CO2.png and /dev/null differ diff --git a/static/img/CTPH.png b/static/img/CTPH.png deleted file mode 100644 index a1a430b..0000000 Binary files a/static/img/CTPH.png and /dev/null differ diff --git a/static/img/CTWD.png b/static/img/CTWD.png deleted file mode 100644 index 2fa401a..0000000 Binary files a/static/img/CTWD.png and /dev/null differ diff --git a/static/img/DD.png b/static/img/DD.png deleted file mode 100644 index 4d5b6ba..0000000 Binary files a/static/img/DD.png and /dev/null differ diff --git a/static/img/FS.png b/static/img/FS.png deleted file mode 100644 index 284fcaf..0000000 Binary files a/static/img/FS.png and /dev/null differ diff --git a/static/img/FX.png b/static/img/FX.png deleted file mode 100644 index 0a63309..0000000 Binary files a/static/img/FX.png and /dev/null differ diff --git a/static/img/GZ.png b/static/img/GZ.png deleted file mode 100644 index 32c2ec1..0000000 Binary files a/static/img/GZ.png and /dev/null differ diff --git a/static/img/HJ.png b/static/img/HJ.png deleted file mode 100644 index 3c1c288..0000000 Binary files a/static/img/HJ.png and /dev/null differ diff --git a/static/img/JY.png b/static/img/JY.png deleted file mode 100644 index e55d5b8..0000000 Binary files a/static/img/JY.png and /dev/null differ diff --git a/static/img/PH.png b/static/img/PH.png deleted file mode 100644 index 4b65200..0000000 Binary files a/static/img/PH.png and /dev/null differ diff --git a/static/img/QY.png b/static/img/QY.png deleted file mode 100644 index a9635ec..0000000 Binary files a/static/img/QY.png and /dev/null differ diff --git a/static/img/SD.png b/static/img/SD.png deleted file mode 100644 index b0cd21d..0000000 Binary files a/static/img/SD.png and /dev/null differ diff --git a/static/img/hl.png b/static/img/hl.png deleted file mode 100644 index af82fef..0000000 Binary files a/static/img/hl.png and /dev/null differ diff --git a/static/tabber/a-a.png b/static/tabber/a-a.png deleted file mode 100644 index 701e847..0000000 Binary files a/static/tabber/a-a.png and /dev/null differ diff --git a/static/tabber/a.png b/static/tabber/a.png deleted file mode 100644 index 06d0260..0000000 Binary files a/static/tabber/a.png and /dev/null differ diff --git a/static/tabber/b-b.png b/static/tabber/b-b.png deleted file mode 100644 index 37fe838..0000000 Binary files a/static/tabber/b-b.png and /dev/null differ diff --git a/static/tabber/b.png b/static/tabber/b.png deleted file mode 100644 index 1edff9b..0000000 Binary files a/static/tabber/b.png and /dev/null differ diff --git a/static/tabber/c-a.png b/static/tabber/c-a.png deleted file mode 100644 index 0011437..0000000 Binary files a/static/tabber/c-a.png and /dev/null differ diff --git a/static/tabber/c.png b/static/tabber/c.png deleted file mode 100644 index 3831231..0000000 Binary files a/static/tabber/c.png and /dev/null differ diff --git a/store/index.js b/store/index.js index 63be680..35ef77e 100644 --- a/store/index.js +++ b/store/index.js @@ -1,37 +1,44 @@ import { - createStore + createStore } from 'vuex' const store = createStore({ - state: { - userInfo:uni.getStorageSync("SY_USER")||null, - farm: JSON.parse(uni.getStorageSync("farm")||"{}"), - house: JSON.parse(uni.getStorageSync("house")||"{}"), - }, + state: { + userInfo: uni.getStorageSync("SY_USER") || null, + farm: JSON.parse(uni.getStorageSync("farm") || "{}"), + house: JSON.parse(uni.getStorageSync("house") || "{}"), + tabbrIndex: 0, + }, - mutations: { - saveUserInfo(state, info) { - state.userInfo = info - uni.setStorageSync("SY_USER", info) - }, - setFarm(state, data){ + mutations: { + saveUserInfo(state, info) { + state.userInfo = info + uni.setStorageSync("SY_USER", info) + }, + setFarm(state, data) { state.farm = data; uni.setStorageSync('farm', JSON.stringify(data)); }, - setHouse(state, data){ + setHouse(state, data) { state.house = data; uni.setStorageSync('house', JSON.stringify(data)); - } - }, - actions: { - saveUserInfo({commit}, info) { - commit('saveUserInfo', info); - }, - setFarm({commit}, info){ + }, + changeTabbar(state, index) { + state.tabbrIndex = +index + }, + }, + actions: { + saveUserInfo({ commit }, info) { + commit('saveUserInfo', info); + }, + setFarm({ commit }, info) { commit('setFarm', info) }, - setHouse({commit}, info){ + setHouse({ commit }, info) { commit('setHouse', info) - } - } + }, + changeTabbar({ commit }, info) { + commit('changeTabbar', info) + }, + } }) export default store \ No newline at end of file