3d-decorate-platform 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +12 -0
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -864,6 +864,18 @@
|
|
|
864
864
|
|
|
865
865
|
// http request 拦截器
|
|
866
866
|
http.interceptors.request.use(function (config) {
|
|
867
|
+
config.vbimRequestSource = '3d-decorate-platform';
|
|
868
|
+
var requestURL = /^(?:https?:)?\/\//i.test(config.url || '') ? config.url : "".concat(config.baseURL || '').concat(config.url || '');
|
|
869
|
+
var requestHost = requestURL.match(/^(?:https?:)?\/\/([^/:?#]+)/i);
|
|
870
|
+
if (requestHost && /(^|\.)vanke\.com$/i.test(requestHost[1]) && typeof console !== 'undefined' && console.warn) {
|
|
871
|
+
var requestPath = requestURL.slice(requestHost[0].length).split(/[?#]/)[0] || '/';
|
|
872
|
+
console.warn('[VBIM_AXIOS_DOMAIN_TRACE]', {
|
|
873
|
+
source: config.vbimRequestSource,
|
|
874
|
+
method: config.method,
|
|
875
|
+
host: requestHost[1],
|
|
876
|
+
path: requestPath
|
|
877
|
+
});
|
|
878
|
+
}
|
|
867
879
|
var projectData = JSON.parse(sessionStorage.getItem('projectData'));
|
|
868
880
|
if (projectData && projectData.projectId) {
|
|
869
881
|
config.headers['projectId'] = projectData.projectId;
|