构建Web的API访问路径URL+Port
const origin = window.location.origin;
const protocol = window.location.protocol;
const hostname = window.location.hostname;
const port = 80;
const API_ROOT = protocol + "//" + hostname + ":" + port;
API_ROOT即为API的访问路径
构建Web的API访问路径URL+Port
const origin = window.location.origin;
const protocol = window.location.protocol;
const hostname = window.location.hostname;
const port = 80;
const API_ROOT = protocol + "//" + hostname + ":" + port;
API_ROOT即为API的访问路径