Mock icon indicating copy to clipboard operation
Mock copied to clipboard

mockjs初始化了responseType

Open lilooc opened this issue 2 years ago • 2 comments

初始化了responseType,会影响到会影响原生的请求,使得服务器返回的arraybuffer类型变成乱码

lilooc avatar Apr 14 '22 03:04 lilooc

此问题已存在: https://github.com/nuysoft/Mock/issues/299

wll8 avatar Apr 14 '22 03:04 wll8

这个仓库已经不维护了,我fork了一份已经解决,可以使用我fork的仓库 tony-mockjs

npm i tony-mockjs

我的代码里里面使用了threejs,具体的responseType值会是 text|ArrayBuffer|json,目前工作良好

具体核心代码如下

image

ygweric avatar Sep 12 '23 08:09 ygweric