fei.wang
6 天以前 645834e1c3efb3a8c50dcbda98d87caba04bd421
config/request.js
@@ -20,22 +20,22 @@
      // console.log(config);
      /* config 为默认全局配置*/ 
      // config.baseURL = 'http://39.106.210.13:8090'; /* 测试-根域名 */ 
      // config.baseURL = 'http://160.202.231.180:8090'; /* 测试-根域名 */
      // config.baseURL = 'http://160.202.231.180:8090'; /* 测试-根域名 */
      
      config.baseURL = uni.getStorageSync('newBaseURL')== ''? 'http://123.117.152.120:8090' : uni.getStorageSync('newBaseURL')   ; /* 测试-根域名 */  
      // config.baseURL = uni.getStorageSync('newBaseURL')== ''? 'http://192.168.5.121:8090' : uni.getStorageSync('newBaseURL')   ; /* 测试-根域名 */
      // config.baseURL = uni.getStorageSync('newBaseURL')== ''? 'http://192.168.5.121:8090' : uni.getStorageSync('newBaseURL')   ; /* 测试-根域名 */
       
      // config.baseURL = 'http://123.117.152.120:8090'; /* 测试-根域名 */
      // config.baseURL = 'http://111.198.60.6:8090'; /* 正式-根域名 */
      // config.baseURL = 'http://192.168.5.121:8090'; /* 正式-根域名 */
      config.custom = {
      // config.baseURL = 'http://123.117.152.120:8090'; /* 测试-根域名 */
      // config.baseURL = 'http://111.198.60.6:8090'; /* 正式-根域名 */
      // config.baseURL = 'http://192.168.5.121:8090'; /* 正式-根域名 */
      config.custom = {
         auth: true 
      }
      config.dataType = 'json'
      return config 
   }) 
   // 请求拦截
   uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
      // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}