refactor(http): rename platform info variables to camelCase
统一将平台信息相关变量从下划线命名改为驼峰命名,保持代码命名风格一致,同时修正请求参数中对应字段的赋值。
This commit is contained in:
@@ -3,7 +3,7 @@ import Util from './util.js'
|
|||||||
import store from '@/store/index.js'
|
import store from '@/store/index.js'
|
||||||
import Platform from './platform.js'
|
import Platform from './platform.js'
|
||||||
|
|
||||||
const { app_type, app_type_name } = Platform.getPlatformInfo();
|
const { appType, appTypeName } = Platform.getPlatformInfo();
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
sendRequest(params) {
|
sendRequest(params) {
|
||||||
@@ -16,11 +16,11 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var method = params.data != undefined ? 'POST' : 'GET', // 请求方式
|
var method = params.data != undefined ? 'POST' : 'GET',
|
||||||
url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'), // 请求路径
|
url = (Config.baseUrl + params.url).replace(/(?<!:)\/+/g, '/'),
|
||||||
data = {
|
data = {
|
||||||
app_type,
|
app_type: appType,
|
||||||
app_type_name
|
app_type_name: appTypeName
|
||||||
};
|
};
|
||||||
|
|
||||||
// token
|
// token
|
||||||
|
|||||||
Reference in New Issue
Block a user