newuser.js 1.2 KB

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