lessonlist.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. gotoUserList: function (e) {
  30. wx.navigateTo({
  31. url: '../other/userlist',
  32. });
  33. },
  34. gotoMarketingUserList: function (e) {
  35. wx.navigateTo({
  36. url: '../../marketing/main/index',
  37. });
  38. },
  39. gotoCheckList: function () {
  40. var url = '../other/homework';
  41. if (this.data.CheckListUserID)
  42. url += "?UserID=" + this.data.CheckListUserID;
  43. wx.navigateTo({
  44. url: url,
  45. });
  46. },
  47. onKeyInput: function (e) {
  48. var userid = e.detail.value;
  49. var that = this;
  50. that.setData({
  51. CheckListUserID: userid,
  52. });
  53. },
  54. onShareAppMessage: function () {
  55. return {
  56. title: app.globalData.ShareTitle,
  57. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  58. imageUrl: "../images/program_screenshot_lesson1.png",
  59. }
  60. },
  61. })