1
wankeda
2025-04-10 e692b8c296bae952a810688f700b659ae8240a5c
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_PDA/common/http.interceptor.js
@@ -1,4 +1,5 @@
let baseUrl = 'http://127.0.0.1:9291'
// let baseUrl = 'http://192.168.30.240:9090'
const install = (Vue, vm) => {
   // æ­¤ä¸ºè‡ªå®šä¹‰é…ç½®å‚数,具体参数见上方说明
@@ -16,7 +17,18 @@
      if (config.url.includes('http://') || config.url.includes('https://')) {
         config.baseURL = '';
      } else {
         config.baseURL = baseUrl;
         uni.getStorage({
            key: 'storage_key_ipAddress',
            success: (res) => {
               debugger;
               console.log(res.data.WCSIP);
               config.baseURL = res.data.WCSIP;
            },
            fail: (err) => {
               console.log("没有找到存储的IP地址,使用默认BaseURL")
               config.baseURL = baseUrl;
            },
         });
      }
      config.header.Token = 'xxxxxx';