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

74 lines
3.4 KiB
Plaintext

<view class="page no-tab profile-settings-page">
<view wx:if="{{loading}}" class="loading-state">个人资料加载中</view>
<block wx:else>
<view class="page-heading">
<text class="page-title">个人资料</text>
<text class="page-subtitle">把你的姓名、联系方式和头像整理成店内可识别的名片。</text>
</view>
<view class="portrait-card">
<view class="portrait-glow"></view>
<view class="portrait-main">
<view wx:if="{{profileForm.avatar}}" class="portrait-avatar image-avatar">
<image src="{{profileForm.avatar}}" mode="aspectFill"></image>
</view>
<view wx:else class="portrait-avatar portrait-empty">头像</view>
<view class="portrait-copy">
<text class="portrait-name">{{profileForm.nickname || userInfo.nickname || '个人头像'}}</text>
<text class="portrait-desc">{{roleText}} · {{shopName}}</text>
</view>
</view>
<view class="portrait-actions">
<button class="avatar-btn" loading="{{avatarUploading}}" disabled="{{loading || avatarUploading || profileSaving}}" bindtap="chooseProfileAvatar">{{avatarUploading ? '上传中' : profileForm.avatar ? '更换头像' : '上传头像'}}</button>
<button wx:if="{{profileForm.avatar}}" class="avatar-remove" disabled="{{loading || avatarUploading || profileSaving}}" bindtap="removeProfileAvatar">移除</button>
</view>
</view>
<view class="info-grid">
<view class="info-tile">
<text>登录账号</text>
<view>{{userInfo.account || '未设置'}}</view>
</view>
<view class="info-tile">
<text>身份</text>
<view>{{roleText}}</view>
</view>
<view class="info-tile">
<text>登录手机号</text>
<view>{{userInfo.phone || '未绑定'}}</view>
</view>
<view class="info-tile">
<text>当前店铺</text>
<view>{{shopName}}</view>
</view>
</view>
<view class="card form-card">
<view class="form-header">
<text class="form-kicker">资料档案</text>
<text class="form-title">用于店内识别与客户沟通</text>
</view>
<view class="profile-field">
<text class="field-label required-label">昵称</text>
<input value="{{profileForm.nickname}}" data-field="nickname" bindinput="onProfileInput" placeholder="请输入昵称" />
</view>
<view class="profile-field">
<text class="field-label">联系电话</text>
<input value="{{profileForm.contactPhone}}" data-field="contactPhone" bindinput="onProfileInput" type="number" placeholder="请输入联系电话" />
</view>
<view class="profile-field">
<text class="field-label">微信号</text>
<input value="{{profileForm.wechatId}}" data-field="wechatId" bindinput="onProfileInput" placeholder="请输入微信号" />
</view>
<view class="profile-field signature-field">
<text class="field-label">签名</text>
<textarea value="{{profileForm.signature}}" data-field="signature" bindinput="onProfileInput" placeholder="请输入个人签名" />
</view>
</view>
</block>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{profileSaving}}" disabled="{{loading || profileSaving || avatarUploading}}" bindtap="saveProfile">保存个人信息</button>
</view>
</view>