Vue前端Copy验证码的代码启动以后不能访问后端服务
你好 ,老师,我按照您的课程《微服务摸鱼君》在编写代码时 ,出现问题,在学习第31节集成验证码到模块中时,我已将验证码的后台代码集成到我的后台应用,也将前端代码集成到我的前端页面,并修改了 axios.defaults.baseURL,但是前台页面仍然不能显示验证码模块,前端页面显示
<strong>We're sorry but vicon-usercenter doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
控制台报错信息如下:
Uncaught TypeError: Cannot read properties of undefined (reading 'defaults')
at eval (axios.js?f837:3:1)
at ./src/components/verifition/utils/axios.js (app.js:319:1)
at __webpack_require__ (app.js:577:33)
at fn (app.js:823:21)
at eval (index.js:6:70)
at ./src/components/verifition/api/index.js (app.js:297:1)
at __webpack_require__ (app.js:577:33)
at fn (app.js:823:21)
at eval (index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/verifition/Verify/VerifySlide.vue?vue&type=script&lang=js&:4:68)
at ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/verifition/Verify/VerifySlide.vue?vue&type=script&lang=js& (app.js:242:1)
请大佬指教
Cannot read properties of undefined (reading 'defaults')
类似于java的空指针
调用栈
./src/components/verifition/utils/axios.js
搜索一下这个:defaults