var t = getApp(), a = t.request, o = t.globalData.setting, os = o, i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"); var regeneratorRuntime = require('../../../utils/runtime.js'); Page({ data:{ yucun_money:0, parameter:true, iurl: o.imghost, is_show_yckcz:0, }, /** * 生命周期函数--监听页面显示 */ onShow: function () { // --先判断会员状态-- var user_info = getApp().globalData.userInfo; if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { wx.navigateTo({ url: '/pages/togoin/togoin', }) return false; } wx.setNavigationBarTitle({ title: "预存款", }) var th = this; getApp().getConfig2(function (ee) { var json_d = JSON.parse(ee.switch_list); th.setData({ is_show_yckcz: json_d.yckcz_switch }); },1) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { this.yuck(); }, //预存款 async yuck(){ var user_id =getApp().globalData.user_id; var store_id = os.stoid; console.log(user_id, "有进来吗银行卡", store_id); await getApp().request.promiseGet("/api/weshop/users/listYuMoney", { data: { user_id: user_id, store_id: store_id } }).then(res => { var a = res.data; console.log("在这了",a); var yucun_money = a.data.yucun_money; var list= a.data.list1; if (list.length != 0){ console.log("在这里0", list.length); console.log(list, "s1w" + yucun_money); this.setData({ yucun_money: yucun_money, list: list, parameter: false }); }else{ console.log("在这里111", list.length); this.setData({ parameter:true}); } }) }, jumPage: function () { wx.navigateTo({ url: 'prepaid/prepaid', }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, })