|
@@ -42,7 +42,6 @@ Page({
|
|
|
"method": "selectMenu",
|
|
|
"content": {}
|
|
|
}).then(res => {
|
|
|
- console.log("商学院分类", res)
|
|
|
if (res.msg != '成功') return this.selectMenu(index + 1)
|
|
|
let str = JSON.stringify(res.data).replace(/classname/g, 'text').replace(/sat_courseware_classid/g, 'id');
|
|
|
this.setData({
|
|
@@ -50,6 +49,14 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ toDetail(e) {
|
|
|
+ const {
|
|
|
+ item
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
+ wx.navigateTo({
|
|
|
+ url: './detail?item=' + JSON.stringify(item),
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
/* 获取列表 */
|
|
|
selectList(init = false) {
|
|
@@ -59,24 +66,23 @@ Page({
|
|
|
})
|
|
|
if (this.data.content.pageNumber > this.data.content.pageTotal) return;
|
|
|
let content = this.data.content;
|
|
|
- content.where.sat_courseware_classid = this.data.activeId;
|
|
|
+ (this.data.activeId == "") ? "" : content.where.sat_courseware_classid = this.data.activeId;
|
|
|
_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.data,
|
|
|
icon: "none"
|
|
|
})
|
|
|
-
|
|
|
this.setData({
|
|
|
list: (res.pageNumber == 1) ? res.data : this.data.list.concat(res.data),
|
|
|
['content.pageNumber']: res.pageNumber + 1,
|
|
|
- ['content.pageTotal']: res.pageTotal
|
|
|
+ ['content.pageTotal']: res.pageTotal,
|
|
|
+ total: res.total
|
|
|
})
|
|
|
})
|
|
|
},
|