studentList.js 633 B

1234567891011121314151617181920212223242526272829303132
  1. const app = require('../../utils/util.js');
  2. Page({
  3. data: {
  4. Arr: []
  5. },
  6. onLoad: function (options) {
  7. wx.showLoading({
  8. title: '加载中',
  9. })
  10. console.log(options.id)
  11. wx.request({
  12. url: app.globalData.publicUrl + '/wx/student/selStudentList',
  13. method: "post",
  14. data: {
  15. clasId: options.id
  16. },
  17. success: (res) => {
  18. if (res.data.code == 0) {
  19. this.setData({
  20. Arr: res.data.data
  21. })
  22. wx.hideLoading()
  23. } else {
  24. wx.hideLoading()
  25. }
  26. },
  27. fail: () => {
  28. wx.hideLoading()
  29. }
  30. })
  31. }
  32. })