From 0782b9f3b407839b2e873581a0a9d17a55e00266 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Sat, 11 Jun 2022 11:45:04 +0800 Subject: [PATCH] 预存页面会员没有登陆,先提示登陆 --- packageD/pages/user/deposit/prepaid/prepaid.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/packageD/pages/user/deposit/prepaid/prepaid.js b/packageD/pages/user/deposit/prepaid/prepaid.js index b646839..527b8eb 100644 --- a/packageD/pages/user/deposit/prepaid/prepaid.js +++ b/packageD/pages/user/deposit/prepaid/prepaid.js @@ -28,8 +28,17 @@ Page({ } } }); - - this.yuck(); + + if(getApp().globalData.user_id){ + this.yuck(); + } + else{ + wx.showToast({ title: "您还未登陆,请先授权", icon: 'none', duration: 2000 }) + setTimeout(function () { + getApp().goto("/pages/togoin/togoin"); + },1200) + } + }, /*预存款的劵*/ async yuck() { @@ -49,7 +58,7 @@ Page({ // var perpaid = res.data.data; console.log( "是什么", perpaids); e.setData({ - perpaid: perpaids + perpaid: perpaids,is_get:1 }); }) @@ -85,6 +94,11 @@ Page({ wx.setNavigationBarTitle({ title: "流动资金转预存", }) + + if(getApp().globalData.user_id && !this.data.is_get){ + this.yuck(); + } + }, //确定充值 determine: function(e) { -- libgit2 0.21.4