wallet.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // lionfish_comshop/pages/groupCenter/wallet.js
  2. var app = getApp();
  3. var util = require('../../utils/util.js');
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. showDialog: false
  10. },
  11. /**
  12. * 生命周期函数--监听页面加载
  13. */
  14. onLoad: function (options) {
  15. },
  16. /**
  17. * 点击提现
  18. */
  19. cashMoney: function(){
  20. var community_info = this.data.community_info;
  21. var pages_all = getCurrentPages();
  22. if (pages_all.length > 3) {
  23. wx.redirectTo({
  24. url: '/lionfish_comshop/pages/groupCenter/editInfo'
  25. })
  26. } else {
  27. wx.navigateTo({
  28. url: '/lionfish_comshop/pages/groupCenter/editInfo'
  29. })
  30. }
  31. },
  32. /**
  33. * 确认对话框
  34. */
  35. confirm: function(){
  36. this.setData({
  37. showDialog: false
  38. })
  39. console.log(111)
  40. },
  41. /**
  42. * 取消对话框
  43. */
  44. cancel: function(){
  45. this.setData({
  46. showDialog: false
  47. })
  48. },
  49. /**
  50. * 生命周期函数--监听页面初次渲染完成
  51. */
  52. onReady: function () {
  53. },
  54. /**
  55. * 生命周期函数--监听页面显示
  56. */
  57. onShow: function () {
  58. var token = wx.getStorageSync('token');
  59. var that = this;
  60. app.util.request({
  61. 'url': 'entry/wxapp/user',
  62. 'data': {
  63. controller: 'community.get_community_info',
  64. 'token': token
  65. },
  66. dataType: 'json',
  67. success: function (res) {
  68. if (res.data.code == 0) {
  69. that.setData({
  70. member_info: res.data.member_info,
  71. community_info: res.data.community_info,
  72. commission_info: res.data.commission_info,
  73. total_order_count: res.data.total_order_count,
  74. total_member_count: res.data.total_member_count,
  75. today_order_count: res.data.today_order_count,
  76. today_effect_order_count: res.data.today_effect_order_count,
  77. today_pay_order_count: res.data.today_pay_order_count,
  78. today_pre_total_money: res.data.today_pre_total_money,
  79. today_all_total_money: res.data.today_all_total_money,
  80. month_pre_total_money: res.data.month_pre_total_money,
  81. pre_total_money: res.data.pre_total_money,
  82. wait_sub_total_money: res.data.wait_sub_total_money,
  83. tixian_sucess_money: res.data.tixian_sucess_money
  84. });
  85. } else {
  86. //is_login
  87. wx.reLaunch({
  88. url: '/lionfish_comshop/pages/user/me',
  89. })
  90. }
  91. }
  92. })
  93. }
  94. })