riku
2026-01-20 91f7d372fa318e859efd20d71eafbd34274902c4
service/baserequest.js
@@ -10,8 +10,8 @@
const util = require('../utils/util.js');
// 小程序后台
// const baseUrl = "http://192.168.0.138:8082"
const baseUrl = 'https://fyami.com.cn';
const baseUrl = "http://192.168.1.9:8082"
// const baseUrl = 'https://fyami.com.cn';
const bu = 'https://fyami.com.cn';
const basePicUrl = `${bu}/images/`;
const baseIconUrl = `${bu}/images/weixin/eplaw/`;
@@ -22,8 +22,8 @@
const spBu = "https://fyami.com.cn:447"
const spPicUrl = `${spBu}/images/`;
// const mode = 'debug';
const mode = 'prod';
const mode = 'debug';
// const mode = 'prod';
function request(fun, hostUrl) {
  const bUrl = hostUrl ? hostUrl : baseUrl;
@@ -44,15 +44,13 @@
    fun.url = bUrl + url;
  }
  var fun1 = util.deepCopy(fun);
  if (mode == 'debug') {
    console.log(
      '|------------------------------------------------------------------------------------------------------------',
    );
    console.log('|--访问: ', fun.url);
    console.log('|--参数: ', fun.data);
  }
  fun1.success = function (res) {
    if (mode == 'debug') {
      console.log(
        '|------------------------------------------------------------------------------------------------------------',
      );
      console.log('|--访问: ', fun.url);
      console.log('|--参数: ', fun.data);
      console.log('|--结果: ', res);
    }
@@ -76,6 +74,11 @@
  };
  fun1.fail = function (error) {
    if (mode == 'debug') {
      console.log(
        '|------------------------------------------------------------------------------------------------------------',
      );
      console.log('|--访问: ', fun.url);
      console.log('|--参数: ', fun.data);
      console.log('|--错误: ', error);
    }
    wx.showToast({