提交 2a7d59c0 编写于 作者: Q qiang

fix: 解决 uni.request 方法在百度小程序平台 dataType 设置为非 json 类型,仍按 json 解析的问题 fixed #558

上级 c903d961
import previewImage from '../../../mp-weixin/helpers/normalize-preview-image'
import previewImage from '../../../mp-weixin/helpers/normalize-preview-image'
// 不支持的 API 列表
const todos = [
'hideKeyboard',
......@@ -48,9 +48,14 @@ const protocols = {
// TODO
// data 不支持 ArrayBuffer
// method 不支持 TRACE, CONNECT
// dataType 可取值为 string/json
return {
method: 'method'
method: 'method',
dataType (type) {
return {
name: 'dataType',
value: type === 'json' ? type : 'string'
}
}
}
}
},
......@@ -96,4 +101,4 @@ export {
protocols,
todos,
canIUses
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册