From 57fbd8796742d5cb30cbaa90154f3137f48df83e Mon Sep 17 00:00:00 2001 From: linfeng <2445465217@qq.com> Date: Tue, 6 Dec 2022 14:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/login/login.vue | 4 ---- .../pages/login/weixin.vue | 17 ++--------------- .../pages/post/add.vue | 4 +++- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/login.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/login.vue index 8576eb3..0cb8a0a 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/login.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/login.vue @@ -60,12 +60,9 @@ } else { if (this.$refs.uCode.canGetCode) { - - // 模拟向后端请求验证码 uni.showLoading({ title: '正在获取验证码' }) - this.$H.post("user/sendSmsCode", { mobile: this.form.mobile }).then(res => { @@ -73,7 +70,6 @@ uni.hideLoading(); this.$refs.uCode.start(); this.$u.toast(res.msg); - } }) } else { diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/weixin.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/weixin.vue index d221f09..1c3bcad 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/weixin.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/login/weixin.vue @@ -40,12 +40,9 @@ title: '正在登陆' }); var that = this; - // let userInfo = await this.getUserProfile(); let code = await this.getLoginCode(); that.$H.post('user/miniWxlogin', { - code: code, - // username: userInfo.nickName, - // avatar: userInfo.avatarUrl, + code: code }).then(res => { if (res.code === 0) { @@ -79,17 +76,7 @@ }); }); }, - // getUserProfile() { - // return new Promise((resolve, reject) => { - // wx.getUserProfile({ - // lang: 'zh_CN', - // desc: '用于完善会员资料', - // success: res => { - // resolve(res.userInfo); - // } - // }); - // }); - // } + } } diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue index b9ed887..79d1e30 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue @@ -50,7 +50,9 @@ }; }, onLoad(options) { - + if(!uni.getStorageSync("hasLogin")){ + this.$u.toast('请先登录哦'); + } }, methods: { chooseClass() {