Browse Source

用户拒绝后优化

yuxingxing 2 years ago
parent
commit
ff2df88606
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pages/users/wechat_login/index.vue

+ 5 - 1
pages/users/wechat_login/index.vue

@@ -186,7 +186,11 @@ export default {
 			}
 		},
 		getPhoneCode(e) {
-			console.log(e.detail.code)
+			console.log(e)
+			if (e.detail.errMsg == 'getPhoneNumber:fail user deny' || !e.detail.code){
+				console.log("用户拒绝获取手机号");
+				return
+			}
 			uni.showLoading({
 				title: this.$t(`正在登录中`)
 			});