fix 修复 EasyPayConfigForm 引用已删除 DaxpayPerm.api 的问题

This commit is contained in:
bootx
2026-05-07 12:06:13 +08:00
parent b6fc04c529
commit c2649a5dd1

View File

@@ -113,8 +113,7 @@
import { useDict } from '@/hooks/bootx/useDict'
import { CashierSceneEnum } from '@/enums/daxpay/daxpayEnum'
import { LabeledValue } from 'ant-design-vue/lib/select'
import { isAdmin, isAgent, isMerchant } from '@/utils/env'
import { getAgentPermConfig, getMchPermConfig } from '@/api/daxpay/DaxpayPerm.api'
import { isAdmin, isMerchant } from '@/utils/env'
const { labelCol, wrapperCol, confirmLoading } = useFormEdit()
const { createMessage } = useMessage()
@@ -150,18 +149,6 @@
permFlag.value = true
return Promise.resolve()
}
if (isAgent()) {
// 返回Promise以确保await生效
return getAgentPermConfig().then(({ data }) => {
permFlag.value = data.setupAlloc as boolean
})
}
if (isMerchant()) {
// 返回Promise以确保await生效
return getMchPermConfig().then(({ data }) => {
permFlag.value = data.setupAlloc as boolean
})
}
permFlag.value = true
return Promise.resolve()
}