| | |
| | | function Request() {} |
| | | // export const basrUrl = 'https://pipe.thhy-tj.com/api'; |
| | | // export const basrUrl = 'http://192.168.0.170:8880'; |
| | | export const basrUrl = 'http://111.30.93.212:8089/suapi'; |
| | | // export const baseUrl = 'https://pipe.thhy-tj.com/api'; |
| | | // export const baseUrl = 'http://192.168.0.170:8880'; |
| | | export const baseUrl = 'http://111.30.93.212:8089/suapi'; |
| | | Request.prototype = { |
| | | post: function(url, params) { |
| | | return new Promise(function(resolve, reject) { |
| | | const userToken = uni.getStorageSync('userToken') || ""; |
| | | uni.request({ |
| | | url: `${basrUrl}${url}`, |
| | | url: `${baseUrl}${url}`, |
| | | data: params, |
| | | method: 'POST', |
| | | header: { |
| | |
| | | const userToken = uni.getStorageSync('userToken') || ""; |
| | | uni.request({ |
| | | method: 'GET', |
| | | url: `${basrUrl}${url}`, |
| | | url: `${baseUrl}${url}`, |
| | | data: params, |
| | | header: { |
| | | usertoken: userToken, |