This commit is contained in:
@@ -63,8 +63,8 @@
|
||||
<view class="function-icon">
|
||||
<image class="function-image icon-bind-phone" src="/static/bind-phone.png" mode="aspectFit" alt="绑定手机号"></image>
|
||||
</view>
|
||||
<view :class="['function-name', alreadyBindPhone ? 'text-primary' : 'text-danger']">
|
||||
{{ alreadyBindPhone ? '已绑定' : '未绑定' }}
|
||||
<view :class="['function-name', assetPhoneBound === true && customerPhone ? 'text-primary' : '']">
|
||||
{{ bindingLabel }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'change-phone')" role="button"
|
||||
@@ -123,9 +123,13 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
alreadyBindPhone: {
|
||||
assetPhoneBound: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: null
|
||||
},
|
||||
customerPhone: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
isDevice: {
|
||||
type: Boolean,
|
||||
@@ -151,9 +155,15 @@
|
||||
};
|
||||
|
||||
const walletText = computed(() => `钱包 (${formatWalletBalance(props.walletBalance)})`);
|
||||
const bindingLabel = computed(() => {
|
||||
if (props.customerPhone === '') return '绑定客户号';
|
||||
if (props.assetPhoneBound === false) return '绑定资产号';
|
||||
if (props.assetPhoneBound === true && props.customerPhone) return '资产已绑定';
|
||||
return '绑定手机号';
|
||||
});
|
||||
|
||||
const handleBindPhone = () => {
|
||||
if (props.alreadyBindPhone) {
|
||||
if (props.assetPhoneBound === true && props.customerPhone) {
|
||||
return;
|
||||
}
|
||||
emit('enter', 'bind');
|
||||
|
||||
Reference in New Issue
Block a user