1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- const _Http = getApp().globalData.http,
- getHeight = require("../../utils/getRheRemainingHeight");
- let content = null;
- Page({
- data: {
- },
- onLoad(options) {
- content = {
- nacache: true,
- pageNumber: 1,
- pageSize: 999,
- where: {
- condition: "",
- sat_courseware_classid: options.id,
- learnstatus: ""
- }
- }
- this.getList()
- },
- getList() {
- _Http.basic({
- "classname": "saletool.courseware.courseware",
- "method": "selectList",
- content
- }).then(res => {
- console.log('课程列表', res)
- this.selectComponent('#ListBox').RefreshToComplete();
- if (res.msg != '成功') return wx.showToast({
- title: res.msg,
- icon: "none"
- });
- this.setData({
- list: res.data,
- total: res.total
- })
- })
- },
- tabsChange(e) {
- content.where.learnstatus = e.detail.title == '全部' ? '' : e.detail.title;
- this.getList();
- },
- onSearch({
- detail
- }) {
- content.where.condition = detail;
- this.getList();
- },
- onReady() {
- getHeight.getHeight('.head', this).then(scrollHeight => this.setData({
- scrollHeight
- }))
- },
- toExam() {
- wx.navigateTo({
- url: '/pages/exam/index',
- })
- }
- })
|