This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/pages/user/wallet/index.js

71 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-04-25 22:59:04 +08:00
const App = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: {},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let _this = this;
// 获取我的钱包
_this.getUserDetail();
},
/**
* 获取我的钱包
*/
getUserDetail: function() {
let _this = this;
App._get('user.wallet/index', {}, function(result) {
_this.setData(result.data);
});
},
/**
* 跳转充值页面
*/
onTargetRecharge(e) {
// 记录formId
App.saveFormId(e.detail.formId);
wx.navigateTo({
url: '../recharge/index'
})
},
/**
* 跳转充值记录页面
*/
onTargetRechargeOrder(e) {
// 记录formId
App.saveFormId(e.detail.formId);
wx.navigateTo({
url: '../recharge/order/index'
})
},
/**
* 跳转账单详情页面
*/
onTargetBalanceLog(e) {
// 记录formId
App.saveFormId(e.detail.formId);
wx.navigateTo({
url: '../wallet/balance/log'
})
},
})