From d5eb0e69083a1c14d1227050ed5741965efc6cfe Mon Sep 17 00:00:00 2001 From: zmr900709 <1838875027@qq.com> Date: Fri, 3 Jul 2020 10:50:02 +0800 Subject: [PATCH] v --- pageA/login/login.vue | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pageA/login/login.vue b/pageA/login/login.vue index 20e3aeb..f2c5169 100644 --- a/pageA/login/login.vue +++ b/pageA/login/login.vue @@ -50,7 +50,7 @@ 微信登录 - 取消 + 取消 @@ -149,18 +149,27 @@ console.log(res) // console.log(res) if (res.errCode == 0) { - // 缓存用户的信息 - uni.setStorage({ - key: 'user_info', - data: res.data, - success: function() { - console.log('success'); - // 跳转首页 - uni.navigateTo({ - url : '/pageA/topick/topick' - }) - } - }); + if(res.data == ''){ + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }) + return false + }else{ + // 缓存用户的信息 + uni.setStorage({ + key: 'user_info', + data: res.data, + success: function() { + console.log('success'); + // 跳转首页 + uni.navigateTo({ + url : '/pageA/topick/topick' + }) + } + }); + } + // 存储接口请求所需token uni.setStorage({ @@ -180,7 +189,6 @@ type: 'error' }) } - }) }, // qq授权登录