Commit 645ed0cc3969dccfd90bb849754dd831aa853649
1 parent
361040e6
优化会员中心未登陆
Showing
1 changed file
with
26 additions
and
6 deletions
pages/user/index/index.js
| ... | ... | @@ -105,7 +105,7 @@ Page({ |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | }else{ |
| 108 | - app.getUserFir(); | |
| 108 | + // app.getUserFir(); | |
| 109 | 109 | } |
| 110 | 110 | this.init_user_tool() |
| 111 | 111 | }, |
| ... | ... | @@ -616,14 +616,22 @@ Page({ |
| 616 | 616 | |
| 617 | 617 | //--跳转到预存款页面-- |
| 618 | 618 | deposit: function () { |
| 619 | - if (!this.data.userInfo) return false; | |
| 619 | + if (!this.data.userInfo) | |
| 620 | + { | |
| 621 | + this.gobindtel(); | |
| 622 | + return false; | |
| 623 | + } | |
| 620 | 624 | wx.navigateTo({ |
| 621 | 625 | url: '/packageD/pages/user/deposit/deposit', |
| 622 | 626 | }) |
| 623 | 627 | }, |
| 624 | 628 | //--跳转到余额页面-- |
| 625 | 629 | balance: function () { |
| 626 | - if (!this.data.userInfo) return false; | |
| 630 | + if (!this.data.userInfo) | |
| 631 | + { | |
| 632 | + this.gobindtel(); | |
| 633 | + return false; | |
| 634 | + }; | |
| 627 | 635 | wx.navigateTo({ |
| 628 | 636 | url: '/packageD/pages/user/member/menber', |
| 629 | 637 | }) |
| ... | ... | @@ -631,7 +639,11 @@ Page({ |
| 631 | 639 | //--跳转到优惠券-- |
| 632 | 640 | coupon: function () { |
| 633 | 641 | var th = this; |
| 634 | - if (!this.data.userInfo) return false; | |
| 642 | + if (!this.data.userInfo) | |
| 643 | + { | |
| 644 | + this.gobindtel(); | |
| 645 | + return false; | |
| 646 | + }; | |
| 635 | 647 | // th.sendsm(); |
| 636 | 648 | wx.navigateTo({ |
| 637 | 649 | url: '/packageD/pages/user/coupons/coupons', |
| ... | ... | @@ -639,7 +651,11 @@ Page({ |
| 639 | 651 | }, |
| 640 | 652 | //--跳转到积分-- |
| 641 | 653 | integral: function () { |
| 642 | - if (!this.data.userInfo) return false; | |
| 654 | + if (!this.data.userInfo) | |
| 655 | + { | |
| 656 | + this.gobindtel(); | |
| 657 | + return false; | |
| 658 | + } | |
| 643 | 659 | wx.navigateTo({ |
| 644 | 660 | url: '/packageD/pages/user/integral/integral', |
| 645 | 661 | }) |
| ... | ... | @@ -652,7 +668,11 @@ Page({ |
| 652 | 668 | }, |
| 653 | 669 | |
| 654 | 670 | go_order: function (e) { |
| 655 | - if (!this.data.userInfo) return false; | |
| 671 | + if (!this.data.userInfo) | |
| 672 | + { | |
| 673 | + this.gobindtel(); | |
| 674 | + return false; | |
| 675 | + }; | |
| 656 | 676 | var url = e.currentTarget.dataset.url; |
| 657 | 677 | wx.navigateTo({ |
| 658 | 678 | url: url, | ... | ... |