94 lines
3.7 KiB
Plaintext
94 lines
3.7 KiB
Plaintext
<view class="page">
|
||
<view class="nav-placeholder" style="height: {{navBarHeight || (statusBarHeight + 44)}}px;"></view>
|
||
<view class="header safe-header-right">
|
||
<view class="nav-back" bindtap="goBack">← 返回</view>
|
||
<text class="header-title">设置</text>
|
||
</view>
|
||
|
||
<view class="main">
|
||
<view class="card">
|
||
<view class="card-head">
|
||
<text class="card-icon">🛡</text>
|
||
<view>
|
||
<text class="card-title">账号绑定</text>
|
||
<text class="card-desc">绑定后可用于提现和找伙伴功能</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="bind-item" data-type="phone" bindtap="openBindModal">
|
||
<view class="bind-left">
|
||
<view class="bind-icon {{user.phone ? 'bound' : ''}}">📱</view>
|
||
<view>
|
||
<text class="bind-label">手机号</text>
|
||
<text class="bind-value">{{user.phone || '未绑定'}}</text>
|
||
</view>
|
||
</view>
|
||
<text class="bind-action" wx:if="{{user.phone}}">✓</text>
|
||
<text class="bind-action brand" wx:else>去绑定</text>
|
||
</view>
|
||
|
||
<view class="bind-item" data-type="wechat" bindtap="openBindModal">
|
||
<view class="bind-left">
|
||
<view class="bind-icon wechat {{user.wechat ? 'bound' : ''}}">💬</view>
|
||
<view>
|
||
<text class="bind-label">微信号</text>
|
||
<text class="bind-value">{{user.wechat || '未绑定'}}</text>
|
||
</view>
|
||
</view>
|
||
<text class="bind-action" wx:if="{{user.wechat}}">✓</text>
|
||
<text class="bind-action green" wx:else>去绑定</text>
|
||
</view>
|
||
|
||
<view class="bind-item" data-type="alipay" bindtap="openBindModal">
|
||
<view class="bind-left">
|
||
<view class="bind-icon alipay {{user.alipay ? 'bound' : ''}}">💳</view>
|
||
<view>
|
||
<text class="bind-label">支付宝</text>
|
||
<text class="bind-value">{{user.alipay || '未绑定'}}</text>
|
||
</view>
|
||
</view>
|
||
<text class="bind-action" wx:if="{{user.alipay}}">✓</text>
|
||
<text class="bind-action blue" wx:else>去绑定</text>
|
||
</view>
|
||
|
||
<view class="bind-item" bindtap="goAddresses">
|
||
<view class="bind-left">
|
||
<view class="bind-icon addr">📍</view>
|
||
<view>
|
||
<text class="bind-label">收货地址</text>
|
||
<text class="bind-value">管理收货地址,用于发货与邮寄</text>
|
||
</view>
|
||
</view>
|
||
<text class="bind-action brand">管理</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="hint" wx:if="{{!user.wechat && !user.alipay}}">
|
||
<text>提示:绑定至少一个支付方式(微信或支付宝)才能使用提现功能</text>
|
||
</view>
|
||
|
||
<view class="btn-logout" bindtap="logout">退出登录</view>
|
||
</view>
|
||
|
||
<view class="mask" wx:if="{{showBindModal}}" catchtap="closeBindModal">
|
||
<view class="modal" catchtap="">
|
||
<view class="modal-head">
|
||
<text class="modal-title">绑定{{bindType === 'phone' ? '手机号' : (bindType === 'wechat' ? '微信号' : '支付宝')}}</text>
|
||
<view class="modal-close" bindtap="closeBindModal">×</view>
|
||
</view>
|
||
<view class="modal-body">
|
||
<input
|
||
class="bind-input"
|
||
placeholder="{{bindType === 'phone' ? '请输入11位手机号' : (bindType === 'wechat' ? '请输入微信号' : '请输入支付宝账号')}}"
|
||
value="{{bindValue}}"
|
||
bindinput="onBindInput"
|
||
/>
|
||
<text class="bind-err" wx:if="{{bindError}}">{{bindError}}</text>
|
||
<view class="btn-primary {{!bindValue || isBinding ? 'disabled' : ''}}" bindtap="submitBind">
|
||
{{isBinding ? '绑定中...' : '确认绑定'}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|