This commit is contained in:
xiaojunnuo
2026-01-22 11:55:01 +08:00
parent d947437c10
commit 96c9e74c6f
4 changed files with 15 additions and 2 deletions

View File

@@ -196,6 +196,7 @@ export const useSettingStore = defineStore({
notification.warn({
message: $t("vip.needVipTip"),
});
mitter.emit("openVipModal");
throw new Error($t("vip.needVipTip"));
}
},

View File

@@ -104,6 +104,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
color: "gold",
icon: "mingcute:vip-1-line",
click: () => {
settingStore.checkPlus();
openDomainImportDialog({
afterSubmit: () => {
setTimeout(() => {

View File

@@ -71,11 +71,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
actionbar: {
buttons: {
add: {
icon: "ion:add-circle-outline",
},
import: {
title: "导入CNAME记录",
type: "primary",
text: "批量导入",
icon: "mingcute:vip-1-line",
click: () => {
settingStore.checkPlus();
openCnameImportDialog({
afterSubmit: () => {
setTimeout(() => {
@@ -89,7 +94,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
title: "导出CNAME记录之后可用于批量导入cname解析到域名注册商",
type: "primary",
text: "批量导出",
icon: "mingcute:vip-1-line",
click: () => {
settingStore.checkPlus();
crudBinding.value.toolbar.buttons.export.click({});
},
},

View File

@@ -233,7 +233,11 @@ export class DomainService extends BaseService<DomainEntity> {
})
const challengeType = "dns"
const importDomain = async (domainRecord: any) => {
const getPage = async (pager: Pager) => {
return await dnsProvider.getDomainListPage(pager)
}
const itemHandle = async (domainRecord: any) => {
task.incrementCurrent()
const domain = domainRecord.domain
@@ -273,7 +277,7 @@ export class DomainService extends BaseService<DomainEntity> {
task.setTotal(pageRes.total || 0)
}
const start = async () => {
await doPageTurn({ pager, getPage: dnsProvider.getDomainListPage, itemHandle: importDomain, batchHandle })
await doPageTurn({ pager, getPage, itemHandle, batchHandle })
}
start()