From 645ed0cc3969dccfd90bb849754dd831aa853649 Mon Sep 17 00:00:00 2001 From: WXD-SEASON\season Date: Mon, 5 Jun 2023 16:55:20 +0800 Subject: [PATCH] 优化会员中心未登陆 --- pages/user/index/index.js | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pages/user/index/index.js b/pages/user/index/index.js index 7fae82f..3e3573c 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -105,7 +105,7 @@ Page({ } }else{ - app.getUserFir(); + // app.getUserFir(); } this.init_user_tool() }, @@ -616,14 +616,22 @@ Page({ //--跳转到预存款页面-- deposit: function () { - if (!this.data.userInfo) return false; + if (!this.data.userInfo) + { + this.gobindtel(); + return false; + } wx.navigateTo({ url: '/packageD/pages/user/deposit/deposit', }) }, //--跳转到余额页面-- balance: function () { - if (!this.data.userInfo) return false; + if (!this.data.userInfo) + { + this.gobindtel(); + return false; + }; wx.navigateTo({ url: '/packageD/pages/user/member/menber', }) @@ -631,7 +639,11 @@ Page({ //--跳转到优惠券-- coupon: function () { var th = this; - if (!this.data.userInfo) return false; + if (!this.data.userInfo) + { + this.gobindtel(); + return false; + }; // th.sendsm(); wx.navigateTo({ url: '/packageD/pages/user/coupons/coupons', @@ -639,7 +651,11 @@ Page({ }, //--跳转到积分-- integral: function () { - if (!this.data.userInfo) return false; + if (!this.data.userInfo) + { + this.gobindtel(); + return false; + } wx.navigateTo({ url: '/packageD/pages/user/integral/integral', }) @@ -652,7 +668,11 @@ Page({ }, go_order: function (e) { - if (!this.data.userInfo) return false; + if (!this.data.userInfo) + { + this.gobindtel(); + return false; + }; var url = e.currentTarget.dataset.url; wx.navigateTo({ url: url, -- libgit2 0.21.4