studentBookList.js 668 B

12345678910111213141516171819202122232425
  1. import Api from "../../model/api";
  2. import {getDataSet} from "../../utils/utils";
  3. import Route from "../../model/route";
  4. import {htmlTypes} from "../../model/enum";
  5. Page({
  6. data: {
  7. list: [],
  8. teamId: ''
  9. },
  10. onLoad: async function (options) {
  11. const {teamId} = options;
  12. this.data.teamId = teamId;
  13. let res = await Api.getBook({
  14. teamId: this.data.teamId
  15. }, true);
  16. this.setData({
  17. list: res.rows, teamId
  18. })
  19. },
  20. click(e) {
  21. let index = getDataSet(e, "index");
  22. Route.toStudentBook(htmlTypes.STUDENT_BOOK, "学员手册", this.data.teamId, index);
  23. }
  24. });