Files
JayuCloud/JC-Salon-WeChat/pages/profile/index.wxml
T

101 lines
4.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.
<view class="page">
<view class="card profile-card">
<view class="profile-main">
<view class="shop-logo">指</view>
<view class="profile-copy">
<text class="shop-name">{{shopName}}</text>
<text class="phone">{{phone}}</text>
</view>
</view>
<text class="role-badge">{{roleText}}</text>
</view>
<view class="card overview-card">
<view class="overview-head">
<text class="overview-title">店铺今日概览</text>
<text class="overview-date">{{overview.date}}</text>
</view>
<view wx:if="{{overviewLoading}}" class="overview-loading">正在加载今日数据...</view>
<view wx:else class="overview-grid">
<view class="overview-item" data-action="todayAppointments" bindtap="goOverviewAction">
<text class="overview-value">{{overview.todayAppointments}}</text>
<text class="overview-label">今日预约</text>
</view>
<view class="overview-item overview-item--warning" data-action="pendingAppointments" bindtap="goOverviewAction">
<text class="overview-value">{{overview.pendingAppointments}}</text>
<text class="overview-label">待确认预约</text>
</view>
<view class="overview-item" data-action="upcomingAppointments" bindtap="goOverviewAction">
<text class="overview-value">{{overview.upcomingAppointments}}</text>
<text class="overview-label">即将开始</text>
</view>
<view class="overview-item">
<text class="overview-value">{{overview.availableEmployees}}</text>
<text class="overview-label">今日可预约员工</text>
</view>
<view class="overview-item overview-item--warning" data-action="scheduleExceptions" bindtap="goOverviewAction">
<text class="overview-value">{{overview.scheduleExceptions}}</text>
<text class="overview-label">请假/调班待处理</text>
</view>
<view class="overview-item overview-item--status">
<view class="status-dot {{overview.shopOpen ? 'is-open' : 'is-closed'}}"></view>
<text class="overview-status">{{overview.shopStatus}}</text>
<text class="overview-label">店铺当前状态</text>
</view>
</view>
</view>
<view class="section menu-list card">
<view wx:for="{{menus}}" wx:key="title" class="menu-row" data-url="{{item.url}}" data-action="{{item.action}}" bindtap="go">
<text>{{item.title}}</text>
<text class="arrow">›</text>
</view>
</view>
<view wx:if="{{editModalVisible}}" class="modal-mask" bindtap="closeEditProfile">
<view class="profile-modal" catchtap="stopTap">
<view class="modal-head">
<text class="modal-title">个人信息</text>
<view class="modal-close" bindtap="closeEditProfile">×</view>
</view>
<view class="profile-avatar-row">
<view wx:if="{{profileForm.avatar}}" class="profile-avatar image-avatar">
<image src="{{profileForm.avatar}}" mode="aspectFill"></image>
</view>
<view wx:else class="profile-avatar">头像</view>
<button class="secondary-btn avatar-btn" loading="{{avatarUploading}}" bindtap="chooseProfileAvatar">上传头像</button>
<button wx:if="{{profileForm.avatar}}" class="text-btn avatar-remove" bindtap="removeProfileAvatar">移除</button>
</view>
<view class="modal-field">
<text class="required-label">昵称</text>
<input value="{{profileForm.nickname}}" data-field="nickname" bindinput="onProfileInput" placeholder="请输入昵称" />
</view>
<view class="modal-field readonly-field">
<text>登录账号</text>
<view>{{userInfo.account || '未设置'}}</view>
</view>
<view class="modal-field readonly-field">
<text>身份</text>
<view>{{roleText}}</view>
</view>
<view class="modal-field readonly-field">
<text>登录手机号</text>
<view>{{userInfo.phone || '未绑定'}}</view>
</view>
<view class="modal-field">
<text>联系电话</text>
<input value="{{profileForm.contactPhone}}" data-field="contactPhone" bindinput="onProfileInput" type="number" placeholder="请输入联系电话" />
</view>
<view class="modal-field">
<text>微信号</text>
<input value="{{profileForm.wechatId}}" data-field="wechatId" bindinput="onProfileInput" placeholder="请输入微信号" />
</view>
<view class="modal-field">
<text>签名</text>
<textarea value="{{profileForm.signature}}" data-field="signature" bindinput="onProfileInput" placeholder="请输入个人签名" />
</view>
<button class="primary-btn modal-submit" loading="{{profileSaving}}" bindtap="saveProfile">保存个人信息</button>
</view>
</view>
</view>