lessonlist.js 991 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. },
  7. onLoad: function () {
  8. var that = this;
  9. that.setData({
  10. CheckListUserID: app.globalData.userInfo.UserID,
  11. Containnerheight: main.getWindowHeight(),
  12. UserID: app.globalData.userInfo.UserID,
  13. });
  14. var userid = app.globalData.userInfo.UserID;
  15. main.getData("GetMiaoguoCheckList?UserID=" + userid, function (data) {
  16. if (data) {
  17. that.setData({
  18. List: data.List,
  19. });
  20. }
  21. });
  22. },
  23. gotoLesson: function (e) {
  24. var id = e.currentTarget.dataset.id;
  25. wx.navigateTo({
  26. url: '../other/lesson?LessonID=' + id,
  27. });
  28. },
  29. onShareAppMessage: function () {
  30. return {
  31. title: app.globalData.ShareTitle,
  32. path: app.globalData.SharePath + '?type=lesson&LessonID=all&UserID=' + app.globalData.userInfo.UserID,
  33. imageUrl: "../images/program_screenshot_lesson_a01.png",
  34. }
  35. },
  36. })