项目背景:
运用vue开发app项目,登录请求模块
问题图片(1):
解决问题:
封装请求时,url的模板字符串拼接写错,改成${mobile}
问题图片(2):
AxiosError {message: 'Request failed with status code 404’, name: 'AxiosError', code: 'ERR BAD REQUEST', config:{..},request:XMLHttpRequest, …}
解决问题:
传参的username写错了。如下图