riku
2022-08-11 5656daeb79c6d4d3f9fc78f981c7faf96582d2f1
service/baserequest.js
@@ -11,10 +11,12 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
const baseUrl = "http://192.168.0.116:8080"
// const baseUrl = "https://fyami.com.cn:447/"
const basePicUrl = baseUrl + "images/"
const baseFileUrl = baseUrl + "meeting/file/"
// const baseUrl = "http://192.168.0.117:8080"
const baseUrl = "https://fyami.com.cn:447"
// const basePicUrl = baseUrl + "/images/"
const basePicUrl = "https://fyami.com.cn:447/images/"
const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
const baseFileUrl = baseUrl + "/meeting/file/"
function request(fun) { 
  if (fun.params != undefined) {
@@ -50,11 +52,15 @@
    // }
  }
  fun1.fail = function (error) {
    console.log("--------------请求错误----------------" + fun.url);
    console.log(error);
    wx.showToast({
      title: '网络连接失败',
      icon: 'none'
    })
    fun.fail(error)
    if (fun.fail) {
      fun.fail(error)
    }
  }
  fun1.complete = fun.complete
  wx.request(fun1)
@@ -71,5 +77,6 @@
  },
  basePicUrl:basePicUrl,
  baseUrl:baseUrl,
  baseFileUrl:baseFileUrl
  baseFileUrl:baseFileUrl,
  baseIconUrl: baseIconUrl
}