From b88ebaeeeeaaa55835e44211249cc6bfc99fc7aa Mon Sep 17 00:00:00 2001 From: lld <15027638633@163.com> Date: Mon, 16 Feb 2026 02:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E5=A4=A7=E6=A3=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/system/assets/agri.js | 13 +++++ pages/home/addAgri.vue | 114 ++++++++++++++++++++++++++------------ pages/index.vue | 11 +++- plugins/modal.js | 13 +++++ 4 files changed, 113 insertions(+), 38 deletions(-) diff --git a/api/system/assets/agri.js b/api/system/assets/agri.js index 67cd217..00deb05 100644 --- a/api/system/assets/agri.js +++ b/api/system/assets/agri.js @@ -49,3 +49,16 @@ export function delAgri(id) { method: 'delete' }) } + +/** + * 移动端添加大棚 + * @param data + * @returns {*} + */ +export function addAgriMobile(data) { + return request({ + url: '/assets/agri/addAgriFromMobile', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/pages/home/addAgri.vue b/pages/home/addAgri.vue index 3da4c82..d695761 100644 --- a/pages/home/addAgri.vue +++ b/pages/home/addAgri.vue @@ -4,18 +4,19 @@ {{ `添加大棚` }} - - 大棚名称: - - - - 设备imei: - - - - + + + + + + + + + + + @@ -33,19 +34,51 @@ - \ No newline at end of file diff --git a/pages/index.vue b/pages/index.vue index ce411ef..3fb6962 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -13,7 +13,8 @@ - 加载中... 没有更多数据了 - + + 点击添加大棚 @@ -84,6 +86,11 @@ import {getNewSpecialData} from "../api/data/specialData"; import AddAgri from "./home/addAgri.vue"; export default { + computed: { + store() { + return store + } + }, components: {AddAgri, CustomRefresher, ZPaging}, data() { return { diff --git a/plugins/modal.js b/plugins/modal.js index 46af2f5..9d22ad5 100644 --- a/plugins/modal.js +++ b/plugins/modal.js @@ -20,6 +20,19 @@ export default { icon: 'success' }) }, + /** + * 自定义提示窗 + * @param content + * @param tag + */ + customMsg(content,tag) { + uni.showToast({ + title: content, + icon: tag, + duration: 3000 + }) + }, + // 隐藏消息 hideMsg(content) { uni.hideToast()