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

35 lines
4.2 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 settings-page">
<view class="card identity-card"><view class="identity-mark">微</view><view class="identity-copy"><text class="identity-title">微信身份</text><text class="identity-status">已安全关联当前账号</text></view><text class="linked-badge">已关联</text></view>
<view class="card phone-card">
<view class="section-title">手机号</view>
<view class="phone-status"><text>{{profile.phoneVerified == 1 ? (profile.maskedPhone || profile.phone) : '尚未绑定'}}</text><text class="status-tag {{profile.phoneVerified == 1 ? 'done' : ''}}">{{profile.phoneVerified == 1 ? '已验证' : '待绑定'}}</text></view>
<view class="privacy-note">手机号绑定为可选,不绑定不影响基础使用。仅用于账号找回和必要订单通知;不会用于营销。</view>
<button class="wechat-phone-btn" open-type="getPhoneNumber" loading="{{binding}}" bindgetphonenumber="bindWechatPhone">快速{{profile.phoneVerified == 1 ? '更换' : '绑定'}}手机号</button>
<view class="sms-entry" bindtap="toggleSms"><text>{{profile.phoneVerified == 1 ? '使用短信验证码更换' : '使用短信验证码绑定'}}</text><text class="sms-arrow {{smsExpanded ? 'expanded' : ''}}">›</text></view>
<view wx:if="{{smsExpanded}}" class="sms-panel">
<view wx:if="{{!unbindMode}}" class="field"><input value="{{smsForm.phone}}" data-field="phone" bindinput="onInput" type="number" maxlength="11" placeholder="请输入手机号" /></view>
<view wx:if="{{unbindMode}}" class="privacy-note">验证码将发送到当前绑定的{{profile.maskedPhone || '手机号'}},仅用于核验解绑操作。</view>
<view wx:if="{{!unbindMode}}" class="privacy-note">发送前再次确认:手机号仅用于账号找回和必要订单通知,不用于营销。</view>
<view class="code-row"><input value="{{smsForm.code}}" data-field="code" bindinput="onInput" type="number" maxlength="6" placeholder="6位验证码" /><button bindtap="sendCode" disabled="{{codeLoading || countdown > 0}}">{{countdown > 0 ? countdown + 's' : '获取验证码'}}</button></view>
<button wx:if="{{!unbindMode}}" class="sms-bind-btn" loading="{{binding}}" bindtap="bindSmsPhone">验证并绑定</button>
<button wx:if="{{unbindMode}}" class="sms-bind-btn" loading="{{binding}}" bindtap="unbindSmsPhone">验证并解绑</button>
</view>
<view wx:if="{{profile.phoneVerified == 1}}" class="sms-entry unbind-entry" bindtap="beginUnbind"><text>解绑当前手机号</text><text class="sms-arrow">›</text></view>
</view>
<view class="account-note">微信身份是账号登录标识,手机号是可选资料,不作为主账号 ID。</view>
<view class="card closure-card">
<view class="section-title">账号注销</view>
<view wx:if="{{closureLoading}}" class="privacy-note">正在读取注销申请状态…</view>
<view wx:elif="{{closureError}}" class="privacy-note closure-error">{{closureError}}<button class="closure-retry" bindtap="loadClosureRequest">重试</button></view>
<block wx:else>
<view wx:if="{{closureRequest && (closureRequest.status === 'PENDING' || closureRequest.status === 'PROCESSING')}}" class="privacy-note">申请处理中,{{closureRequest.processingTargetText || '以管理人员审核和门店交接进度为准'}}</view>
<view wx:elif="{{closureRequest && closureRequest.status === 'APPROVED'}}" class="privacy-note">账号资料已完成清理。</view>
<view wx:elif="{{closureRequest && closureRequest.status === 'REJECTED'}}" class="privacy-note">上次申请未通过:{{closureRequest.reviewerNote || '请联系管理人员'}}</view>
<view wx:elif="{{!closureRequest}}" class="privacy-note">可申请注销工作台账号。提交后可在管理人员处理前撤回。</view>
<button wx:if="{{closureRequest && closureRequest.status === 'PENDING'}}" class="closure-btn secondary" bindtap="withdrawClosure">撤回注销申请</button>
<button wx:elif="{{!closureRequest || closureRequest.status === 'REJECTED'}}" class="closure-btn" bindtap="requestClosure">申请注销账号</button>
</block>
</view>
<button class="logout-btn" bindtap="logout">退出登录</button>
</view>