feat: 新增更新资产实名认证策略
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m5s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m5s
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
@show-switch-card="showSwitchCardDialog"
|
||||
@show-switch-mode="showSwitchModeDialog"
|
||||
@show-set-wifi="showSetWiFiDialog"
|
||||
@show-realname-policy="showRealnamePolicyDialog"
|
||||
@enable-binding-card="handleEnableBindingCard"
|
||||
@disable-binding-card="handleDisableBindingCard"
|
||||
@navigate-to-card="handleNavigateToCard"
|
||||
@@ -116,6 +117,12 @@
|
||||
:asset-identifier="cardInfo?.identifier"
|
||||
:asset-type="cardInfo?.asset_type"
|
||||
/>
|
||||
<RealnamePolicyDialog
|
||||
v-model="realnamePolicyDialogVisible"
|
||||
:asset-identifier="cardInfo?.identifier || ''"
|
||||
:current-policy="cardInfo?.realname_policy"
|
||||
@confirm="handleConfirmRealnamePolicy"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -140,6 +147,7 @@
|
||||
DailyRecordsDialog,
|
||||
OrderHistoryDialog
|
||||
} from './components/dialogs'
|
||||
import RealnamePolicyDialog from '@/components/device/RealnamePolicyDialog.vue'
|
||||
|
||||
// 引入 composables
|
||||
import { useAssetInfo } from './composables/useAssetInfo'
|
||||
@@ -196,6 +204,7 @@
|
||||
const rechargeDialogVisible = ref(false)
|
||||
const dailyRecordsDialogVisible = ref(false)
|
||||
const orderHistoryDialogVisible = ref(false)
|
||||
const realnamePolicyDialogVisible = ref(false)
|
||||
const selectedPackageUsageId = ref<number | null>(null)
|
||||
|
||||
// ========== 套餐列表分页状态 ==========
|
||||
@@ -343,6 +352,34 @@
|
||||
setWiFiDialogVisible.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示实名认证策略对话框
|
||||
*/
|
||||
const showRealnamePolicyDialog = () => {
|
||||
realnamePolicyDialogVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认实名认证策略
|
||||
*/
|
||||
const handleConfirmRealnamePolicy = async (form: { realname_policy: string }) => {
|
||||
try {
|
||||
const { AssetService } = await import('@/api/modules')
|
||||
const identifier = cardInfo.value?.identifier || ''
|
||||
const res = await AssetService.updateRealnamePolicy(identifier, form.realname_policy)
|
||||
if (res.code === 0) {
|
||||
ElMessage.success('设置实名认证策略成功')
|
||||
realnamePolicyDialogVisible.value = false
|
||||
await refreshAsset(cardInfo.value!.identifier, cardInfo.value!.asset_type)
|
||||
} else {
|
||||
ElMessage.error(res.msg || '设置实名认证策略失败')
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('设置实名认证策略失败:', error)
|
||||
ElMessage.error('设置实名认证策略失败')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定卡操作 - 启用绑定卡
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user