|
@@ -242,7 +242,10 @@ service.interceptors.response.use(
|
|
|
*/
|
|
*/
|
|
|
export function GET<T>(url: string, data?: any, config?: any): Promise<T> {
|
|
export function GET<T>(url: string, data?: any, config?: any): Promise<T> {
|
|
|
return service.get(url, {
|
|
return service.get(url, {
|
|
|
- params: data,
|
|
|
|
|
|
|
+ params: {
|
|
|
|
|
+ ...data,
|
|
|
|
|
+ machine_type:1,
|
|
|
|
|
+ },
|
|
|
loading: config?.loading ?? false,
|
|
loading: config?.loading ?? false,
|
|
|
showErrorMessage: config?.showErrorMessage ?? true,
|
|
showErrorMessage: config?.showErrorMessage ?? true,
|
|
|
});
|
|
});
|
|
@@ -258,7 +261,10 @@ export function GET<T>(url: string, data?: any, config?: any): Promise<T> {
|
|
|
* @returns {Promise<T>} 返回一个 Promise,解析为响应数据
|
|
* @returns {Promise<T>} 返回一个 Promise,解析为响应数据
|
|
|
*/
|
|
*/
|
|
|
export function POST<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T> {
|
|
export function POST<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T> {
|
|
|
- return service.post(url, data, {
|
|
|
|
|
|
|
+ return service.post(url, {
|
|
|
|
|
+ ...data,
|
|
|
|
|
+ machine_type:1,
|
|
|
|
|
+ }, {
|
|
|
...config,
|
|
...config,
|
|
|
loading: config?.loading ?? true,
|
|
loading: config?.loading ?? true,
|
|
|
showErrorMessage: config?.showErrorMessage ?? true,
|
|
showErrorMessage: config?.showErrorMessage ?? true,
|