优化自定义后缀只需要改一个文件

This commit is contained in:
7836246 2024-03-17 22:25:10 +08:00
parent 47c8fb76fd
commit 168013cb27
6 changed files with 2550 additions and 4036 deletions

View File

@ -13,7 +13,7 @@ const router = useRouter();
const runtimeConfig = useRuntimeConfig()
const localePath = useLocalePath()
const settingsStore = useSettingsStore()
const handleAction = async (url: any) => {
if (!state.domain) return toast.add({ title: '请输入域名' })
@ -25,7 +25,9 @@ const handleAction = async (url: any) => {
domain = updateDomainForTLD(parts);
state.domain = domain;
await router.push(localePath(`/${url}/${state.domain.replace(/\./g, '_')}.html`));
const isLink = ref({})
isLink.value = settingsStore.linkOpenType != 'currentWindow'
await router.push(localePath(`/${url}/${state.domain.replace(/\./g, '_')}.html`))
}

View File

@ -10,18 +10,19 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxt/ui": "^2.14.1",
"@nuxt/ui": "^2.14.2",
"@nuxtjs/tailwindcss": "^6.11.4",
"@pinia/nuxt": "^0.5.1",
"nuxt": "^3.10.3",
"nuxt": "^3.11.0",
"socks": "^2.8.1",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@nuxtjs/i18n": "^8.1.1",
"@nuxtjs/i18n": "^8.2.0",
"@pinia-plugin-persistedstate/nuxt": "^1.2.0",
"nuxt-headlessui": "^1.1.5",
"nuxt-simple-robots": "4.0.0-rc.14",
"typescript": "5.3.3"
"typescript": "5.4.2"
}
}

1849
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -345,8 +345,8 @@ export async function tcpWhois(domain: string, queryOptions: string, server: str
options.proxy.password = proxy.password;
}
return new Promise((resolve, reject) => {
SocksClient.createConnection(options, function(err, info) {
return new Promise((resolve:any, reject:any) => {
SocksClient.createConnection(options, function(err:any, info:any) {
if (err) {
reject(err);
} else {
@ -364,7 +364,7 @@ export async function tcpWhois(domain: string, queryOptions: string, server: str
);
}
info?.socket.on('data', (data) => {
info?.socket.on('data', (data:any) => {
resolve(decoder.decode(data));
});

File diff suppressed because it is too large Load Diff