Pārlūkot izejas kodu

Merge branch 'HEAD' of http://dev.schoolwisdoms.com/xzh/schoolwisdoms-student-mp

# Conflicts:
#	pages/makePiano/makePiano.js

Signed-off-by: yukangzhe <382985154@qq.com>
yukangzhe 3 gadi atpakaļ
vecāks
revīzija
c4c933bb89

+ 4 - 6
pages/makePiano/makePiano.js

@@ -269,16 +269,14 @@ Page({
     const urls = urlDef.urls;
 
     let sl = this.data.schoolList;
-    let s = sl.filter(o => o.id == this.data.schoolList[this.data.schoolIndex].id)[0];
+    let s = sl.filter(o => o.id == sid)[0];
 
     let w = this.data.weekList[this.data.curIndex];
 
     let date = w.ds
-    let week = w.ws
-    if(week == 0){
-      week = 7
-    }
-    let params = { 'q.orgId': this.data.schoolList[this.data.schoolIndex].id, 'q.studentId': this.data.curStu.studentId, 'q.date': date, 'q.week': week, 'q.timeScope': this.data.timeScope }
+    let week = w.ws + 1;
+
+    let params = { 'q.orgId': sid, 'q.studentId': this.data.curStu.studentId, 'q.date': date, 'q.week': week, 'q.timeScope': this.data.timeScope }
     // params['q.timeScope'] = ''; 时段
     util.apiPost(urls.query_school_attence, params).then(rs => {
       s.items = rs

+ 3 - 3
pages/orderClassDetail/orderClassDetail.js

@@ -46,9 +46,9 @@ Page({
     }
     util.apiPost(urls.get_order, params).then(rs => {
       if (rs != null) {
-        // rs[0].payDate = this.renderTime(rs[0].payDate)
-        // this.setData({ items: rs, order: rs[0] })
-        // this.queryContract()
+        rs[0].payDate = this.renderTime(rs[0].payDate)
+        this.setData({ items: rs, order: rs[0] })
+        this.queryContract()
       }
     })
   },