perf: dynamic options demo

This commit is contained in:
ckl1
2022-07-01 09:46:38 +08:00
parent 5e292f8a2b
commit 9a3b6177aa
4 changed files with 18 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ service.interceptors.request.use(
) {
config.data = qs.stringify(config.data)
}
// 添加token可根据实际业务修改
// config!.headers!['Authorization'] = 'something'
// get参数编码
if (config.method === 'get' && config.params) {
let url = config.url as string