evaluationCourseDetail.js 682 B

123456789101112131415161718192021222324252627282930
  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. if (res.data.code == 0) {
  17. this.setData({
  18. gridArr: res.data.list
  19. })
  20. }
  21. }
  22. })
  23. },
  24. async onLoad(options) {
  25. let answersId = options.answersId;
  26. const sessionKey = await tools.checkSessionAndLogin();
  27. this.chengji(sessionKey, answersId);
  28. }
  29. })