Files
wxapp_companion/pages/home/index.wxml
T
lik 5915396192 feat: 界面切换暖色主题
统一配色/圆角/间距与图标资源,订单页结构简化,
健康档案与订单编辑交互调整;附主题色方案文档
2026-11-08 12:01:55 +08:00

107 lines
3.9 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">
<text class="level-text">{{profile.level}}</text>
</view>
</view>
<text class="greeting">{{greeting}},{{todayText}}</text>
</view>
</view>
<view class="online-switch" 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="section">
<text class="section-title">快捷入口</text>
<view class="quick-grid card">
<view class="quick-row">
<view class="quick-item" wx:for="{{quickEntries}}" wx:key="name" wx:if="{{item.type === 'quick'}}" bindtap="onEntryTap" data-index="{{index}}">
<view class="quick-icon" style="background-color: {{item.color}}1a;">
<t-icon name="{{item.icon}}" size="40rpx" color="{{item.color}}" />
</view>
<text class="quick-label">{{item.name}}</text>
</view>
</view>
<view class="quick-row">
<view class="quick-item" wx:for="{{quickEntries}}" wx:key="name" wx:if="{{item.type === 'function'}}" bindtap="onEntryTap" data-index="{{index}}">
<view class="quick-icon" style="background-color: {{item.color}}1a;">
<t-icon name="{{item.icon}}" size="40rpx" color="{{item.color}}" />
</view>
<text class="quick-label">{{item.name}}</text>
</view>
</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>