Files
wxapp_companion/pages/home/index.wxml
T
lik 1d8af0cb26 style: 统一全局字号层级,首页快捷入口改为单行
正文统一 28rpx,小字整体上调一级;快捷入口所有项目单行等分展示。
2026-11-10 21:13:34 +08:00

103 lines
3.7 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.
<!--pages/home/index.wxml-->
<view class="page">
<!-- 头部信息卡 -->
<view class="header-card">
<view class="profile-row">
<view class="profile-left">
<view class="avatar">
<image wx:if="{{profile.avatar}}" class="avatar-img" src="{{profile.avatar}}" mode="aspectFill" />
<text wx:else class="avatar-text">{{profile.name[0]}}</text>
</view>
<view class="profile-info">
<view class="name-row">
<text class="name">{{profile.name}}</text>
<view class="level-tag" wx:if="{{levelText}}">
<text class="level-text">{{levelText}}</text>
</view>
</view>
<text class="greeting">{{greeting}},{{todayText}}</text>
</view>
</view>
<view class="online-switch" wx:if="{{showOnlineSwitch}}" bindtap="toggleOnline">
<text class="switch-text">{{online ? '接单中' : '休息中'}}</text>
<view class="switch-track {{online ? 'on' : 'off'}}">
<view class="switch-thumb"></view>
</view>
</view>
</view>
<view class="stats-row">
<view class="stat">
<text class="stat-label">今日收益</text>
<view class="stat-value">
<text class="stat-unit">¥</text>
<text class="stat-num">{{todayIncome}}</text>
</view>
</view>
<view class="stat-divider"></view>
<view class="stat stat-right">
<text class="stat-label">今日接单</text>
<view class="stat-value">
<text class="stat-num">{{todayOrderCount}}</text>
<text class="stat-unit">单</text>
</view>
</view>
</view>
</view>
<!-- 实习期只读提示 -->
<view class="intern-tip" wx:if="{{isIntern}}">
<t-icon name="info-circle" size="32rpx" color="#C26A2E" />
<text class="intern-tip-text">实习期可查看订单,暂不能接单;管理员转正后即可接单。</text>
</view>
<!-- 快捷入口 -->
<view class="section">
<text class="section-title">快捷入口</text>
<view class="quick-grid card">
<view class="quick-item" wx:for="{{quickEntries}}" wx:key="name" bindtap="onEntryTap" data-index="{{index}}">
<view class="quick-icon" style="background-color: {{item.color}}1a;">
<t-icon name="{{item.icon}}" size="36rpx" color="{{item.color}}" />
</view>
<text class="quick-label">{{item.name}}</text>
</view>
</view>
</view>
<!-- 订单统计 -->
<order-stats />
<!-- 近7日订单 -->
<view class="section">
<view class="section-header">
<text class="section-title">近7日订单</text>
<view class="view-all" bindtap="viewAllOrders">
<text>全部</text>
<t-icon name="chevron-right" size="28rpx" color="#A3988B" />
</view>
</view>
<view class="order-list" wx:if="{{recentOrders.length > 0}}">
<view class="order-card" wx:for="{{recentOrders}}" wx:key="_id" data-id="{{item._id}}" bindtap="onOrderTap">
<view class="order-line1">
<text class="order-patient">{{item.patient.name}}</text>
<text class="order-service">{{item.escort.serviceName}}</text>
<view class="status-tag status-{{item.displayStatus}}">
<text>{{statusMap[item.displayStatus] || item.displayStatus}}</text>
</view>
</view>
<view class="order-line2">
<text class="order-hospital">{{item.hospital.name}} · {{item.hospital.department}}</text>
<text class="order-time">{{item.schedule.date}}</text>
</view>
</view>
</view>
<view class="empty-state" wx:else>
<t-icon name="inbox" size="72rpx" color="#DFD7CE" />
<text class="empty-text">暂无近7日订单</text>
</view>
</view>
</view>