1. 报错信息如下
进行跨域请求时报错,报错信息如下:
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
vue.js:9064 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
index.html:1 Access to XMLHttpRequest at ‘http://localhost:8888/employees’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
jquery.js:2 GET http://localhost:8888/employees net::ERR_FAILED
send @ jquery.js:2
ajax @ jquery.js:2
p. @ jquery.js:2
mounted @ index.html:30
invokeWithErrorHandling @ vue.js:1863
callHook @ vue.js:4220
mountComponent @ vue.js:4087
Vue. m o u n t @ v u e . j s : 9044 V u