87 lines
3.3 KiB
Plaintext
87 lines
3.3 KiB
Plaintext
<!--index.wxml-->
|
||
<view class="page">
|
||
<!-- loading 遮罩 -->
|
||
<view class="loading-mask" wx:if="{{!isLoggedIn && !loginFailed}}">
|
||
<view class="loading-spinner"></view>
|
||
<text class="loading-text">正在获取身份信息...</text>
|
||
</view>
|
||
|
||
<!-- 登录失败 -->
|
||
<view class="loading-mask" wx:if="{{loginFailed}}">
|
||
<text class="fail-icon">⚠️</text>
|
||
<text class="fail-text">网络异常,请重试</text>
|
||
<view class="retry-btn" bindtap="onRetry">重新加载</view>
|
||
</view>
|
||
|
||
<view class="header">
|
||
<view class="header-icon">🏢</view>
|
||
<text class="header-title">访客预约系统</text>
|
||
<text class="header-subtitle">协能工厂区域访问管理</text>
|
||
</view>
|
||
|
||
<view class="action-list">
|
||
<view class="action-card" bindtap="goAppointment">
|
||
<view class="action-icon-wrap action-icon-blue">
|
||
<text class="action-icon-text">📅</text>
|
||
</view>
|
||
<view class="action-info">
|
||
<text class="action-title">访客预约</text>
|
||
<text class="action-desc">选择预约时间和预约人,提交预约信息</text>
|
||
</view>
|
||
<text class="action-arrow">›</text>
|
||
</view>
|
||
|
||
<view class="action-card" bindtap="goRecords">
|
||
<view class="action-icon-wrap action-icon-green">
|
||
<text class="action-icon-text">📋</text>
|
||
</view>
|
||
<view class="action-info">
|
||
<text class="action-title">预约记录</text>
|
||
<text class="action-desc">查看预约记录、进度及取消预约</text>
|
||
</view>
|
||
<text class="action-arrow">›</text>
|
||
</view>
|
||
|
||
<!-- 最新预约摘要 -->
|
||
<view class="latest-card" wx:if="{{latestRecord}}">
|
||
<view class="latest-header">
|
||
<view style="display: flex; align-items: center;">
|
||
<text style="margin-right: 10px;" class="latest-title"> 最新预约</text>
|
||
<view wx:if="{{latestRecord.status === 'approved'}}" class="qrcode-btn" catchtap="showQrcode" data-id="{{latestRecord._id}}">出示凭证</view>
|
||
</view>
|
||
<view class="latest-header-right">
|
||
|
||
<view class="status-tag status-{{latestRecord.status}}">{{latestRecord.statusText}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="latest-body">
|
||
<view class="latest-row">
|
||
<text class="latest-label">访客</text>
|
||
<text class="latest-value">{{latestRecord.name}}</text>
|
||
</view>
|
||
<view class="latest-row">
|
||
<text class="latest-label">时间</text>
|
||
<text class="latest-value">{{latestRecord.date}} {{latestRecord.time}}</text>
|
||
</view>
|
||
<view class="latest-row">
|
||
<text class="latest-label">区域</text>
|
||
<text class="latest-value">{{latestRecord.area}}</text>
|
||
</view>
|
||
<view class="latest-row">
|
||
<text class="latest-label">被访人</text>
|
||
<text class="latest-value">{{latestRecord.hostName}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="latest-footer" bindtap="goRecords">
|
||
<text class="latest-link">查看全部记录 ›</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="footer">
|
||
<text class="footer-text">协能工厂 · 访客管理</text>
|
||
</view>
|
||
|
||
<!-- 二维码弹窗 -->
|
||
<qrcode-modal visible="{{qrcodeVisible}}" qrcode-id="{{qrcodeId}}" bind:close="hideQrcode" />
|
||
</view> |