diff --git a/package.json b/package.json index 92c8acc..b9142b2 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,16 @@ "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", "axios": "^1.6.2", + "colord": "^2.9.3", "default-passive-events": "^2.0.0", "echarts": "^5.5.0", "element-plus": "^2.4.2", + "figlet": "^1.7.0", "highlight.js": "^11.9.0", "html2canvas": "^1.4.1", "imorse": "^1.0.0", + "jwt-decode": "^4.0.0", + "lodash": "^4.17.21", "prismjs": "^1.29.0", "qrcode-vue3": "^1.6.8", "sass": "^1.69.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44d11f4..402612b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ dependencies: axios: specifier: ^1.6.2 version: 1.6.2 + colord: + specifier: ^2.9.3 + version: 2.9.3 default-passive-events: specifier: ^2.0.0 version: 2.0.0 @@ -62,6 +65,9 @@ dependencies: element-plus: specifier: ^2.4.2 version: 2.4.3(vue@3.3.10) + figlet: + specifier: ^1.7.0 + version: 1.7.0 highlight.js: specifier: ^11.9.0 version: 11.9.0 @@ -71,6 +77,12 @@ dependencies: imorse: specifier: ^1.0.0 version: 1.0.0 + jwt-decode: + specifier: ^4.0.0 + version: 4.0.0 + lodash: + specifier: ^4.17.21 + version: 4.17.21 prismjs: specifier: ^1.29.0 version: 1.29.0 @@ -2109,6 +2121,10 @@ packages: dev: false optional: true + /colord@2.9.3: + resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} + dev: false + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true @@ -2853,8 +2869,8 @@ packages: resolution: {integrity: sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==} dev: false - /dompurify@3.0.6: - resolution: {integrity: sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==} + /dompurify@3.1.4: + resolution: {integrity: sha512-2gnshi6OshmuKil8rMZuQCGiUF3cUxHY3NGDzUAdUx/NPEe5DVnO8BDoAQouvgwnx0R/+a6jUn36Z0FSdq8vww==} dev: false /domutils@1.7.0: @@ -3309,6 +3325,12 @@ packages: pend: 1.2.0 dev: false + /figlet@1.7.0: + resolution: {integrity: sha512-gO8l3wvqo0V7wEFLXPbkX83b7MVjRrk1oRLfYlZXol8nEpb/ON9pcKLI4qpBv5YtOTfrINtqb7b40iYY2FTWFg==} + engines: {node: '>= 0.4.0'} + hasBin: true + dev: false + /figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -4188,6 +4210,11 @@ packages: dev: false optional: true + /jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + dev: false + /katex@0.13.24: resolution: {integrity: sha512-jZxYuKCma3VS5UuxOx/rFV1QyGSl3Uy/i0kTJF3HgQ5xMinCQVF8Zd4bMY/9aI9b9A2pjIBOsjSSm68ykTAr8w==} hasBin: true @@ -4533,7 +4560,7 @@ packages: d3-sankey: 0.12.3 dagre-d3-es: 7.0.10 dayjs: 1.11.10 - dompurify: 3.0.6 + dompurify: 3.1.4 elkjs: 0.8.2 khroma: 2.1.0 lodash-es: 4.17.21 diff --git a/public/images/logo/HtmlEntity.png b/public/images/logo/HtmlEntity.png new file mode 100644 index 0000000..f612ae2 Binary files /dev/null and b/public/images/logo/HtmlEntity.png differ diff --git a/public/images/logo/ascii_word_pic.png b/public/images/logo/ascii_word_pic.png new file mode 100644 index 0000000..47dbe5a Binary files /dev/null and b/public/images/logo/ascii_word_pic.png differ diff --git a/public/images/logo/color_picker.png b/public/images/logo/color_picker.png new file mode 100644 index 0000000..a20d355 Binary files /dev/null and b/public/images/logo/color_picker.png differ diff --git a/public/images/logo/http_code.png b/public/images/logo/http_code.png new file mode 100644 index 0000000..80535a9 Binary files /dev/null and b/public/images/logo/http_code.png differ diff --git a/public/images/logo/jwt_parse.png b/public/images/logo/jwt_parse.png new file mode 100644 index 0000000..196165f Binary files /dev/null and b/public/images/logo/jwt_parse.png differ diff --git a/src/components/Tools/ASCIIWordPic/ASCIIWordPic.vue b/src/components/Tools/ASCIIWordPic/ASCIIWordPic.vue new file mode 100644 index 0000000..9566d94 --- /dev/null +++ b/src/components/Tools/ASCIIWordPic/ASCIIWordPic.vue @@ -0,0 +1,184 @@ + + + + + \ No newline at end of file diff --git a/src/components/Tools/ColorPicker/ColorPicker.vue b/src/components/Tools/ColorPicker/ColorPicker.vue new file mode 100644 index 0000000..e83e980 --- /dev/null +++ b/src/components/Tools/ColorPicker/ColorPicker.vue @@ -0,0 +1,248 @@ + + + + + \ No newline at end of file diff --git a/src/components/Tools/HtmlEntity/HtmlEntity.vue b/src/components/Tools/HtmlEntity/HtmlEntity.vue new file mode 100644 index 0000000..810fb10 --- /dev/null +++ b/src/components/Tools/HtmlEntity/HtmlEntity.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/src/components/Tools/HttpStatusCode/HttpStatusCode.vue b/src/components/Tools/HttpStatusCode/HttpStatusCode.vue new file mode 100644 index 0000000..3ec6bb8 --- /dev/null +++ b/src/components/Tools/HttpStatusCode/HttpStatusCode.vue @@ -0,0 +1,137 @@ + + + + + \ No newline at end of file diff --git a/src/components/Tools/JWT/JWT.vue b/src/components/Tools/JWT/JWT.vue new file mode 100644 index 0000000..18667a1 --- /dev/null +++ b/src/components/Tools/JWT/JWT.vue @@ -0,0 +1,98 @@ + + + + + \ No newline at end of file diff --git a/src/components/Tools/tools.ts b/src/components/Tools/tools.ts index 8dcac6e..fd98baa 100644 --- a/src/components/Tools/tools.ts +++ b/src/components/Tools/tools.ts @@ -13,7 +13,7 @@ export function getToolsCate() { title: '随机密码生成', logo: '/images/logo/keywords.png', desc: '密码生成器、随机字符串生成,批量生成', - url: '/random_password', + url: '/random_password/', cateId: 2, cate: '开发运维', }, @@ -22,7 +22,7 @@ export function getToolsCate() { title: 'URL编码/解码', logo: '/images/logo/url.png', desc: 'URL在线编码解码工具(UrlEncode编码 和 UrlDecode解码)', - url: '/urlencode', + url: '/urlencode/', cateId: 2, cate: '开发运维', }, @@ -31,7 +31,7 @@ export function getToolsCate() { title: 'UUID生成器', logo: '/images/logo/uuid.png', desc: '批量生成UUID', - url: '/uuid', + url: '/uuid/', cateId: 2, cate: '开发运维', }, @@ -40,7 +40,7 @@ export function getToolsCate() { title: '时间戳转换', logo: '/images/logo/Time.png', desc: '在线时间戳转换工具以及获取当前时间戳', - url: '/timetran', + url: '/timetran/', cateId: 2, cate: '开发运维', }, @@ -49,7 +49,7 @@ export function getToolsCate() { title: 'MD5在线加密', logo: '/images/logo/md5.png', desc: 'MD5在线加密,长度包含32位、16位', - url: '/MD5', + url: '/MD5/', cateId: 2, cate: '开发运维', }, @@ -58,7 +58,7 @@ export function getToolsCate() { title: 'Json在线转换', logo: '/images/logo/json.png', desc: '在线编辑json, 语法检查', - url: '/json', + url: '/json/', cateId: 2, cate: '开发运维', }, @@ -67,7 +67,7 @@ export function getToolsCate() { title: '正则测试工具', logo: '/images/logo/reg.png', desc: '正则表达式测试工具, 常用正则表达式', - url: '/reg', + url: '/reg/', cateId: 2, cate: '开发运维', }, @@ -76,7 +76,34 @@ export function getToolsCate() { title: 'Unicode转中文', logo: '/images/logo/union.png', desc: 'Unicode和中文的相互转换', - url: '/unicode', + url: '/unicode/', + cateId: 2, + cate: '开发运维', + }, + { + id: 1, + title: 'HTTP状态码', + logo: '/images/logo/http_code.png', + desc: 'http状态对应的名称和含义解释', + url: '/HttpStatusCode/', + cateId: 2, + cate: '开发运维', + }, + { + id: 1, + title: 'JWT解析', + logo: '/images/logo/jwt_parse.png', + desc: '解析和解码JSON Web Token(jwt)', + url: '/jwt/', + cateId: 2, + cate: '开发运维', + }, + { + id: 1, + title: 'html实体转义', + logo: '/images/logo/HtmlEntity.png', + desc: 'html实体转义,实体转义成html', + url: '/HtmlEntity/', cateId: 2, cate: '开发运维', } @@ -92,7 +119,7 @@ export function getToolsCate() { title: '文本对比', logo: '/images/logo/diff.png', desc: '文本差异比对支持中文、英文、代码比对', - url: '/diff', + url: '/diff/', cateId: 3, cate: '文本处理' }, @@ -101,7 +128,7 @@ export function getToolsCate() { title: 'markdown编辑器', logo: '/images/logo/file-markdown-fill.png', desc: '在线创建或编辑markdown, 实时预览,导出markdown', - url: '/markdown', + url: '/markdown/', cateId: 3, cate: '文本处理' }, @@ -110,7 +137,7 @@ export function getToolsCate() { title: '字数统计', logo: '/images/logo/wordCount.png', desc: '在线统计字符串的字数、段落、标点符号数量', - url: '/wordCount', + url: '/wordCount/', cateId: 3, cate: '文本处理', }, @@ -119,7 +146,16 @@ export function getToolsCate() { title: '文本去重', logo: '/images/logo/textRemoveDuplicate.png', desc: '可以删除或去除文本或字符串中的重复行', - url: '/textRemoveDuplicate', + url: '/textRemoveDuplicate/', + cateId: 3, + cate: '文本处理', + }, + { + id: 1, + title: 'ASCII字形生成器', + logo: '/images/logo/ascii_word_pic.png', + desc: '在线生成字形ASCII画', + url: '/asciiWordPic/', cateId: 3, cate: '文本处理', }, @@ -135,7 +171,7 @@ export function getToolsCate() { title: '单位换算', logo: '/images/logo/unit.png', desc: '在线重量、长度、面积、时间、角度、速度、温度、压力、热量、功率等换算', - url: '/unit', + url: '/unit/', cateId: 4, cate: '教育学术' }, @@ -144,7 +180,7 @@ export function getToolsCate() { title: '摩斯电码', logo: '/images/logo/medium.png', desc: '支持中文的摩斯电码编码解码', - url: '/morse', + url: '/morse/', cateId: 4, cate: '教育学术' }, @@ -153,7 +189,7 @@ export function getToolsCate() { title: '常用进制转换', logo: '/images/logo/scaletran.png', desc: '在线进制转换工具,可在2到64进制之间相互转换', - url: '/scaletran', + url: '/scaletran/', cateId: 4, cate: '教育学术', }, @@ -162,7 +198,7 @@ export function getToolsCate() { title: 'ASCII码表', logo: '/images/logo/ascii.png', desc: 'ASCII码表,控制代码、标准ASCII字符和非标准ASCII字符对照表', - url: '/ascii', + url: '/ascii/', cateId: 4, cate: '教育学术' }, @@ -178,7 +214,7 @@ export function getToolsCate() { title: '二维码生成', logo: '/images/logo/qrcode.png', desc: '在线生成带logo、透明、艺术的二维码', - url: '/qrcode', + url: '/qrcode/', cateId: 5, cate: '图片处理' }, @@ -187,7 +223,7 @@ export function getToolsCate() { title: '在线图片处理', logo: '/images/logo/img.png', desc: '在线图片裁剪,标注,滤镜,画等操作', - url: '/signimage', + url: '/signimage/', cateId: 5, cate: '图片处理', }, @@ -196,7 +232,7 @@ export function getToolsCate() { title: '文本转图片', logo: '/images/logo/text_to_img.png', desc: '把文本转换成图片,生成长图,具有超多个性文字排版', - url: '/textToImg', + url: '/textToImg/', cateId: 5, cate: '图片处理' }, @@ -205,7 +241,7 @@ export function getToolsCate() { title: '图片分割', logo: '/images/logo/imgCut.png', desc: '将图片分割成四宫格、九宫格、十六宫格,支持自定义行与列', - url: '/imgCut', + url: '/imgCut/', cateId: 5, cate: '图片处理', }, @@ -221,7 +257,7 @@ export function getToolsCate() { title: '柱状图', logo: '/images/logo/bar.png', desc: '在线制作柱状图,像做表格一样制作可视化图表,支持导出静态或动态图表', - url: '/bar', + url: '/bar/', cateId: 8, cate: '数据图表', },{ @@ -229,7 +265,7 @@ export function getToolsCate() { title: '折线图', logo: '/images/logo/line.png', desc: '在线制作折线图,像做表格一样制作可视化图表,支持导出静态或动态图表', - url: '/line', + url: '/line/', cateId: 8, cate: '数据图表', }, @@ -238,7 +274,7 @@ export function getToolsCate() { title: '饼图', logo: '/images/logo/pie.png', desc: '在线制作饼图,像做表格一样制作可视化图表,支持导出静态或动态图表', - url: '/pie', + url: '/pie/', cateId: 8, cate: '数据图表', }, @@ -247,7 +283,7 @@ export function getToolsCate() { title: '散点图', logo: '/images/logo/scatter.png', desc: '在线制作散点图,像做表格一样制作可视化图表,支持导出静态或动态图表', - url: '/scatter', + url: '/scatter/', cateId: 8, cate: '数据图表', } @@ -263,7 +299,7 @@ export function getToolsCate() { title: '生成随机数', logo: '/images/logo/random.png', desc: '可定制范围内进行随机数字,可用于抽奖、点名等用途', - url: '/random', + url: '/random/', cateId: 9, cate: '选择随机' }, @@ -272,7 +308,7 @@ export function getToolsCate() { title: '帮我决定', logo: '/images/logo/choose.png', desc: '选择困难,难以决定,今天吃什么,现在做什么,自定义选项都给你安排的明明白白', - url: '/decision', + url: '/decision/', cateId: 9, cate: '选择随机' }, @@ -281,7 +317,7 @@ export function getToolsCate() { title: '抛硬币', logo: '/images/logo/coin.png', desc: '在线抛硬币,选择困难那么交给硬币来帮你选择吧', - url: '/coin', + url: '/coin/', cateId: 9, cate: '选择随机', }, @@ -290,7 +326,7 @@ export function getToolsCate() { title: '投骰子', logo: '/images/logo/dice.png', desc: '在线投骰子,可自定义骰子数量,简单好用的骰子工具', - url: '/dice', + url: '/dice/', cateId: 9, cate: '选择随机', }, @@ -331,7 +367,7 @@ export function getToolsCate() { title: '数字转金额大写', logo: '/images/logo/numberToChinese.png', desc: '在线数字一键转换成人民币大写,中文大写转换数字', - url: '/numberToChinese', + url: '/numberToChinese/', cateId: 7, cate: '其他工具' }, @@ -340,7 +376,7 @@ export function getToolsCate() { title: '手持弹幕', logo: '/images/logo/dm.png', desc: '手持滚动弹幕', - url: '/barrage', + url: '/barrage/', cateId: 7, cate: '其他工具', }, @@ -349,7 +385,16 @@ export function getToolsCate() { title: '色板', logo: '/images/logo/palettes.png', desc: '包含纯色、渐变与阶梯色和常用色彩组合', - url: '/palettes', + url: '/palettes/', + cateId: 7, + cate: '其他工具' + }, + { + id: 1, + title: 'Color选择器', + logo: '/images/logo/color_picker.png', + desc: '颜色选择器、在各种颜色空间如十六进制、rgb、hsl、css等等之间转换颜色', + url: '/ColorPicker/', cateId: 7, cate: '其他工具' } diff --git a/src/router/router.ts b/src/router/router.ts index 467660e..2e45c18 100644 --- a/src/router/router.ts +++ b/src/router/router.ts @@ -341,6 +341,56 @@ export const constantRoute = [ description: '将图片分割成四宫格、九宫格、十六宫格,支持自定义行与列', } }, + { + path: '/HttpStatusCode', + component: () => import('@/components/Tools/HttpStatusCode/HttpStatusCode.vue'), + name: 'HttpStatusCode', + meta: { + title: "HTTP状态码", + keywords: 'http状态码', + description: '所有http状态对应的名称和含义解释', + } + }, + { + path: '/jwt', + component: () => import('@/components/Tools/JWT/JWT.vue'), + name: 'jwt', + meta: { + title: "JWT解析", + keywords: 'jwt解析,jwt解码,JSON Web Token解析', + description: '解析和解码JSON Web Token(jwt)', + } + }, + { + path: '/HtmlEntity', + component: () => import('@/components/Tools/HtmlEntity/HtmlEntity.vue'), + name: 'HtmlEntity', + meta: { + title: "html实体转义", + keywords: 'html实体转义', + description: 'html实体转义,实体转义成html', + } + }, + { + path: '/ColorPicker', + component: () => import('@/components/Tools/ColorPicker/ColorPicker.vue'), + name: 'ColorPicker', + meta: { + title: "Color选择器", + keywords: '颜色选择器,Color选择器', + description: '颜色选择器、在各种颜色空间如十六进制、rgb、hsl、css等等之间转换颜色', + } + }, + { + path: '/asciiWordPic', + component: () => import('@/components/Tools/ASCIIWordPic/ASCIIWordPic.vue'), + name: 'asciiWordPic', + meta: { + title: "Color选择器", + keywords: '颜色选择器,Color选择器', + description: '颜色选择器、在各种颜色空间如十六进制、rgb、hsl、css等等之间转换颜色', + } + }, // 关于 { path: '/about', diff --git a/src/store/modules/linux.ts b/src/store/modules/linux.ts deleted file mode 100644 index 559e9e6..0000000 --- a/src/store/modules/linux.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineStore } from 'pinia' -export const useUserStore = defineStore('linux', { - //用来存放变量 - state: () => ({ - - }), - //方法 - actions: { - //获取tools - async getCmds() { - //发送请求 - // const result: any = await getTools(data) - // if (result.code == 200) { - - // return result.message - // } else { - // return Promise.reject(new Error(result.message)) - // } - }, - } -}) \ No newline at end of file diff --git a/src/store/modules/tools.ts b/src/store/modules/tools.ts index 9b71db8..231b24e 100644 --- a/src/store/modules/tools.ts +++ b/src/store/modules/tools.ts @@ -25,23 +25,15 @@ export const useToolsStore = defineStore('tools', { async getTools(data: ToolsReqData) { //发送请求 const result: any = await getTools(data) - if (result.code == 200) { - this.list = result.data - return result.message - } else { - return Promise.reject(new Error(result.message)) - } + this.list = result + return result }, //获取tool info async getToolInfo(data: ToolsReqData) { //发送请求 const result: any = await getTools(data) - if (result.code == 200) { - this.toolInfo = result.data[0] - return result.message - } else { - return Promise.reject(new Error(result.message)) - } + this.toolInfo = result + return result }, //获取tools cate async getToolCate() {