From 10131924c9d669c640947d08e9f41ca0d8f4dfa4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com>
Date: Tue, 4 Apr 2023 14:47:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 25 +++++++++++------
pages/index/customer.vue | 58 +++-------------------------------------
pages/index/index.vue | 4 +--
3 files changed, 22 insertions(+), 65 deletions(-)
diff --git a/App.vue b/App.vue
index cfe8b73..cda5c2e 100644
--- a/App.vue
+++ b/App.vue
@@ -33,31 +33,40 @@
method: "POST",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync(
+ 'weapp_session_login_data').token
},
data: {
houseId: uni.getStorageSync('buildingID').id
},
success: (data) => {
+ console.log(data.data.data.receivingCustomer, 'receivingCustomer')
+
if (data.data.data == null) {
+ uni.removeTabBarBadge({
+ index: 0,
+ })
return
} else {
+ uni.removeTabBarBadge({
+ index: 0,
+ })
if (data.data.data.receivingCustomer > 0) {
uni.setTabBarBadge({
index: 0,
- text: data.data.data.receivingCustomer.toString() || "0"
- })
- } else {
- uni.removeTabBarBadge({
- inndex: 0,
+ text: `${data.data.data.receivingCustomer}`
})
}
}
},
- fail: () => {}
+ fail: () => {
+ uni.removeTabBarBadge({
+ index: 0,
+ })
+ }
})
},
-
+
upDateBulidIngObj() {
this.bulidIngObj = uni.getStorageSync('buildingID')
},
diff --git a/pages/index/customer.vue b/pages/index/customer.vue
index 4465345..56ec65d 100644
--- a/pages/index/customer.vue
+++ b/pages/index/customer.vue
@@ -10,54 +10,6 @@
暂无数据
-
@@ -72,9 +24,6 @@
-
@@ -129,10 +78,6 @@
{{ item.createTime }}
-