|
@@ -111,7 +111,7 @@ function callBack (res, success, fail) {
|
|
|
success(res)
|
|
success(res)
|
|
|
} else {
|
|
} else {
|
|
|
if (fail) {
|
|
if (fail) {
|
|
|
- fail()
|
|
|
|
|
|
|
+ fail(res)
|
|
|
}
|
|
}
|
|
|
switch (res.data.err_code) {
|
|
switch (res.data.err_code) {
|
|
|
case 'userNeedLogin':
|
|
case 'userNeedLogin':
|
|
@@ -169,11 +169,23 @@ function callBack (res, success, fail) {
|
|
|
}
|
|
}
|
|
|
break
|
|
break
|
|
|
default:
|
|
default:
|
|
|
- wx.showToast({
|
|
|
|
|
- title: res.data.err_msg,
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(res.data.err_msg.length > 20){
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ confirmColor: '#eab86a',
|
|
|
|
|
+ content: res.data.err_msg,
|
|
|
|
|
+ showCancel: false,//没有取消按钮的弹框
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: res.data.err_msg,
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ duration: 2000
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|