From c83fa6c1089acaf0794b7218a859ef24a6076ae5 Mon Sep 17 00:00:00 2001
From: Iruka <1017819588@qq.com>
Date: Thu, 16 Jan 2025 17:25:51 +0800
Subject: [PATCH] .
---
App.vue | 14 +++----
.../custom-select-land/custom-select-land.vue | 3 +-
pages/index-map.vue | 30 +++++---------
pages/index.vue | 40 +++++++++----------
pages/mine/avatar/index.vue | 8 ----
pages/work/user/index.vue | 8 ----
6 files changed, 36 insertions(+), 67 deletions(-)
diff --git a/App.vue b/App.vue
index f6f507f..e69f315 100644
--- a/App.vue
+++ b/App.vue
@@ -8,6 +8,12 @@
import mqttUtil from "@/utils/mqttUtil.js"
const mqttUrl = import.meta.env.VITE_BASE_MQTT;
+ // 引入插件包
+ import {
+ requestPermissions,
+ goSetting
+ } from "@/js_sdk/yu-app-permission/yu-app-permission.js"
+
export default {
data() {
return {
@@ -115,13 +121,7 @@
break;
default:
// 消息通知
- if (params.success == dcMsgType.ok) {
- this.$modal.msgSuccess(params.message);
- } else if (params.success == dcMsgType.err) {
- this.$modal.msgError(params.message);
- } else {
- this.$modal.msgWarning(params.message);
- }
+ this.$toast(params.message)
break;
}
},
diff --git a/components/custom-select-land/custom-select-land.vue b/components/custom-select-land/custom-select-land.vue
index 78fa107..6ef434d 100644
--- a/components/custom-select-land/custom-select-land.vue
+++ b/components/custom-select-land/custom-select-land.vue
@@ -18,7 +18,7 @@
@click="handleExpandedChange(item)">
{{ item.label }}
-
+
@@ -108,7 +108,6 @@
const data = deepClone(this.dataRef);
this.datalist = [];
this.handleTreeData(data);
-
// 展开第一个
if (this.expandFirst && this.datalist.length) {
this.handleExpandedChange(this.datalist[0]);
diff --git a/pages/index-map.vue b/pages/index-map.vue
index 5966ea5..7f428de 100644
--- a/pages/index-map.vue
+++ b/pages/index-map.vue
@@ -1,6 +1,6 @@
-
+
地块
@@ -449,8 +449,7 @@
-
+
@@ -472,20 +471,12 @@
import {
getOtherDevice
} from "@/api/system/controlOtherInterface"
- // 引入插件包
- import {
- requestPermissions
- } from "@/js_sdk/yu-app-permission/yu-app-permission.js"
- // 前往设置页面 兼容安卓以及IOS
- import {
- goSetting
- } from "@/js_sdk/yu-app-permission/yu-app-permission.js"
export default {
data() {
return {
user: store.state.user.user,
- title: "",
+ title: null,
ijs: getApp().ijs, // 首页公共js
dc: getApp().dc, // 设备控制公共代码
valveImg: imageAssets, //阀门图片
@@ -518,12 +509,12 @@
}
});
getApp().on("land", "land_map", function(e) {
- this.mapOnload();
+ that.title = that.ijs?.land?.landName || null;
+ that.mapOnload();
});
},
onShow() {
this.title = this.ijs?.land?.landName || "田间";
-
// 监听控制角度弹窗通知
uni.$off("open-angle-slider");
uni.$on("open-angle-slider", (e) => {
@@ -545,10 +536,6 @@
};
},
methods: {
- // 地块选择回调
- landChange(e) {
- this.title = e.landName;
- },
// 获取地块信息
getLand(e) {
this.ijs.getLand(e.node).then(res => {
@@ -1547,20 +1534,21 @@
::v-deep.uni-navbar__header-container {
align-items: center;
justify-content: center;
-
+
&>view {
font-size: 36rpx;
}
}
-
+
::v-deep.uni-navbar__header-btns-left {
font-size: 27rpx;
}
-
+
::v-deep.uni-navbar__header-btns-right .icon {
font-size: 44rpx;
margin-left: 10px;
}
+
// .icon {
// width: 16px;
// height: 16px;
diff --git a/pages/index.vue b/pages/index.vue
index f74c2da..7bab7bd 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,6 +1,6 @@
-
+
地块
@@ -96,7 +96,7 @@
-
+
@@ -112,7 +112,8 @@
-
+
@@ -538,8 +539,7 @@
-
+
@@ -552,20 +552,12 @@