This commit is contained in:
@@ -45,11 +45,13 @@
|
||||
</view>
|
||||
<view class="function-name">资产套餐历史</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'bind')" role="button" tabindex="0">
|
||||
<view class="function-item interactive card-interactive" @tap="handleBindPhone" role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/bind-phone.png" mode="aspectFit" alt="绑定手机号"></image>
|
||||
</view>
|
||||
<view class="function-name">绑定手机号</view>
|
||||
<view :class="['function-name', alreadyBindPhone ? 'text-primary' : '']">
|
||||
{{ alreadyBindPhone ? '已绑定' : '绑定手机号' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice" @tap="$emit('enter', 'change-phone')" role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
@@ -94,13 +96,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
realNameStatus: { type: String, default: '' },
|
||||
alreadyBindPhone: { type: Boolean, default: false },
|
||||
isDevice: { type: Boolean, default: true }
|
||||
});
|
||||
|
||||
defineEmits(['enter', 'sync']);
|
||||
const emit = defineEmits(['enter', 'sync']);
|
||||
|
||||
const handleBindPhone = () => {
|
||||
if (props.alreadyBindPhone) {
|
||||
// 已绑定,不可点击
|
||||
return;
|
||||
}
|
||||
// 未绑定,可以点击进入绑定页面
|
||||
emit('enter', 'bind');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -135,18 +135,11 @@
|
||||
};
|
||||
|
||||
// 监听 identifier 变化
|
||||
watch(() => props.identifier, (newVal) => {
|
||||
watch(() => props.identifier || userStore.state.identifier, (newVal) => {
|
||||
if (newVal) {
|
||||
loadPackageData();
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
// 如果没有传入 identifier,则使用 store 中的
|
||||
watch(() => userStore.state.identifier, (newVal) => {
|
||||
if (newVal && !props.identifier) {
|
||||
loadPackageData();
|
||||
}
|
||||
}, { immediate: true });
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
<view class="user-details flex-col-g8">
|
||||
<view class="flex-row-g20">
|
||||
<view class="title">{{ currentCardNo }}</view>
|
||||
<view class="title">{{ currentCardNo || '-' }}</view>
|
||||
</view>
|
||||
<view class="caption">IMEI:{{ deviceInfo.imei || '-' }}</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user