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) {