evaluationCourseDetail.js 727 B

1234567891011121314151617181920212223242526272829303132
  1. const app = require('../../utils/util.js');
  2. const tools = require('../../utils/tools.js');
  3. Page({
  4. data: {
  5. gridArr: [],
  6. },
  7. chengji(sessionKey, answersId) {
  8. wx.request({
  9. url: app.globalData.publicUrl + '/wx/answer/detail',
  10. method: "post",
  11. data: {
  12. sessionKey: sessionKey,
  13. answersId: answersId
  14. },
  15. success: (res) => {
  16. console.log(res,"sssssss");
  17. if (res.data.code == 0) {
  18. this.setData({
  19. gridArr: res.data.list
  20. })
  21. }
  22. }
  23. })
  24. },
  25. async onLoad(options) {
  26. let answersId = options.answersId;
  27. const sessionKey = await tools.checkSessionAndLogin();
  28. this.chengji(sessionKey, answersId);
  29. }
  30. })