lessonlist.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. List: ['第一课', '第二课', '第三课', '第四课', '第五课', '第六课', '第七课', '第八课'],
  7. },
  8. onLoad: function () {
  9. var that = this;
  10. that.setData({
  11. CheckListUserID:app.globalData.userInfo.UserID,
  12. Containnerheight: main.getWindowHeight(),
  13. });
  14. },
  15. gotoLesson: function (e) {
  16. var id=e.currentTarget.dataset.id;
  17. wx.navigateTo({
  18. url: '../other/lesson?LessonID='+id,
  19. });
  20. },
  21. gotoUserList: function (e) {
  22. wx.navigateTo({
  23. url: '../other/userlist',
  24. });
  25. },
  26. gotoCheckList: function(){
  27. var url = '../other/homework';
  28. if (this.data.CheckListUserID)
  29. url+="?UserID="+this.data.CheckListUserID;
  30. wx.navigateTo({
  31. url: url,
  32. });
  33. },
  34. onKeyInput: function (e) {
  35. var userid = e.detail.value;
  36. var that = this;
  37. that.setData({
  38. CheckListUserID: userid,
  39. });
  40. },
  41. onShareAppMessage: function () {
  42. return {
  43. title: app.globalData.ShareTitle,
  44. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  45. imageUrl: app.globalData.ShareImage,
  46. }
  47. },
  48. })