This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/*
* 1.前端目录:通过document.location.origin和document.currentScript属性取得
* 2.网关地址:跨域时需要填写具体地址并设置crossDomain为true
*/
const config = {
crossDomain: false,
path: document.currentScript.src.substring(document.location.origin.length, document.currentScript.src.length - 'js/config.js'.length),
file: function (file) {
return this.path + file;
},
gateway: 'http://example_gateway_host/',
service: function (service) {
return (this.crossDomain ? this.gateway : '/') + service + '/';
}
};