Bladeren bron

更改学习目标内容

Limengbo 6 jaren geleden
bovenliggende
commit
87891c7d16

+ 4 - 4
compontents/target/target.js

@@ -5,8 +5,8 @@ Component({
    */
   properties: {
     wxObjectives: {
-      type: String,
-      value: ""
+      type: Array,
+      value: []
     }
   },
 
@@ -27,14 +27,14 @@ Component({
     onTap (e) {
       let flage = e.target.dataset.flag;
       if(flage){
-        this.util(flage, '156rpx');
+        this.util(flage, '120rpx');
         this.setData({
           'flag': false,
           'downUp': '展开',
           'src': '../../pages/image/toUp.png'
         })
       } else {
-        this.util(flage, '200rpx');
+        this.util(flage, '100%');
         this.setData({
           'flag': true,
           'downUp': '收起',

+ 3 - 1
compontents/target/target.wxml

@@ -4,7 +4,9 @@
         <text>本周学习目标</text>
     </view>
     <view class="{{ flag ? 'target-txt-show' : 'target-txt'}}" animation="{{animationData}}">
-        <text class="week">第五周:{{wxObjectives}}</text>
+        <view class="week-con" wx:for="{{wxObjectives}}" wx:key="{{index}}">
+            {{item}}
+        </view>
     </view>
 
 

+ 1 - 1
compontents/target/target.wxss

@@ -15,7 +15,7 @@
 }
 
 .target-txt {
-    height: 156rpx;
+    height: 120rpx;
     display: -webkit-box;
     font-size: 28rpx;
     margin-top: 28rpx;

+ 4 - 2
pages/art/art.js

@@ -18,7 +18,8 @@ Page({
     lessonListHeight: '',
     previewHeight: '',
     productionMore: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
 
   /* 区分答疑和分享 */
@@ -165,7 +166,8 @@ Page({
         } 
         this.setData({
           courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list)
+          list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/art/art.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!-- 科学艺术 -->
           <view class="art">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 3 - 1
pages/chinese/chinese.js

@@ -15,7 +15,8 @@ Page({
     list: [],
     lessonListHeight: '',
     previewHeight: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
 
   /* 区分答疑和分享 */
@@ -127,6 +128,7 @@ Page({
         this.setData({
           courseData: res.data.data,
           list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/chinese/chinese.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!--中文  -->
           <view class="chinese">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 4 - 2
pages/english/english.js

@@ -15,7 +15,8 @@ Page({
     list: [],
     lessonListHeight: '',
     previewHeight: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
 
   /* 区分答疑和分享 */
@@ -127,7 +128,8 @@ Page({
         } 
         this.setData({
           courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list)
+          list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/english/english.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!-- 英语分级阅读 -->
           <view class="english">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 4 - 2
pages/language/language.js

@@ -15,7 +15,8 @@ Page({
     list: [],
     lessonListHeight: '',
     previewHeight: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
 
   /* 区分答疑和分享 */
@@ -123,7 +124,8 @@ Page({
         } 
         this.setData({
           courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list)
+          list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/language/language.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!-- 语文 -->
           <view class="language">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 4 - 2
pages/mathematics/mathematics.js

@@ -15,7 +15,8 @@ Page({
     list: [],
     lessonListHeight: '',
     previewHeight: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
 
   /* 区分答疑和分享 */
@@ -126,7 +127,8 @@ Page({
         } 
         this.setData({
           courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list)
+          list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/mathematics/mathematics.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!-- 数学 -->
           <view class="mathematics">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 3 - 2
pages/recommend/recommend.js

@@ -8,7 +8,7 @@ Page({
   data: {
     recommendData: {},
     metalsStrategy: [],
-    downUp: '展开'    
+    wxObjectives: ''  
   },
 
   onLoad: function (options) {
@@ -23,7 +23,8 @@ Page({
         console.log(res.data)
         this.setData({
           recommendData: res.data.data,
-          metalsStrategy:util.strategy(res.data.data.weekPageThemeConfig.metalsStrategy)
+          metalsStrategy:util.strategy(res.data.data.weekPageThemeConfig.metalsStrategy),
+          wxObjectives: util.strategy(res.data.data.weekPageThemeConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/recommend/recommend.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true">
         <view class="recommend">
             <!-- 本周推荐 -->
-            <target wxObjectives="{{recommendData.weekPageThemeConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <view class="recommend-exchange">
                 <view class="auto-img">

+ 4 - 2
pages/science/science.js

@@ -18,7 +18,8 @@ Page({
     lessonListHeight: '',
     previewHeight: '',
     productionMore: '',
-    questionsMore: ''
+    questionsMore: '',
+    wxObjectives: []
   },
   /* 区分答疑和分享 */
   distinction: function(type, columnId, pageNo, pageSize, success) {
@@ -163,7 +164,8 @@ Page({
         } 
         this.setData({
           courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list)
+          list: util.studyPageTime(res.data.data.lessonPage.list),
+          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
         })
       })
     }, function() {

+ 1 - 1
pages/science/science.wxml

@@ -7,7 +7,7 @@
       <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true" scroll-into-view="{{position}}">
           <!-- 科学 -->
           <view class="science">
-            <target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
+            <target wxObjectives="{{wxObjectives}}"/>
 
             <lessonList 
             lessonData="{{list}}"

+ 1 - 1
utils/util.js

@@ -83,7 +83,7 @@ function studyPageTime (arr) {
 
 //本周推荐勋章攻略 取消<br>
 function strategy (str) {
-  return str.split('<br>')
+  return str.split('<br/>');
 }
 
 //判断能不能预览