f
This commit is contained in:
@@ -53,43 +53,46 @@ export const toolboxItems = [
|
|||||||
validate: (form) => /^1[3-9]\d{9}$/.test(form.mobile || ''),
|
validate: (form) => /^1[3-9]\d{9}$/.test(form.mobile || ''),
|
||||||
validateMsg: '请输入正确的11位手机号',
|
validateMsg: '请输入正确的11位手机号',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
province: '省份',
|
mobile: '手机号码',
|
||||||
city: '城市',
|
mobileprovice: '所属省份',
|
||||||
carrier: '运营商',
|
mobilearea: '所属城市',
|
||||||
area_code: '区号',
|
mobiletype: '运营商类型',
|
||||||
zip_code: '邮编',
|
areacode: '区号',
|
||||||
},
|
postcode: '邮编',
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'beijing-time',
|
|
||||||
name: '北京时间查询',
|
|
||||||
desc: '获取当前北京时间',
|
|
||||||
icon: 'i-carbon-time',
|
|
||||||
fields: [],
|
|
||||||
validate: () => true,
|
|
||||||
validateMsg: '',
|
|
||||||
resultLabels: {
|
|
||||||
datetime: '北京时间',
|
|
||||||
date: '日期',
|
|
||||||
time: '时间',
|
|
||||||
weekday: '星期',
|
|
||||||
timestamp: '时间戳',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// key: 'beijing-time',
|
||||||
|
// name: '北京时间查询',
|
||||||
|
// desc: '获取当前北京时间',
|
||||||
|
// icon: 'i-carbon-time',
|
||||||
|
// fields: [],
|
||||||
|
// validate: () => true,
|
||||||
|
// validateMsg: '',
|
||||||
|
// resultLabels: {
|
||||||
|
// datetime: '北京时间',
|
||||||
|
// date: '日期',
|
||||||
|
// time: '时间',
|
||||||
|
// weekday: '星期',
|
||||||
|
// timestamp: '时间戳',
|
||||||
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
key: 'bank-card',
|
key: 'bank-card',
|
||||||
name: '银行卡识别',
|
name: '银行卡识别',
|
||||||
desc: '识别银行卡发卡行与卡种',
|
desc: '识别银行卡发卡行与卡种',
|
||||||
icon: 'i-carbon-wallet',
|
icon: 'i-carbon-wallet',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'card', label: '银行卡号', type: 'digit', maxlength: 20, placeholder: '请输入银行卡号' },
|
{ key: 'card_no', label: '银行卡号', type: 'digit', maxlength: 19, placeholder: '请输入银行卡号' },
|
||||||
],
|
],
|
||||||
validate: (form) => /^\d{13,19}$/.test(form.card || ''),
|
validate: (form) => /^\d{16,19}$/.test((form.card_no || '').replace(/\s+/g, '')),
|
||||||
validateMsg: '请输入正确的银行卡号',
|
validateMsg: '请输入正确的16-19位银行卡号',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
|
card_no: '银行卡号',
|
||||||
bank: '发卡银行',
|
bank: '发卡银行',
|
||||||
card_type: '卡种',
|
card_type: '卡种',
|
||||||
brand: '卡品牌',
|
valid: { label: '校验状态', transform: (v) => v ? '有效' : '无效' },
|
||||||
|
reason: '校验结果',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -115,14 +118,14 @@ export const toolboxItems = [
|
|||||||
desc: '阿拉伯数字转中文大写金额',
|
desc: '阿拉伯数字转中文大写金额',
|
||||||
icon: 'i-carbon-calculator',
|
icon: 'i-carbon-calculator',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'amount', label: '金额', type: 'digit', maxlength: 15, placeholder: '请输入金额' },
|
{ key: 'money', label: '金额', type: 'digit', maxlength: 15, placeholder: '请输入金额' },
|
||||||
],
|
],
|
||||||
validate: (form) => /^\d+(\.\d{1,2})?$/.test(form.amount || ''),
|
validate: (form) => /^\d+(\.\d{1,2})?$/.test(form.money || ''),
|
||||||
validateMsg: '请输入正确的金额(最多两位小数)',
|
validateMsg: '请输入正确的金额(最多两位小数)',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
amount: '原始金额',
|
cnresult: '中文大写',
|
||||||
chinese: '大写金额',
|
enresult: '英文大写',
|
||||||
simplified: '简写',
|
fnresult: '财务简写',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -431,6 +434,7 @@ export const toolboxItems = [
|
|||||||
content: '英文句子',
|
content: '英文句子',
|
||||||
note: '中文释义',
|
note: '中文释义',
|
||||||
source: '出处',
|
source: '出处',
|
||||||
|
date: '日期',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -443,9 +447,9 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
quest: '题目',
|
title: '题目',
|
||||||
result: { label: '答案', hidden: true },
|
answer: { label: '答案', hidden: true },
|
||||||
explain: { label: '解析', hidden: true },
|
analyse: { label: '解析', hidden: true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -475,6 +479,7 @@ export const toolboxItems = [
|
|||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '文案内容',
|
content: '文案内容',
|
||||||
|
source: '来源',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -486,6 +491,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '养生妙招',
|
content: '养生妙招',
|
||||||
},
|
},
|
||||||
@@ -502,9 +508,9 @@ export const toolboxItems = [
|
|||||||
validateMsg: '请输入违章代码',
|
validateMsg: '请输入违章代码',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
code: '违章代码',
|
code: '违章代码',
|
||||||
fen: '扣分',
|
deduct: '扣分',
|
||||||
money: '罚款',
|
fine: '罚款',
|
||||||
content: '违法行为',
|
behavior: '违法行为',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -533,11 +539,12 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
title: '曲名',
|
title: '曲名',
|
||||||
author: '作者',
|
author: '作者',
|
||||||
content: '原文',
|
content: '原文',
|
||||||
translate: '译文',
|
note: '注释',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -599,8 +606,8 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
quest: '广告语',
|
content: '广告语',
|
||||||
result: { label: '品牌答案', hidden: true },
|
answer: { label: '品牌答案', hidden: true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -613,9 +620,9 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
quest: '谜面',
|
content: '谜面',
|
||||||
result: { label: '谜底', hidden: true },
|
answer: { label: '谜底', hidden: true },
|
||||||
content: { label: '解析', hidden: true },
|
reason: { label: '解析', hidden: true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -641,8 +648,10 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '短句',
|
word: '短句',
|
||||||
origin: '出处',
|
wordfrom: '出处',
|
||||||
|
date: '日期',
|
||||||
|
imgauthor: '图片作者',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -655,7 +664,8 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '谚语',
|
front: '上句',
|
||||||
|
behind: '下句',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -668,10 +678,12 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
head: '提示',
|
question: '谜面',
|
||||||
result: { label: '谜底', hidden: true },
|
answer: { label: '谜底', hidden: true },
|
||||||
pinyin: '拼音',
|
pinyin: '拼音',
|
||||||
content: '释义',
|
study: '释义',
|
||||||
|
source: '出处',
|
||||||
|
abbr: '缩写',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -684,7 +696,7 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '小窍门',
|
content: '技巧内容',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -715,6 +727,8 @@ export const toolboxItems = [
|
|||||||
resultLabels: {
|
resultLabels: {
|
||||||
number: '数字',
|
number: '数字',
|
||||||
score: '评分',
|
score: '评分',
|
||||||
|
shuli: '数理',
|
||||||
|
gaishu: '概述',
|
||||||
result: '吉凶',
|
result: '吉凶',
|
||||||
conclusion: '结论',
|
conclusion: '结论',
|
||||||
},
|
},
|
||||||
@@ -731,9 +745,7 @@ export const toolboxItems = [
|
|||||||
validateMsg: '请输入姓氏',
|
validateMsg: '请输入姓氏',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
xing: '姓氏',
|
xing: '姓氏',
|
||||||
origin: '起源',
|
content: '起源及相关信息',
|
||||||
junwang: '郡望',
|
|
||||||
tanghao: '堂号',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -837,10 +849,13 @@ export const toolboxItems = [
|
|||||||
],
|
],
|
||||||
validate: (form) => (form.prov || '').length > 0,
|
validate: (form) => (form.prov || '').length > 0,
|
||||||
validateMsg: '请输入省份',
|
validateMsg: '请输入省份',
|
||||||
resultType: 'list',
|
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
city: '城市',
|
prov: '省份',
|
||||||
category: '油品',
|
update: '更新时间',
|
||||||
|
},
|
||||||
|
subResultKey: 'prices',
|
||||||
|
subResultLabels: {
|
||||||
|
label: '油品',
|
||||||
price: '价格',
|
price: '价格',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -879,16 +894,20 @@ export const toolboxItems = [
|
|||||||
{
|
{
|
||||||
key: 'domain',
|
key: 'domain',
|
||||||
name: '域名解析',
|
name: '域名解析',
|
||||||
desc: '查询域名Whois信息与解析记录',
|
desc: '查询域名解析记录详情',
|
||||||
icon: 'i-carbon-globe',
|
icon: 'i-carbon-globe',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'domain', label: '域名', type: 'text', maxlength: 100, placeholder: '请输入域名,如:baidu.com' },
|
{ key: 'domain', label: '域名', type: 'text', maxlength: 100, placeholder: '请输入域名,如:baidu.com' },
|
||||||
],
|
],
|
||||||
validate: (form) => (form.domain || '').length > 0,
|
validate: (form) => (form.domain || '').length > 0,
|
||||||
validateMsg: '请输入域名',
|
validateMsg: '请输入域名',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
domain: '域名',
|
host: '主机名',
|
||||||
content: '解析信息',
|
type: '记录类型',
|
||||||
|
ip: 'IP地址',
|
||||||
|
target: '目标地址',
|
||||||
|
ttl: '有效时间',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1081,6 +1100,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
quest: '前半句',
|
quest: '前半句',
|
||||||
result: { label: '后半句', hidden: true },
|
result: { label: '后半句', hidden: true },
|
||||||
@@ -1284,15 +1304,30 @@ export const toolboxItems = [
|
|||||||
{
|
{
|
||||||
key: 'holiday',
|
key: 'holiday',
|
||||||
name: '节假日查询',
|
name: '节假日查询',
|
||||||
desc: '查询指定年份公历、农历、节假日信息',
|
desc: '查询指定日期是否为节假日、调休日或工作日',
|
||||||
icon: 'i-carbon-calendar',
|
icon: 'i-carbon-calendar',
|
||||||
autoQuery: true,
|
fields: [
|
||||||
fields: [],
|
{ key: 'date', label: '查询日期', type: 'text', maxlength: 30, placeholder: '如:2025-01-01 或 2025-10,留空查今天' },
|
||||||
|
{ key: 'type', label: '查询方式', type: 'radio', options: [
|
||||||
|
{ value: 0, label: '批量查询' },
|
||||||
|
{ value: 1, label: '按年' },
|
||||||
|
{ value: 2, label: '按月' },
|
||||||
|
{ value: 3, label: '按范围' },
|
||||||
|
], default: 0 },
|
||||||
|
],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
date: '日期',
|
date: '日期',
|
||||||
content: '节假日信息',
|
name: '节日名称',
|
||||||
|
info: '日期类型',
|
||||||
|
tip: '放假提示',
|
||||||
|
cnweekday: '星期',
|
||||||
|
lunaryear: '农历年',
|
||||||
|
lunarmonth: '农历月',
|
||||||
|
lunarday: '农历日',
|
||||||
|
wage: '薪资倍数',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1314,20 +1349,21 @@ export const toolboxItems = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'zone',
|
key: 'zone',
|
||||||
name: '地区编码查询',
|
name: '地区搜索',
|
||||||
desc: '查询省市区三级行政区划代码及名称',
|
desc: '搜索地区行政区划代码、天气ID及归属地',
|
||||||
icon: 'i-carbon-location',
|
icon: 'i-carbon-location',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'province', label: '省份', type: 'text', maxlength: 20, placeholder: '可选,如:北京' },
|
{ key: 'area', label: '地区名称', type: 'text', maxlength: 20, placeholder: '请输入地区名称,如:西安' },
|
||||||
{ key: 'city', label: '城市', type: 'text', maxlength: 20, placeholder: '可选,如:北京市' },
|
|
||||||
],
|
],
|
||||||
validate: () => true,
|
validate: (form) => (form.area || '').length > 0,
|
||||||
validateMsg: '',
|
validateMsg: '请输入地区名称',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
province: '省份',
|
adcode: '行政代码',
|
||||||
city: '城市',
|
areacn: '地区名称',
|
||||||
district: '区县',
|
citycn: '归属地市',
|
||||||
code: '编码',
|
provincecn: '归属省份',
|
||||||
|
areaid: '天气ID',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// ─── 第二批新增工具 ───
|
// ─── 第二批新增工具 ───
|
||||||
@@ -1336,12 +1372,18 @@ export const toolboxItems = [
|
|||||||
name: '时区查询',
|
name: '时区查询',
|
||||||
desc: '查询全球各时区的当前时间',
|
desc: '查询全球各时区的当前时间',
|
||||||
icon: 'i-carbon-time',
|
icon: 'i-carbon-time',
|
||||||
fields: [],
|
fields: [
|
||||||
validate: () => true,
|
{ key: 'word', label: '国家/地区', type: 'text', maxlength: 20, placeholder: '请输入国家或地区名,如:中国' },
|
||||||
validateMsg: '',
|
],
|
||||||
|
validate: (form) => (form.word || '').length > 0,
|
||||||
|
validateMsg: '请输入国家或地区名',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
zone: '时区',
|
country: '国家',
|
||||||
time: '时间',
|
countryen: '国家(英文)',
|
||||||
|
areaname: '地区',
|
||||||
|
timezone: '时区',
|
||||||
|
continent: '所属洲',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1356,7 +1398,17 @@ export const toolboxItems = [
|
|||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
city: '城市',
|
city: '城市',
|
||||||
time: '时间',
|
encity: '城市(英文)',
|
||||||
|
country: '国家',
|
||||||
|
encountry: '国家(英文)',
|
||||||
|
countrycode: '国家代码',
|
||||||
|
strtime: '当前时间',
|
||||||
|
week: '星期',
|
||||||
|
enweek: '星期(英文)',
|
||||||
|
nowmonth: '月份',
|
||||||
|
timeZone: '时区',
|
||||||
|
timestamp: '时间戳',
|
||||||
|
summertime: '夏令时',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1439,13 +1491,18 @@ export const toolboxItems = [
|
|||||||
desc: '查询汽车OBD故障码含义及解决方案',
|
desc: '查询汽车OBD故障码含义及解决方案',
|
||||||
icon: 'i-carbon-car',
|
icon: 'i-carbon-car',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'code', label: '故障码', type: 'text', maxlength: 10, placeholder: '请输入OBD故障码' },
|
{ key: 'code', label: '故障码', type: 'text', maxlength: 10, placeholder: '请输入OBD故障码,如:P267B' },
|
||||||
],
|
],
|
||||||
validate: (form) => (form.code || '').length > 0,
|
validate: (form) => (form.code || '').length > 0,
|
||||||
validateMsg: '请输入故障码',
|
validateMsg: '请输入故障码',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
code: '故障码',
|
code: '故障代码',
|
||||||
content: '含义',
|
zhnote: '中文含义',
|
||||||
|
ennote: '英文含义',
|
||||||
|
descr: '详细描述',
|
||||||
|
carmodel: '适用车型',
|
||||||
|
category: '故障范围',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1463,84 +1520,60 @@ export const toolboxItems = [
|
|||||||
content: '信息',
|
content: '信息',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'citylookup',
|
|
||||||
name: '城市查询',
|
|
||||||
desc: '查询城市基本信息及归属',
|
|
||||||
icon: 'i-carbon-location-filled',
|
|
||||||
fields: [
|
|
||||||
{ key: 'city', label: '城市名', type: 'text', maxlength: 20, placeholder: '请输入城市名' },
|
|
||||||
],
|
|
||||||
validate: (form) => (form.city || '').length > 0,
|
|
||||||
validateMsg: '请输入城市名',
|
|
||||||
resultLabels: {
|
|
||||||
city: '城市',
|
|
||||||
content: '信息',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'telecode',
|
key: 'telecode',
|
||||||
name: '电话区号',
|
name: '标准电码',
|
||||||
desc: '查询国内外电话区号',
|
desc: '查询汉字对应的标准电码(中文电码)',
|
||||||
icon: 'i-carbon-phone',
|
icon: 'i-carbon-phone',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'city', label: '城市', type: 'text', maxlength: 20, placeholder: '请输入城市名' },
|
{ key: 'city', label: '查询内容', type: 'text', maxlength: 20, placeholder: '请输入要查询的汉字或电码' },
|
||||||
],
|
],
|
||||||
validate: (form) => (form.city || '').length > 0,
|
validate: (form) => (form.city || '').length > 0,
|
||||||
validateMsg: '请输入城市名',
|
validateMsg: '请输入查询内容',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
city: '城市',
|
text: '汉字',
|
||||||
code: '区号',
|
code: '电码',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'charconvert',
|
key: 'charconvert',
|
||||||
name: '字符转换',
|
name: '简繁转换',
|
||||||
desc: '各种字符编码格式转换',
|
desc: '汉字简体与繁体相互转换',
|
||||||
icon: 'i-carbon-text-link',
|
icon: 'i-carbon-text-link',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'text', label: '待转换文本', type: 'textarea', placeholder: '请输入要转换的文本' },
|
{ key: 'text', label: '待转换文本', type: 'textarea', placeholder: '请输入要转换的文本' },
|
||||||
|
{ key: 'type', label: '转换类型', type: 'radio', options: [
|
||||||
|
{ value: 0, label: '转繁体' },
|
||||||
|
{ value: 1, label: '转简体' },
|
||||||
|
], default: 0 },
|
||||||
],
|
],
|
||||||
validate: (form) => (form.text || '').length > 0,
|
validate: (form) => (form.text || '').length > 0,
|
||||||
validateMsg: '请输入文本',
|
validateMsg: '请输入文本',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
text: '原文',
|
intext: '原文',
|
||||||
result: '转换结果',
|
outtext: '转换结果',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'checkipv6',
|
key: 'checkipv6',
|
||||||
name: 'IPv6检测',
|
name: 'IPv6检测',
|
||||||
desc: '检测IPv6地址格式及归属',
|
desc: '检测网站域名是否支持IPv6访问',
|
||||||
icon: 'i-carbon-network',
|
icon: 'i-carbon-network',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'ip', label: 'IPv6地址', type: 'text', maxlength: 50, placeholder: '请输入IPv6地址' },
|
{ key: 'domain', label: '域名', type: 'text', maxlength: 100, placeholder: '请输入要检测的域名' },
|
||||||
],
|
|
||||||
validate: (form) => (form.ip || '').length > 0,
|
|
||||||
validateMsg: '请输入IPv6地址',
|
|
||||||
resultLabels: {
|
|
||||||
ip: 'IP地址',
|
|
||||||
content: '信息',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'domainparse',
|
|
||||||
name: '域名解析',
|
|
||||||
desc: '域名Whois信息查询',
|
|
||||||
icon: 'i-carbon-globe',
|
|
||||||
fields: [
|
|
||||||
{ key: 'domain', label: '域名', type: 'text', maxlength: 100, placeholder: '请输入域名' },
|
|
||||||
],
|
],
|
||||||
validate: (form) => (form.domain || '').length > 0,
|
validate: (form) => (form.domain || '').length > 0,
|
||||||
validateMsg: '请输入域名',
|
validateMsg: '请输入域名',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
domain: '域名',
|
domain: '域名',
|
||||||
content: '解析信息',
|
ipv6: 'IPv6地址',
|
||||||
|
isipv6: { label: '支持状态', transform: (v) => Number(v) === 1 ? '支持' : '不支持' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'addressparse',
|
key: 'addressparse',
|
||||||
name: '地址解析',
|
name: '地址格式化',
|
||||||
desc: '智能地址格式化与解析',
|
desc: '智能地址格式化与解析',
|
||||||
icon: 'i-carbon-location',
|
icon: 'i-carbon-location',
|
||||||
fields: [
|
fields: [
|
||||||
@@ -1549,23 +1582,41 @@ export const toolboxItems = [
|
|||||||
validate: (form) => (form.address || '').length > 0,
|
validate: (form) => (form.address || '').length > 0,
|
||||||
validateMsg: '请输入地址',
|
validateMsg: '请输入地址',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
address: '地址',
|
province: '省份',
|
||||||
content: '解析结果',
|
city: '城市',
|
||||||
|
district: '区县',
|
||||||
|
detail: '详细地址',
|
||||||
|
name: '姓名',
|
||||||
|
mobile: '电话',
|
||||||
|
postcode: '邮编',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'areadata',
|
key: 'areadata',
|
||||||
name: '地区数据',
|
name: '行政区划',
|
||||||
desc: '各地区统计数据分析',
|
desc: '提供全国省、市、区、乡镇、村五级行政区划完整数据及编码查询。',
|
||||||
icon: 'i-carbon-chart-bar',
|
icon: 'i-carbon-chart-bar',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'area', label: '地区', type: 'text', maxlength: 20, placeholder: '请输入地区名' },
|
{ key: 'province', label: '省级ID', type: 'text', maxlength: 20, placeholder: '可选,获取市级列表示例:420000' },
|
||||||
|
{ key: 'city', label: '市级ID', type: 'text', maxlength: 20, placeholder: '可选,获取区县级列表示例:421100000000' },
|
||||||
|
{ key: 'county', label: '区县级ID', type: 'text', maxlength: 20, placeholder: '可选,获取乡镇级列表示例:421123000000' },
|
||||||
|
{ key: 'town', label: '乡镇级ID', type: 'text', maxlength: 20, placeholder: '可选,获取村级列表示例:421123100000' },
|
||||||
|
{ key: 'village', label: '社区村级ID', type: 'text', maxlength: 20, placeholder: '可选,获取上级信息示例:421123100212' },
|
||||||
],
|
],
|
||||||
validate: (form) => (form.area || '').length > 0,
|
validate: () => true,
|
||||||
validateMsg: '请输入地区名',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
area: '地区',
|
provincename: '省份',
|
||||||
content: '数据',
|
provinceid: '省份代码',
|
||||||
|
cityname: '城市',
|
||||||
|
cityid: '城市代码',
|
||||||
|
countyname: '区县',
|
||||||
|
countyid: '区县代码',
|
||||||
|
townname: '乡镇',
|
||||||
|
townid: '乡镇代码',
|
||||||
|
villagename: '社区/村',
|
||||||
|
villageid: '社区/村代码',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1673,6 +1724,7 @@ export const toolboxItems = [
|
|||||||
],
|
],
|
||||||
validate: (form) => (form.word || '').length > 0,
|
validate: (form) => (form.word || '').length > 0,
|
||||||
validateMsg: '请输入关键词',
|
validateMsg: '请输入关键词',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
title: '歌名',
|
title: '歌名',
|
||||||
content: '歌词',
|
content: '歌词',
|
||||||
@@ -1704,6 +1756,7 @@ export const toolboxItems = [
|
|||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '名句',
|
content: '名句',
|
||||||
|
source: '出处',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1716,7 +1769,8 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '解读',
|
targa: '牌面',
|
||||||
|
notes: '解读',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1776,6 +1830,7 @@ export const toolboxItems = [
|
|||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '解读',
|
content: '解读',
|
||||||
|
source: '出处',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1789,8 +1844,7 @@ export const toolboxItems = [
|
|||||||
validate: (form) => (form.word || '').length > 0,
|
validate: (form) => (form.word || '').length > 0,
|
||||||
validateMsg: '请输入汉字',
|
validateMsg: '请输入汉字',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
word: '汉字',
|
content: '简码内容',
|
||||||
code: '简码',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1804,6 +1858,7 @@ export const toolboxItems = [
|
|||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '民调数据',
|
content: '民调数据',
|
||||||
|
source: '来源',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1816,7 +1871,7 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '信息',
|
content: '人民币信息',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1829,7 +1884,9 @@ export const toolboxItems = [
|
|||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '名言',
|
saying: '名言',
|
||||||
|
source: '出处',
|
||||||
|
transl: '翻译',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1857,7 +1914,10 @@ export const toolboxItems = [
|
|||||||
validate: (form) => (form.context || '').length > 0,
|
validate: (form) => (form.context || '').length > 0,
|
||||||
validateMsg: '请输入上下文',
|
validateMsg: '请输入上下文',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '对话',
|
dialogue: '对话',
|
||||||
|
english: '英文',
|
||||||
|
source: '出处',
|
||||||
|
type: '类型',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1897,8 +1957,13 @@ export const toolboxItems = [
|
|||||||
validate: (form) => (form.city || '').length > 0,
|
validate: (form) => (form.city || '').length > 0,
|
||||||
validateMsg: '请输入城市名',
|
validateMsg: '请输入城市名',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
city: '城市',
|
area: '城市',
|
||||||
content: '空气质量',
|
aqi: '空气质量指数',
|
||||||
|
quality: '质量等级',
|
||||||
|
primary_pollutant: '首要污染物',
|
||||||
|
pm2_5: 'PM2.5',
|
||||||
|
pm10: 'PM10',
|
||||||
|
time: '发布时间',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1911,6 +1976,7 @@ export const toolboxItems = [
|
|||||||
],
|
],
|
||||||
validate: (form) => (form.name || '').length > 0,
|
validate: (form) => (form.name || '').length > 0,
|
||||||
validateMsg: '请输入宠物名称',
|
validateMsg: '请输入宠物名称',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
name: '宠物',
|
name: '宠物',
|
||||||
content: '知识',
|
content: '知识',
|
||||||
@@ -1955,6 +2021,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '文案',
|
content: '文案',
|
||||||
},
|
},
|
||||||
@@ -1968,6 +2035,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
content: '问候语',
|
content: '问候语',
|
||||||
},
|
},
|
||||||
@@ -1981,6 +2049,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
title: '故事名',
|
title: '故事名',
|
||||||
content: '内容',
|
content: '内容',
|
||||||
@@ -1995,6 +2064,7 @@ export const toolboxItems = [
|
|||||||
fields: [],
|
fields: [],
|
||||||
validate: () => true,
|
validate: () => true,
|
||||||
validateMsg: '',
|
validateMsg: '',
|
||||||
|
resultType: 'list',
|
||||||
resultLabels: {
|
resultLabels: {
|
||||||
title: '事件',
|
title: '事件',
|
||||||
content: '介绍',
|
content: '介绍',
|
||||||
@@ -2018,112 +2088,76 @@ export function getToolboxItem(key) {
|
|||||||
* areadata, mgjuzi, songci, story, qingshi, lajifenlei, domainparse, hanzipinyin, shorthistory
|
* areadata, mgjuzi, songci, story, qingshi, lajifenlei, domainparse, hanzipinyin, shorthistory
|
||||||
*/
|
*/
|
||||||
export const toolboxCategories = [
|
export const toolboxCategories = [
|
||||||
{
|
|
||||||
key: 'hot',
|
|
||||||
name: '热门推荐',
|
|
||||||
icon: 'i-carbon-fire',
|
|
||||||
color: '#ff6b35',
|
|
||||||
tools: [
|
|
||||||
'ip-location', 'phone-location', 'beijing-time', 'idcard-info',
|
|
||||||
'history-today', 'bank-card', 'password-strength', 'days-between-dates',
|
|
||||||
'file-size-format', 'text-stats', 'money-to-chinese', 'plate-parse',
|
|
||||||
'timezone', 'duoyinzi', 'worldtime', 'charconvert', 'hanzipinyin', 'checkipv6',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'fun',
|
|
||||||
name: '趣味问答',
|
|
||||||
icon: 'i-carbon-face-cool',
|
|
||||||
color: '#7b61ff',
|
|
||||||
tools: [
|
|
||||||
'idiom-quiz', 'poem-fill', 'caichengyu', 'naowan', 'zimi', 'riddle',
|
|
||||||
'slogan', 'cityriddle', 'caizimi', 'wenda', 'chengyujielong', 'decide', 'godreply',
|
|
||||||
'baiketiku', 'dialogue', 'tiangou', 'robotlog', 'story', 'zmsc', 'hsjz', 'targa',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'quotes',
|
|
||||||
name: '文案语录',
|
|
||||||
icon: 'i-carbon-chat',
|
|
||||||
color: '#f7ba1e',
|
|
||||||
tools: [
|
|
||||||
'caihongpi', 'dujitang', 'saylove', 'pyqwenan', 'one', 'proverb',
|
|
||||||
'sentence', 'verse', 'mingyan', 'dictum', 'rkl', 'duilian',
|
|
||||||
'dailytel', 'lzmy', 'cnmoney', 'zaowanwords', 'wananwords', 'huayu', 'mgjuzi',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'culture',
|
|
||||||
name: '诗词国学',
|
|
||||||
icon: 'i-carbon-book',
|
|
||||||
color: '#0fc6c2',
|
|
||||||
tools: [
|
|
||||||
'chengyu', 'poetry', 'yuanqu', 'xiehou', 'bcgm', 'gjdm',
|
|
||||||
'poetries', 'tianqishiju', 'pitlishi', 'mnpara', 'lunar', 'jieqi',
|
|
||||||
'moodpoetry', 'qingshi', 'songci', 'shijing', 'duishici', 'msdl', 'flmj', 'shorthistory',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'astro',
|
|
||||||
name: '星座运势',
|
|
||||||
icon: 'i-carbon-star-filled',
|
|
||||||
color: '#f53f3f',
|
|
||||||
tools: [
|
|
||||||
'constellation', 'star', 'xingzuo', 'zodiac', 'blood', 'dob',
|
|
||||||
'jixiong', 'surname', 'cname', 'dream', 'skl',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'news',
|
|
||||||
name: '新闻热点',
|
|
||||||
icon: 'i-carbon-chart-line',
|
|
||||||
color: '#3491fa',
|
|
||||||
tools: [
|
|
||||||
'weibohot', 'nethot', 'bulletin', 'areanews', 'woman', 'wxnew',
|
|
||||||
'hotword', 'joke', 'wxhottopic', 'douyinhot', 'hotreview', 'gjmj',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'health',
|
|
||||||
name: '健康生活',
|
|
||||||
icon: 'i-carbon-favorite',
|
|
||||||
color: '#00b42a',
|
|
||||||
tools: [
|
|
||||||
'bmi', 'zhongyao', 'yaopin', 'caipu', 'garbage', 'healthskill',
|
|
||||||
'healthtip', 'nutrient', 'hotlajifenlei', 'qiaomen',
|
|
||||||
'anslajifenlei', 'lajifenlei', 'pet', 'aqi',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'learn',
|
|
||||||
name: '学习工具',
|
|
||||||
icon: 'i-carbon-language',
|
|
||||||
color: '#722ed1',
|
|
||||||
tools: [
|
|
||||||
'fanyi', 'everyday', 'pinyin', 'lexicon', 'jf-words', 'enwords',
|
|
||||||
'ensentence', 'ten-why', 'fairytales', 'duoyinzi', 'hanzipinyin', 'chaizi', 'xhzd',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'utility',
|
key: 'utility',
|
||||||
name: '实用查询',
|
name: '万象速查',
|
||||||
icon: 'i-carbon-search',
|
icon: 'i-carbon-search',
|
||||||
color: '#4e5969',
|
color: '#4e5969',
|
||||||
tools: [
|
tools: [
|
||||||
'fxrate', 'oilprice', 'holiday', 'shares', 'jtwfcode', 'domain',
|
'ip-location', 'idcard-info', 'phone-location', 'beijing-time', 'bank-card',
|
||||||
'zone', 'scenic', 'timezone', 'worldtime', 'obdcode', 'chepai', 'citylookup',
|
'plate-parse', 'domain', 'domainparse', 'zone', 'areadata', 'citylookup', 'addressparse',
|
||||||
'telecode', 'charconvert', 'checkipv6', 'domainparse', 'addressparse', 'areadata',
|
'telecode', 'obdcode', 'charconvert', 'checkipv6', 'worldtime', 'timezone',
|
||||||
'shorthistory',
|
'shares', 'fxrate', 'oilprice', 'holiday', 'scenic', 'lunar', 'aqi',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'text',
|
key: 'text',
|
||||||
name: '文字处理',
|
name: '文韵工坊',
|
||||||
icon: 'i-carbon-text-font',
|
icon: 'i-carbon-text-font',
|
||||||
color: '#722ed1',
|
color: '#722ed1',
|
||||||
tools: [
|
tools: [
|
||||||
'text-stats', 'pinyin', 'hanzipinyin', 'duoyinzi', 'chaizi', 'charconvert',
|
'money-to-chinese', 'password-strength', 'days-between-dates', 'file-size-format',
|
||||||
'xhzd', 'hsjz',
|
'text-stats', 'pinyin', 'hanzipinyin', 'duoyinzi', 'chaizi', 'xhzd', 'jf-words',
|
||||||
|
'lexicon', 'enwords', 'ensentence', 'fanyi', 'dailytel', 'cnmoney',
|
||||||
|
'slogan', 'zimi',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'culture',
|
||||||
|
name: '墨韵知藏',
|
||||||
|
icon: 'i-carbon-book',
|
||||||
|
color: '#0fc6c2',
|
||||||
|
tools: [
|
||||||
|
'history-today', 'ten-why', 'duilian', 'gjdm', 'bcgm', 'idiom-quiz', 'poem-fill',
|
||||||
|
'fairytales', 'yuanqu', 'poetry', 'poetries', 'shijing', 'songci', 'verse',
|
||||||
|
'tianqishiju', 'chengyu', 'caichengyu', 'chengyujielong', 'pitlishi', 'riddle',
|
||||||
|
'cityriddle', 'caizimi', 'zimi', 'qingshi', 'flmj', 'xiehou', 'proverb', 'dictum',
|
||||||
|
'mingyan', 'sentence', 'mnpara', 'mgjuzi', 'duishici', 'msdl',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'fun',
|
||||||
|
name: '闲趣乐园',
|
||||||
|
icon: 'i-carbon-face-cool',
|
||||||
|
color: '#7b61ff',
|
||||||
|
tools: [
|
||||||
|
'jixiong', 'blood', 'zodiac', 'xingzuo', 'star', 'constellation', 'dob', 'saylove',
|
||||||
|
'caihongpi', 'dujitang', 'joke', 'naowan', 'wenda', 'decide', 'caipu', 'dream',
|
||||||
|
'rkl', 'godreply', 'tiangou', 'robotlog', 'dialogue', 'story', 'zmsc', 'targa',
|
||||||
|
'hsjz',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'life',
|
||||||
|
name: '人间百态',
|
||||||
|
icon: 'i-carbon-favorite',
|
||||||
|
color: '#00b42a',
|
||||||
|
tools: [
|
||||||
|
'everyday', 'woman', 'pyqwenan', 'healthskill', 'healthtip', 'nutrient',
|
||||||
|
'surname', 'jtwfcode', 'pet', 'bmi', 'zhongyao', 'yaopin', 'qiaomen',
|
||||||
|
'areanews', 'wxnew', 'wxhottopic', 'weibohot', 'nethot', 'hotword', 'hotreview',
|
||||||
|
'bulletin', 'douyinhot', 'zaowanwords', 'wananwords', 'caihongpi',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'search',
|
||||||
|
name: '知源检索',
|
||||||
|
icon: 'i-carbon-cloud-service-management',
|
||||||
|
color: '#3491fa',
|
||||||
|
tools: [
|
||||||
|
'one', 'proverb', 'slogan', 'chengyu', 'lexicon', 'cnmoney', 'lzmy', 'baiketiku',
|
||||||
|
'gjmj', 'shares', 'hotlajifenlei', 'garbage', 'lajifenlei', 'anslajifenlei',
|
||||||
|
'hotreview',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ interface ReviewItem {
|
|||||||
content: string
|
content: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type QuerySection = 'free' | 'paid'
|
||||||
|
|
||||||
const caseList = ref<CaseItem[]>([
|
const caseList = ref<CaseItem[]>([
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
@@ -41,6 +43,8 @@ const caseList = ref<CaseItem[]>([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const vehicleItems = computed(() => getInquireCategoryConfig('vehicle')?.items ?? [])
|
const vehicleItems = computed(() => getInquireCategoryConfig('vehicle')?.items ?? [])
|
||||||
|
const freeToolboxCategories = computed(() => toolboxCategories)
|
||||||
|
const activeQuerySection = ref<QuerySection>('paid')
|
||||||
|
|
||||||
const reviewList = ref<ReviewItem[]>([
|
const reviewList = ref<ReviewItem[]>([
|
||||||
{
|
{
|
||||||
@@ -59,6 +63,10 @@ function reviewInitial(name: string) {
|
|||||||
return name.slice(0, 1) || '?'
|
return name.slice(0, 1) || '?'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function switchQuerySection(section: QuerySection) {
|
||||||
|
activeQuerySection.value = section
|
||||||
|
}
|
||||||
|
|
||||||
function goInquireFeature(feature: string) {
|
function goInquireFeature(feature: string) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/inquire/index?feature=${encodeURIComponent(feature)}`,
|
url: `/pages/inquire/index?feature=${encodeURIComponent(feature)}`,
|
||||||
@@ -104,89 +112,130 @@ function goCategory(categoryKey: string) {
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="main-query">
|
<view class="card query-zone">
|
||||||
<view class="main-left card card-img-wrap" @tap="goVinClaim">
|
|
||||||
<image
|
|
||||||
class="main-left-img"
|
|
||||||
src="/static/home/images/VIN.png"
|
|
||||||
mode="widthFix"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="main-right">
|
|
||||||
<view class="card card-img-wrap small-card-img" @tap="goVinMaintain">
|
|
||||||
<image
|
|
||||||
class="main-right-img"
|
|
||||||
src="/static/home/images/VIN2.png"
|
|
||||||
mode="aspectFill"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<view class="card card-img-wrap small-card-img" @tap="goEvHealth">
|
|
||||||
<image
|
|
||||||
class="main-right-img"
|
|
||||||
src="/static/home/images/VIN3.png"
|
|
||||||
mode="aspectFill"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view
|
|
||||||
v-for="cat in toolboxCategories"
|
|
||||||
:key="cat.key"
|
|
||||||
class="card"
|
|
||||||
>
|
|
||||||
<view class="card-header">
|
|
||||||
<view class="card-header-left">
|
|
||||||
<view class="cat-badge" :style="{ background: `${cat.color}15` }">
|
|
||||||
<view :class="['cat-badge-icon', cat.icon]" :style="{ color: cat.color }" />
|
|
||||||
</view>
|
|
||||||
<text class="card-title">{{ cat.name }}</text>
|
|
||||||
</view>
|
|
||||||
<text class="card-more-link" @tap="goCategory(cat.key)">
|
|
||||||
查看更多
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="inq-grid">
|
|
||||||
<view
|
|
||||||
v-for="item in getCategoryHotTools(cat.key)"
|
|
||||||
:key="item.key"
|
|
||||||
class="inq-cell"
|
|
||||||
@tap="goToolboxItem(item.key)"
|
|
||||||
>
|
|
||||||
<view class="inq-icon-custom" :style="{ color: cat.color }">
|
|
||||||
<view :class="item.icon" />
|
|
||||||
</view>
|
|
||||||
<text class="inq-name">{{ item.name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="card">
|
|
||||||
<view class="card-header">
|
<view class="card-header">
|
||||||
<text class="card-title">
|
<text class="card-title">
|
||||||
车辆查询
|
查询专区
|
||||||
</text>
|
</text>
|
||||||
<text class="card-sub">
|
<text class="card-sub">
|
||||||
请选择查询类型
|
免费工具 / 付费车况
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="inq-grid">
|
<view class="query-section-grid">
|
||||||
<view
|
<view
|
||||||
v-for="item in vehicleItems"
|
class="query-section-card"
|
||||||
:key="item.feature"
|
:class="{ active: activeQuerySection === 'free' }"
|
||||||
class="inq-cell"
|
@tap="switchQuerySection('free')"
|
||||||
@tap="goInquireFeature(item.feature)"
|
|
||||||
>
|
>
|
||||||
<image
|
<text class="query-section-label">
|
||||||
class="inq-icon"
|
免费查询
|
||||||
:src="getInquiryItemIconUrl(item)"
|
</text>
|
||||||
mode="aspectFit"
|
<text class="query-section-desc">
|
||||||
/>
|
点击查看工具分类
|
||||||
<text class="inq-name">{{ item.name }}</text>
|
</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="query-section-card"
|
||||||
|
:class="{ active: activeQuerySection === 'paid' }"
|
||||||
|
@tap="switchQuerySection('paid')"
|
||||||
|
>
|
||||||
|
<text class="query-section-label">
|
||||||
|
付费查询
|
||||||
|
</text>
|
||||||
|
<text class="query-section-desc">
|
||||||
|
车辆出险 / 维保等
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<template v-if="activeQuerySection === 'paid'">
|
||||||
|
<view class="main-query">
|
||||||
|
<view class="main-left card card-img-wrap" @tap="goVinClaim">
|
||||||
|
<image
|
||||||
|
class="main-left-img"
|
||||||
|
src="/static/home/images/VIN.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="main-right">
|
||||||
|
<view class="card card-img-wrap small-card-img" @tap="goVinMaintain">
|
||||||
|
<image
|
||||||
|
class="main-right-img"
|
||||||
|
src="/static/home/images/VIN2.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="card card-img-wrap small-card-img" @tap="goEvHealth">
|
||||||
|
<image
|
||||||
|
class="main-right-img"
|
||||||
|
src="/static/home/images/VIN3.png"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card">
|
||||||
|
<view class="card-header">
|
||||||
|
<text class="card-title">
|
||||||
|
车辆查询
|
||||||
|
</text>
|
||||||
|
<text class="card-sub">
|
||||||
|
请选择查询类型
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="inq-grid">
|
||||||
|
<view
|
||||||
|
v-for="item in vehicleItems"
|
||||||
|
:key="item.feature"
|
||||||
|
class="inq-cell"
|
||||||
|
@tap="goInquireFeature(item.feature)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
class="inq-icon"
|
||||||
|
:src="getInquiryItemIconUrl(item)"
|
||||||
|
mode="aspectFit"
|
||||||
|
/>
|
||||||
|
<text class="inq-name">{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<view
|
||||||
|
v-for="cat in freeToolboxCategories"
|
||||||
|
:key="cat.key"
|
||||||
|
class="card"
|
||||||
|
>
|
||||||
|
<view class="card-header">
|
||||||
|
<view class="card-header-left">
|
||||||
|
<view class="cat-badge" :style="{ background: `${cat.color}15` }">
|
||||||
|
<view :class="['cat-badge-icon', cat.icon]" :style="{ color: cat.color }" />
|
||||||
|
</view>
|
||||||
|
<text class="card-title">{{ cat.name }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="card-more-link" @tap="goCategory(cat.key)">
|
||||||
|
查看更多
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="inq-grid">
|
||||||
|
<view
|
||||||
|
v-for="item in getCategoryHotTools(cat.key)"
|
||||||
|
:key="item.key"
|
||||||
|
class="inq-cell"
|
||||||
|
@tap="goToolboxItem(item.key)"
|
||||||
|
>
|
||||||
|
<view class="inq-icon-custom" :style="{ color: cat.color }">
|
||||||
|
<view :class="item.icon" />
|
||||||
|
</view>
|
||||||
|
<text class="inq-name">{{ item.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card-header">
|
<view class="card-header">
|
||||||
<text class="card-title">
|
<text class="card-title">
|
||||||
@@ -277,6 +326,44 @@ function goCategory(categoryKey: string) {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.query-zone {
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-section-grid {
|
||||||
|
display: flex;
|
||||||
|
gap: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-section-card {
|
||||||
|
flex: 1;
|
||||||
|
padding: 24rpx 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background: #f7f8fa;
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-section-card.active {
|
||||||
|
background: linear-gradient(145deg, #eef4ff 0%, #f5f8ff 100%);
|
||||||
|
border-color: #1768ff;
|
||||||
|
box-shadow: 0 12rpx 24rpx rgba(23, 104, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-section-label {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1d2129;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-section-desc {
|
||||||
|
display: block;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #86909c;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background: linear-gradient(145deg, #ffffff 0%, #f7f8ff 100%);
|
background: linear-gradient(145deg, #ffffff 0%, #f7f8ff 100%);
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { onLoad } from '@dcloudio/uni-app'
|
|||||||
import { computed, onUnmounted, ref } from 'vue'
|
import { computed, onUnmounted, ref } from 'vue'
|
||||||
import { getProductByEn, getUserDetail, postAuthSendSmsQuery, postPayPayment, postQueryService, postUploadImage } from '@/api'
|
import { getProductByEn, getUserDetail, postAuthSendSmsQuery, postPayPayment, postQueryService, postUploadImage } from '@/api'
|
||||||
import { productHasSmsCode, useInquireForm } from '@/composables/useInquireForm'
|
import { productHasSmsCode, useInquireForm } from '@/composables/useInquireForm'
|
||||||
import { aesEncrypt, QUERY_PAYLOAD_AES_HEX_KEY } from '@/utils/crypto'
|
import { aesEncrypt, QUERY_PAYLOAD_AES_HEX_KEY } from '@/utils/crypto.js'
|
||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
style: {
|
style: {
|
||||||
|
|||||||
@@ -167,6 +167,21 @@ const resultList = computed(() => {
|
|||||||
return list
|
return list
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const subResultList = computed(() => {
|
||||||
|
if (!result.value || !tool.value?.subResultKey || !tool.value?.subResultLabels)
|
||||||
|
return []
|
||||||
|
const sub = result.value[tool.value.subResultKey]
|
||||||
|
if (!Array.isArray(sub))
|
||||||
|
return []
|
||||||
|
return sub
|
||||||
|
})
|
||||||
|
|
||||||
|
const subResultLabelEntries = computed(() => {
|
||||||
|
if (!tool.value?.subResultLabels)
|
||||||
|
return []
|
||||||
|
return Object.entries(tool.value.subResultLabels)
|
||||||
|
})
|
||||||
|
|
||||||
const listLabelEntries = computed(() => {
|
const listLabelEntries = computed(() => {
|
||||||
if (!tool.value?.resultLabels)
|
if (!tool.value?.resultLabels)
|
||||||
return []
|
return []
|
||||||
@@ -188,9 +203,22 @@ const listLabelEntries = computed(() => {
|
|||||||
<view v-for="field in tool.fields" :key="field.key" class="field">
|
<view v-for="field in tool.fields" :key="field.key" class="field">
|
||||||
<text class="field-label">{{ field.label }}</text>
|
<text class="field-label">{{ field.label }}</text>
|
||||||
|
|
||||||
|
<!-- 按钮切换 (Radio) -->
|
||||||
|
<view v-if="field.type === 'radio'" class="field-radio-group">
|
||||||
|
<view
|
||||||
|
v-for="opt in field.options"
|
||||||
|
:key="opt.value"
|
||||||
|
class="radio-item"
|
||||||
|
:class="{ active: (form[field.key] ?? field.default) === opt.value }"
|
||||||
|
@tap="form[field.key] = opt.value"
|
||||||
|
>
|
||||||
|
{{ opt.label }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 选择框 -->
|
<!-- 选择框 -->
|
||||||
<picker
|
<picker
|
||||||
v-if="field.type === 'select'"
|
v-else-if="field.type === 'select'"
|
||||||
mode="selector"
|
mode="selector"
|
||||||
:range="field.options.map(opt => opt.label)"
|
:range="field.options.map(opt => opt.label)"
|
||||||
:value="getSelectIndex(field, form[field.key])"
|
:value="getSelectIndex(field, form[field.key])"
|
||||||
@@ -286,6 +314,31 @@ const listLabelEntries = computed(() => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 结果展示 - 子列表型 (如油价明细) -->
|
||||||
|
<view v-if="subResultList.length > 0" class="result-area">
|
||||||
|
<view class="result-title">详细列表</view>
|
||||||
|
<view class="result-card-list">
|
||||||
|
<view
|
||||||
|
v-for="(item, idx) in subResultList"
|
||||||
|
:key="idx"
|
||||||
|
class="result-card-item"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="([fieldKey, fieldLabel], fIdx) in subResultLabelEntries"
|
||||||
|
:key="fieldKey"
|
||||||
|
class="card-item-row"
|
||||||
|
>
|
||||||
|
<template v-if="item[fieldKey] !== undefined && item[fieldKey] !== ''">
|
||||||
|
<text v-if="fIdx === 0" class="card-item-index">{{ idx + 1 }}</text>
|
||||||
|
<text v-else class="card-item-index-placeholder" />
|
||||||
|
<text class="card-item-field-label">{{ typeof fieldLabel === 'object' ? fieldLabel.label : fieldLabel }}</text>
|
||||||
|
<text class="card-item-field-value">{{ item[fieldKey] }}</text>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 结果展示 - 列表型 -->
|
<!-- 结果展示 - 列表型 -->
|
||||||
<view v-if="resultList.length > 0" class="result-area">
|
<view v-if="resultList.length > 0" class="result-area">
|
||||||
<view class="result-title">查询结果</view>
|
<view class="result-title">查询结果</view>
|
||||||
@@ -386,6 +439,34 @@ const listLabelEntries = computed(() => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.field-radio-group {
|
||||||
|
display: flex;
|
||||||
|
gap: 16rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-item {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 140rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #f7f8fa;
|
||||||
|
border: 1rpx solid #e5e6f0;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #4e5969;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-item.active {
|
||||||
|
background: #e8f3ff;
|
||||||
|
border-color: #1768ff;
|
||||||
|
color: #1768ff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
.field-picker {
|
.field-picker {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import CryptoJS from 'crypto-js'
|
import CryptoJS from 'crypto-js'
|
||||||
|
|
||||||
/** 与 tyc-webview-v2 `utils/crypto.js` 一致:AES-CBC,IV 前置后 Base64 */
|
/** 与 tyc-webview-v2 `utils/crypto.js` 一致:AES-CBC,IV 前置后 Base64 */
|
||||||
export function aesEncrypt(plainText: string, hexKey: string): string {
|
export function aesEncrypt(plainText, hexKey) {
|
||||||
const key = CryptoJS.enc.Hex.parse(hexKey)
|
const key = CryptoJS.enc.Hex.parse(hexKey)
|
||||||
const iv = generateRandomIV()
|
const iv = generateRandomIV()
|
||||||
const encrypted = CryptoJS.AES.encrypt(plainText, key, {
|
const encrypted = CryptoJS.AES.encrypt(plainText, key, {
|
||||||
@@ -14,7 +14,7 @@ export function aesEncrypt(plainText: string, hexKey: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generateRandomIV() {
|
function generateRandomIV() {
|
||||||
const iv: number[] = []
|
const iv = []
|
||||||
for (let i = 0; i < 16; i++)
|
for (let i = 0; i < 16; i++)
|
||||||
iv.push(Math.floor(Math.random() * 256))
|
iv.push(Math.floor(Math.random() * 256))
|
||||||
return CryptoJS.enc.Hex.parse(iv.map(b => b.toString(16).padStart(2, '0')).join(''))
|
return CryptoJS.enc.Hex.parse(iv.map(b => b.toString(16).padStart(2, '0')).join(''))
|
||||||
Reference in New Issue
Block a user