newuser.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. },
  16. init: function () {
  17. var that = this;
  18. main.getData("GetClassList?Flag=0", function (data) {
  19. if (data && data.length>0) {
  20. that.setData({
  21. StartDate: common.formatDateCHS(data[0].StartDate),
  22. })
  23. }
  24. });
  25. },
  26. gotoPanel2:function(){
  27. this.setData({
  28. PanelShow:1,
  29. })
  30. },
  31. copyManager: function () {
  32. wx.setClipboardData({
  33. data: "秒过学习法",
  34. success(res) {
  35. wx.showModal({
  36. title: '已复制',
  37. showCancel: false,
  38. content: "请在微信添加公众号中长按粘贴。",
  39. confirmText: "知道了",
  40. });
  41. }
  42. });
  43. },
  44. gotoIndex: function () {
  45. wx.reLaunch({
  46. url: '../index/index',
  47. })
  48. },
  49. onShareAppMessage: function () {
  50. return {
  51. title: app.globalData.ShareTitle,
  52. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  53. imageUrl: app.globalData.ShareImage,
  54. }
  55. },
  56. })