From 6837a5d93467f0c8e0a608a4304b942d7f9584f7 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Wed, 27 May 2026 17:18:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20platform.js=20?= =?UTF-8?q?=E4=B8=8E=20http.js/util.js=20=E4=B9=8B=E9=97=B4=20app=5Ftype/a?= =?UTF-8?q?pp=5Ftype=5Fname=20=E5=8F=98=E9=87=8F=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E5=8C=B9=E9=85=8D=E5=AF=BC=E8=87=B4=E7=9A=84=20undefi?= =?UTF-8?q?ned=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - http.js: 修正 getPlatformInfo() 解构赋值为 appType/appTypeName - http.js: 修复 headimgBase64、headimgPull、upload 方法中的变量引用 - util.js: 修正 upload 方法中的解构赋值和变量引用 此问题导致所有 API 请求中 app_type 和 app_type_name 参数均为 undefined --- common/js/http.js | 12 ++++++------ common/js/util.js | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/js/http.js b/common/js/http.js index 1b46061..3749e46 100644 --- a/common/js/http.js +++ b/common/js/http.js @@ -164,8 +164,8 @@ export default { 'content-type': 'application/x-www-form-urlencoded;application/json' }, data: { - app_type, - app_type_name, + app_type: appType, + app_type_name: appTypeName, images: params.base64 }, dataType: 'json', @@ -186,8 +186,8 @@ export default { 'content-type': 'application/x-www-form-urlencoded;application/json' }, data: { - app_type, - app_type_name, + app_type: appType, + app_type_name: appTypeName, path: params.path }, dataType: 'json', @@ -207,8 +207,8 @@ export default { name: params.name || 'file', fileType: params.fileType || 'image', formData: { - app_type, - app_type_name, + app_type: appType, + app_type_name: appTypeName, }, header: { 'content-type': 'application/x-www-form-urlencoded;application/json' diff --git a/common/js/util.js b/common/js/util.js index cc2678a..3c38cb4 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -382,11 +382,11 @@ export default { * @param url */ upload: function (num, params, callback, url) { - const { app_type, app_type_name } = Platform.getPlatformInfo(); + const { appType, appTypeName } = Platform.getPlatformInfo(); var data = { token: store.state.token, - app_type: app_type, - app_type_name: app_type_name + app_type: appType, + app_type_name: appTypeName } data = Object.assign(data, params);