| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- 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'
- })
- }
- })
|