index.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const _Http = getApp().globalData.http;
  2. let content = null;
  3. Page({
  4. data: {
  5. },
  6. onLoad(options) {},
  7. getList() {
  8. _Http.basic({
  9. "classname": "saletool.courseware.courseware",
  10. "method": "selectMenu",
  11. "content": {
  12. pageSize: 999
  13. }
  14. }).then(res => {
  15. console.log('分类', res)
  16. if (res.msg != '成功') return wx.showToast({
  17. title: res.msg,
  18. icon: "none"
  19. });
  20. this.setData({
  21. list: res.data
  22. })
  23. })
  24. _Http.basic({
  25. "classname": "saletool.courseware.courseware",
  26. "method": "queryReadLog",
  27. "content": {
  28. "pageNumber": 1,
  29. "pageSize": 10,
  30. "where": {
  31. "condition": ""
  32. }
  33. }
  34. }).then(res => {
  35. console.log('学习足迹', res)
  36. if (res.msg != '成功') return wx.showToast({
  37. title: res.msg,
  38. icon: "none"
  39. });
  40. this.setData({
  41. history: res.data
  42. })
  43. })
  44. },
  45. onShow() {
  46. this.getList()
  47. },
  48. })