|
@@ -179,24 +179,17 @@ function apiPost(url, params, contentType) {
|
|
|
if (res.success > 1 || typeof res.version != undefined) {
|
|
|
resolve(res.data)
|
|
|
} else {
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: '加载失败,请重试',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: '加载失败,请重试',
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
faild: res => {
|
|
|
// reject(res)
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: res.errMsg,
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: res.errMsg,
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
},
|
|
|
complete: res =>{
|
|
@@ -227,24 +220,17 @@ function doPost(url, params) {
|
|
|
if (res.success > 1 || typeof res.version != undefined) {
|
|
|
resolve(res.data)
|
|
|
} else {
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: '加载失败,请重试',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: '加载失败,请重试',
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
faild: res => {
|
|
|
// reject(res)
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: res.errMsg,
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: res.errMsg,
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
},
|
|
|
complete: res =>{
|
|
@@ -275,24 +261,17 @@ function notWxPost(url, params) {
|
|
|
if (res.success > 1 || typeof res.version != undefined) {
|
|
|
resolve(res.data)
|
|
|
} else {
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: '加载失败,请重试',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: '加载失败,请重试',
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
faild: res => {
|
|
|
// reject(res)
|
|
|
- wx.hideLoading({
|
|
|
- success: (res) => {
|
|
|
- wx.showToast({
|
|
|
- title: res.errMsg,
|
|
|
- })
|
|
|
- },
|
|
|
+ wx.showToast({
|
|
|
+ title: res.errMsg,
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
},
|
|
|
complete: res =>{
|