chengjie лет назад: 6
Родитель
Сommit
55f783042c
8 измененных файлов с 50 добавлено и 38 удалено
  1. 1 1
      app.js
  2. 8 0
      pages/main/detail.js
  3. 2 1
      pages/main/detail.json
  4. 6 6
      pages/main/detail.wxml
  5. 2 2
      pages/main/preview.js
  6. 27 27
      pages/main/preview.wxml
  7. 3 0
      pages/main/preview.wxss
  8. 1 1
      project.config.json

+ 1 - 1
app.js

@@ -25,7 +25,7 @@ App({
25
     }
25
     }
26
   },
26
   },
27
   globalData: {
27
   globalData: {
28
-    Version: "1.0.0.19",
28
+    Version: "1.0.0.20",
29
     IsProduction: true,
29
     IsProduction: true,
30
     ShareTitle: "可以用来记忆一切的工具",
30
     ShareTitle: "可以用来记忆一切的工具",
31
     SharePath: "pages/index/index",
31
     SharePath: "pages/index/index",

+ 8 - 0
pages/main/detail.js

@@ -67,6 +67,8 @@ Page({
67
 
67
 
68
       listTaskFinished = [];
68
       listTaskFinished = [];
69
       that.setSoundFile(1);
69
       that.setSoundFile(1);
70
+
71
+      
70
     }
72
     }
71
     else {
73
     else {
72
       that.setSoundFile(-1);
74
       that.setSoundFile(-1);
@@ -93,6 +95,8 @@ Page({
93
     clearInterval(intervalSound);
95
     clearInterval(intervalSound);
94
   },
96
   },
95
   onPullDownRefresh: function () {
97
   onPullDownRefresh: function () {
98
+    this.onShowAnswer({currentTarget:{dataset:{start:true}}});
99
+    wx.stopPullDownRefresh();
96
   },
100
   },
97
   setSoundFile: function (isFinish) {//isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
101
   setSoundFile: function (isFinish) {//isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
98
     var that = this;
102
     var that = this;
@@ -668,6 +672,10 @@ Page({
668
           Speed1: speed1 + "张题卡",
672
           Speed1: speed1 + "张题卡",
669
           Speed2: speed2,
673
           Speed2: speed2,
670
         });
674
         });
675
+
676
+        wx.setNavigationBarTitle({
677
+          title: "报告"
678
+        });
671
       }
679
       }
672
     });
680
     });
673
   },
681
   },

+ 2 - 1
pages/main/detail.json

@@ -1,3 +1,4 @@
1
 {
1
 {
2
-  "navigationBarTitleText": "学习中"
2
+  "navigationBarTitleText": "学习中",
3
+  "enablePullDownRefresh": true
3
 }
4
 }

+ 6 - 6
pages/main/detail.wxml

@@ -42,11 +42,11 @@
42
         <block wx:for="{{TaskInfo.ContentNew.Field[1]}}" wx:key="index">
42
         <block wx:for="{{TaskInfo.ContentNew.Field[1]}}" wx:key="index">
43
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
43
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
44
 
44
 
45
-          <text class="textNormal" space='nbsp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
45
+          <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
46
 
46
 
47
-          <text class="textNormal FlexRow" space='nbsp' wx:if="{{item.Type=='line'}}">
47
+          <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
48
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
48
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
49
-              <text space='nbsp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
49
+              <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
50
           <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
50
           <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
51
         </block>
51
         </block>
52
         </text>
52
         </text>
@@ -88,11 +88,11 @@
88
         <block wx:for="{{TaskInfo.ContentNew.Field[itemParent]}}" wx:key="index">
88
         <block wx:for="{{TaskInfo.ContentNew.Field[itemParent]}}" wx:key="index">
89
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
89
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
90
 
90
 
91
-          <text class="textNormal2 textNormal" space='nbsp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
91
+          <text class="textNormal2 textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
92
 
92
 
93
-          <text class="textNormal2 FlexRow" space='nbsp' wx:if="{{item.Type=='line'}}">
93
+          <text class="textNormal2 FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
94
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
94
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
95
-              <text space='nbsp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
95
+              <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
96
           <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
96
           <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
97
         </block>
97
         </block>
98
         </text>
98
         </text>

+ 2 - 2
pages/main/preview.js

@@ -21,7 +21,7 @@ Page({
21
       ShowType: options.type,
21
       ShowType: options.type,
22
       MiaoguoCardID: id,
22
       MiaoguoCardID: id,
23
     });
23
     });
24
-    //console.log("MiaoguoCardID:" + id);
24
+    console.log("MiaoguoCardID:" + id);
25
 
25
 
26
     this.audioCtx = [];
26
     this.audioCtx = [];
27
 
27
 
@@ -86,7 +86,7 @@ Page({
86
 
86
 
87
     var isTodayPractice = true;
87
     var isTodayPractice = true;
88
     var task = app.globalData.TaskToday;
88
     var task = app.globalData.TaskToday;
89
-    if (task && (task.ListNew.length > 0 || task.ListHistory.length>0 || task.ListReview.length>0)) {
89
+    if (task && task.ListNew && (task.ListNew.length > 0 || task.ListHistory.length>0 || task.ListReview.length>0)) {
90
       for (var i = 0; i < task.ListNew.length; i++) {
90
       for (var i = 0; i < task.ListNew.length; i++) {
91
         if (task.ListNew[i].MiaoguoCardID == that.data.MiaoguoCardID) {
91
         if (task.ListNew[i].MiaoguoCardID == that.data.MiaoguoCardID) {
92
           isTodayPractice = false;
92
           isTodayPractice = false;

+ 27 - 27
pages/main/preview.wxml

@@ -12,22 +12,22 @@
12
     </view>
12
     </view>
13
     <view class="panelTop1"></view>
13
     <view class="panelTop1"></view>
14
   </block>
14
   </block>
15
-  <view class="panelField{{ShowType}} panelField1 FlexColumn" bindlongpress='editField' data-id="1">
15
+  <view class="panelField{{ShowType}} panelField1 FlexColumn">
16
     <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
16
     <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
17
       <block wx:for="{{Field[1]}}" wx:key="index">
17
       <block wx:for="{{Field[1]}}" wx:key="index">
18
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
18
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
19
-        <text class="textNormal" space='nbsp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
20
-        <text class="textNormal FlexRow" space='nbsp' wx:if="{{item.Type=='line'}}">
19
+        <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
20
+        <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
21
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
21
           <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
22
-              <text space='nbsp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
23
-          <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
24
-        </block>
25
-        </text>
26
-        <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
27
-          <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
28
-        </view>
29
-        <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</text>
30
-        <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
22
+              <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
23
+        <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
24
+      </block>
25
+      </text>
26
+      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
27
+        <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
28
+      </view>
29
+      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</text>
30
+      <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
31
       </block>
31
       </block>
32
     </view>
32
     </view>
33
   </view>
33
   </view>
@@ -39,33 +39,33 @@
39
     </view>
39
     </view>
40
     <view wx:if="{{true}}"></view>
40
     <view wx:if="{{true}}"></view>
41
   </view>
41
   </view>
42
-  
43
-  <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{Field[itemParent].length>0}}" bindlongpress='editField' data-id="{{itemParent}}">
42
+
43
+  <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{Field[itemParent].length>0}}" >
44
     <view wx:if="{{itemParent==3}}" class="lineField"></view>
44
     <view wx:if="{{itemParent==3}}" class="lineField"></view>
45
 
45
 
46
     <view class="panelField21 panelItem FlexRow">
46
     <view class="panelField21 panelItem FlexRow">
47
       <block wx:for="{{Field[itemParent]}}" wx:key="index">
47
       <block wx:for="{{Field[itemParent]}}" wx:key="index">
48
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
48
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
49
 
49
 
50
-        <text class="textNormal" space='nbsp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
50
+        <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
51
 
51
 
52
-        <text class="textNormal FlexRow" space='nbsp' wx:if="{{item.Type=='line'}}">
52
+        <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
53
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
53
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
54
-              <text space='nbsp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
55
-          <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
56
-        </block>
57
-        </text>
54
+              <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
55
+        <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
56
+      </block>
57
+      </text>
58
 
58
 
59
-        <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
60
-          <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
61
-        </view>
59
+      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
60
+        <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
61
+      </view>
62
 
62
 
63
-        <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
63
+      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
64
 
64
 
65
-        <!-- <image class="imageBishun" wx:if="{{item.Type=='image' && !item.Url}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" />
65
+      <!-- <image class="imageBishun" wx:if="{{item.Type=='image' && !item.Url}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" />
66
          -->
66
          -->
67
-        <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
68
-      
67
+      <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
68
+
69
       </block>
69
       </block>
70
     </view>
70
     </view>
71
   </view>
71
   </view>

+ 3 - 0
pages/main/preview.wxss

@@ -103,6 +103,9 @@
103
   text-decoration: underline;
103
   text-decoration: underline;
104
 }
104
 }
105
 
105
 
106
+.panelItem .textNormal {
107
+  width:650rpx;
108
+}
106
 .panelItem .textPinyin {
109
 .panelItem .textPinyin {
107
   text-decoration: underline;
110
   text-decoration: underline;
108
   margin-right: 10rpx;
111
   margin-right: 10rpx;

+ 1 - 1
project.config.json

@@ -43,7 +43,7 @@
43
 					"id": 0,
43
 					"id": 0,
44
 					"name": "分享",
44
 					"name": "分享",
45
 					"pathName": "pages/index/index",
45
 					"pathName": "pages/index/index",
46
-					"query": "UserID=1&Share=1&MiaoguoCardID=4769",
46
+					"query": "UserID=1&Share=1&MiaoguoCardID=4997",
47
 					"scene": null
47
 					"scene": null
48
 				},
48
 				},
49
 				{
49
 				{