isdata-customer-sdk 0.1.89 → 0.1.91

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 CHANGED
@@ -29744,7 +29744,7 @@ var querystringify = __webpack_require__(3992);
29744
29744
  ;// ./src/api/request.js
29745
29745
 
29746
29746
 
29747
- let apiContextPath = /* unsupported import.meta.env.VITE_SERVICE_BASE_URL */ undefined.VITE_SERVICE_BASE_URL;
29747
+ let apiContextPath = "";
29748
29748
  // const onlineDevelopmentMode = process.env.VUE_APP_ONLINE_DEVELOPMENT_MODE === "true" || process.env.REACT_APP_ONLINE_DEVELOPMENT_MODE === "true"
29749
29749
  // if (process.env.NODE_ENV === "development" && !onlineDevelopmentMode) {
29750
29750
  // document.cookie =
@@ -29770,6 +29770,15 @@ const getInstance = (prefix = "") => {
29770
29770
  token: querystringify.parse(window.location.search).token || window.token
29771
29771
  } : {}
29772
29772
  });
29773
+ let oldPost = instance.post;
29774
+ instance.post = (url, data, config) => {
29775
+ let prefix = window.VITE_SERVICE_BASE_URL || "";
29776
+ if (prefix) {
29777
+ let newUrl = prefix + url;
29778
+ return oldPost.call(instance, newUrl, data, config);
29779
+ }
29780
+ return oldPost.call(instance, url, data, config);
29781
+ };
29773
29782
  instance.defaults.headers.post["Content-Type"] = "application/json";
29774
29783
  instance.interceptors.response.use(response => {
29775
29784
  let {