newuser.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. gotoPanel2:function(){
  31. this.setData({
  32. PanelShow:1,
  33. })
  34. },
  35. copyManager: function () {
  36. wx.setClipboardData({
  37. data: "秒过学习法",
  38. success(res) {
  39. wx.showModal({
  40. title: '已复制',
  41. showCancel: false,
  42. content: "请在微信添加公众号中长按粘贴。",
  43. confirmText: "知道了",
  44. });
  45. }
  46. });
  47. },
  48. gotoIndex: function () {
  49. wx.reLaunch({
  50. url: '../index/index',
  51. })
  52. },
  53. onShareAppMessage: function () {
  54. return {
  55. title: app.globalData.ShareTitle,
  56. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  57. imageUrl: app.globalData.ShareImage,
  58. }
  59. },
  60. })