Files
miniwx/pages/index/index.wxml
T

91 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--index.wxml-->
<view class="page">
<!-- 登录失败提示条(不遮挡页面) -->
<view class="login-fail-bar" wx:if="{{loginFailed && !isLoggedIn}}">
<text>网络异常,无法获取身份信息</text>
<text class="retry-link" bindtap="onRetry">重试</text>
</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="{{recordLoading}}">
<view class="latest-header">
<text class="latest-title">最新预约</text>
</view>
<view class="latest-body">
<view class="skeleton-row"><view class="skeleton-bar" style="width:60%"></view></view>
<view class="skeleton-row"><view class="skeleton-bar" style="width:80%"></view></view>
<view class="skeleton-row"><view class="skeleton-bar" style="width:50%"></view></view>
<view class="skeleton-row"><view class="skeleton-bar" style="width:40%"></view></view>
</view>
</view>
<view class="latest-card" wx:elif="{{latestRecord}}">
<view class="latest-header">
<view class="latest-header-left">
<text 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 id="qrcodeModal" />
</view>