Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhangbo1_wd
2024-04-23 09:08:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f540a463f54050e7c40aa0347becbc38c037ce35
f540a463
1 parent
04b670a2
添加接口返回数据打印
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
sight_harmony/commons/wdNetwork/src/main/ets/http/AxiosRequest.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/AxiosRequest.ets
View file @
f540a46
...
...
@@ -5,6 +5,7 @@ import axios, {
HttpStatusCode,
InternalAxiosRequestConfig
} from '@ohos/axios';
import { Logger } from 'wdKit/Index';
// import type ResponseDTO from '../models/ResponseDTO';
...
...
@@ -84,6 +85,9 @@ instance.interceptors.response.use(// 响应拦截器response类型就是Axios.r
// return Promise.reject(new Error(message))
// }
// const data: ResponseBean<any> = response.data
Logger.debug('HttpRequest', 'response ======start======= ')
Logger.debug('HttpRequest', 'response: ' + JSON.stringify(response.data))
Logger.debug('HttpRequest', 'response ======end======= ')
// 改造返回的数据,即将AxiosResponse的data返回,服务端返回的数据
return response.data;
} else {
...
...
Please
register
or
login
to post a comment