| | |
| | | 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('|--结果: ', res); |
| | | } |
| | | |
| | |
| | | }; |
| | | fun1.fail = function (error) { |
| | | if (mode == 'debug') { |
| | | console.log('--------------请求错误----------------' + fun.url); |
| | | console.log(error); |
| | | console.log('|--错误: ', error); |
| | | } |
| | | wx.showToast({ |
| | | title: '请求失败', |