Browse Source

提示用户不存在处理

gcz 2 years ago
parent
commit
cdefe9220c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      common/request.js

+ 5 - 0
common/request.js

@@ -83,6 +83,11 @@ module.exports = (vm) => {
 				unlogin()
 			}
 			
+			if(data.msg == "用户不存在!"){
+				uni.clearStorage();
+				unlogin()
+			}
+			
 			return Promise.reject(data)
 			// 如果需要catch返回,则进行reject
 			// if (custom?.catch) {