systemsetting.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. List: [],
  7. IsPay: true,
  8. IsShow: 0,
  9. },
  10. onLoad: function (options) {
  11. var that = this;
  12. var childUserID = 0;
  13. if (app.globalData.userInfo.ChildUserID && app.globalData.userInfo.ChildUserID != undefined)
  14. childUserID = app.globalData.userInfo.ChildUserID;
  15. var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
  16. var today15 = common.formatDateCHS(common.formatTime(common.addDate("d", 15, new Date())));
  17. var isPay = true;
  18. if (productServiceTime > today15) {
  19. isPay = false;
  20. }
  21. that.setData({
  22. Containnerheight: main.getWindowHeight(),
  23. ProgramName: app.globalData.ProgramName,
  24. Version: app.globalData.Version,
  25. ProductServiceTime: productServiceTime,
  26. IsPay: isPay,
  27. IsShow: app.globalData.userInfo.IsShow,
  28. ChildUserID: childUserID,
  29. });
  30. },
  31. gotoPay: function () {
  32. var payindex = 3;
  33. if (app.globalData.userInfo.IsFinishTask == 1)
  34. payindex = 2;
  35. wx.navigateTo({
  36. url: '../other/pay?paypanel=1&payindex=' + payindex,
  37. });
  38. },
  39. gotoBinding: function () {
  40. wx.navigateTo({
  41. url: '../other/binding',
  42. })
  43. },
  44. gotoUserbook:function(){
  45. wx.navigateTo({
  46. url: '../other/userbook',
  47. });
  48. },
  49. updateMember: function () {
  50. wx.reLaunch({
  51. url: '../index/index',
  52. })
  53. },
  54. gotoMarketingUserList: function (e) {
  55. wx.navigateTo({
  56. url: '../../marketing/main/index',
  57. });
  58. },
  59. onShareAppMessage: function () {
  60. return {
  61. title: app.globalData.ShareTitle,
  62. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  63. imageUrl: app.globalData.ShareImage,
  64. }
  65. },
  66. })