|
@@ -130,6 +130,43 @@ Page({
|
|
|
teacher: wx.getStorageSync('user').data.data.isTeacher
|
|
|
})
|
|
|
}
|
|
|
+ /*科目信息*/
|
|
|
+ login.getOpenidSessionKey((res) => {
|
|
|
+ //console.log(res.data.data.uid);
|
|
|
+ APIClient.getEachSchedule({
|
|
|
+ uid: res.data.data.uid
|
|
|
+ }, {
|
|
|
+ "category": 5
|
|
|
+ }).success((res) => {
|
|
|
+ //console.log('科目信息' + JSON.stringify(res));
|
|
|
+ const lessonListLength = util.studyPageTime(res.data.data.lessonPage.list).length;
|
|
|
+ const previewLength = util.filter(res.data.data.lessonPage.list).length;
|
|
|
+ if(lessonListLength > 4) {
|
|
|
+ this.setData({
|
|
|
+ lessonListHeight: 144
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(previewLength > 4){
|
|
|
+ this.setData({
|
|
|
+ previewHeight: 144
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ courseData: res.data.data,
|
|
|
+ materialData: util.filter(res.data.data.lessonPage.list),
|
|
|
+ list: util.studyPageTime(res.data.data.lessonPage.list),
|
|
|
+ wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }, () => {
|
|
|
+ this.setData({
|
|
|
+ flag: !this.data.flag
|
|
|
+ })
|
|
|
+ }, this.data.loginType);
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ onShow: function () {
|
|
|
const columnId = util.column('5').columnId;
|
|
|
/* 分享 */
|
|
|
this.distinction(2, columnId, 1, 2, res => {
|
|
@@ -176,45 +213,7 @@ Page({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
- /*科目信息*/
|
|
|
- login.getOpenidSessionKey((res) => {
|
|
|
- //console.log(res.data.data.uid);
|
|
|
- APIClient.getEachSchedule({
|
|
|
- uid: res.data.data.uid
|
|
|
- }, {
|
|
|
- "category": 5
|
|
|
- }).success((res) => {
|
|
|
- //console.log('科目信息' + JSON.stringify(res));
|
|
|
- const lessonListLength = util.studyPageTime(res.data.data.lessonPage.list).length;
|
|
|
- const previewLength = util.filter(res.data.data.lessonPage.list).length;
|
|
|
- if(lessonListLength > 4) {
|
|
|
- this.setData({
|
|
|
- lessonListHeight: 144
|
|
|
- })
|
|
|
- }
|
|
|
- if(previewLength > 4){
|
|
|
- this.setData({
|
|
|
- previewHeight: 144
|
|
|
- })
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- courseData: res.data.data,
|
|
|
- materialData: util.filter(res.data.data.lessonPage.list),
|
|
|
- list: util.studyPageTime(res.data.data.lessonPage.list),
|
|
|
- wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
|
|
|
- })
|
|
|
- })
|
|
|
- }, () => {
|
|
|
- this.setData({
|
|
|
- flag: !this.data.flag
|
|
|
- })
|
|
|
- }, this.data.loginType);
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- onShow: function () {
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
/* 转发*/
|
|
|
onShareAppMessage: function (ops) {
|