newuser.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. var app = getApp();
  4. Page({
  5. data: {
  6. PanelShow: 0,
  7. ImagePath: app.globalData.uploadImageUrl,
  8. },
  9. onLoad: function (options) {
  10. var that = this;
  11. that.setData({
  12. Containnerheight: main.getWindowHeight(),
  13. });
  14. that.init();
  15. wx.setNavigationBarColor({
  16. frontColor: "#ffffff",
  17. backgroundColor: "#9BD41C",
  18. });
  19. },
  20. init: function () {
  21. var that = this;
  22. main.getData("GetClassList?Flag=0", function (data) {
  23. if (data && data.length>0) {
  24. that.setData({
  25. StartDate: common.formatDateCHS(data[0].StartDate),
  26. })
  27. }
  28. });
  29. },
  30. payMoney: function () {
  31. var that = this;
  32. var money = 1;
  33. var detail = {};
  34. //console.log(detail);
  35. //console.log(money);
  36. var remark = null;
  37. main.payMoney(9, remark, money, detail, function () {
  38. that.setData({
  39. PanelShow:1,
  40. });
  41. wx.setNavigationBarColor({
  42. frontColor: "#000000",
  43. backgroundColor: "#ffffff",
  44. });
  45. });
  46. },
  47. copyManager: function () {
  48. wx.setClipboardData({
  49. data: "秒过学习法",
  50. success(res) {
  51. wx.showModal({
  52. title: '已复制',
  53. showCancel: false,
  54. content: "请在微信添加公众号中长按粘贴。",
  55. confirmText: "知道了",
  56. });
  57. }
  58. });
  59. },
  60. gotoIndex: function () {
  61. wx.reLaunch({
  62. url: '../index/index',
  63. })
  64. },
  65. onShareAppMessage: function () {
  66. return {
  67. title: app.globalData.ShareTitle,
  68. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  69. imageUrl: app.globalData.ShareImage,
  70. }
  71. },
  72. })