From ff36d048b287f6d9c3f655c9cdd1394c95553894 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 7 Jan 2025 09:03:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E8=A7=A3=E5=AF=86=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=88=B0app=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/encryptUtil.js | 65 ++------------------------------------------ 1 file changed, 2 insertions(+), 63 deletions(-) diff --git a/utils/encryptUtil.js b/utils/encryptUtil.js index c1b1f31..5023b89 100644 --- a/utils/encryptUtil.js +++ b/utils/encryptUtil.js @@ -1,64 +1,3 @@ -import { SM4 } from 'gm-crypto' -import {encryptKey} from '@/commons/config.js' - -let HEX_KEY = null - -// 字符串转16进制 -function str2hex(str) { - var val = '' - for (var i = 0; i < str.length; i++) { - if (val == '') - val = str.charCodeAt(i).toString(16) - else - val += str.charCodeAt(i).toString(16) - } - val += '' - return val -} - -// 获取hex秘钥 -function getHexKey(){ - - if(!HEX_KEY){ - - HEX_KEY = str2hex(encryptKey) - - } - return HEX_KEY -} - - -// 解密 (http响应数据, 做通用处理) export function sm4DecryptByResData(data){ - - if(!data){ - return data - } - - let res = SM4.decrypt(data, getHexKey(), { - inputEncoding: 'base64', - outputEncoding: 'utf8' - }) - - if(!res){ - return res - } - - return JSON.parse(res)['originData'] -} - -// 加密 (http响应数据, 做通用处理) -export function sm4EncryptByReqData(data){ - if(!data){ - return data - } - - // 加密处理 - let encryptData = SM4.encrypt(JSON.stringify(data), getHexKey(), { - inputEncoding: 'utf8', - outputEncoding: 'base64' - }) - - return {encryptData : encryptData} -} - + return data +} \ No newline at end of file From 4326e4ff70b0a9e91a2a2ba9b0a45d7af6142410 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 7 Jan 2025 09:03:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/config.js b/commons/config.js index 0634ca3..447803e 100644 --- a/commons/config.js +++ b/commons/config.js @@ -13,7 +13,7 @@ export const h5Config = { export const AppConfig = { production: 'https://dj-api.hnsiyao.cn', - test: 'https://video-h5.hnsiyao.cn', + test: 'https://web-api.hnsiyao.cn', local: 'http://192.168.1.41:8100' } From c78c4875c86e6340d4e8845857da3dbd858ba272 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 7 Jan 2025 09:04:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .hbuilderx/launch.json | 9 +++++++++ manifest.json | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .hbuilderx/launch.json diff --git a/.gitignore b/.gitignore index cfad2d1..f1315a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules/ /unpackage/ /unpackage/dist/ +/unpackage/dist/cache/ diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..1b8d0f6 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,9 @@ +{ + "version" : "1.0", + "configurations" : [ + { + "playground" : "custom", + "type" : "uni-app:app-android" + } + ] +} diff --git a/manifest.json b/manifest.json index 6013768..175630e 100644 --- a/manifest.json +++ b/manifest.json @@ -54,7 +54,8 @@ "NSPhotoLibraryUsageDescription" : "获取您的相册读取权限,目的是为了在我的资料页面使用相册读取功能,修改上传头像", "NSCameraUsageDescription" : "获取您的摄像头权限,目的是为了在我的资料页面使用摄像头功能,修改上传头像" }, - "urltypes" : "com.hnsiyao.duanju" + "urltypes" : "com.hnsiyao.duanju", + "dSYMs" : false }, /* SDK配置 */ "sdkConfigs" : {