| | |
| | | */ |
| | | const util = require('../utils/util.js'); |
| | | |
| | | // const baseUrl = "http://192.168.0.123:8080" |
| | | // const baseUrl = "https://fyami.com.cn:447" |
| | | 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 bu = "https://fyami.com.cn:447" |
| | | const basePicUrl = `${bu}/images/`; |
| | | const baseIconUrl = `${bu}/images/weixin/eplaw/`; |
| | | const baseFileUrl = `${bu}/meeting/file/`; |
| | | // const mode = 'debug'; |
| | | const mode = 'prod'; |
| | | |
| | | // 飞羽监管系统后台 |
| | | const spUrl = "https://fyami.com.cn:447" |
| | | const spBu = "https://fyami.com.cn:447" |
| | | const spPicUrl = `${spBu}/images/`; |
| | | |
| | | const mode = 'debug'; |
| | | // const mode = 'prod'; |
| | | |
| | | function request(fun, hostUrl) { |
| | | const bUrl = hostUrl ? hostUrl : baseUrl; |
| | |
| | | '|------------------------------------------------------------------------------------------------------------', |
| | | ); |
| | | console.log('|--访问: ', fun.url); |
| | | console.log('|--参数: ', fun.data); |
| | | console.log('|--结果: ', res); |
| | | } |
| | | |
| | |
| | | }; |
| | | 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: '请求失败', |
| | |
| | | baseUrl: baseUrl, |
| | | baseFileUrl: baseFileUrl, |
| | | baseIconUrl: baseIconUrl, |
| | | spUrl: spUrl, |
| | | spPicUrl: spPicUrl, |
| | | }; |