index.js 933 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. const App = getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. userInfo: {},
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad(options) {
  13. },
  14. /**
  15. * 生命周期函数--监听页面显示
  16. */
  17. onShow() {
  18. let _this = this;
  19. // 获取我的钱包
  20. _this.getUserDetail();
  21. },
  22. /**
  23. * 获取我的钱包
  24. */
  25. getUserDetail: function() {
  26. let _this = this;
  27. App._get('user.wallet/index', {}, function(result) {
  28. _this.setData(result.data);
  29. });
  30. },
  31. /**
  32. * 跳转充值页面
  33. */
  34. onTargetRecharge(e) {
  35. wx.navigateTo({
  36. url: '../recharge/index'
  37. })
  38. },
  39. /**
  40. * 跳转充值记录页面
  41. */
  42. onTargetRechargeOrder(e) {
  43. wx.navigateTo({
  44. url: '../recharge/order/index'
  45. })
  46. },
  47. /**
  48. * 跳转账单详情页面
  49. */
  50. onTargetBalanceLog(e) {
  51. wx.navigateTo({
  52. url: '../wallet/balance/log'
  53. })
  54. },
  55. })