修复bug

This commit is contained in:
zhouyanli
2026-08-28 17:25:55 +08:00
parent ea1acf1bbc
commit 0661687bc5
11 changed files with 93 additions and 48 deletions

View File

@@ -4,8 +4,8 @@
<view class="info-card">
<view class="info-header">
<text class="title">来访者{{ visitorInfo.name }}</text>
<text class="status {{ visitorInfo.status === 'visited' ? 'visited' : 'waiting' }}">
{{ visitorInfo.status === 'visited' ? '已到访' : '等待来访' }}
<text class="status" :class="{ active: visitorInfo.status === '等待来访' }">
{{ visitorInfo.status}}
</text>
</view>
@@ -30,7 +30,7 @@
</view>
<view class="info-item">
<text class="label">有效期</text>
<text class="value">{{ visitorInfo.validTime }}</text>
<text class="value-valid">{{ visitorInfo.validTime }}</text>
</view>
<view class="info-item">
<text class="label">邀请时间</text>
@@ -65,7 +65,7 @@ import {getVisitorDetail} from '../api/api.js'
// 访客信息(实际项目中从接口获取)
const visitorInfo = ref({
name: '',
status: 'waiting', // waiting:等待来访visited:已到访
status: '', // waiting:等待来访visited:已到访
type: '',
address: '',
phone: '',
@@ -84,7 +84,7 @@ const mapDetail = (item) => {
item.unitNo ? item.unitNo + '单元' : '',
item.houseNo
].filter(Boolean)
const status = item.status === 1 || item.status === '1' ? 'visited' : 'waiting'
const status = item.status === '1' ? '已到访' : '等待来访'
return {
name: item.visitorName || '',
status,
@@ -153,6 +153,10 @@ const goToQrcode = () => {
padding: 6rpx 16rpx;
border-radius: 20rpx;
}
.status.active{
color: #2f77fd;
font-weight: 500;
}
.waiting {
color: #007aff;
@@ -181,6 +185,13 @@ const goToQrcode = () => {
.value {
color: #222;
flex: 1;
text-align: right;
}
.value-valid{
color: #222;
flex: 1;
text-align: right;
white-space: nowrap;
}
.tips-text {