startClass.js 617 B

123456789101112131415161718192021222324252627
  1. const app = require('../../utils/util.js');
  2. const tools = require('../../utils/tools.js');
  3. Page({
  4. data: {
  5. dataArr: []
  6. },
  7. getjj(sessionKey) {
  8. wx.request({
  9. url: app.globalData.publicUrl + '/wx/student/selClasToo',
  10. method: "post",
  11. data: {
  12. sessionKey: sessionKey,
  13. isActive: "0"
  14. },
  15. success: (res)=> {
  16. console.log(res.data, "我是即将开班的列表")
  17. this.setData({
  18. dataArr: res.data.data
  19. })
  20. }
  21. })
  22. },
  23. async onLoad() {
  24. const sessionKey = await tools.checkSessionAndLogin();
  25. this.getjj(sessionKey);
  26. }
  27. })