|
@@ -1,54 +1,59 @@
|
|
|
const _Http = getApp().globalData.http,
|
|
|
- getHeight = require("../../utils/getRheRemainingHeight");
|
|
|
+ getHeight = require("../../utils/getRheRemainingHeight");
|
|
|
let content = null;
|
|
|
Page({
|
|
|
- data: {
|
|
|
+ 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;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- onSearch({
|
|
|
- detail
|
|
|
- }) {
|
|
|
- content.where.condition = detail;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- onReady() {
|
|
|
- getHeight.getHeight('.head', this).then(scrollHeight => this.setData({
|
|
|
- scrollHeight
|
|
|
- }))
|
|
|
- },
|
|
|
+ },
|
|
|
+ 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;
|
|
|
+ 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',
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|