|
|
@@ -39,7 +39,9 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- onSearch({detail}) {
|
|
|
+ onSearch({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
this.data.content.where.condition = detail;
|
|
|
this.getList(true);
|
|
|
},
|
|
|
@@ -47,6 +49,35 @@ Page({
|
|
|
const {
|
|
|
sat_coursewareid
|
|
|
} = e.currentTarget.dataset;
|
|
|
+
|
|
|
+
|
|
|
+ let that = this;
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "saletool.courseware.coursewaretest",
|
|
|
+ "method": "queryTestList",
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 999,
|
|
|
+ sat_coursewareid,
|
|
|
+ "where": {
|
|
|
+ "status": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (res.data.length == 0) {
|
|
|
+ this.createTest();
|
|
|
+ } else {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/exam/detail?id=' + res.data[res.data.length - 1].sat_courseware_testid,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ createTest(sat_coursewareid) {
|
|
|
_Http.basic({
|
|
|
"classname": "saletool.courseware.coursewaretest",
|
|
|
"method": "createTest",
|