This commit is contained in:
2026-04-19 20:56:06 +08:00
parent ac7dd9dd30
commit 4caf7ff1ab
9 changed files with 727 additions and 60 deletions

View File

@ -1,15 +1,18 @@
<template>
<view class="site-switch-header">
<uni-data-picker
placeholder="请选择"
popup-title="业态选择"
:step-searh="true"
:value="siteId"
:clear-icon="false"
:localdata="siteTypeOptions"
:ellipsis="false"
@change="handleChange"
/>
<view class="selector-row">
<uni-data-picker
placeholder="请选择"
popup-title="业态选择"
:step-searh="true"
:value="siteId"
:clear-icon="false"
:localdata="siteTypeOptions"
:ellipsis="false"
@change="handleChange"
/>
<view class="site-count-badge">{{ displaySiteCount }}</view>
</view>
<view class="info">
<view class="list">
<uni-icons type="location" color="#fff" size="20"></uni-icons>
@ -41,6 +44,19 @@
runningTime: {
type: String,
default: '-'
},
siteCount: {
type: [String, Number],
default: 0
}
},
computed: {
displaySiteCount() {
const count = Number(this.siteCount || 0)
if (!Number.isFinite(count) || count <= 0) {
return '0'
}
return count > 99 ? '99+' : String(count)
}
},
methods: {
@ -58,6 +74,30 @@
padding-bottom: 100rpx;
color: #fff;
.selector-row {
display: flex;
align-items: center;
gap: 16rpx;
}
.site-count-badge {
min-width: 48rpx;
height: 48rpx;
padding: 0 12rpx;
border-radius: 999rpx;
background: #ff4d4f;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
line-height: 1;
font-weight: 700;
color: #fff;
box-sizing: border-box;
flex-shrink: 0;
box-shadow: 0 6rpx 14rpx rgba(255, 77, 79, 0.28);
}
.info {
color: #fff;
font-size: 26rpx;