Vue directly requests the routing http://localhost:8081/role/datagrid of beego backend to report an error.

XMLHttpRequest cannot load http://localhost:8081/role/datagrid. No "Access-Control-Allow-Origin" header is present on the requested resource. Origin" http://localhost:8080" is therefore not allowed access.

Mar.10,2021

is cross-domain. You need to set Access-Control-Allow-Origin as your domain name, or directly to *

.
Menu