-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
热更新和参数问题 #15
Comments
|
1、可能是我本地环境问题,有空再试一下 |
我这边管理的项目中,也有包括使用 axios , fetch, 以及包括在小程序中的,使用axios库以及其他库没有发现问题,可否给出你这边使用 axios 和 mock 的相关代码示例? |
1、请大佬检阅~~
3、api.mock.ts:
4、请求接口
ps:
5、实际请求
如果图片无法加载,可以浏览器访问这个地址,https://imgse.com/i/pSxojHA 7、另外好像热更新。。。我这边就是不行。。mock接口中,isLogin改为false。。刷新页面。返回值依旧是true。。 |
这里有一个错误: method {
body: (resquest) => {
const { query, params, body } = request
}
} {
body: ({ query, params, body }) => {
}
} 从截图中我看到的有两个问题点, 一个是 响应体中的 问题1产生的原因是 感谢反馈 bug ! |
以上发现的问题已在 |
上面的问题,都已经解决~~ 遇到个新"问题",但是不晓得能不能从插件层面进行容错~~
这个修改的时候,我改错了,我写成了
然后导致程序直接退出
这个写法肯定有问题,但万一手抖,改错了。。重新启动,时间成本略微有点高~ |
1、环境:v0.4.0 + vue 2.7.14 + vite 4.1.3
2、问题
1)开发环境,修改***.mock.ts文件接口数据,好像无法热更新
2)是否可支持属性同义词配置,比如,axios中 params 表示 url后的参数,data表示body体的参数,但实际mock接口接收后,query、params、body无法对应,是否可支持同义词配置?alias : { body:'data', query: 'params'}
The text was updated successfully, but these errors were encountered: