5***@qq.com
5***@qq.com
  • 发布:2022-02-14 09:06
  • 更新:2023-01-23 21:17
  • 阅读:1675

#插件讨论# 【 axios-request - 髙髙 】, 访问post方法报错Cannot read properties of undefined (reading 'post')

分类:uni-app
关联插件: axios-request

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

2022-02-14 09:06 负责人:无 分享
已邀请:
3***@qq.com

3***@qq.com

你看看是不是main.js里边忘了注册,Vue.use(http);

5***@qq.com

5***@qq.com

你在main里注册的是http,但是你把http改成了httpRequest当然undefined了,你就没有定义httpRequest,程序给你在什么地方给你早你的$httpRequest去

要回复问题请先登录注册