fix(http): 移除默认的Content-Type请求头

refactor(hooks): 改进上传钩子的响应解析逻辑

移除http拦截器中硬编码的Content-Type头,让请求更灵活
修改useUpload钩子以适配不同平台的返回格式,增强容错性
This commit is contained in:
feige996
2025-09-30 17:59:27 +08:00
parent fe7d81ff62
commit 6b899c712e
2 changed files with 14 additions and 4 deletions

View File

@@ -47,7 +47,6 @@ const httpInterceptor = {
// 2. (可选)添加小程序端请求头标识
options.header = {
...options.header,
'Content-Type': 'application/json; charset=utf-8',
}
// 3. 添加 token 请求头标识
const tokenStore = useTokenStore()