this.$httpRequest.post('/login' 报错Cannot read properties of undefined (reading 'post') 这个是为什么呀?没有正确引入么?

5***@qq.com
- 发布:2022-02-14 09:06
- 更新:2023-01-23 21:17
- 阅读:1837
#插件讨论# 【 axios-request - 髙髙 】, 访问post方法报错Cannot read properties of undefined (reading 'post')
分类:uni-app
关联插件:
axios-request
2 个回复
3***@qq.com
你看看是不是main.js里边忘了注册,Vue.use(http);
5***@qq.com
你在main里注册的是http,但是你把http改成了httpRequest当然undefined了,你就没有定义httpRequest,程序给你在什么地方给你早你的$httpRequest去