lyuis il y a 7 mois
Parent
commit
8e9727f4e1
1 fichiers modifiés avec 15 ajouts et 2 suppressions
  1. 15 2
      common/httpRequest.js

+ 15 - 2
common/httpRequest.js

@@ -226,7 +226,11 @@ module.exports = {
 								title: '用户信息失效,请重新登录!',
 								icon: 'none'
 							})
-						}
+						}else if (result.data.code !=0) 
+							uni.showToast({
+								title: result.data.msg||'查询失败',
+								icon: 'none'
+							})
 						succ.call(self, result.data)
 					},
 					fail: function(e) {
@@ -244,6 +248,11 @@ module.exports = {
 						"content-type": header
 					},
 					success: function(result) {
+						if (result.data.code !=0)
+							uni.showToast({
+								title: result.data.msg||'查询失败',
+								icon: 'none'
+							})
 						succ.call(self, result.data)
 					},
 					fail: function(e) {
@@ -282,7 +291,11 @@ module.exports = {
 							title: '用户信息失效,请重新登录!',
 							icon: 'none'
 						})
-					}
+					}else if (result.data.code !=0) 
+							uni.showToast({
+								title: result.data.msg||'查询失败',
+								icon: 'none'
+							})
 					succ.call(self, result.data)
 				},
 				fail: function(e) {