From d492850f1cc64ddcfaf43798af9c76c2505414fd Mon Sep 17 00:00:00 2001
From: renkang <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 24 一月 2025 18:24:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
---
h5/pages/index.vue | 45 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/h5/pages/index.vue b/h5/pages/index.vue
index 81b4ef6..f64142b 100644
--- a/h5/pages/index.vue
+++ b/h5/pages/index.vue
@@ -17,7 +17,8 @@
<view class="list">
<view v-for="item in list2" class="item" @click="itemClick(item)">
<image :src="item.img"></image>
- <view class="name">{{item.name}}</view>
+ <view class="name">{{item.name}}</view>
+ <view v-if="item.name == '寰呭姙涓績' && taskNum" class="superscript">{{taskNum}}</view>
</view>
</view>
<view class="loginout" @click="loginOut">閫�鍑虹櫥闄�</view>
@@ -26,7 +27,8 @@
<script>
import {
- logoutPost
+ logoutPost,
+ myNoticesH5
} from '@/api'
export default {
data() {
@@ -49,6 +51,12 @@
url: '/pages/operation/device',
img: require('@/static/home/ic_fangkebaobe@2x.png'),
auth: 'weixin:menu:visitcar'
+ },
+ {
+ name: '搴撳瓨鐩樼偣',
+ url: '/pages/inventory/index',
+ img: require('@/static/home/ic_pandian@2x.png'),
+ auth: 'weixin:menu:visitcar'
},
],
list2: [{
@@ -62,12 +70,21 @@
url: '/pages/operation/record',
img: require('@/static/home/ic_wodehuiyi@2x.png'),
auth: 'weixin:menu:visitcar'
+ },
+ {
+ name: '寰呭姙涓績',
+ url: '/pages/workOrder/wait',
+ img: require('@/static/home/ic_daiban@2x.png'),
+ auth: 'weixin:menu:visitcar'
},
- ]
+ ],
+ taskNum: 0
}
},
- onLoad() {
-
+ onShow() {
+ myNoticesH5({ page: 1, capacity: 1,model: {status: 0}}).then(res => {
+ this.taskNum = res.data.total
+ })
},
methods: {
itemClick(item) {
@@ -132,8 +149,8 @@
display: flex;
flex-direction: column;
align-items: center;
- width: 25%;
-
+ width: 25%;
+ position: relative;
image {
width: 88rpx;
height: 88rpx;
@@ -143,6 +160,20 @@
.name {
font-size: 26rpx;
}
+ .superscript{
+ height: 40rpx;
+ width: 40rpx;
+ position: absolute;
+ top: -16rpx;
+ right: 24rpx;
+ background-color: red;
+ color: #fff;
+ font-size: 24rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ }
}
}
--
Gitblit v1.9.3