diff --git a/src/app/admin/channels/page.tsx b/src/app/admin/channels/page.tsx index 3687921..f340d91 100644 --- a/src/app/admin/channels/page.tsx +++ b/src/app/admin/channels/page.tsx @@ -178,6 +178,21 @@ export default function ChannelsPage(props: ChannelsPageProps) { header: '代理地址', cell: ({row}) => , }, + { + header: '地区', + cell: ({row}) => { + const prov = row.original.filter_prov + const city = row.original.filter_city + const parts = [] + if (prov && prov !== 'all') parts.push(prov) + if (city && city !== 'all') parts.push(city) + return ( +
+ {parts.length > 0 ? parts.join(' / ') : '不限'} +
+ ) + }, + }, { header: '认证方式', cell: ({row}) => { diff --git a/src/components/composites/extract/index.tsx b/src/components/composites/extract/index.tsx index 59814f4..1447e5d 100644 --- a/src/components/composites/extract/index.tsx +++ b/src/components/composites/extract/index.tsx @@ -26,7 +26,7 @@ const schema = z.object({ prov: z.string().optional(), city: z.string().optional(), regionType: z.enum(['unlimited', 'specific']).default('unlimited'), - isp: z.enum(['all', '1', '2', '3'], {required_error: '请选择运营商'}), + // isp: z.enum(['all', '1', '2', '3'], {required_error: '请选择运营商'}), proto: z.enum(['all', '1', '2'], {required_error: '请选择协议'}), authType: z.enum(['1', '2'], {required_error: '请选择认证方式'}), distinct: z.enum(['1', '0'], {required_error: '请选择去重选项'}), @@ -48,7 +48,7 @@ export default function Extract(props: ExtractProps) { resolver: zodResolver(schema), defaultValues: { regionType: 'unlimited', - isp: 'all', + // isp: 'all', proto: 'all', authType: '1', count: 1, @@ -108,7 +108,7 @@ const FormFields = memo(() => { {/* 运营商筛选 */} - + {/* {({id, field}) => ( { )} - + */} {/* 协议类型 */} @@ -711,7 +711,7 @@ function ApplyLink() { } function link(values: Schema) { - const {resource, prov, city, isp, proto, authType, distinct, format: formatType, separator, breaker, count} = values + const {resource, prov, city, proto, authType, distinct, format: formatType, separator, breaker, count} = values console.log(values, 'values') const sp = new URLSearchParams() @@ -721,7 +721,7 @@ function link(values: Schema) { if (prov) sp.set('b', prov) if (city) sp.set('b', city) - if (isp != 'all') sp.set('s', isp) + sp.set('s', 'all') sp.set('d', distinct) sp.set('rt', formatType) sp.set('rh', 'ip') diff --git a/src/components/composites/purchase/long/center.tsx b/src/components/composites/purchase/long/center.tsx index 68ce1fd..3001ce6 100644 --- a/src/components/composites/purchase/long/center.tsx +++ b/src/components/composites/purchase/long/center.tsx @@ -134,7 +134,7 @@ export default function Center({skuData}: { setValue('expire', nextExpireList[0]) } }} - className="grid grid-cols-[repeat(auto-fill,minmax(120px,1fr))] gap-4"> + className="grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-4"> {liveList.map((live) => { const priceExpire = type === '1' && !hasPurchaseSku(skuData, {mode: type, live, expire}) ? getAvailablePurchaseExpires(skuData, {mode: type, live})[0] || '0' diff --git a/src/components/composites/purchase/option.tsx b/src/components/composites/purchase/option.tsx index 5259e1a..a0895de 100644 --- a/src/components/composites/purchase/option.tsx +++ b/src/components/composites/purchase/option.tsx @@ -57,7 +57,7 @@ export default function FormOption(props: FormOptionProps) {

{props.description}

)} {isValidPrice && ( -
+
{hasDiscount ? ( <>

¥{formatPrice(discountedPrice!)}/IP

diff --git a/src/components/composites/purchase/short/center.tsx b/src/components/composites/purchase/short/center.tsx index 3f7660f..cf532a0 100644 --- a/src/components/composites/purchase/short/center.tsx +++ b/src/components/composites/purchase/short/center.tsx @@ -135,7 +135,7 @@ export default function Center({ setValue('expire', nextExpireList[0]) } }} - className="grid grid-cols-[repeat(auto-fill,minmax(120px,1fr))] gap-4"> + className="grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-4"> {liveList.map((live) => { const priceExpire = type === '1' && !hasPurchaseSku(skuData, {mode: type, live, expire}) ? getAvailablePurchaseExpires(skuData, {mode: type, live})[0] || '0' diff --git a/src/lib/models/models.ts b/src/lib/models/models.ts index 1a819ff..b0ad6d5 100644 --- a/src/lib/models/models.ts +++ b/src/lib/models/models.ts @@ -104,6 +104,8 @@ export type Channel = { expired_at: Date host: string batch_no: string + filter_prov: string + filter_city: string } export type Proxy = { id: number