修复bug
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
</view>
|
||||
<view class="value">
|
||||
<uni-datetime-picker type="datetime" v-model="form.visitTime" @change="handleTimeChange" @maskClick="pickerVisible = false"
|
||||
:border="false" />
|
||||
:border="false" :hide-second="true"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" @click="onPickerOpen">
|
||||
@@ -91,7 +91,7 @@
|
||||
</view>
|
||||
<view class="value">
|
||||
<uni-datetime-picker type="datetime" v-model="form.leaveTime" @change="handleTimeChange" @maskClick="pickerVisible = false"
|
||||
:border="false" />
|
||||
:border="false" :hide-second="true"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">预计来访时间和预计离开时间间隔不能超过24小时</view>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部占位,防止最后一项贴底 -->
|
||||
<!-- 底部占位 -->
|
||||
<view class="list-bottom-space"></view>
|
||||
</view>
|
||||
|
||||
@@ -167,7 +167,6 @@ const addInvitation = () => {
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
background: #e2f0ff;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
|
||||
Reference in New Issue
Block a user