let myPro = require("../../../utils/wxRequest.js"); let util = require("../../../utils/util.js"); Page({ /** * 页面的初始数据 */ data: { imgUrl: getApp().globalData.imgUrl, info: null, money: null }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { let that = this; that.getShopInfo(); }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ // 获取个人信息 getShopInfo(){ let that = this; myPro.wxRequest("store/info","GET",{}).then(res=>{ that.setData({ info: res.result }); }).catch(err=>{ console.log('报错信息',err); wx.showToast({ title: err, icon: "none" }); }); }, // 获取输入金额 getChargeMoney(event){ // console.log(event) let that = this; that.setData({ money: event.detail }) }, // 提现 nextFun(){ let that = this; if(!that.data.money){ wx.showToast({ title: "请输入提现金额", icon: "none" }); return; } let params = { money: parseFloat(that.data.money) }; myPro.wxRequest("store/tx/apply","POST",params).then(res=>{ wx.showToast({ title: res.msg, icon: "none" }); that.goCashOutLog() }).catch(err=>{ console.log('报错信息',err); wx.showToast({ title: err, icon: "none" }) }); }, // 进入提现列表 goCashOutLog(){ wx.navigateTo({ url: '/pages/shopRole/cashoutlog/index?status=0' }) } })