refactor(http): rename platform info variables to camelCase

统一将平台信息相关变量从下划线命名改为驼峰命名,保持代码命名风格一致,同时修正请求参数中对应字段的赋值。
This commit is contained in:
2026-05-27 17:15:21 +08:00
parent e4c905d278
commit 474b3a1091

View File

@@ -3,7 +3,7 @@ import Util from './util.js'
import store from '@/store/index.js'
import Platform from './platform.js'
const { app_type, app_type_name } = Platform.getPlatformInfo();
const { appType, appTypeName } = Platform.getPlatformInfo();
export default {
sendRequest(params) {
@@ -16,11 +16,11 @@ export default {
return;
}
var method = params.data != undefined ? 'POST' : 'GET', // 请求方式
url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'), // 请求路径
var method = params.data != undefined ? 'POST' : 'GET',
url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'),
data = {
app_type,
app_type_name
app_type: appType,
app_type_name: appTypeName
};
// token