Commit dc32a43e authored by Damon's avatar Damon
parents 47b62b5c f18aed21
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
align-items: flex-start; align-items: flex-start;
text-align: left;
.address-image { .address-image {
width: 26rpx; width: 26rpx;
height: 28rpx; height: 28rpx;
......
...@@ -348,10 +348,17 @@ ...@@ -348,10 +348,17 @@
count += res.data[i] count += res.data[i]
} }
// 修改tab总数 // 修改tab总数
if (count > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 1, index: 1,
text: String(count) text: String(count)
}) })
} else {
uni.removeTabBarBadge({
index: 1
})
}
} }
} else { } else {
......
...@@ -274,10 +274,16 @@ ...@@ -274,10 +274,16 @@
count += res.data[i] count += res.data[i]
} }
// 修改tab总数 // 修改tab总数
if (count > 0) {
uni.setTabBarBadge({ uni.setTabBarBadge({
index: 1, index: 1,
text: String(count) text: String(count)
}) })
} else {
uni.removeTabBarBadge({
index: 1
})
}
} }
} else { } else {
console.log(res.message, "获取订单数量失败!"); console.log(res.message, "获取订单数量失败!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment