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;
@@ -50,6 +50,7 @@
        '|------------------------------------------------------------------------------------------------------------',
      );
      console.log('|--访问: ', fun.url);
      console.log('|--参数: ', fun.data);
      console.log('|--结果: ', res);
    }
@@ -73,8 +74,12 @@
  };
  fun1.fail = function (error) {
    if (mode == 'debug') {
      console.log('--------------请求错误----------------' + fun.url);
      console.log(error);
      console.log(
        '|------------------------------------------------------------------------------------------------------------',
      );
      console.log('|--访问: ', fun.url);
      console.log('|--参数: ', fun.data);
      console.log('|--错误: ', error);
    }
    wx.showToast({
      title: '请求失败',