chengjie 6 anni fa
parent
commit
16097269c6

+ 2 - 1
app.js

@@ -25,7 +25,7 @@ App({
25
     }
25
     }
26
   },
26
   },
27
   globalData: {
27
   globalData: {
28
-    Version: "1.0.1.2",
28
+    Version: "1.0.1.3",
29
     IsProduction: true,
29
     IsProduction: true,
30
     ShareTitle: "可以用来记忆一切的工具",
30
     ShareTitle: "可以用来记忆一切的工具",
31
     SharePath: "pages/index/index",
31
     SharePath: "pages/index/index",
@@ -61,6 +61,7 @@ App({
61
     TempFieldNumber:0,//资料搜索时的段落编号
61
     TempFieldNumber:0,//资料搜索时的段落编号
62
     TempSearcchBackNumber:3,//资料搜索时返回的页面数
62
     TempSearcchBackNumber:3,//资料搜索时返回的页面数
63
     MemoryLevel:0,//记忆水平
63
     MemoryLevel:0,//记忆水平
64
+    ColorIndex:0,//色彩方案
64
 
65
 
65
   }
66
   }
66
 })
67
 })

+ 2 - 1
app.json

@@ -1,6 +1,8 @@
1
 {
1
 {
2
   "pages": [
2
   "pages": [
3
     "pages/index/index",
3
     "pages/index/index",
4
+    "pages/other/test",
5
+    "pages/main/colorplan",
4
     "pages/index/notice",
6
     "pages/index/notice",
5
     "pages/index/accredit",
7
     "pages/index/accredit",
6
     "pages/main/default",
8
     "pages/main/default",
@@ -14,7 +16,6 @@
14
     "pages/main/searchWeb1",
16
     "pages/main/searchWeb1",
15
     "pages/main/searchWeb",
17
     "pages/main/searchWeb",
16
     "pages/main/detail",
18
     "pages/main/detail",
17
-    "pages/main/colorplan",
18
     "pages/main/memoryLevel",
19
     "pages/main/memoryLevel",
19
     "pages/main/setting"
20
     "pages/main/setting"
20
   ],
21
   ],

BIN
pages/images/universalpic_read_mark_black_20x20.gif


+ 2 - 10
pages/index/accredit.js

@@ -98,20 +98,12 @@ Page({
98
       app.globalData.userInfo.Province = data.Province;
98
       app.globalData.userInfo.Province = data.Province;
99
       app.globalData.userInfo.Country = data.Country;
99
       app.globalData.userInfo.Country = data.Country;
100
       
100
       
101
-      if (data.IsMember){
102
-        app.globalData.userInfo.Country=data.IsMember;
103
-        that.buildInitData();
104
-      }
105
-      else{
106
-        wx.navigateBack({
107
-          delta: 1
108
-        });
109
-      }
101
+      app.globalData.userInfo.IsMember=data.IsMember;
102
+      that.buildInitData();
110
     });
103
     });
111
   },
104
   },
112
   buildInitData: function () {
105
   buildInitData: function () {
113
     //app.globalData.userInfo.UserID=4;
106
     //app.globalData.userInfo.UserID=4;
114
-
115
     wx.showLoading({
107
     wx.showLoading({
116
       title: '数据初始化',
108
       title: '数据初始化',
117
     });
109
     });

+ 13 - 6
pages/index/index.js

@@ -4,13 +4,20 @@ import main from '../../utils/main';
4
 const app = getApp();
4
 const app = getApp();
5
 const arrSentence = [
5
 const arrSentence = [
6
   "荀子曰:\n君子博学而日参省乎己,\n则知明而行无过矣",
6
   "荀子曰:\n君子博学而日参省乎己,\n则知明而行无过矣",
7
+  "为什么订正过的题目还会错?\n用秒过,不再错",
7
   "子曰:\n学而时习之,不亦悦乎。",
8
   "子曰:\n学而时习之,不亦悦乎。",
8
-  "子曰:\n学而不思则罔,\n思而不学则殆。",
9
-  "荀子曰:\n青,取之于蓝,而青于蓝。\n冰,水为之,而寒于水。",
10
-  "荀子曰:\n不积跬步,无以至千里;\n不积小流,无以成江海。",
11
-  "荀子曰:\n骐骥一跃,不能十步;\n驽马十驾,功在不舍。",
12
-  "荀子曰:\n锲而舍之,朽木不折;\n锲而不舍,金石可镂。",
13
-  "孟子曰:\n故天将降大任于是人也,\n必先苦其心志,劳其筋骨,\n饿其体肤……",
9
+  "秒过之前,错字连篇\n秒过之后,错字罕见",
10
+  "子曰:\n学而不思则罔\n思而不学则殆",
11
+  "记忆是思考的残留物\n唯有不断思考才能记住",
12
+  "荀子曰:\n青,取之于蓝,而青于蓝\n冰,水为之,而寒于水",
13
+  "舒适区练习不会带来改变\n只有刻意练习才能提高",
14
+  "荀子曰:\n不积跬步,无以至千里\n不积小流,无以成江海",
15
+  "死记硬背? No! \n测试可以知晓自己\n问题在哪里。",
16
+  "荀子曰:\n骐骥一跃,不能十步\n驽马十驾,功在不舍",
17
+  "同一时间反复练习?No! \n要间隔练习、穿插练习、换环境练习",
18
+  "荀子曰:\n锲而舍之,朽木不折\n锲而不舍,金石可镂",
19
+  "所谓的粗心\n只是对细节缺乏敏感\n秒过关注每个细节",
20
+  "孟子曰:\n故天将降大任于是人也\n必先苦其心志,劳其筋骨\n饿其体肤……",
14
 ];
21
 ];
15
 
22
 
16
 Page({
23
 Page({

+ 11 - 13
pages/main/add.js

@@ -18,6 +18,7 @@ Page({
18
     FieldContent: "",
18
     FieldContent: "",
19
     SoundSign: "[读]",
19
     SoundSign: "[读]",
20
     LineSign: "[线]",
20
     LineSign: "[线]",
21
+    IsTodayStudy:false,
21
     BtnArray: ["+", "-", "×", "÷", "=", "<", ">"],
22
     BtnArray: ["+", "-", "×", "÷", "=", "<", ">"],
22
   },
23
   },
23
   onLoad: function (options) {
24
   onLoad: function (options) {
@@ -28,11 +29,16 @@ Page({
28
     if (options.type2)
29
     if (options.type2)
29
       type2=options.type2;
30
       type2=options.type2;
30
 
31
 
32
+    var fieldNumber=0;
33
+    if (options.fieldid)
34
+      fieldNumber=options.fieldid;
35
+
31
     that.setData({
36
     that.setData({
32
       Containnerheight: main.getWindowHeight(),
37
       Containnerheight: main.getWindowHeight(),
33
       UpdateType: options.type,
38
       UpdateType: options.type,
34
       ShowType:type2,
39
       ShowType:type2,
35
       MiaoguoCardID: options.id,
40
       MiaoguoCardID: options.id,
41
+      FieldNumber:fieldNumber,
36
     });
42
     });
37
 
43
 
38
     var list = app.globalData.CardList;
44
     var list = app.globalData.CardList;
@@ -77,6 +83,10 @@ Page({
77
           title: '编辑题卡'
83
           title: '编辑题卡'
78
         });
84
         });
79
       }
85
       }
86
+
87
+      if (that.data.UpdateType == "edit3") {
88
+        that.gotoAddItem({ currentTarget: { dataset: { fieldid: that.data.FieldNumber}}});
89
+      }
80
     }
90
     }
81
   },
91
   },
82
   onUnload: function () {
92
   onUnload: function () {
@@ -221,8 +231,7 @@ Page({
221
         //   param: common.Encrypt(JSON.stringify(param1))
231
         //   param: common.Encrypt(JSON.stringify(param1))
222
         // }
232
         // }
223
         main.postData('AddMiaoguoCard?Type=' + that.data.UpdateType + '&UserID=' + userid, param1, function (data) {
233
         main.postData('AddMiaoguoCard?Type=' + that.data.UpdateType + '&UserID=' + userid, param1, function (data) {
224
-          if (that.data.UpdateType == "edit" || that.data.UpdateType == "edit2") {
225
-            
234
+          if (that.data.UpdateType == "edit" || that.data.UpdateType == "edit2" || that.data.UpdateType == "edit3") {
226
             that.onClose();
235
             that.onClose();
227
           }
236
           }
228
           else {
237
           else {
@@ -239,9 +248,6 @@ Page({
239
             taskToday.CardNumber++;
248
             taskToday.CardNumber++;
240
             app.globalData.TaskToday=taskToday;
249
             app.globalData.TaskToday=taskToday;
241
 
250
 
242
-            that.setData({
243
-              IsTodayStudy:false,
244
-            })
245
           }
251
           }
246
           wx.removeStorageSync("TempCardInfo");
252
           wx.removeStorageSync("TempCardInfo");
247
         });
253
         });
@@ -589,14 +595,6 @@ Page({
589
 
595
 
590
   updateField: function (history) {
596
   updateField: function (history) {
591
     var str = this.data.FieldContent;
597
     var str = this.data.FieldContent;
592
-    // str = main.decryptUrl(str);
593
-
594
-    // str = str.replace(/\[读\]/g, "\n[读]");
595
-    // str = str.replace(/\[图\]/g, "\n[图]");
596
-    // str = str.replace(/\[\/读\]/g, "[\/读]\n");
597
-    // str = str.replace(/\[\/图\]/g, "[\/图]\n");
598
-    // str = str.replace(/\n\n\n/g, "\n\n");
599
-
600
     var list = app.globalData.CardList;
598
     var list = app.globalData.CardList;
601
     var card={};
599
     var card={};
602
     for (var i = 0; i < list.length; i++) {
600
     for (var i = 0; i < list.length; i++) {

+ 3 - 3
pages/main/add.wxml

@@ -73,15 +73,15 @@
73
     <view class='panelSave0' bindtap="saveCard">保存</view>
73
     <view class='panelSave0' bindtap="saveCard">保存</view>
74
 
74
 
75
     <view class='panelSave00 FlexRow'>
75
     <view class='panelSave00 FlexRow'>
76
-      <view class="panelSave4 panelSave2 panelSave1" bindtap="onPreview" wx:if="{{ShowType==1}}">
76
+      <view class="panelSave4 panelSave2 panelSave1" bindtap="onPreview">
77
         预览
77
         预览
78
       </view>
78
       </view>
79
-      <view class="panelSave2 panelSave1" bindtap="onPreview" wx:if="{{ShowType==0}}">
79
+      <!-- <view class="panelSave2 panelSave1" bindtap="onPreview" wx:if="{{ShowType==0}}">
80
         预览
80
         预览
81
       </view>
81
       </view>
82
       <view class="panelSave3 panelSave1 FlexRow" bindtap="onGotoList" wx:if="{{ShowType==0}}">
82
       <view class="panelSave3 panelSave1 FlexRow" bindtap="onGotoList" wx:if="{{ShowType==0}}">
83
         <image src='../images/universalpic_card_gray_26x26.png' class="universalpic_card_gray_26x26" />
83
         <image src='../images/universalpic_card_gray_26x26.png' class="universalpic_card_gray_26x26" />
84
-      </view>
84
+      </view> -->
85
     </view>
85
     </view>
86
   </view>
86
   </view>
87
 </view>
87
 </view>

+ 1 - 1
pages/main/add.wxss

@@ -164,7 +164,7 @@
164
   font-size: 28rpx;
164
   font-size: 28rpx;
165
   color:#1e1e1e;
165
   color:#1e1e1e;
166
   text-align: left;
166
   text-align: left;
167
-  min-height:80rpx;
167
+  height:100rpx;
168
   line-height: 100rpx;
168
   line-height: 100rpx;
169
   flex-wrap: wrap;
169
   flex-wrap: wrap;
170
   justify-content: flex-start;
170
   justify-content: flex-start;

+ 1 - 3
pages/main/colorplan.wxml

@@ -15,9 +15,7 @@
15
     <view class="panelItem FlexColumn">
15
     <view class="panelItem FlexColumn">
16
       <view style="height:30rpx;"></view>
16
       <view style="height:30rpx;"></view>
17
       <view class="{{item.SelectedCSS}} panelItem0 FlexRow" wx:for="{{ColorList}}" wx:key="index" wx:if="{{index>0}}" bindtap="selectColor" data-index="{{index}}">
17
       <view class="{{item.SelectedCSS}} panelItem0 FlexRow" wx:for="{{ColorList}}" wx:key="index" wx:if="{{index>0}}" bindtap="selectColor" data-index="{{index}}">
18
-        <view class='panelItem01' style='background-color:{{item.BackColor}};color:{{item.FrontColor}};'>{{item.Name}}</view>
19
-        <view class='panelItem02' style='background-color:{{item.BackColor1}};'></view>
20
-        <view class='panelItem03' style='background-color:{{item.BackColor2}};'></view>
18
+        <view class='panelItem01' style='background-color:{{item.BackColor}};'>{{item.Name}}</view>
21
       </view>
19
       </view>
22
     </view>
20
     </view>
23
     <view class='lineFooter'></view>
21
     <view class='lineFooter'></view>

+ 4 - 14
pages/main/colorplan.wxss

@@ -27,6 +27,7 @@
27
 .panelItem0{
27
 .panelItem0{
28
   width:690rpx;
28
   width:690rpx;
29
   height:100rpx;
29
   height:100rpx;
30
+  color:#fff;
30
   border-radius: 10rpx;
31
   border-radius: 10rpx;
31
   margin-bottom: 30rpx;
32
   margin-bottom: 30rpx;
32
   border:1rpx solid #9B9B9B;
33
   border:1rpx solid #9B9B9B;
@@ -34,26 +35,15 @@
34
 
35
 
35
 .panelItemSelected{
36
 .panelItemSelected{
36
   border:5rpx solid #fff;
37
   border:5rpx solid #fff;
37
-  box-shadow:0 0 0 3px #1e1e1e;
38
+  box-shadow:0 0 0 3px #0071EF;
38
 }
39
 }
39
 
40
 
40
 .panelItem01{
41
 .panelItem01{
41
-  width:360rpx;
42
+  width:100%;
42
   line-height: 100rpx;
43
   line-height: 100rpx;
43
   padding-left: 30rpx;
44
   padding-left: 30rpx;
44
   font-weight: 400;
45
   font-weight: 400;
45
-  border-top-left-radius: 10rpx;
46
-  border-bottom-left-radius: 10rpx;
47
-}
48
-.panelItem02{
49
-  width:230rpx;
50
-  height:100rpx;
51
-}
52
-.panelItem03{
53
-  width:100rpx;
54
-  height:100rpx;
55
-  border-top-right-radius: 10rpx;
56
-  border-bottom-right-radius: 10rpx;
46
+  border-radius: 10rpx;
57
 }
47
 }
58
 
48
 
59
 .panelItem .panelItem1{
49
 .panelItem .panelItem1{

+ 5 - 0
pages/main/default.js

@@ -48,6 +48,11 @@ Page({
48
             });
48
             });
49
           });
49
           });
50
 
50
 
51
+          app.globalData.ColorIndex = wx.getStorageSync("ColorIndex");
52
+          var color = main.getDetailColor(-1);
53
+          if (!app.globalData.ColorIndex || app.globalData.ColorIndex > (color.length-1))
54
+            app.globalData.ColorIndex=0;
55
+
51
           that.getTaskTodayList();
56
           that.getTaskTodayList();
52
         }
57
         }
53
         else {
58
         else {

+ 170 - 102
pages/main/detail.js

@@ -3,16 +3,15 @@ import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
 
5
 
6
-const arrFontSize = [46, 68, 108];
6
+const arrFontSize = [48, 36, 68, 108];
7
 
7
 
8
 var innerAudioContext1;
8
 var innerAudioContext1;
9
 
9
 
10
 var listTaskFinished = []; //完成的任务
10
 var listTaskFinished = []; //完成的任务
11
 var timeStart; //计算时长
11
 var timeStart; //计算时长
12
 var TaskList = [];
12
 var TaskList = [];
13
-var iTimeout = 0;
14
 var arrImage = [], arrImage2 = [];
13
 var arrImage = [], arrImage2 = [];
15
-var intervalSound = 0, intervalRefresh=0;
14
+var intervalSound = 0, intervalRefresh = 0;
16
 
15
 
17
 Page({
16
 Page({
18
   data: {
17
   data: {
@@ -21,48 +20,36 @@ Page({
21
     NumberHistory: 30,
20
     NumberHistory: 30,
22
     IsShowNumberInfo: false,
21
     IsShowNumberInfo: false,
23
     TaskInfo: {},
22
     TaskInfo: {},
24
-    Color: {//配色1
25
-      Name: "黑白",
26
-      BackColor: "#ffffff",
27
-      BackColor1: "#D2D2D2",
28
-      FrontColor: "#1E1E1E",
29
-      FrontColor1: "rgba(0,0,0,0.3)",
30
-      BackColor2: "#E3E3E3",
31
-      BackColor20: 'rgba(227,227,227,0)',
32
-      FrontColor2: "#1E1E1E",
33
-      TagColor: "#9B9B9B",
34
-      FieldLineColor: "#4B3840",
35
-      IconColor: "black",
36
-      FrontColorNavigationBar: "#000000",
37
-    },
38
   },
23
   },
39
   onLoad: function () {
24
   onLoad: function () {
40
     wx.hideShareMenu();
25
     wx.hideShareMenu();
41
     var that = this;
26
     var that = this;
42
-    var height = app.globalData.systemInfo.screenHeight * 2-90;
43
-    var height2=750;
44
-    if (app.globalData.IsIPad){
45
-      height=960;
46
-      height2=670;
27
+    var height = app.globalData.systemInfo.screenHeight * 2 - 90;
28
+    var height2 = 750;
29
+    if (app.globalData.IsIPad) {
30
+      height = 960;
31
+      height2 = 670;
47
     }
32
     }
48
 
33
 
49
     that.setData({
34
     that.setData({
50
       Containnerheight: height,
35
       Containnerheight: height,
51
-      Containnerheight2: height-height2,
36
+      Containnerheight2: height - height2,
52
       IsShowAnswer: [0, 0],
37
       IsShowAnswer: [0, 0],
53
       CanUndo: 1,
38
       CanUndo: 1,
39
+      TaskInfo:{},
54
       IsIphoneX: main.checkIsIPhoneX(),
40
       IsIphoneX: main.checkIsIPhoneX(),
41
+      Color: main.getDetailColor(app.globalData.ColorIndex),
55
     });
42
     });
56
 
43
 
57
     innerAudioContext1 = wx.createInnerAudioContext();
44
     innerAudioContext1 = wx.createInnerAudioContext();
58
-    this.audioCtx=[];
45
+    this.audioCtx = [];
59
 
46
 
60
     this.getList();
47
     this.getList();
61
 
48
 
62
     this.getColor();
49
     this.getColor();
63
 
50
 
64
     this.getMemoryLevel();
51
     this.getMemoryLevel();
65
-    
52
+
66
   },
53
   },
67
   onShow: function () {
54
   onShow: function () {
68
     var that = this;
55
     var that = this;
@@ -70,15 +57,16 @@ Page({
70
       that.data.NumberReview == 0 &&
57
       that.data.NumberReview == 0 &&
71
       that.data.NumberHistory == 0) {
58
       that.data.NumberHistory == 0) {
72
 
59
 
60
+      that.setData({
61
+        CanUndo: 0,
62
+        TaskInfo:{},
63
+      });
73
       listTaskFinished = [];
64
       listTaskFinished = [];
74
-      that.setSoundFile(1);
75
-
76
-      
65
+      that.getTaskTime();
77
     }
66
     }
78
     else {
67
     else {
79
       that.setSoundFile(-1);
68
       that.setSoundFile(-1);
80
 
69
 
81
-
82
       var list = app.globalData.CardList;
70
       var list = app.globalData.CardList;
83
       if (list && list.length > 0) {
71
       if (list && list.length > 0) {
84
         for (var i = 0; i < list.length; i++) {
72
         for (var i = 0; i < list.length; i++) {
@@ -88,7 +76,7 @@ Page({
88
             that.setData({
76
             that.setData({
89
               TaskInfo: TaskList[0],
77
               TaskInfo: TaskList[0],
90
             });
78
             });
91
-            app.globalData.CardList=[];
79
+            app.globalData.CardList = [];
92
             break;
80
             break;
93
           }
81
           }
94
         }
82
         }
@@ -96,11 +84,11 @@ Page({
96
 
84
 
97
     }
85
     }
98
   },
86
   },
99
-  onUnload:function(){
87
+  onUnload: function () {
100
     clearInterval(intervalSound);
88
     clearInterval(intervalSound);
101
   },
89
   },
102
   onPullDownRefresh: function () {
90
   onPullDownRefresh: function () {
103
-    this.onShowAnswer({currentTarget:{dataset:{start:true}}});
91
+    this.onShowAnswer({ currentTarget: { dataset: { start: true } } });
104
     wx.stopPullDownRefresh();
92
     wx.stopPullDownRefresh();
105
   },
93
   },
106
   setSoundFile: function (isFinish) {//isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
94
   setSoundFile: function (isFinish) {//isFinish=3搁置 =2撤退 =1结束 =0正常 =-1开始
@@ -108,11 +96,13 @@ Page({
108
     var url = "/pages/sounds/";
96
     var url = "/pages/sounds/";
109
     if (isFinish == 1) {
97
     if (isFinish == 1) {
110
       url += "end.mp3";
98
       url += "end.mp3";
111
-      that.getTaskTime();
112
     }
99
     }
113
-    else if (isFinish == 2 || isFinish == 3) {
100
+    else if (isFinish == 2) {
114
       url += "short3.mp3";
101
       url += "short3.mp3";
115
     }
102
     }
103
+    else if (isFinish == 3) {
104
+      url += "short1.mp3";
105
+    }
116
     else {
106
     else {
117
       url += "short2.mp3";
107
       url += "short2.mp3";
118
     }
108
     }
@@ -127,25 +117,21 @@ Page({
127
   },
117
   },
128
   getColor: function () {
118
   getColor: function () {
129
     var that = this;
119
     var that = this;
130
-    common.getStorageValue(that, "ColorIndex", 0, function () {
131
-      var color = main.getDetailColor(that.data.ColorIndex);
132
-      that.setData({
133
-        Color: color,
134
-      });
135
-      if (wx.setBackgroundColor) {
136
-        wx.setBackgroundColor({
137
-          backgroundColor: color.BackColor,
138
-          backgroundColorTop: color.BackColor, 
139
-          backgroundColorBottom: color.BackColor2, 
140
-        })
141
-      }
142
-      if (wx.setNavigationBarColor) {
143
-        wx.setNavigationBarColor({
144
-          frontColor: color.FrontColorNavigationBar,
145
-          backgroundColor: color.BackColor,
146
-        })
147
-      }
148
-    });
120
+
121
+    if (wx.setBackgroundColor) {
122
+      wx.setBackgroundColor({
123
+        backgroundColor: that.data.Color.BackColor,
124
+        backgroundColorTop: that.data.Color.BackColor,
125
+        backgroundColorBottom: that.data.Color.BackColor,
126
+      })
127
+    }
128
+    if (wx.setNavigationBarColor) {
129
+      wx.setNavigationBarColor({
130
+        frontColor: "#000000",
131
+        backgroundColor: that.data.Color.BackColor,
132
+      })
133
+    }
134
+
149
   },
135
   },
150
   getList: function () {
136
   getList: function () {
151
     var task = app.globalData.TaskToday;
137
     var task = app.globalData.TaskToday;
@@ -205,12 +191,16 @@ Page({
205
       arrImage = TaskList[0].ContentNew.Images;
191
       arrImage = TaskList[0].ContentNew.Images;
206
       arrImage2 = TaskList[0].ContentNew.Images2;
192
       arrImage2 = TaskList[0].ContentNew.Images2;
207
     }
193
     }
208
-    
194
+
195
+    var taskInfo = TaskList[0];
196
+    if (!taskInfo)
197
+      taskInfo={};
198
+
209
     that.setData({
199
     that.setData({
210
       NumberNew: arrNew.length,
200
       NumberNew: arrNew.length,
211
       NumberReview: that.data.NumberReview,
201
       NumberReview: that.data.NumberReview,
212
       NumberHistory: arrHistory.length,
202
       NumberHistory: arrHistory.length,
213
-      TaskInfo: TaskList[0],
203
+      TaskInfo: taskInfo,
214
       CanUndo: 0,
204
       CanUndo: 0,
215
     });
205
     });
216
 
206
 
@@ -219,8 +209,19 @@ Page({
219
 
209
 
220
     function formatList(list) {
210
     function formatList(list) {
221
       for (var i = 0; i < list.length; i++) {
211
       for (var i = 0; i < list.length; i++) {
222
-        if (list[i].Content)
212
+        if (list[i].Content) {
223
           list[i].ContentNew = main.changeStringToView(list[i].Content);
213
           list[i].ContentNew = main.changeStringToView(list[i].Content);
214
+          list[i].TagWidth = 0;
215
+          if (list[i].ContentNew.Tags && list[i].ContentNew.Tags.length > 0) {
216
+            list[i].TagWidth = 92 + (list[i].ContentNew.Tags.length - 1) * 122;
217
+            for (var j = 0; j < list[i].ContentNew.Tags.length; j++) {
218
+              if (list[i].ContentNew.Tags[j].length > 2) {
219
+                list[i].TagWidth += 46 * (list[i].ContentNew.Tags[j].length - 2);
220
+              }
221
+            }
222
+          }
223
+        }
224
+
224
       }
225
       }
225
       return list;
226
       return list;
226
     }
227
     }
@@ -228,7 +229,7 @@ Page({
228
     function updateNumberStr(list) {
229
     function updateNumberStr(list) {
229
       for (var i = 0; i < list.length; i++) {
230
       for (var i = 0; i < list.length; i++) {
230
         if (list[i].Number0)
231
         if (list[i].Number0)
231
-          list[i].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel,0,list[i].Number0);
232
+          list[i].Number0Str = main.getMemoryLevel(app.globalData.MemoryLevel, 0, list[i].Number0);
232
         if (list[i].Number1)
233
         if (list[i].Number1)
233
           list[i].Number1Str = main.getMemoryLevel(app.globalData.MemoryLevel, 1, list[i].Number1);
234
           list[i].Number1Str = main.getMemoryLevel(app.globalData.MemoryLevel, 1, list[i].Number1);
234
         if (list[i].Number2)
235
         if (list[i].Number2)
@@ -245,7 +246,7 @@ Page({
245
     var that = this;
246
     var that = this;
246
     if (!(that.data.NumberNew == 0 &&
247
     if (!(that.data.NumberNew == 0 &&
247
       that.data.NumberReview == 0 &&
248
       that.data.NumberReview == 0 &&
248
-      that.data.NumberHistory == 0)) {
249
+      that.data.NumberHistory == 0) && !that.data.IsShowNumberInfo) {
249
 
250
 
250
       if (start) {
251
       if (start) {
251
         that.data.IsShowAnswer[0] = 0;
252
         that.data.IsShowAnswer[0] = 0;
@@ -273,7 +274,7 @@ Page({
273
     //console.log(res.tapIndex);
274
     //console.log(res.tapIndex);
274
     var list = [];
275
     var list = [];
275
     list.push(TaskList[0]);
276
     list.push(TaskList[0]);
276
-    app.globalData.CardList=list;
277
+    app.globalData.CardList = list;
277
     wx.navigateTo({
278
     wx.navigateTo({
278
       url: './add?type=edit&type2=1&id=' + TaskList[0].MiaoguoCardID,
279
       url: './add?type=edit&type2=1&id=' + TaskList[0].MiaoguoCardID,
279
     });
280
     });
@@ -294,7 +295,7 @@ Page({
294
     });
295
     });
295
   },
296
   },
296
   gotoPrev: function () {
297
   gotoPrev: function () {
297
-    clearTimeout(iTimeout);
298
+    var that = this;
298
     wx.showLoading({
299
     wx.showLoading({
299
       title: '请稍候',
300
       title: '请稍候',
300
       mask: true,
301
       mask: true,
@@ -303,7 +304,6 @@ Page({
303
       var card = listTaskFinished.pop();
304
       var card = listTaskFinished.pop();
304
       //console.log(card);
305
       //console.log(card);
305
 
306
 
306
-      var that = this;
307
       var url = "UndoMiaoguoCard?";
307
       var url = "UndoMiaoguoCard?";
308
       url += "ID=" + card.Card.MiaoguoCardID;
308
       url += "ID=" + card.Card.MiaoguoCardID;
309
       url += "&UserID=" + app.globalData.userInfo.UserID;
309
       url += "&UserID=" + app.globalData.userInfo.UserID;
@@ -361,14 +361,14 @@ Page({
361
           image: "../images/universalpic_undo_white_120x90.png",
361
           image: "../images/universalpic_undo_white_120x90.png",
362
         });
362
         });
363
       });
363
       });
364
+      that.setSoundFile(2);
365
+    }
366
+    else {
367
+      wx.hideLoading();
364
     }
368
     }
365
-    that.setSoundFile(2);
366
   },
369
   },
367
   gotoNext: function (e) {
370
   gotoNext: function (e) {
368
     var that = this;
371
     var that = this;
369
-
370
-    clearTimeout(iTimeout);
371
-
372
     wx.showLoading({
372
     wx.showLoading({
373
       title: '请稍候',
373
       title: '请稍候',
374
       mask: true,
374
       mask: true,
@@ -518,6 +518,8 @@ Page({
518
           CanUndo: 1,
518
           CanUndo: 1,
519
         });
519
         });
520
         that.setSoundFile(1);
520
         that.setSoundFile(1);
521
+        that.getTaskTime();
522
+
521
       } else {
523
       } else {
522
         arrImage = TaskList[0].ContentNew.Images;
524
         arrImage = TaskList[0].ContentNew.Images;
523
         arrImage2 = TaskList[0].ContentNew.Images2;
525
         arrImage2 = TaskList[0].ContentNew.Images2;
@@ -544,8 +546,6 @@ Page({
544
           that.setSoundFile(0);
546
           that.setSoundFile(0);
545
       }
547
       }
546
     });
548
     });
547
-
548
-
549
   },
549
   },
550
   saveCard: function (obj, callback) {
550
   saveCard: function (obj, callback) {
551
     var url = "UpdateMiaoguoCardToday?";
551
     var url = "UpdateMiaoguoCardToday?";
@@ -557,8 +557,8 @@ Page({
557
     url += "&FontSize=" + TaskList[0].FontSize;
557
     url += "&FontSize=" + TaskList[0].FontSize;
558
 
558
 
559
     var duration = common.diffDate("s", timeStart, new Date());
559
     var duration = common.diffDate("s", timeStart, new Date());
560
-    if (obj.btnnumber==1)
561
-      duration=0;
560
+    if (obj.btnnumber == 1)
561
+      duration = 0;
562
     url += "&Duration=" + duration;
562
     url += "&Duration=" + duration;
563
 
563
 
564
     url += "&IsUndo=" + obj.IsUndo;
564
     url += "&IsUndo=" + obj.IsUndo;
@@ -597,13 +597,13 @@ Page({
597
     }
597
     }
598
 
598
 
599
     var arr = url.split(",");
599
     var arr = url.split(",");
600
-    this.audioCtx=[];
600
+    this.audioCtx = [];
601
     for (var i = 0; i < arr.length; i++) {
601
     for (var i = 0; i < arr.length; i++) {
602
       this.audioCtx.push(wx.createAudioContext('myAudio' + i));
602
       this.audioCtx.push(wx.createAudioContext('myAudio' + i));
603
     }
603
     }
604
 
604
 
605
     var index = 0;
605
     var index = 0;
606
-    if (arr.length>1){
606
+    if (arr.length > 1) {
607
       intervalSound = setInterval(function () {
607
       intervalSound = setInterval(function () {
608
         that.audioCtx[index].setSrc(arr[index]);
608
         that.audioCtx[index].setSrc(arr[index]);
609
         that.audioCtx[index].play();
609
         that.audioCtx[index].play();
@@ -614,38 +614,15 @@ Page({
614
         }
614
         }
615
       }, 1000);
615
       }, 1000);
616
     }
616
     }
617
-    else{
618
-      if (arr[index].indexOf("http")>0)
617
+    else {
618
+      if (arr[index].indexOf("http") > 0)
619
         arr[index] = arr[index].substr(arr[index].indexOf("http"));
619
         arr[index] = arr[index].substr(arr[index].indexOf("http"));
620
-      arr[index] = arr[index].replace("http","https");
620
+      arr[index] = arr[index].replace("http://", "https://");
621
 
621
 
622
-      console.log("play:" + arr[index]);
622
+      //console.log("play:" + arr[index]);
623
       that.audioCtx[index].setSrc(arr[index]);
623
       that.audioCtx[index].setSrc(arr[index]);
624
       that.audioCtx[index].play();
624
       that.audioCtx[index].play();
625
     }
625
     }
626
-
627
-    var fieldid = e.currentTarget.dataset.fieldid;
628
-    var content = TaskList[0].ContentNew.Field[fieldid];
629
-    var selectIndex = 0;
630
-    for (var i = 0; i < content.length; i++) {
631
-      if (content[i].Type == 'sound') {
632
-        if (content[i].Content == e.currentTarget.dataset.content) {
633
-          content[i].SoundImageName = "gif";
634
-          selectIndex = i;
635
-          break;
636
-        }
637
-      }
638
-    }
639
-    that.setData({
640
-      TaskInfo: TaskList[0],
641
-    });
642
-    iTimeout = setTimeout(function () {
643
-      content[selectIndex].SoundImageName = "png";
644
-      TaskList[0].ContentNew.Field[fieldid] = content;
645
-      that.setData({
646
-        TaskInfo: TaskList[0],
647
-      });
648
-    }, 2000);
649
   },
626
   },
650
   getTaskTime: function () {
627
   getTaskTime: function () {
651
     var that = this;
628
     var that = this;
@@ -653,7 +630,10 @@ Page({
653
     url += "UserID=" + app.globalData.userInfo.UserID;
630
     url += "UserID=" + app.globalData.userInfo.UserID;
654
     main.getData(url, function (data) {
631
     main.getData(url, function (data) {
655
       if (data) {
632
       if (data) {
656
-        var duration = common.getMinuteSecond(data.Duration, true);
633
+        var duration = data.Duration;
634
+        if (duration > 0) {
635
+          duration = Math.round(duration / 60);
636
+        }
657
         var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
637
         var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
658
         var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
638
         var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
659
 
639
 
@@ -699,8 +679,8 @@ Page({
699
           //console.log("serverUrl2:" + serverUrl);
679
           //console.log("serverUrl2:" + serverUrl);
700
           //console.log(res.tempFilePath);
680
           //console.log(res.tempFilePath);
701
           main.saveTempImage(serverUrl, res.tempFilePath);
681
           main.saveTempImage(serverUrl, res.tempFilePath);
702
-          for(var i=0;i<arrImage.length;i++){
703
-            if (arrImage[i] == oldTempUrl){
682
+          for (var i = 0; i < arrImage.length; i++) {
683
+            if (arrImage[i] == oldTempUrl) {
704
               arrImage[i] = res.tempFilePath;
684
               arrImage[i] = res.tempFilePath;
705
             }
685
             }
706
           }
686
           }
@@ -727,7 +707,7 @@ Page({
727
       TaskInfo: this.data.TaskInfo,
707
       TaskInfo: this.data.TaskInfo,
728
     });
708
     });
729
   },
709
   },
730
-  onClose:function(){
710
+  onClose: function () {
731
     wx.navigateBack({
711
     wx.navigateBack({
732
       delta: 1,
712
       delta: 1,
733
     });
713
     });
@@ -740,6 +720,94 @@ Page({
740
     }
720
     }
741
     app.globalData.MemoryLevel = index;
721
     app.globalData.MemoryLevel = index;
742
   },
722
   },
723
+
724
+  buildShareImage: function () {
725
+    var that = this;
726
+    wx.showLoading({
727
+      title: '生成中',
728
+    });
729
+    //console.log(app.globalData.userInfo.AvatarUrl);
730
+    var avatarUrl = app.globalData.userInfo.AvatarUrl;
731
+    avatarUrl = avatarUrl.substring(0, avatarUrl.lastIndexOf("/") + 1);
732
+    avatarUrl = avatarUrl + "0";
733
+
734
+    wx.downloadFile({
735
+      url: avatarUrl, // 仅为示例,并非真实的资源
736
+      success(res) {
737
+        // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
738
+        if (res.statusCode === 200) {
739
+          var canvas = wx.createCanvasContext("shareCanvas", that);
740
+          canvas.setFillStyle(main.getShareImageBackColor());
741
+          canvas.fillRect(360, 0, 600, 360);
742
+          canvas.drawImage(res.tempFilePath, 0, 0, 360, 360);
743
+          canvas.drawImage("../images/universalpic_screenshot_jl_bgimage_360x360.png", 0, 0, 360, 360);
744
+          canvas.fillStyle = "#ffffff";
745
+          canvas.setTextBaseline('top');
746
+          canvas.setFontSize(24);
747
+          canvas.fillText(app.globalData.userInfo.NickName, 30, 282);
748
+
749
+          var today = common.formatTime(new Date(), ".", true);
750
+          canvas.setFontSize(18);
751
+          canvas.fillText(today, 30, 315);
752
+
753
+          canvas.setFontSize(20);
754
+          canvas.fillText("秒过学习", 390, 30);
755
+          canvas.setFontSize(44);
756
+          canvas.fillText("勤勉接力", 390, 58);
757
+          canvas.setFontSize(20);
758
+          canvas.fillText("见证成长", 390, 120);
759
+
760
+          canvas.setFontSize(68);
761
+          canvas.fillText(that.data.TodayTime, 390, 148);
762
+
763
+          canvas.font = "normal 500 68px caption";
764
+          var metrics = canvas.measureText(that.data.TodayTime.toString());
765
+          //console.log(JSON.stringify(metrics));
766
+
767
+          var h = 179;
768
+          if (app.globalData.IsIOS)
769
+            h = 176;
770
+          canvas.font = "normal 500 32px caption";
771
+          canvas.fillText("分钟", 393 + Math.round(metrics.width), h);
772
+
773
+
774
+          canvas.setFontSize(20);
775
+          canvas.fillText("迄今已接力", 390, 267);
776
+          canvas.setFontSize(32);
777
+          canvas.fillText(app.globalData.TaskToday.DayNumber + "次", 390, 295);
778
+
779
+          canvas.draw(1, function (n) {
780
+            wx.canvasToTempFilePath({
781
+              x: 0,
782
+              y: 0,
783
+              width: 600,
784
+              height: 360,
785
+              destWidth: 600,
786
+              destHeight: 360,
787
+              canvasId: 'shareCanvas',
788
+              success: function (res2) {
789
+                wx.hideLoading();
790
+
791
+                wx.previewImage({
792
+                  current: res2.tempFilePath, // 当前显示图片的http链接
793
+                  urls: [res2.tempFilePath] // 需要预览的图片http链接列表
794
+                });
795
+              },
796
+              fail:function(){
797
+                wx.hideLoading();
798
+              }
799
+            })
800
+          });
801
+        }
802
+        else{
803
+          wx.hideLoading();
804
+        }
805
+      },
806
+      fail: function () {
807
+        wx.hideLoading();
808
+      }
809
+    });
810
+  },
743
   onShareAppMessage: function () {
811
   onShareAppMessage: function () {
744
     return {
812
     return {
745
       title: app.globalData.ShareTitle,
813
       title: app.globalData.ShareTitle,

+ 2 - 1
pages/main/detail.json

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

+ 161 - 128
pages/main/detail.wxml

@@ -1,198 +1,231 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor2}}'>
2
-  <view class='panelTop FlexRow' style='background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
3
-    <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
4
-    </view>
5
-    <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
6
-    </view>
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}' bindtap='onShowAnswer'>
2
+  <!-- 练习中 -->
3
+  <block wx:if="{{(NumberNew+NumberReview+NumberHistory)>0}}">
7
 
4
 
8
-    <view class='panelCancel FlexRow' bindtap='gotoEdit' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
9
-      <image src="../images/universalpic_edit_{{Color.IconColor}}_25x25.png" class='universalpic_edit_white_25x25' />
10
-    </view>
11
-    <view class='panelCancel FlexRow' bindtap='onFontSize' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
12
-      <image src="../images/universalpic_typesize_{{Color.IconColor}}_30x18.png" class='universalpic_typesize_white_30x18' />
13
-    </view>
5
+    <!-- 工具栏 -->
6
+    <view class='panelTop FlexRow' style='background-color:{{Color.BackColor}};'>
7
+      <view class='panelCancel FlexRow' catchtouchstart='gotoEdit'>
8
+        <view class='panelCancel0 FlexRow'>
9
+          <image src="../images/universalpic_edit_gray_25x25.png" class='universalpic_edit_white_25x25' />
10
+        </view>
11
+      </view>
12
+      <view class='panelCancel FlexRow' catchtouchstart='onFontSize'>
13
+        <view class='panelCancel0 FlexRow'>
14
+          <image src="../images/universalpic_typesize_gray_30x18.png" class='universalpic_typesize_white_30x18' />
15
+        </view>
16
+      </view>
17
+      <view class='panelNumber FlexRow' catchtouchstart='showNumberContainner'>
18
+        <view class="panelNumber1">{{NumberNew}}</view>
19
+        <view class="panelNumber1">{{NumberHistory}}</view>
20
+        <view class="panelNumber1">{{NumberReview}}</view>
21
+        <view class="FlexColumn">
22
+          <view class='panelNumber2 panelNumber1'>{{NumberNew+NumberReview+NumberHistory}}</view>
23
+          <view class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
24
+        </view>
25
+      </view>
26
+      <view class='panelCancel FlexRow' catchtouchstart='gotoNext' data-time="1d" data-btnnumber="1">
27
+        <view class='panelCancel0 FlexRow'>
28
+          <image src="../images/universalpic_shelve_gray_26x26.png" class='universalpic_shelve_white_26x26' />
29
+        </view>
30
+      </view>
31
+      <view class='panelCancel FlexRow' wx:if="{{CanUndo==0}}">
32
+        <view class='panelCancel0 FlexRow'>
33
+          <image src="../images/universalpic_undo_gray_26x20.png" class='universalpic_undo_white_30p_26x20' />
34
+        </view>
35
+      </view>
36
+      <view class='panelCancel FlexRow' catchtouchstart='gotoPrev' wx:if="{{CanUndo==1}}">
37
+        <view class='panelCancel0 FlexRow'>
38
+          <image src="../images/universalpic_undo_gray_26x20.png" class='universalpic_undo_white_30p_26x20' />
39
+        </view>
40
+      </view>
14
 
41
 
15
-    <view class='panelNumber FlexRow' bindtap='showNumberContainner'>
16
-      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberNew}}</view>
17
-      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberHistory}}</view>
18
-      <view class="panelNumber1" style='color:{{Color.FrontColor1}};'>{{NumberReview}}</view>
19
-      <view class="panelNumber2 panelNumber1" style='background-color:{{Color.FrontColor1}};'>{{NumberNew+NumberReview+NumberHistory}}</view>
20
-    </view>
21
-    <view class='panelCancel FlexRow' bindtap='gotoNext' data-time="1d" data-btnnumber="1" wx:if="{{NumberNew+NumberReview+NumberHistory>0}}">
22
-      <image src="../images/universalpic_shelve_{{Color.IconColor}}_26x26.png" class='universalpic_shelve_white_26x26' />
23
-    </view>
24
-    <view class='panelCancel' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
25
     </view>
42
     </view>
26
 
43
 
27
-    <view class='panelCancel FlexRow' wx:if="{{CanUndo==0}}">
28
-      <image src="../images/universalpic_undo_black_30p_26x20.png" class='universalpic_undo_white_30p_26x20' />
29
-    </view>
30
-    <view class='panelCancel FlexRow' bindtap='gotoPrev' wx:if="{{CanUndo==1}}">
31
-      <image src="../images/universalpic_undo_{{Color.IconColor}}_26x20.png" class='universalpic_undo_white_30p_26x20' />
32
-    </view>
33
-
34
-  </view>
35
-
36
-  <!-- 学习页 -->
37
-  <block wx:if="{{(NumberNew+NumberReview+NumberHistory)>0}}">
44
+    <!-- 第一段 -->
38
 
45
 
39
     <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
46
     <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
40
-    <view class="panelField1 FlexColumn" bindtap="onShowAnswer" style='background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
47
+
48
+    <view class="panelField1 FlexColumn" style='background-color:{{Color.BackColor}};'>
49
+      <view class="editFieldNull"></view>
41
       <view class="panelField11 panelItem FlexRow" style="font-size:{{TaskInfo.FontSize}}rpx;">
50
       <view class="panelField11 panelItem FlexRow" style="font-size:{{TaskInfo.FontSize}}rpx;">
42
         <block wx:for="{{TaskInfo.ContentNew.Field[1]}}" wx:key="index">
51
         <block wx:for="{{TaskInfo.ContentNew.Field[1]}}" wx:key="index">
43
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
52
           <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
44
-          <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
53
+          <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}" style="height:{{TaskInfo.FontSize/2}}rpx;"></view>
45
           <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
54
           <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
46
 
55
 
47
           <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
56
           <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">
57
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
49
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
58
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
50
-            <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
51
-          </block>
59
+              <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
60
+            </block>
52
           </text>
61
           </text>
53
 
62
 
54
-          <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
63
+          <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
55
             <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
64
             <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
56
           </view>
65
           </view>
57
 
66
 
58
-          <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</text>
67
+          <view class="textPinyin" hover-class='panelSoundHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</view>
59
           <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
           <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" />
60
-      
69
+
61
         </block>
70
         </block>
62
       </view>
71
       </view>
63
-
64
-    </view>
65
-  <view class="panelTag FlexRow" bindtap="onShowAnswer" style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
66
-    <view wx:if="{{!TaskInfo.ContentNew.Tags || TaskInfo.ContentNew.Tags.length==0}}"></view>
67
-    <view class="panelTag1 FlexRow" wx:if="{{TaskInfo.ContentNew.Tags && TaskInfo.ContentNew.Tags.length>0}}">
68
-      <view class='tagDot' style='background-color:{{Color.TagColor}};'></view>
69
-      <view class="tag" wx:for="{{TaskInfo.ContentNew.Tags}}" wx:key="index">{{item}}</view>
70
     </view>
72
     </view>
71
 
73
 
72
-    <view class='right2 FlexRow' wx:if="{{IsShowAnswer[0]==0}}">
73
-      <image class="universalpic_show_white_30x30" src='../images/universalpic_show_{{Color.IconColor}}_30x30.png' />
74
-    </view>
75
-    <view class='right2 FlexRow' catchtap='onShowAnswer' data-start="true" wx:if="{{IsShowAnswer[0]==1}}">
76
-      <image class="universalpic_hide_white_34x34" src='../images/universalpic_hide_{{Color.IconColor}}_34x34.png' />
74
+    <!-- 标签 -->
75
+    <view class="panelTag FlexColumn" wx:if="{{TaskInfo.ContentNew.Tags.length>0}}">
76
+      <view class='panelTagLine' style='width:{{TaskInfo.TagWidth}}rpx;background-color:{{Color.LineColor}};'></view>
77
+      <view class="panelTag1 FlexRow">
78
+        <view class="tag" wx:for="{{TaskInfo.ContentNew.Tags}}" wx:key="index">{{item}}</view>
79
+      </view>
77
     </view>
80
     </view>
78
 
81
 
79
-  </view>
82
+    <!-- 第二段和第三段 -->
83
+    <view class="panelField20 FlexColumn">
84
+      <view class="editFieldNull2"></view>
85
+      <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{TaskInfo.ContentNew.Field[itemParent].length>0 && IsShowAnswer[itemParent-2]}}" style='background-color:{{Color.FieldBackColor}};'>
86
+        <view class="panelField21 panelItem FlexRow" style='color:{{Color.FieldColor}};'>
87
+          <block wx:for="{{TaskInfo.ContentNew.Field[itemParent]}}" wx:key="index">
88
+            <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
89
+            <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
80
 
90
 
81
-  <view class="panelField20 FlexColumn" style='min-height:{{Containnerheight2}}rpx;background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};' bindtap="onShowAnswer">
82
-    <view class="panelField2 FlexColumn" wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{TaskInfo.ContentNew.Field[itemParent].length>0 && IsShowAnswer[itemParent-2]}}">
83
-      <view wx:if="{{itemParent==3}}" class="lineField" style='background-color:{{Color.FieldLineColor}};'></view>
84
-      <view class="panelField21 panelItem FlexRow">
85
-        <block wx:for="{{TaskInfo.ContentNew.Field[itemParent]}}" wx:key="index">
86
-          <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
87
-          <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
88
-        
89
-          <text class="textNormal2 textNormal" selectable="true" space='ensp' 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>
90
 
92
 
91
-          <text class="textNormal2 FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
92
-            <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
93
-              <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
94
-              <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
95
-            </block>
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">
95
+                <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
96
+            <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
97
+          </block>
96
           </text>
98
           </text>
97
 
99
 
98
-          <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
100
+          <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
99
             <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
101
             <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
100
           </view>
102
           </view>
101
 
103
 
102
-          <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
103
-          <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" />
104
-        </block>
104
+          <view class="textPinyin" hover-class='panelPinyinHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</view>
105
+          <image class="imageFree2" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
106
+          </block>
107
+        </view>
105
       </view>
108
       </view>
106
     </view>
109
     </view>
107
-  </view>
108
-  </block>
109
-
110
-  <!-- 最后一页 -->
111
-  <view class='panelLast FlexColumn' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}" style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};color:{{Color.FrontColor}};'>
112
-    <view class='text1'>做完了</view>
113
-
114
-    <view class="panelLastTime FlexColumn">
115
-      <view style='color:{{Color.FrontColor1}};'>今日用时</view>
116
-      <view class="time">{{TodayTime}}</view>
117
-    </view>
118
-    <view class="panelLastTime FlexColumn">
119
-      <view style='color:{{Color.FrontColor1}};'>每分钟可练习</view>
120
-      <view class="time">{{Speed1}}</view>
121
-    </view>
122
-    <view class="panelLastTime FlexColumn">
123
-      <view style='color:{{Color.FrontColor1}};'>单张题卡平均用时</view>
124
-      <view class="time">{{Speed2}}</view>
125
-    </view>
126
-
127
-    <view class='panelLastFooter' bindtap='onClose'>关闭</view>
128
-  </view>
129
 
110
 
130
-  <view class='footer' wx:if="{{NumberNew+NumberReview+NumberHistory>0}}" bindtap="onShowAnswer" ></view>
131
-  <view class='footer1 footer' wx:if="{{NumberNew+NumberReview+NumberHistory==0}}"></view>
111
+    <view class='footer0'></view>
132
 
112
 
133
-  <view class="panelFooter FlexColumn" wx:if="{{IsShowAnswer[1]}}">
134
-    <view class="panelBottomAnswer0" style='background:linear-gradient({{Color.BackColor20}},{{Color.BackColor2}});'></view>
135
-    <view class='panelBottomAnswer panelBottom FlexRow' style='background-color:{{Color.BackColor2}};color:{{Color.FrontColor2}};'>
136
-      <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
137
-        <view class="Answer0 btnColor"></view>
138
-        <view class="btnTime">
139
-          {{TaskInfo.Number0Str}}
140
-        </view>
113
+    <!-- 下方按钮 -->
114
+    <!-- <view class="footerShade" style='background:linear-gradient({{Color.BackColor}},{{Color.BackColor2}});'></view> -->
115
+    <view class='footer FlexColumn' style='background-color:{{Color.BackColor}}'>
116
+      <view class="panelFooter FlexColumn" wx:if="{{!IsShowAnswer[0] && !IsShowAnswer[1]}}" catchtouchstart="onShowAnswer">
117
+        看答案
118
+      </view>
119
+      <view class="panelFooter FlexColumn" wx:if="{{IsShowAnswer[0] && !IsShowAnswer[1]}}" catchtouchstart="onShowAnswer">
120
+        显示第三段
141
       </view>
121
       </view>
142
-      <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number1}}" data-btnnumber="3" wx:if="{{TaskInfo.Number1}}">
143
-        <view class="Answer1 btnColor"></view>
144
-        <view class="btnTime">
145
-          {{TaskInfo.Number1Str}}
122
+      <view class="panelFooter0 panelFooter FlexColumn" wx:if="{{IsShowAnswer[1]}}">
123
+        <view class='panelBottomAnswer panelBottom FlexRow'>
124
+          <view class="Answer FlexColumn" catchtouchstart='gotoNext' data-time="{{TaskInfo.Number0}}" data-btnnumber="0">
125
+            <view class="Answer0 btnColor"></view>
126
+            <view class="btnTime">
127
+              {{TaskInfo.Number0Str}}
128
+            </view>
129
+          </view>
130
+          <view class="Answer FlexColumn" catchtouchstart='gotoNext' data-time="{{TaskInfo.Number1}}" data-btnnumber="3" wx:if="{{TaskInfo.Number1}}">
131
+            <view class="Answer1 btnColor"></view>
132
+            <view class="btnTime">
133
+              {{TaskInfo.Number1Str}}
134
+            </view>
135
+          </view>
136
+          <view class="Answer FlexColumn" catchtouchstart='gotoNext' data-time="{{TaskInfo.Number2}}" data-btnnumber="4">
137
+            <view class="Answer2 btnColor"></view>
138
+            <view class="btnTime">
139
+              {{TaskInfo.Number2Str}}
140
+            </view>
141
+          </view>
142
+          <view class="Answer FlexColumn" catchtouchstart='gotoNext' data-time="{{TaskInfo.Number3}}" data-btnnumber="5" wx:if="{{TaskInfo.Number3}}">
143
+            <view class="Answer3 btnColor"></view>
144
+            <view class="btnTime">
145
+              {{TaskInfo.Number3Str}}
146
+            </view>
147
+          </view>
146
         </view>
148
         </view>
149
+        <!-- <view class="iphoneX" wx:if="{{IsIphoneX}}" style='background-color:{{Color.BackColor2}};'></view> -->
147
       </view>
150
       </view>
148
-      <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number2}}" data-btnnumber="4">
149
-        <view class="Answer2 btnColor"></view>
150
-        <view class="btnTime">
151
-          {{TaskInfo.Number2Str}}
151
+
152
+    </view>
153
+  </block>
154
+  <!-- 最后一页 -->
155
+  <block wx:if="{{NumberNew+NumberReview+NumberHistory==0}}">
156
+    <view class='panelLast FlexColumn' style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};'>
157
+      <view class='text1'>做完了</view>
158
+
159
+      <view class="panelLastTime FlexColumn">
160
+        <view style='color:{{Color.FrontColor1}};'>今日练习总共用时</view>
161
+        <view class="time1 FlexRow" style='color:{{Color.LineColor}}'>
162
+          <view class='time11'>{{TodayTime}}</view>
163
+          <view>分钟</view>
152
         </view>
164
         </view>
153
       </view>
165
       </view>
154
-      <view class="Answer FlexColumn" hover-class="AnswerHover{{Color.ID}}" catchtap='gotoNext' data-time="{{TaskInfo.Number3}}" data-btnnumber="5" wx:if="{{TaskInfo.Number3}}">
155
-        <view class="Answer3 btnColor"></view>
156
-        <view class="btnTime">
157
-          {{TaskInfo.Number3Str}}
166
+      <view class="panelLastTime FlexColumn">
167
+        <view style='color:{{Color.FrontColor1}};'>单张题卡平均用时</view>
168
+        <view class="time2" style='color:{{Color.LineColor}}'>{{Speed2}}</view>
169
+      </view>
170
+      <view class="panelLastTime FlexColumn">
171
+        <view style='color:{{Color.FrontColor1}};'>每分钟可练习</view>
172
+        <view class="time2" style='color:{{Color.LineColor}}'>{{Speed1}}</view>
173
+      </view>
174
+
175
+
176
+      <view class='panelLastFooter'>
177
+        <view class="panelLastFooter1 FlexRow" bindtap='gotoPrev' wx:if="{{CanUndo==1}}">
178
+          <image src="../images/universalpic_undo_gray_26x20.png" class='universalpic_undo_gray_26x20' />
179
+          <view>回到题卡</view>
180
+        </view>
181
+        <view class="panelLastFooter1 FlexRow" bindtap='buildShareImage'>
182
+          <image src="../images/universalpic_screenshot_gray_30x30.png" class='universalpic_screenshot_gray_30x30' />
183
+          <view>群接力</view>
184
+        </view>
185
+        <view class="panelLastFooter2 FlexRow" bindtap='onClose'>
186
+          <view>关闭</view>
158
         </view>
187
         </view>
159
       </view>
188
       </view>
160
     </view>
189
     </view>
161
-    <view class="iphoneX" wx:if="{{IsIphoneX}}" style='background-color:{{Color.BackColor2}};'></view>
162
-  </view>
163
-</view>
164
-
165
-<view wx:if="{{IsShowNumberInfo}}" catchtap='closeNumberContainner' class="numberContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
166
-  <view class='numberContainer1 FlexColumn'>
190
+  </block>
191
+  <!-- 今日任务量 -->
192
+  <view wx:if="{{IsShowNumberInfo}}" class="numberContainer FlexColumn" style='height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}};'>
167
     <view class="numberContainer11 FlexRow">
193
     <view class="numberContainer11 FlexRow">
168
-      <view class='left'>今日剩余任务量{{NumberNew+NumberReview+NumberHistory}}张,包括:</view>
169
-      <view></view>
194
+      今日剩余任务量
170
     </view>
195
     </view>
171
     <view class="numberContainer12 FlexRow">
196
     <view class="numberContainer12 FlexRow">
172
       <view class='left'>新题卡</view>
197
       <view class='left'>新题卡</view>
173
       <view class='right3'>{{NumberNew}}张</view>
198
       <view class='right3'>{{NumberNew}}张</view>
174
     </view>
199
     </view>
175
     <view class="lineWidthAll FlexRow">
200
     <view class="lineWidthAll FlexRow">
176
-      <view class="lineWidth700"></view>
201
+      <view class="lineWidth720"></view>
177
     </view>
202
     </view>
178
     <view class="numberContainer12 FlexRow">
203
     <view class="numberContainer12 FlexRow">
179
       <view class='left'>旧题卡</view>
204
       <view class='left'>旧题卡</view>
180
       <view class='right3'>{{NumberHistory}}张</view>
205
       <view class='right3'>{{NumberHistory}}张</view>
181
     </view>
206
     </view>
182
     <view class="lineWidthAll FlexRow">
207
     <view class="lineWidthAll FlexRow">
183
-      <view class="lineWidth700"></view>
208
+      <view class="lineWidth720"></view>
184
     </view>
209
     </view>
185
     <view class="numberContainer12 FlexRow">
210
     <view class="numberContainer12 FlexRow">
186
-      <view class='left'>及时强化</view>
211
+      <view class='left'>需要及时强化</view>
187
       <view class='right3'>{{NumberReview}}张</view>
212
       <view class='right3'>{{NumberReview}}张</view>
188
     </view>
213
     </view>
214
+    <view class="lineWidthAll FlexRow">
215
+      <view class="lineWidth720"></view>
216
+    </view>
217
+    <view class="numberContainer12 FlexRow">
218
+      <view class='left'>总计</view>
219
+      <view class='right3' style='color:{{Color.LineColor}};'>{{NumberNew+NumberReview+NumberHistory}}张</view>
220
+    </view>
189
     <view class='lineFooter'></view>
221
     <view class='lineFooter'></view>
190
-    <view class="numberContainer13 FlexRow">
191
-      <view>知道了</view>
222
+    <view class="numberContaineFooter FlexRow" catchtap='closeNumberContainner'>
223
+      <view>关闭</view>
192
     </view>
224
     </view>
193
   </view>
225
   </view>
194
 </view>
226
 </view>
195
 
227
 
228
+<canvas class='Canvas' canvas-id="shareCanvas"></canvas>
196
 <audio hidden='true' id="myAudio0"></audio>
229
 <audio hidden='true' id="myAudio0"></audio>
197
 <audio hidden='true' id="myAudio1"></audio>
230
 <audio hidden='true' id="myAudio1"></audio>
198
 <audio hidden='true' id="myAudio2"></audio>
231
 <audio hidden='true' id="myAudio2"></audio>

+ 239 - 152
pages/main/detail.wxss

@@ -1,8 +1,10 @@
1
- .container {
1
+.container {
2
   justify-content: flex-start;
2
   justify-content: flex-start;
3
   font-weight: 500;
3
   font-weight: 500;
4
 }
4
 }
5
 
5
 
6
+
7
+
6
 /* 工具栏 */
8
 /* 工具栏 */
7
 
9
 
8
 .panelTop {
10
 .panelTop {
@@ -20,21 +22,28 @@
20
   margin: 0 5rpx;
22
   margin: 0 5rpx;
21
 }
23
 }
22
 
24
 
25
+.panelCancel0 {
26
+  width: 70rpx;
27
+  height: 70rpx;
28
+  background-color: rgba(0, 0, 0, 0.1);
29
+  border-radius: 50%;
30
+}
23
 
31
 
24
 .universalpic_undo_white_30p_26x20 {
32
 .universalpic_undo_white_30p_26x20 {
25
   width: 26rpx;
33
   width: 26rpx;
26
   height: 19rpx;
34
   height: 19rpx;
27
 }
35
 }
28
-.universalpic_typesize_white_30x18{
36
+
37
+.universalpic_typesize_white_30x18 {
29
   width: 29rpx;
38
   width: 29rpx;
30
   height: 18rpx;
39
   height: 18rpx;
31
 }
40
 }
41
+
32
 .universalpic_shelve_white_26x26 {
42
 .universalpic_shelve_white_26x26 {
33
   width: 26rpx;
43
   width: 26rpx;
34
   height: 26rpx;
44
   height: 26rpx;
35
 }
45
 }
36
 
46
 
37
-
38
 .universalpic_edit_white_25x25 {
47
 .universalpic_edit_white_25x25 {
39
   width: 25rpx;
48
   width: 25rpx;
40
   height: 25rpx;
49
   height: 25rpx;
@@ -42,8 +51,9 @@
42
 
51
 
43
 .panelNumber {
52
 .panelNumber {
44
   width: 218rpx;
53
   width: 218rpx;
45
-  height: 120rpx;
46
-  margin: 0 31rpx;
54
+  height: 50rpx;
55
+  margin: 20rpx 31rpx;
56
+  align-items: flex-start;
47
 }
57
 }
48
 
58
 
49
 .panelNumber1 {
59
 .panelNumber1 {
@@ -54,14 +64,27 @@
54
   min-width: 50rpx;
64
   min-width: 50rpx;
55
   text-align: center;
65
   text-align: center;
56
   line-height: 50rpx;
66
   line-height: 50rpx;
67
+  color: rgba(255, 255, 255, 0.5);
57
 }
68
 }
58
 
69
 
59
 .panelNumber2 {
70
 .panelNumber2 {
60
   color: #fff;
71
   color: #fff;
61
-  border-radius: 50%;
62
 }
72
 }
63
 
73
 
64
-/* 段落 */
74
+.panelNumber2Line {
75
+  width: 70%;
76
+  height: 6rpx;
77
+  margin-top: -7rpx;
78
+}
79
+
80
+/* 段落显示************************ */
81
+
82
+.editFieldNull{
83
+  height:60rpx;
84
+}
85
+.editFieldNull2{
86
+  height:80rpx;
87
+}
65
 
88
 
66
 .panelItem {
89
 .panelItem {
67
   width: 650rpx;
90
   width: 650rpx;
@@ -71,68 +94,69 @@
71
   z-index: 5;
94
   z-index: 5;
72
 }
95
 }
73
 
96
 
74
-.panelField10{
97
+.panelField10 {
75
   width: 100%;
98
   width: 100%;
76
   height: 110rpx;
99
   height: 110rpx;
77
 }
100
 }
78
 
101
 
79
 .panelField1 {
102
 .panelField1 {
80
   width: 100%;
103
   width: 100%;
81
-  min-height: 320rpx;
82
   justify-content: flex-start;
104
   justify-content: flex-start;
83
-  border-bottom-left-radius: 50rpx;
84
-  border-bottom-right-radius: 50rpx;
85
 }
105
 }
86
 
106
 
87
 .panelField11 {
107
 .panelField11 {
88
-  font-size: 46rpx;
108
+  font-size: 48rpx;
89
   justify-content: flex-start;
109
   justify-content: flex-start;
90
-  margin: 40rpx 0 80rpx 0;
110
+  color: #fff;
91
 }
111
 }
92
 
112
 
93
-
94
 .panelTag {
113
 .panelTag {
95
   width: 100%;
114
   width: 100%;
96
-  justify-content: space-between;
97
-  align-items: flex-end;
98
-  height:110rpx;
99
-  padding-bottom: 20rpx;
100
-  position: relative;
115
+  min-height: 95rpx;
116
+  align-items: flex-start;
117
+  justify-content: flex-start;
118
+  margin-top: 80rpx;
119
+  z-index: 5;
101
 }
120
 }
102
 
121
 
103
-.panelTag1 {
104
-  font-size: 28rpx;
105
-  margin-left: 50rpx;
122
+.panelTag .panelTagLine {
123
+  margin: 0 0 0 50rpx;
124
+  max-width: 650rpx;
125
+  height: 10rpx;
106
 }
126
 }
107
 
127
 
108
-.panelTag .tagDot{
109
-  width:20rpx;
110
-  height:20rpx;
111
-  border-radius: 5rpx;
112
-  background-color: #7F4B52;
113
-  margin-right: 20rpx;
128
+.panelTag .panelTag1 {
129
+  margin: 0 0 0 50rpx;
130
+  width: 650rpx;
131
+  flex-wrap: wrap;
132
+  align-items: flex-start;
133
+  justify-content: flex-start;
114
 }
134
 }
115
 
135
 
116
 .panelTag .tag {
136
 .panelTag .tag {
117
-  margin: 6rpx 20rpx 6rpx 0;
137
+  font-size: 46rpx;
138
+  margin: 20rpx 30rpx 0 0;
139
+  font-weight: 400;
140
+  color: #d2d2d2;
118
 }
141
 }
119
 
142
 
120
 .right2 {
143
 .right2 {
121
   position: absolute;
144
   position: absolute;
122
-  top:0;
123
-  right:0;
124
-  width:134rpx;
125
-  height:150rpx;
145
+  top: 0;
146
+  right: 0;
147
+  width: 134rpx;
148
+  height: 150rpx;
126
   align-items: flex-start;
149
   align-items: flex-start;
127
 }
150
 }
128
 
151
 
129
 .line1 {
152
 .line1 {
130
   width: 4rpx;
153
   width: 4rpx;
131
   height: 30rpx;
154
   height: 30rpx;
132
-  background-color: rgba(255,255,255,0.2);
155
+  background-color: rgba(255, 255, 255, 0.2);
133
   margin-top: 66rpx;
156
   margin-top: 66rpx;
134
 }
157
 }
135
-.universalpic_show_white_30x30{
158
+
159
+.universalpic_show_white_30x30 {
136
   width: 36rpx;
160
   width: 36rpx;
137
   height: 36rpx;
161
   height: 36rpx;
138
   margin: 68rpx 50rpx 0 50rpx;
162
   margin: 68rpx 50rpx 0 50rpx;
@@ -147,25 +171,19 @@
147
 .panelField20 {
171
 .panelField20 {
148
   width: 100%;
172
   width: 100%;
149
   justify-content: flex-start;
173
   justify-content: flex-start;
174
+  z-index: 5; 
150
 }
175
 }
151
 
176
 
152
 .panelField2 {
177
 .panelField2 {
153
-  width: 100%;
178
+  width: 710rpx;
154
   margin-bottom: 20rpx;
179
   margin-bottom: 20rpx;
180
+  border-radius: 20rpx;
155
 }
181
 }
156
 
182
 
157
 .panelField21 {
183
 .panelField21 {
158
   width: 650rpx;
184
   width: 650rpx;
159
   font-size: 36rpx;
185
   font-size: 36rpx;
160
-  margin: 40rpx 30rpx 0 30rpx;
161
-  min-height: 50rpx;
162
-}
163
-
164
-.lineField{
165
-  width:650rpx;
166
-  height:3rpx;
167
-  background-color: #4B3840;
168
-  margin-top: 30rpx;
186
+  margin: 50rpx 40rpx;
169
 }
187
 }
170
 
188
 
171
 .panelItem .panelSound {
189
 .panelItem .panelSound {
@@ -176,6 +194,13 @@
176
   border-radius: 50%;
194
   border-radius: 50%;
177
 }
195
 }
178
 
196
 
197
+.panelItem .panelSoundHover {
198
+  background-color: #d2d2d2;
199
+}
200
+.panelItem .panelSoundHover1 {
201
+  color: #d2d2d2;
202
+}
203
+
179
 .panelItem .universalpic_read_mark_black_20x20 {
204
 .panelItem .universalpic_read_mark_black_20x20 {
180
   width: 21rpx;
205
   width: 21rpx;
181
   height: 20rpx;
206
   height: 20rpx;
@@ -185,12 +210,12 @@
185
   text-decoration: underline;
210
   text-decoration: underline;
186
 }
211
 }
187
 
212
 
188
-.panelItem .textNormal{
189
-  min-height:50rpx;
213
+.panelItem .textNormal {
214
+  min-height: 50rpx;
190
 }
215
 }
191
 
216
 
192
-.panelItem .textNormal2{
193
-  font-size:36rpx;
217
+.panelItem .textNormal2 {
218
+  font-size: 36rpx;
194
 }
219
 }
195
 
220
 
196
 .panelItem .textPinyin {
221
 .panelItem .textPinyin {
@@ -201,18 +226,23 @@
201
 .panelItem .imageBishun {
226
 .panelItem .imageBishun {
202
   width: 360rpx;
227
   width: 360rpx;
203
   height: 360rpx;
228
   height: 360rpx;
204
-  margin: 30rpx 0;
229
+  margin: 6rpx 0;
205
 }
230
 }
206
 
231
 
207
 .panelItem .imageFree {
232
 .panelItem .imageFree {
208
   width: 650rpx;
233
   width: 650rpx;
209
-  margin: 30rpx 0;
234
+  margin: 6rpx 0;
210
   border-radius: 20rpx;
235
   border-radius: 20rpx;
211
 }
236
 }
212
 
237
 
213
-.panelItem .textBr{
214
-  width:100%;
215
-  height:20rpx;
238
+.panelItem .imageFree2 {
239
+  width: 650rpx;
240
+  border-radius: 10rpx;
241
+}
242
+
243
+.panelItem .textBr {
244
+  width: 100%;
245
+  height: 24rpx;
216
 }
246
 }
217
 
247
 
218
 .panelItem .textReturn {
248
 .panelItem .textReturn {
@@ -224,14 +254,39 @@
224
   height: 30rpx;
254
   height: 30rpx;
225
 }
255
 }
226
 
256
 
257
+/* ******************************** */
227
 
258
 
228
 /* 底部记忆选择 */
259
 /* 底部记忆选择 */
229
 
260
 
230
-.panelFooter{
261
+.footerShade{
231
   width: 100%;
262
   width: 100%;
232
   position: fixed;
263
   position: fixed;
264
+  height:480rpx;
265
+  bottom: 0;
266
+  z-index: 7;
267
+}
268
+
269
+.footer{
270
+  width: 710rpx;
271
+  position: fixed;
233
   bottom: 0;
272
   bottom: 0;
234
   z-index: 10;
273
   z-index: 10;
274
+  border-top-left-radius: 20rpx;
275
+  border-top-right-radius: 20rpx;
276
+}
277
+.panelFooter {
278
+  width: 710rpx;
279
+  margin-bottom: 20rpx;
280
+  background-color: #181a21;
281
+  border-radius: 20rpx;
282
+  color: #d2d2d2;
283
+  font-size: 48rpx;
284
+  text-align: center;
285
+  line-height: 140rpx;
286
+}
287
+
288
+.panelFooter0 {
289
+  line-height: 40rpx;
235
 }
290
 }
236
 
291
 
237
 .panelBottomAnswer0 {
292
 .panelBottomAnswer0 {
@@ -242,13 +297,13 @@
242
 
297
 
243
 .panelBottomAnswer {
298
 .panelBottomAnswer {
244
   width: 100%;
299
   width: 100%;
245
-  font-size: 20rpx;
300
+  font-size: 28rpx;
246
   justify-content: space-between;
301
   justify-content: space-between;
247
   z-index: 10;
302
   z-index: 10;
248
-  height:130rpx;
303
+  height: 140rpx;
249
 }
304
 }
250
 
305
 
251
-.iphoneX{
306
+.iphoneX {
252
   width: 100%;
307
   width: 100%;
253
   height: 60rpx;
308
   height: 60rpx;
254
   z-index: 10;
309
   z-index: 10;
@@ -256,157 +311,182 @@
256
 
311
 
257
 .Answer {
312
 .Answer {
258
   flex: 1;
313
   flex: 1;
259
-  height: 130rpx;
260
-  font-size: 24rpx;
314
+  font-size: 28rpx;
261
   justify-content: flex-start;
315
   justify-content: flex-start;
316
+  height: 140rpx;
262
 }
317
 }
263
 
318
 
264
-.AnswerHover1{
265
-  background-color: #F0F0F0;
319
+.Answer .btnColor {
320
+  height: 14rpx;
321
+  width: 75%;
322
+  border-radius: 4rpx;
323
+  margin-top: 34rpx;
266
 }
324
 }
267
-.AnswerHover2{
268
-  background-color: #49354C;
325
+
326
+.Answer .btnTime {
327
+  margin-top: 14rpx;
269
 }
328
 }
270
-.AnswerHover3{
271
-  background-color: #504F5A;
329
+
330
+.Answer .Answer0 {
331
+  background-color: #fe6659;
272
 }
332
 }
273
-.AnswerHover4{
274
-  background-color: #373B4F;
333
+
334
+.Answer .Answer1 {
335
+  background-color: #ffbc00;
275
 }
336
 }
276
-.AnswerHover5{
277
-  background-color: #34384C;
337
+
338
+.Answer .Answer2 {
339
+  background-color: #329468;
278
 }
340
 }
279
-.AnswerHover6{
280
-  background-color: #32304C;
341
+
342
+.Answer .Answer3 {
343
+  background-color: #0a60be;
281
 }
344
 }
282
-.AnswerHover7{
283
-  background-color: #3D3838;
345
+
346
+
347
+.footer0 {
348
+  height: 180rpx;
349
+  width: 100%;
350
+  z-index: 1;
284
 }
351
 }
285
-.AnswerHover8{
286
-  background-color: #473F52;
352
+
353
+/* 最后一页 */
354
+
355
+.panelLast {
356
+  width: 100%;
357
+  justify-content: flex-start;
358
+  align-items: flex-start;
359
+  position: fixed;
360
+  top: 0;
361
+  color: #fff;
362
+  z-index: 20;
287
 }
363
 }
288
 
364
 
365
+.text1 {
366
+  margin: 100rpx 0 60rpx 40rpx;
367
+  font-size: 90rpx;
368
+}
289
 
369
 
290
-.Answer .btnColor {
291
-  height: 30rpx;
292
-  width: 90%;
293
-  border-radius: 6rpx;
294
-  margin-top: 30rpx;
370
+.panelLastTime {
371
+  font-size: 28rpx;
372
+  font-weight: 400;
373
+  color: #e3e3e3;
374
+  margin: 0 0 40rpx 40rpx;
375
+  align-items: flex-start;
295
 }
376
 }
296
 
377
 
297
-.Answer .btnTime {
298
-  margin-top: 10rpx;
378
+.panelLastTime .time1 {
379
+  font-size: 90rpx;
380
+}
381
+.panelLastTime .time11 {
382
+  font-size: 108rpx;
383
+  font-family: 'Roboto-Black';
384
+}
385
+
386
+.panelLastTime .time2 {
387
+  font-size: 36rpx;
388
+  font-family: 'Roboto-Black';
389
+}
390
+
391
+.panelLastFooter {
392
+  width: 100%;
393
+  position: fixed;
394
+  bottom: 0;
395
+  align-items: flex-start;
396
+  font-size: 36rpx;
299
 }
397
 }
300
 
398
 
301
-.Answer0 {
302
-  background-color: #FE6659;
399
+.panelLastFooter .panelLastFooter1 {
400
+  width: 100%;
401
+  height: 131rpx;
402
+  border-top: 1rpx solid rgba(0, 0, 0, 0.2);
403
+  justify-content: flex-start;
303
 }
404
 }
304
 
405
 
305
-.Answer1 {
306
-  background-color: #FFBC00;
406
+.panelLastFooter .panelLastFooter2 {
407
+  width: 100%;
408
+  border-top: 1rpx solid rgba(0, 0, 0, 0.2);
409
+  text-align: center;
410
+  line-height: 131rpx;
307
 }
411
 }
308
 
412
 
309
-.Answer2 {
310
-  background-color: #329468;
413
+.universalpic_undo_gray_26x20 {
414
+  width: 26rpx;
415
+  height: 19rpx;
416
+  margin: 0 20rpx 0 30rpx;
311
 }
417
 }
312
 
418
 
313
-.Answer3 {
314
-  background-color: #0A60BE;
419
+.universalpic_screenshot_gray_30x30 {
420
+  width: 30rpx;
421
+  height: 30rpx;
422
+  margin: 0 20rpx 0 30rpx;
315
 }
423
 }
316
 
424
 
425
+
317
 .numberContainer {
426
 .numberContainer {
318
-  background-color: rgba(0, 0, 0, 0.7);
319
-  position: fixed;
320
   width: 100%;
427
   width: 100%;
428
+  justify-content: flex-start;
429
+  align-items: flex-start;
430
+  position: fixed;
321
   top: 0;
431
   top: 0;
432
+  color: #fff;
322
   z-index: 20;
433
   z-index: 20;
323
 }
434
 }
324
 
435
 
325
-.numberContainer1 {
326
-  background-color: #f0f0f0;
327
-  margin-top: 10rpx;
328
-  width: 730rpx;
329
-  border-radius: 10rpx;
330
-  font-size: 28rpx;
331
-  color: #1e1e1e;
332
-}
333
-
334
-.numberContainer11 {
335
-  border-top-left-radius: 10rpx;
336
-  border-top-right-radius: 10rpx;
337
-  justify-content: space-between;
338
-  height: 100rpx;
339
-  width: 100%;
436
+.numberContainer .numberContainer11 {
437
+  margin: 50rpx 0 0 30rpx;
438
+  font-size:32rpx;
340
 }
439
 }
341
 
440
 
342
 .numberContainer .left {
441
 .numberContainer .left {
343
   margin-left: 30rpx;
442
   margin-left: 30rpx;
344
   font-weight: 400;
443
   font-weight: 400;
444
+  font-size:28rpx;
345
 }
445
 }
346
 
446
 
347
 .numberContainer .right3 {
447
 .numberContainer .right3 {
348
   margin-right: 30rpx;
448
   margin-right: 30rpx;
349
-  color:#787878;
350
   font-weight: 500;
449
   font-weight: 500;
450
+  font-size:28rpx;
351
 }
451
 }
352
 
452
 
353
-.numberContainer12 {
453
+.numberContainer .numberContainer12 {
354
   justify-content: space-between;
454
   justify-content: space-between;
355
   height: 100rpx;
455
   height: 100rpx;
356
   width: 100%;
456
   width: 100%;
357
-  background-color: #fff;
358
   font-weight: 400;
457
   font-weight: 400;
359
 }
458
 }
360
 
459
 
361
-.numberContainer13 {
362
-  height: 100rpx;
460
+.numberContainer .numberContaineFooter{
363
   width: 100%;
461
   width: 100%;
364
-  color: #0071ef;
365
-  border-bottom-left-radius: 10rpx;
366
-  border-bottom-right-radius: 10rpx;
462
+  position: fixed;
463
+  bottom: 0;
464
+  align-items: flex-start;
465
+  font-size: 36rpx;
466
+  border-top: 1rpx solid rgba(0, 0, 0, 0.2);
367
   text-align: center;
467
   text-align: center;
368
-  font-weight: 500;
468
+  line-height: 131rpx;
369
 }
469
 }
370
 
470
 
371
-.footer{
372
-  height:180rpx;
471
+.lineWidthAll{
373
   width: 100%;
472
   width: 100%;
473
+  justify-content: flex-end;
474
+  height: 1rpx;
475
+  background-color: transparent;
374
 }
476
 }
375
-
376
-.panelLast {
377
-  width: 100%;
378
-  justify-content: flex-start;
379
-  position: fixed;
380
-  top:0;
477
+.lineWidth720{
478
+  width: 720rpx;
479
+  height: 1rpx;
480
+  background-color:rgba(0, 0, 0, 0.2);
381
 }
481
 }
382
 
482
 
383
-.text1 {
384
-  margin: 230rpx 0 60rpx 0;
385
-  font-size: 64rpx;
386
-}
387
-
388
-.panelLastTime {
389
-  font-size: 28rpx;
390
-  font-weight: 400;
391
-  margin-bottom: 40rpx;
392
-}
393
-
394
-.panelLastTime .time {
395
-  font-size: 30rpx;
396
-  font-family: 'Roboto-Black';
397
-}
398
-
399
-.panelLastFooter{
483
+.lineFooter{
400
   width: 100%;
484
   width: 100%;
401
-  height:130rpx;
402
-  border-top:1rpx solid rgba(0, 0, 0, 0.2);
403
-  font-size:36rpx;
404
-  text-align: center;
405
-  line-height: 130rpx;
406
-  position: fixed;
407
-  bottom: 0;
485
+  height: 1rpx;
486
+  background-color:rgba(0, 0, 0, 0.2);
408
 }
487
 }
409
-.practice_introduction_marks_a{
488
+
489
+.practice_introduction_marks_a {
410
   width: 22rpx;
490
   width: 22rpx;
411
   height: 16rpx;
491
   height: 16rpx;
412
   margin-top: 104rpx;
492
   margin-top: 104rpx;
@@ -419,16 +499,23 @@
419
   text-align: center;
499
   text-align: center;
420
 }
500
 }
421
 
501
 
422
-.practice_introduction_marks_b{
502
+.practice_introduction_marks_b {
423
   width: 22rpx;
503
   width: 22rpx;
424
   height: 16rpx;
504
   height: 16rpx;
425
   margin-top: 30rpx;
505
   margin-top: 30rpx;
426
 }
506
 }
427
 
507
 
428
-
429
 .text3 {
508
 .text3 {
430
   margin-top: 40rpx;
509
   margin-top: 40rpx;
431
   font-size: 20rpx;
510
   font-size: 20rpx;
432
   font-weight: 500;
511
   font-weight: 500;
433
   text-align: center;
512
   text-align: center;
513
+}
514
+
515
+
516
+.Canvas{
517
+  width: 600px; 
518
+  height: 360px;
519
+  position: fixed;
520
+  left:760rpx;
434
 }
521
 }

+ 56 - 60
pages/main/preview.js

@@ -2,7 +2,7 @@ import common from '../../utils/util';
2
 import main from '../../utils/main';
2
 import main from '../../utils/main';
3
 
3
 
4
 const app = getApp();
4
 const app = getApp();
5
-var iTimeout = 0, intervalSound = 0, intervalRefresh = 0;
5
+var intervalSound = 0, intervalRefresh = 0;
6
 var arrImage = [];
6
 var arrImage = [];
7
 var isCopying = false;
7
 var isCopying = false;
8
 var isPlaying = false;
8
 var isPlaying = false;
@@ -23,22 +23,39 @@ Page({
23
       Containnerheight: main.getWindowHeight(),
23
       Containnerheight: main.getWindowHeight(),
24
       ShowType: options.type,
24
       ShowType: options.type,
25
       MiaoguoCardID: id,
25
       MiaoguoCardID: id,
26
+      Color: main.getDetailColor(app.globalData.ColorIndex),
26
     });
27
     });
27
     console.log("MiaoguoCardID:" + id);
28
     console.log("MiaoguoCardID:" + id);
28
 
29
 
29
     this.audioCtx = [];
30
     this.audioCtx = [];
30
 
31
 
31
 
32
 
32
-    if (options.type == "share") {
33
-      wx.setNavigationBarTitle({
34
-        title: "来自分享"
35
-      });
36
-    }
37
-    else if (options.type == "show") {
33
+    if (options.type == "show") {
38
       wx.setNavigationBarTitle({
34
       wx.setNavigationBarTitle({
39
         title: "查看题卡"
35
         title: "查看题卡"
40
       });
36
       });
41
     }
37
     }
38
+    else{
39
+      if (options.type == "share") {
40
+        wx.setNavigationBarTitle({
41
+          title: "来自分享"
42
+        });
43
+      }
44
+    
45
+      if (wx.setBackgroundColor) {
46
+        wx.setBackgroundColor({
47
+          backgroundColor: that.data.Color.BackColor,
48
+          backgroundColorTop: that.data.Color.BackColor,
49
+          backgroundColorBottom: that.data.Color.BackColor,
50
+        })
51
+      }
52
+      if (wx.setNavigationBarColor) {
53
+        wx.setNavigationBarColor({
54
+          frontColor: "#ffffff",
55
+          backgroundColor: that.data.Color.BackColor,
56
+        })
57
+      }
58
+    }
42
   },
59
   },
43
   onShow: function () {
60
   onShow: function () {
44
     var that = this;
61
     var that = this;
@@ -56,7 +73,6 @@ Page({
56
         that.init();
73
         that.init();
57
   },
74
   },
58
   onUnload: function () {
75
   onUnload: function () {
59
-    clearTimeout(iTimeout);
60
     clearInterval(intervalSound);
76
     clearInterval(intervalSound);
61
   },
77
   },
62
   init: function () {
78
   init: function () {
@@ -114,10 +130,21 @@ Page({
114
         }
130
         }
115
       }
131
       }
116
     }
132
     }
133
+
134
+    var TagWidth = 0;
135
+    if (card.Tags && card.Tags.length > 0) {
136
+      TagWidth = 92 + (card.Tags.length - 1) * 122;
137
+      for (var j = 0; j < card.Tags.length; j++) {
138
+        if (card.Tags[j].length > 2) {
139
+          TagWidth += 46 * (card.Tags[j].length - 2);
140
+        }
141
+      }
142
+    }
117
     this.setData({
143
     this.setData({
118
       ID: card.MiaoguoCardID,
144
       ID: card.MiaoguoCardID,
119
       Field: card.Field,
145
       Field: card.Field,
120
       Tags: card.Tags,
146
       Tags: card.Tags,
147
+      TagWidth: TagWidth,
121
       PrevID: prevId,
148
       PrevID: prevId,
122
       NextID: nextId,
149
       NextID: nextId,
123
       FontSize: card.FontSize,
150
       FontSize: card.FontSize,
@@ -295,63 +322,33 @@ Page({
295
         this.audioCtx.push(wx.createAudioContext('myAudio' + i));
322
         this.audioCtx.push(wx.createAudioContext('myAudio' + i));
296
       }
323
       }
297
       var index = 0;
324
       var index = 0;
298
-      intervalSound = setInterval(function () {
299
-        that.audioCtx[index].setSrc(arr[index]);
300
-        that.audioCtx[index].play();
325
+      if (arr.length > 1) {
326
+        
327
+        intervalSound = setInterval(function () {
328
+          that.audioCtx[index].setSrc(arr[index]);
329
+          that.audioCtx[index].play();
301
 
330
 
302
-        index++;
303
-        if (index >= arr.length) {
304
-          clearInterval(intervalSound);
305
-        }
306
-      }, 1000);
307
-
308
-      var fieldid = e.currentTarget.dataset.fieldid;
309
-      var content = that.data.Field[fieldid];
310
-      var selectIndex = 0;
311
-      for (var i = 0; i < content.length; i++) {
312
-        if (content[i].Type == 'sound') {
313
-          if (content[i].Content == e.currentTarget.dataset.content) {
314
-            content[i].SoundImageName = "gif";
315
-            selectIndex = i;
316
-            break;
331
+          index++;
332
+          if (index >= arr.length) {
333
+            clearInterval(intervalSound);
317
           }
334
           }
318
-        }
335
+        }, 1000);
336
+      }
337
+      else {
338
+        if (arr[index].indexOf("http") > 0)
339
+          arr[index] = arr[index].substr(arr[index].indexOf("http"));
340
+        arr[index] = arr[index].replace("http://", "https://");
341
+
342
+        that.audioCtx[index].setSrc(arr[index]);
343
+        that.audioCtx[index].play();
319
       }
344
       }
320
-      that.setData({
321
-        Field: that.data.Field,
322
-      });
323
-      iTimeout = setTimeout(function () {
324
-        content[selectIndex].SoundImageName = "png";
325
-        that.data.Field[fieldid] = content;
326
-        that.setData({
327
-          Field: that.data.Field,
328
-        });
329
-      }, 2000);
330
     }
345
     }
331
   },
346
   },
332
-  onMore: function () {
333
-    var that = this;
334
-    wx.showActionSheet({
335
-      itemList: ["详细信息", "编辑题卡", "删除题卡"],
336
-      success(res) {
337
-        //console.log(res.tapIndex);
338
-        if (res.tapIndex == 0) {
339
-          wx.navigateTo({
340
-            url: './cardInfo?id=' + that.data.MiaoguoCardID,
341
-          });
342
-        }
343
-        else if (res.tapIndex == 1) {
344
-          wx.navigateTo({
345
-            url: './add?type=edit2&type2=1&id=' + that.data.MiaoguoCardID,
346
-          });
347
-        }
348
-        else if (res.tapIndex == 2) {
349
-          that.deleteCard();
350
-        }
351
-      },
352
-    })
347
+  getDetailInfo:function(){
348
+    wx.navigateTo({
349
+      url: './cardInfo?id=' + this.data.MiaoguoCardID,
350
+    });
353
   },
351
   },
354
-
355
   deleteCard: function () {
352
   deleteCard: function () {
356
     var that = this;
353
     var that = this;
357
     wx.showModal({
354
     wx.showModal({
@@ -384,7 +381,6 @@ Page({
384
     });
381
     });
385
   },
382
   },
386
   onPreview: function (e) {
383
   onPreview: function (e) {
387
-    clearTimeout(iTimeout);
388
     var id = e.currentTarget.dataset.id;
384
     var id = e.currentTarget.dataset.id;
389
     wx.redirectTo({
385
     wx.redirectTo({
390
       url: './preview?type=show&id=' + id,
386
       url: './preview?type=show&id=' + id,

+ 1 - 5
pages/main/preview.json

@@ -1,7 +1,3 @@
1
 {
1
 {
2
-  "navigationBarBackgroundColor": "#ffffff",
3
-  "navigationBarTextStyle": "black",
4
-  "navigationBarTitleText": "预览",
5
-  "backgroundColor": "#E3E3E3",
6
-  "backgroundColorTop":"#ffffff"
2
+  "navigationBarTitleText": "格式预览"
7
 }
3
 }

+ 55 - 36
pages/main/preview.wxml

@@ -1,79 +1,101 @@
1
-<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}'>
2
+  <!-- 顶端工具栏 -->
2
   <block wx:if="{{ShowType=='show'}}">
3
   <block wx:if="{{ShowType=='show'}}">
3
     <view class="panelTop FlexRow">
4
     <view class="panelTop FlexRow">
4
-      <view class='left FlexRow'>
5
+      <view class='left FlexColumn'>
5
         <view class="text1">到期时间</view>
6
         <view class="text1">到期时间</view>
6
         <view class="text2">{{LimitTimeStr}}</view>
7
         <view class="text2">{{LimitTimeStr}}</view>
7
       </view>
8
       </view>
8
       <view class='right FlexRow'>
9
       <view class='right FlexRow'>
10
+        <view class="panelTopBtn FlexRow" bindtap='deleteCard'>
11
+          <image class="universalpic_del_black_20x28" src='../images/universalpic_del_black_20x28.png' />
12
+        </view>
13
+        <view class="panelTopBtn FlexRow" bindtap='getDetailInfo'>
14
+          <image class="universalpic_info_black_26x26" src='../images/universalpic_info_black_26x26.png' />
15
+        </view>
9
         <view class="text3" bindtap='practiceToday' hidden="{{!IsTodayPractice}}">今天必练</view>
16
         <view class="text3" bindtap='practiceToday' hidden="{{!IsTodayPractice}}">今天必练</view>
10
         <view class="text4 text3" bindtap='shelveTask' hidden="{{IsTodayPractice}}">今天不练</view>
17
         <view class="text4 text3" bindtap='shelveTask' hidden="{{IsTodayPractice}}">今天不练</view>
11
       </view>
18
       </view>
12
     </view>
19
     </view>
13
     <view class="panelTop1"></view>
20
     <view class="panelTop1"></view>
14
   </block>
21
   </block>
15
-  <view class="panelField{{ShowType}} panelField1 FlexColumn">
16
-    <view class="panelField11 panelItem FlexRow" style="font-size:{{FontSize}}rpx;">
22
+
23
+  <!-- 第一段 -->
24
+  <view class="panelField1 FlexColumn" style='background-color:{{Color.BackColor}};'>
25
+    <view class="editFieldNull" hidden="{{ShowType=='sharepreview'}}"></view>
26
+    <view class="editFieldNull1" hidden="{{ShowType!='sharepreview'}}"></view>
27
+    
28
+    <view class="editField" bindtap='editField' data-id="1" wx:if="{{ShowType == 'show'}}">编辑段落1</view>
29
+    <view class="panelField11 panelItem FlexRow" style="font-size:46rpx;">
17
       <block wx:for="{{Field[1]}}" wx:key="index">
30
       <block wx:for="{{Field[1]}}" wx:key="index">
18
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
31
         <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
19
         <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
32
         <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
20
-        
21
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
33
         <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
34
+
22
         <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
35
         <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
23
-          <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
36
+            <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
24
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
37
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
25
         <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
38
         <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
26
       </block>
39
       </block>
27
       </text>
40
       </text>
28
-      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
41
+
42
+      <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">
29
         <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
43
         <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
30
       </view>
44
       </view>
31
-      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</text>
45
+
46
+      <view class="textPinyin" hover-class='panelSoundHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="1">{{item.Content}}</view>
32
       <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" />
47
       <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" />
48
+
33
       </block>
49
       </block>
34
     </view>
50
     </view>
35
   </view>
51
   </view>
36
 
52
 
37
-  <view class="panelTag FlexRow" wx:if="{{Tags && Tags.length>0}}">
38
-    <view class="panelTag1 FlexRow" wx:if="{{Tags && Tags.length>0}}">
39
-      <view class='tagDot'></view>
53
+  <!-- 标签 -->
54
+  <view class="panelTag FlexColumn" wx:if="{{Tags.length>0}}">
55
+    <view class='panelTagLine' style='width:{{TagWidth}}rpx;background-color:{{Color.LineColor}};'></view>
56
+    <view class="panelTag1 FlexRow">
40
       <view class="tag" wx:for="{{Tags}}" wx:key="index">{{item}}</view>
57
       <view class="tag" wx:for="{{Tags}}" wx:key="index">{{item}}</view>
41
     </view>
58
     </view>
42
-    <view wx:if="{{true}}"></view>
43
   </view>
59
   </view>
44
 
60
 
45
-  <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}}" >
46
-    <view wx:if="{{itemParent==3}}" class="lineField"></view>
61
+  <!-- 第二段和第三段 -->
62
+  <view class="panelField20 FlexColumn">
63
+    <view class="editFieldNull2"  hidden="{{ShowType=='sharepreview'}}"></view>
64
+    <view class="editFieldNull3"  hidden="{{ShowType!='sharepreview'}}"></view>
65
+    
66
+    <block wx:for="{{[2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent" wx:if="{{Field[itemParent].length>0}}" >
67
+    <view class="editField" bindtap='editField' data-id="{{itemParent}}" wx:if="{{ShowType == 'show'}}">编辑段落{{itemParent}}</view>
68
+    <view class="panelField2 FlexColumn" style='background-color:{{Color.FieldBackColor}};'>
69
+      <view class="panelField21 panelItem FlexRow" style='color:{{Color.FieldColor}};'>
70
+        <block wx:for="{{Field[itemParent]}}" wx:key="index">
71
+          <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
72
+          <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
47
 
73
 
48
-    <view class="panelField21 panelItem FlexRow">
49
-      <block wx:for="{{Field[itemParent]}}" wx:key="index">
50
-        <text class="textReturn" wx:if="{{index>0 && item.Type=='return'}}"></text>
51
-        <view class="textBr" wx:if="{{index>0 && item.Type=='br'}}"></view>
52
-        
53
-        <text class="textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
74
+          <text class="textNormal2 textNormal" selectable="true" space='ensp' wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
54
 
75
 
55
-        <text class="textNormal FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
76
+          <text class="textNormal2 FlexRow" selectable="true" space='ensp' wx:if="{{item.Type=='line'}}">
56
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
77
             <block wx:for="{{item.Content}}" wx:key="contentIndex" wx:for-item="contentItem">
57
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
78
               <text space='ensp' wx:if="{{contentItem.key=='normal'}}">{{contentItem.value}}</text>
58
-        <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
59
-      </block>
60
-      </text>
61
-
62
-      <view class="panelSound FlexRow" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
63
-        <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
64
-      </view>
79
+          <text class="textLine" wx:if="{{contentItem.key=='line'}}">{{contentItem.value}}</text>
80
+        </block>
81
+        </text>
65
 
82
 
66
-      <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
83
+        <view class="panelSound FlexRow" hover-class='panelSoundHover' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" bindtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">
84
+          <image class="universalpic_read_mark_black_20x20" src='../images/universalpic_read_mark_black_20x20.{{item.SoundImageName}}' />
85
+        </view>
67
 
86
 
68
-      <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" />
69
-
70
-      </block>
87
+        <view class="textPinyin" hover-class='panelPinyinHover1' hover-stay-time="1000" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</view>
88
+        <image class="imageFree2" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
89
+        </block>
90
+      </view>
71
     </view>
91
     </view>
92
+    </block>
72
   </view>
93
   </view>
73
 
94
 
95
+
74
   <view style='height:150rpx'></view>
96
   <view style='height:150rpx'></view>
75
 
97
 
76
-  <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
98
+  <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">退出预览</view>
77
 
99
 
78
   <view class='panelSaveShare panelSave FlexRow' wx:if="{{ShowType=='share'}}">
100
   <view class='panelSaveShare panelSave FlexRow' wx:if="{{ShowType=='share'}}">
79
     <view class='text5 text3' bindtap="returnDefault">首页</view>
101
     <view class='text5 text3' bindtap="returnDefault">首页</view>
@@ -89,9 +111,6 @@
89
     <view class='btn2 FlexRow'>
111
     <view class='btn2 FlexRow'>
90
       <button class="btn21" open-type='share'>分享给大家</button>
112
       <button class="btn21" open-type='share'>分享给大家</button>
91
     </view>
113
     </view>
92
-    <view class='btn2 FlexRow' bindtap="onMore">
93
-      <image class="universalpic_more_40x10" src='../images/universalpic_more_40x10.png' />
94
-    </view>
95
     <view class='btn1 FlexRow' bindtap="onPreview" data-id="{{NextID}}" wx:if="{{NextID>0}}">
114
     <view class='btn1 FlexRow' bindtap="onPreview" data-id="{{NextID}}" wx:if="{{NextID>0}}">
96
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_next_black_30x30.png' />
115
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_next_black_30x30.png' />
97
     </view>
116
     </view>

+ 153 - 91
pages/main/preview.wxss

@@ -26,74 +26,190 @@
26
 .left {
26
 .left {
27
   margin-left: 25rpx;
27
   margin-left: 25rpx;
28
   font-weight: 400;
28
   font-weight: 400;
29
+  align-items: flex-start;
29
 }
30
 }
30
 
31
 
31
 .right {
32
 .right {
32
-  margin-right: 30rpx;
33
+  margin-right: 20rpx;
34
+}
35
+
36
+.panelTopBtn{
37
+  width:100rpx;
38
+  height:120rpx;
39
+}
40
+
41
+.universalpic_del_black_20x28{
42
+  width:20rpx;
43
+  height:28rpx;
44
+}
45
+
46
+.universalpic_info_black_26x26{
47
+  width:26rpx;
48
+  height:26rpx;
33
 }
49
 }
34
 
50
 
51
+.text1 {
52
+  font-size:24rpx;
53
+}
35
 .text2 {
54
 .text2 {
36
   color: #787878;
55
   color: #787878;
37
-  margin-left: 30rpx;
38
   font-weight: 500;
56
   font-weight: 500;
57
+  font-size:28rpx;
39
 }
58
 }
40
 
59
 
41
 .text3 {
60
 .text3 {
42
   color: #787878;
61
   color: #787878;
43
-  width: 132rpx;
62
+  width: 156rpx;
44
   line-height: 80rpx;
63
   line-height: 80rpx;
45
   text-align: center;
64
   text-align: center;
46
   background-color: #fff;
65
   background-color: #fff;
47
   border:1rpx solid #9B9B9B;
66
   border:1rpx solid #9B9B9B;
48
   border-radius: 10rpx;
67
   border-radius: 10rpx;
49
   font-size: 24rpx;
68
   font-size: 24rpx;
69
+  margin-left: 20rpx;
50
 }
70
 }
51
 
71
 
52
 .text4 {
72
 .text4 {
53
   color: #A20602;
73
   color: #A20602;
54
 }
74
 }
55
 
75
 
76
+.editField{
77
+  color:#fff;
78
+  font-size:24rpx;
79
+  align-self: flex-start;
80
+  margin: 0 0 20rpx 50rpx;
81
+}
82
+
83
+/* 段落显示************************ */
84
+
85
+.editFieldNull{
86
+  height:60rpx;
87
+}
88
+.editFieldNull1{
89
+  height:40rpx;
90
+}
91
+.editFieldNull2{
92
+  height:80rpx;
93
+}
94
+.editFieldNull3{
95
+  height:30rpx;
96
+}
97
+
56
 .panelItem {
98
 .panelItem {
57
   width: 650rpx;
99
   width: 650rpx;
58
   font-weight: 400;
100
   font-weight: 400;
59
   flex-wrap: wrap;
101
   flex-wrap: wrap;
60
   justify-content: flex-start;
102
   justify-content: flex-start;
61
-  color: #1e1e1e;
103
+  z-index: 5;
104
+}
105
+
106
+.panelField10 {
107
+  width: 100%;
108
+  height: 110rpx;
62
 }
109
 }
63
 
110
 
64
 .panelField1 {
111
 .panelField1 {
65
   width: 100%;
112
   width: 100%;
66
-  background-color: #fff;
67
-  min-height: 320rpx;
68
   justify-content: flex-start;
113
   justify-content: flex-start;
69
-  border-bottom-left-radius: 50rpx;
70
-  border-bottom-right-radius: 50rpx;
71
-}
72
-.panelFieldsharepreview{
73
-  min-height: 0rpx;
74
-  border-bottom-left-radius: 0;
75
-  border-bottom-right-radius: 0;
76
 }
114
 }
115
+
77
 .panelField11 {
116
 .panelField11 {
117
+  font-size: 48rpx;
118
+  justify-content: flex-start;
119
+  color: #fff;
120
+}
121
+
122
+.panelTag {
123
+  width: 100%;
124
+  min-height: 95rpx;
125
+  align-items: flex-start;
126
+  justify-content: flex-start;
127
+  margin-top: 80rpx;
128
+  z-index: 5;
129
+}
130
+
131
+.panelTag .panelTagLine {
132
+  margin: 0 0 0 50rpx;
133
+  max-width: 650rpx;
134
+  height: 10rpx;
135
+}
136
+
137
+.panelTag .panelTag1 {
138
+  margin: 0 0 0 50rpx;
139
+  width: 650rpx;
140
+  flex-wrap: wrap;
141
+  align-items: flex-start;
142
+  justify-content: flex-start;
143
+}
144
+
145
+.panelTag .tag {
78
   font-size: 46rpx;
146
   font-size: 46rpx;
147
+  margin: 20rpx 30rpx 0 0;
148
+  font-weight: 400;
149
+  color: #d2d2d2;
150
+}
151
+
152
+.right2 {
153
+  position: absolute;
154
+  top: 0;
155
+  right: 0;
156
+  width: 134rpx;
157
+  height: 150rpx;
158
+  align-items: flex-start;
159
+}
160
+
161
+.line1 {
162
+  width: 4rpx;
163
+  height: 30rpx;
164
+  background-color: rgba(255, 255, 255, 0.2);
165
+  margin-top: 66rpx;
166
+}
167
+
168
+.universalpic_show_white_30x30 {
169
+  width: 36rpx;
170
+  height: 36rpx;
171
+  margin: 68rpx 50rpx 0 50rpx;
172
+}
173
+
174
+.universalpic_hide_white_34x34 {
175
+  width: 36rpx;
176
+  height: 20rpx;
177
+  margin: 68rpx 50rpx 0 50rpx;
178
+}
179
+
180
+.panelField20 {
181
+  width: 100%;
79
   justify-content: flex-start;
182
   justify-content: flex-start;
80
-  margin: 40rpx 0 80rpx 0;
183
+  z-index: 5; 
81
 }
184
 }
82
 
185
 
83
-.panelItem .universalpic_read_gray_40x40 {
84
-  width: 40rpx;
85
-  height: 40rpx;
86
-  margin: 0 10rpx 0 10rpx;
186
+.panelField2 {
187
+  width: 710rpx;
188
+  margin-bottom: 20rpx;
189
+  border-radius: 20rpx;
190
+}
191
+
192
+.panelField21 {
193
+  width: 650rpx;
194
+  font-size: 36rpx;
195
+  margin: 50rpx 40rpx;
87
 }
196
 }
88
 
197
 
89
 .panelItem .panelSound {
198
 .panelItem .panelSound {
90
   width: 40rpx;
199
   width: 40rpx;
91
   height: 40rpx;
200
   height: 40rpx;
92
   margin: 0 10rpx 0 0;
201
   margin: 0 10rpx 0 0;
93
-  background-color: #F0F0F0;
202
+  background-color: #fff;
94
   border-radius: 50%;
203
   border-radius: 50%;
95
 }
204
 }
96
 
205
 
206
+.panelItem .panelSoundHover {
207
+  background-color: #d2d2d2;
208
+}
209
+.panelItem .panelSoundHover1 {
210
+  color: #d2d2d2;
211
+}
212
+
97
 .panelItem .universalpic_read_mark_black_20x20 {
213
 .panelItem .universalpic_read_mark_black_20x20 {
98
   width: 21rpx;
214
   width: 21rpx;
99
   height: 20rpx;
215
   height: 20rpx;
@@ -104,9 +220,13 @@
104
 }
220
 }
105
 
221
 
106
 .panelItem .textNormal {
222
 .panelItem .textNormal {
107
-  width:650rpx;
108
-  justify-content: flex-start;
223
+  min-height: 50rpx;
224
+}
225
+
226
+.panelItem .textNormal2 {
227
+  font-size: 36rpx;
109
 }
228
 }
229
+
110
 .panelItem .textPinyin {
230
 .panelItem .textPinyin {
111
   text-decoration: underline;
231
   text-decoration: underline;
112
   margin-right: 10rpx;
232
   margin-right: 10rpx;
@@ -115,87 +235,35 @@
115
 .panelItem .imageBishun {
235
 .panelItem .imageBishun {
116
   width: 360rpx;
236
   width: 360rpx;
117
   height: 360rpx;
237
   height: 360rpx;
118
-  margin: 30rpx 0;
238
+  margin: 6rpx 0;
119
 }
239
 }
120
 
240
 
121
 .panelItem .imageFree {
241
 .panelItem .imageFree {
122
   width: 650rpx;
242
   width: 650rpx;
123
-  margin: 30rpx 0;
243
+  margin: 6rpx 0;
124
   border-radius: 20rpx;
244
   border-radius: 20rpx;
125
 }
245
 }
126
 
246
 
127
-.panelItem .textBr{
128
-  width:100%;
129
-  height:20rpx;
247
+.panelItem .imageFree2 {
248
+  width: 650rpx;
249
+  border-radius: 10rpx;
130
 }
250
 }
131
 
251
 
132
-.panelItem .textReturn {
252
+.panelItem .textBr {
133
   width: 100%;
253
   width: 100%;
254
+  height: 24rpx;
134
 }
255
 }
135
 
256
 
136
-.panelItem .textReturn2 {
257
+.panelItem .textReturn {
137
   width: 100%;
258
   width: 100%;
138
-  height: 30rpx;
139
 }
259
 }
140
 
260
 
141
-.panelTag {
261
+.panelItem .textReturn2 {
142
   width: 100%;
262
   width: 100%;
143
-  justify-content: space-between;
144
-  margin: 60rpx 0 20rpx 0;
145
-}
146
-
147
-.panelTag1 {
148
-  font-size: 28rpx;
149
-  margin-left: 50rpx;
150
-}
151
-
152
-.panelTag .tagDot{
153
-  width:20rpx;
154
-  height:20rpx;
155
-  border-radius: 5rpx;
156
-  background-color: #9B9B9B;
157
-  margin-right: 20rpx;
158
-}
159
-
160
-.panelTag .tag {
161
-  color: #1E1E1E;
162
-  margin: 6rpx 20rpx 6rpx 0;
163
-}
164
-
165
-.right2 {
166
-  margin-right: 50rpx;
167
-}
168
-
169
-.line1 {
170
-  width: 4rpx;
171
   height: 30rpx;
263
   height: 30rpx;
172
-  background-color: #d2d2d2;
173
-}
174
-
175
-.universalpic_restore_black_34x34 {
176
-  width: 26rpx;
177
-  height: 26rpx;
178
-  margin-left: 50rpx;
179
-}
180
-
181
-.panelField2 {
182
-  width: 100%;
183
-  margin-bottom: 20rpx;
184
-}
185
-
186
-.panelField21 {
187
-  width: 650rpx;
188
-  font-size: 36rpx;
189
-  margin: 40rpx 0 0 0;
190
-}
191
-
192
-.lineField{
193
-  width:650rpx;
194
-  height:3rpx;
195
-  background-color: #D2D2D2;
196
-  margin-top: 30rpx;
197
 }
264
 }
198
 
265
 
266
+/* ******************************** */
199
 .panelSave {
267
 .panelSave {
200
   width: 100%;
268
   width: 100%;
201
   background-color: #fff;
269
   background-color: #fff;
@@ -215,24 +283,18 @@
215
 }
283
 }
216
 
284
 
217
 .btn2 {
285
 .btn2 {
218
-  width: 225rpx;
286
+  width: 450rpx;
219
   height: 120rpx;
287
   height: 120rpx;
220
   background-color: #fff;
288
   background-color: #fff;
221
 }
289
 }
222
 
290
 
223
 .btn21 {
291
 .btn21 {
224
-  width: 160rpx;
225
-  height: 80rpx;
226
-  font-size: 24rpx;
292
+  font-size: 36rpx;
227
   color: #0071ef;
293
   color: #0071ef;
228
-  line-height: 80rpx;
229
   text-align: center;
294
   text-align: center;
230
   padding-left: 0;
295
   padding-left: 0;
231
   padding-right: 0;
296
   padding-right: 0;
232
   background-color: #fff;
297
   background-color: #fff;
233
-  border:1rpx solid #9B9B9B;
234
-  border-radius: 10rpx;
235
-  margin: 0;
236
 }
298
 }
237
 
299
 
238
 .btn21::after {
300
 .btn21::after {

+ 6 - 3
pages/main/searchWeb1.js

@@ -67,7 +67,7 @@ Page({
67
         }
67
         }
68
         arr.unshift(search);
68
         arr.unshift(search);
69
 
69
 
70
-        if (arr.length > 10) {
70
+        while (arr.length > 10){
71
           arr.pop();
71
           arr.pop();
72
         }
72
         }
73
 
73
 
@@ -97,7 +97,7 @@ Page({
97
         break;
97
         break;
98
       }
98
       }
99
     }
99
     }
100
-    this.searchResult(obj.Key,obj.Type,obj.Author);
100
+    this.searchResult(obj.Key,obj.Type,obj.Author,obj.Url);
101
     
101
     
102
   },
102
   },
103
   close: function (e) {
103
   close: function (e) {
@@ -113,7 +113,7 @@ Page({
113
     });
113
     });
114
     wx.removeStorageSync("SearchTextList");
114
     wx.removeStorageSync("SearchTextList");
115
   },
115
   },
116
-  searchResult: function (search, searchType, author) {
116
+  searchResult: function (search, searchType, author,shiciUrl) {
117
 
117
 
118
     wx.showLoading({
118
     wx.showLoading({
119
       title: '查询中',
119
       title: '查询中',
@@ -126,6 +126,8 @@ Page({
126
       url += "&SearchType=" + searchType;
126
       url += "&SearchType=" + searchType;
127
     if (author)
127
     if (author)
128
       url += "&Author=" + author;
128
       url += "&Author=" + author;
129
+    if (shiciUrl)
130
+      url += "&ShiciUrl=" + shiciUrl;
129
     main.getData(url, function (data) {
131
     main.getData(url, function (data) {
130
       wx.hideLoading();
132
       wx.hideLoading();
131
       wx.setNavigationBarTitle({
133
       wx.setNavigationBarTitle({
@@ -161,6 +163,7 @@ Page({
161
             obj.Type = "shici";
163
             obj.Type = "shici";
162
             obj.TypeName = "诗词";
164
             obj.TypeName = "诗词";
163
             obj.Content = data.CHN.PeomContent.join("").substr(0, 26);
165
             obj.Content = data.CHN.PeomContent.join("").substr(0, 26);
166
+            obj.ShiciUrl=shiciUrl;
164
           }
167
           }
165
           else if (data.CHN){
168
           else if (data.CHN){
166
             obj.Type = "zici";
169
             obj.Type = "zici";

+ 1 - 18
pages/main/searchWeb1.wxml

@@ -29,24 +29,7 @@
29
           <view class="panelTag0">{{item}}</view>
29
           <view class="panelTag0">{{item}}</view>
30
         </view>
30
         </view>
31
       </view>
31
       </view>
32
-      <!-- <block wx:for="{{SearchTextList}}" wx:key="index">
33
-        <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
34
-          <view class="lineWidth720"></view>
35
-        </view>
36
-        <view class="panelItemSearch0 FlexRow">
37
-          <view class="panelItemSearch01">
38
-          </view>
39
-          <view class="panelItemSearch02 FlexRow">
40
-            <view class="panelItemSearchText01" bindtap='onSearch' data-search="{{item}}">
41
-              {{item}}
42
-            </view>
43
-            <view class="panelItemSearch021 FlexRow" bindtap='deleteItem' data-id="{{index}}">
44
-              <image src='../images/universalpic_del_gray_14x14.png' class="universalpic_del_gray_14x14" />
45
-            </view>
46
-          </view>
47
-        </view>
48
-
49
-      </block> -->
32
+      
50
       <view class='lineFooter'></view>
33
       <view class='lineFooter'></view>
51
     </block>
34
     </block>
52
   </block>
35
   </block>

+ 1 - 0
pages/main/searchWeb2.wxss

@@ -44,6 +44,7 @@
44
   border:1rpx solid #9B9B9B;
44
   border:1rpx solid #9B9B9B;
45
   background-color: #fff;
45
   background-color: #fff;
46
   margin: 30rpx 0  0 30rpx;
46
   margin: 30rpx 0  0 30rpx;
47
+  min-height: 100rpx;
47
 }
48
 }
48
 
49
 
49
 .Select1 {
50
 .Select1 {

+ 66 - 0
pages/other/test.js

@@ -0,0 +1,66 @@
1
+// pages/other/test.js
2
+Page({
3
+
4
+  /**
5
+   * 页面的初始数据
6
+   */
7
+  data: {
8
+
9
+  },
10
+
11
+  /**
12
+   * 生命周期函数--监听页面加载
13
+   */
14
+  onLoad: function (options) {
15
+
16
+  },
17
+
18
+  /**
19
+   * 生命周期函数--监听页面初次渲染完成
20
+   */
21
+  onReady: function () {
22
+
23
+  },
24
+
25
+  /**
26
+   * 生命周期函数--监听页面显示
27
+   */
28
+  onShow: function () {
29
+
30
+  },
31
+
32
+  /**
33
+   * 生命周期函数--监听页面隐藏
34
+   */
35
+  onHide: function () {
36
+
37
+  },
38
+
39
+  /**
40
+   * 生命周期函数--监听页面卸载
41
+   */
42
+  onUnload: function () {
43
+
44
+  },
45
+
46
+  /**
47
+   * 页面相关事件处理函数--监听用户下拉动作
48
+   */
49
+  onPullDownRefresh: function () {
50
+
51
+  },
52
+
53
+  /**
54
+   * 页面上拉触底事件的处理函数
55
+   */
56
+  onReachBottom: function () {
57
+
58
+  },
59
+
60
+  /**
61
+   * 用户点击右上角分享
62
+   */
63
+  onShareAppMessage: function () {
64
+
65
+  }
66
+})

+ 3 - 0
pages/other/test.json

@@ -0,0 +1,3 @@
1
+{
2
+  "usingComponents": {}
3
+}

+ 2 - 0
pages/other/test.wxml

@@ -0,0 +1,2 @@
1
+<!--pages/other/test.wxml-->
2
+<text class='textPinyin'>鲜花盛开</text>

+ 6 - 0
pages/other/test.wxss

@@ -0,0 +1,6 @@
1
+/* pages/other/test.wxss */
2
+.textPinyin {
3
+  border-bottom: 1px solid;
4
+  margin-right: 10rpx;
5
+  line-height:66rpx;
6
+}

BIN
pages/sounds/short1.mp3


+ 84 - 141
utils/main.js

@@ -421,8 +421,8 @@ function changeStringToView(field) {
421
             obj.Type = "normal";
421
             obj.Type = "normal";
422
             obj.Content = arr[k];
422
             obj.Content = arr[k];
423
             arrResult.push(obj);
423
             arrResult.push(obj);
424
-          } 
425
-          else if (k>0 && arr[k] == "") {
424
+          }
425
+          else if (k > 0 && arr[k] == "") {
426
             var obj = {};
426
             var obj = {};
427
             obj.Type = "br";
427
             obj.Type = "br";
428
             obj.Content = "";
428
             obj.Content = "";
@@ -432,6 +432,21 @@ function changeStringToView(field) {
432
           obj.Type = "return";
432
           obj.Type = "return";
433
           arrResult.push(obj);
433
           arrResult.push(obj);
434
         }
434
         }
435
+
436
+        //去掉前回车换行
437
+        while (arrResult[0].Type == "return"
438
+          || arrResult[0].Type == "br") {
439
+          arrResult.shift();
440
+        }
441
+        //去掉后回车换行
442
+        for (var i = arrResult.length - 1; i >= 0; i--) {
443
+          if (arrResult[i].Type == "return"
444
+            || arrResult[i].Type == "br")
445
+            arrResult.pop();
446
+          else {
447
+            break;
448
+          }
449
+        }
435
         result.Field.push(arrResult);
450
         result.Field.push(arrResult);
436
 
451
 
437
       }
452
       }
@@ -471,7 +486,7 @@ function getTaskTodayList(callback) {
471
     wx.hideLoading();
486
     wx.hideLoading();
472
 
487
 
473
     if (data) {
488
     if (data) {
474
-      app.globalData.TaskToday= data;
489
+      app.globalData.TaskToday = data;
475
       callback(data);
490
       callback(data);
476
 
491
 
477
     }
492
     }
@@ -510,28 +525,39 @@ function saveTempImage(serverUrl, tempUrl) {
510
     list.push({ "ServerUrl": serverUrl, "TempUrl": tempUrl });
525
     list.push({ "ServerUrl": serverUrl, "TempUrl": tempUrl });
511
   }
526
   }
512
 
527
 
513
-  if (list.length>200){
528
+  if (list.length > 200) {
514
     list.pop();
529
     list.pop();
515
   }
530
   }
516
   wx.setStorageSync("TempImageList", list);
531
   wx.setStorageSync("TempImageList", list);
517
 }
532
 }
518
 
533
 
519
-function updateSearchList(obj){
534
+function updateSearchList(obj) {
520
   var arr = wx.getStorageSync("SearchWord3");
535
   var arr = wx.getStorageSync("SearchWord3");
521
   if (!arr)
536
   if (!arr)
522
     arr = [];
537
     arr = [];
523
-  
524
-  if (obj.Type=="shici"){
525
-    if (obj.Key.indexOf("《")==0)
526
-      obj.Key=obj.Key.substring(1,obj.Key.length-1);
538
+
539
+  if (obj.Type == "shici") {
540
+    if (obj.Key.indexOf("《") == 0)
541
+      obj.Key = obj.Key.substring(1, obj.Key.length - 1);
527
   }
542
   }
528
   for (var i = 0; i < arr.length; i++) {
543
   for (var i = 0; i < arr.length; i++) {
529
     if (arr[i].Key == obj.Key
544
     if (arr[i].Key == obj.Key
530
       && arr[i].Type == obj.Type
545
       && arr[i].Type == obj.Type
531
-      && arr[i].Author == obj.Author) {
532
-      obj.Value = arr[i].Value;
533
-      arr.splice(i, 1);
534
-      break;
546
+      && arr[i].Author == obj.Author
547
+    ) {
548
+      if (obj.Type == "shici") {
549
+        if (arr[i].ShiciUrl==obj.ShiciUrl){
550
+          obj.Value = arr[i].Value;
551
+          arr.splice(i, 1);
552
+          break;
553
+        }
554
+      }
555
+      else{
556
+        obj.Value = arr[i].Value;
557
+        arr.splice(i, 1);
558
+        break;
559
+      }
560
+      
535
     }
561
     }
536
   }
562
   }
537
   arr.unshift(obj);
563
   arr.unshift(obj);
@@ -540,13 +566,13 @@ function updateSearchList(obj){
540
     arr.pop();
566
     arr.pop();
541
   }
567
   }
542
   wx.setStorageSync("SearchWord3", arr);
568
   wx.setStorageSync("SearchWord3", arr);
543
-  
569
+
544
   app.globalData.SearchItem = obj.Value;
570
   app.globalData.SearchItem = obj.Value;
545
 }
571
 }
546
 
572
 
547
-function checkIsIPhoneX(){
573
+function checkIsIPhoneX() {
548
   var isIphoneX = false;
574
   var isIphoneX = false;
549
-  if (app.globalData.systemInfo.model.indexOf("iPhone X")>=0
575
+  if (app.globalData.systemInfo.model.indexOf("iPhone X") >= 0
550
     || app.globalData.systemInfo.model.indexOf("iPhone X") >= 0) {
576
     || app.globalData.systemInfo.model.indexOf("iPhone X") >= 0) {
551
     isIphoneX = true;
577
     isIphoneX = true;
552
   }
578
   }
@@ -572,8 +598,8 @@ function getMemoryLevelAll() {
572
 }
598
 }
573
 
599
 
574
 function getMemoryLevel(index, number, time) {
600
 function getMemoryLevel(index, number, time) {
575
-  var arr=getMemoryLevelAll();
576
-  if (index<3)
601
+  var arr = getMemoryLevelAll();
602
+  if (index < 3)
577
     return arr[index].Value[number];
603
     return arr[index].Value[number];
578
   else
604
   else
579
     return replaceStr(time);
605
     return replaceStr(time);
@@ -608,141 +634,57 @@ function getDetailColor(index) {
608
     },
634
     },
609
     {
635
     {
610
       ID: 1,
636
       ID: 1,
611
-      Name: "黑白",
612
-      BackColor: "#ffffff",
613
-      BackColor1: "#D2D2D2",
614
-      FrontColor: "#1E1E1E",
615
-      FrontColor1: "rgba(0,0,0,0.3)",
616
-      BackColor2: "#E3E3E3",
617
-      BackColor20: 'rgba(227,227,227,0)',
618
-      FrontColor2: "#1E1E1E",
619
-      TagColor: "#9B9B9B",
620
-      FieldLineColor: "#4B3840",
621
-      IconColor: "black",
622
-      FrontColorNavigationBar: "#000000",
623
-      BtnPressDownColor: "#F0F0F0",
637
+      Name: "阿拉斯加海湾",
638
+      BackColor: "#1F3C88",
639
+      BackColor2: "#19306C",
640
+      LineColor: "#D38E02",
641
+      FieldBackColor: "#15295E",
642
+      FieldColor: "#ACC3DC",
624
     },
643
     },
625
     {
644
     {
626
       ID: 2,
645
       ID: 2,
627
-      Name: "珊瑚树",
628
-      BackColor: "#A5656E",
629
-      BackColor1: "#7F4B52",
630
-      FrontColor: "#ffffff",
631
-      FrontColor1: "rgba(255,255,255,0.5)",
632
-      BackColor2: "#362738",
633
-      BackColor20: 'rgba(54,39,56,0)',
634
-      FrontColor2: "#D2AFBC",
635
-      TagColor: "#7F4B52",
636
-      FieldLineColor: "#D2D2D2",
637
-      IconColor: "white",
638
-      FrontColorNavigationBar: "#ffffff",
639
-      BtnPressDownColor: "#49354C",
640
-    },
641
-    {
642
-      ID: 3,
643
-      Name: "水果沙拉",
644
-      BackColor: "#67A05D",
645
-      BackColor1: "#467A5C",
646
-      FrontColor: "#ffffff",
647
-      FrontColor1: "rgba(255,255,255,0.5)",
648
-      BackColor2: "#403F48",
649
-      BackColor20: 'rgba(64,63,72,0)',
650
-      FrontColor2: "#E3D9CA",
651
-      TagColor: "#467A5C",
652
-      FieldLineColor: "#605F6C",
653
-      IconColor: "white",
654
-      FrontColorNavigationBar: "#ffffff",
655
-      BtnPressDownColor: "#504F5A",
656
-    },
657
-    {
658
-      ID: 4,
659
-      Name: "瞭望",
660
-      BackColor: "#0B8457",
661
-      BackColor1: "#1F6349",
662
-      FrontColor: "#ffffff",
663
-      FrontColor1: "rgba(255,255,255,0.5)",
664
-      BackColor2: "#292C3B",
665
-      BackColor20: 'rgba(41,44,59,0)',
666
-      FrontColor2: "#AAC4C0",
667
-      TagColor: "#1F6349",
668
-      FieldLineColor: "#353A4C",
669
-      IconColor: "white",
670
-      FrontColorNavigationBar: "#ffffff",
671
-      BtnPressDownColor: "#373B4F",
672
-    },
673
-    {
674
-      ID: 5,
675
-      Name: "软糖豆",
676
-      BackColor: "#018790",
677
-      BackColor1: "#1C686C",
678
-      FrontColor: "#ffffff",
679
-      FrontColor1: "rgba(255,255,255,0.5)",
680
-      BackColor2: "#262938",
681
-      BackColor20: 'rgba(38,41,56,0)',
682
-      FrontColor2: "#A9AEC5",
683
-      TagColor: "#1C686C",
684
-      FieldLineColor: "#414760",
685
-      IconColor: "white",
686
-      FrontColorNavigationBar: "#ffffff",
687
-      BtnPressDownColor: "#34384C",
688
-    },
689
-    {
690
-      ID: 6,
691
-      Name: "沙漏",
692
-      BackColor: "#A3816A",
693
-      BackColor1: "#7D614E",
694
-      FrontColor: "#ffffff",
695
-      FrontColor1: "rgba(255,255,255,0.5)",
696
-      BackColor2: "#242337",
697
-      BackColor20: 'rgba(36,35,55,0)',
698
-      FrontColor2: "#A6A4C5",
699
-      TagColor: "#7D614E",
700
-      FieldLineColor: "#3B3F56",
701
-      IconColor: "white",
702
-      FrontColorNavigationBar: "#ffffff",
703
-      BtnPressDownColor: "#32304C",
704
-    },
705
-    {
706
-      ID: 7,
707
-      Name: "曼巴",
708
-      BackColor: "#7E7373",
709
-      BackColor1: "#E08371",
710
-      FrontColor: "#ffffff",
711
-      FrontColor1: "rgba(255,255,255,0.5)",
712
-      BackColor2: "#2B2828",
713
-      BackColor20: 'rgba(43,40,40,0)',
714
-      FrontColor2: "#D3C0C0",
715
-      TagColor: "#E08371",
716
-      FieldLineColor: "#4E4949",
717
-      IconColor: "white",
718
-      FrontColorNavigationBar: "#ffffff",
719
-      BtnPressDownColor: "#3D3838",
720
-    },
721
-    {
722
-      ID: 8,
723
-      Name: "烧赭",
724
-      BackColor: "#FB6C54",
725
-      BackColor1: "#CC554D",
726
-      FrontColor: "#ffffff",
727
-      FrontColor1: "rgba(255,255,255,0.5)",
728
-      BackColor2: "#36303F",
729
-      BackColor20: 'rgba(54,48,63,0)',
730
-      FrontColor2: "#AAA8BC",
731
-      TagColor: "#CC554D",
732
-      FieldLineColor: "#3D3B4D",
733
-      IconColor: "white",
734
-      FrontColorNavigationBar: "#ffffff",
735
-      BtnPressDownColor: "#473F52",
646
+      Name: "塔斯马尼亚的尤加利",
647
+      BackColor: "#1B5E20",
648
+      BackColor2: "#1C4417",
649
+      LineColor: "#FF945B",
650
+      FieldBackColor: "#1C4417",
651
+      FieldColor: "#AFEFB4",
736
     },
652
     },
653
+    // {
654
+    //   ID: 3,
655
+    //   Name: "特立尼达的傍晚",
656
+    //   BackColor: "#E64A19",
657
+    //   BackColor2: "#C12A16",
658
+    //   LineColor: "#ADD303",
659
+    //   FieldBackColor: "#A9361D",
660
+    //   FieldColor: "#FBCAC4",
661
+    // },
737
   ];
662
   ];
738
   if (index > 0)
663
   if (index > 0)
739
     return arr[index];
664
     return arr[index];
740
   else if (index == 0)
665
   else if (index == 0)
741
-    return arr[common.random(2, arr.length - 1)];
666
+    return arr[common.random(1, arr.length - 1)];
742
   else if (index == -1)
667
   else if (index == -1)
743
     return arr;
668
     return arr;
744
 }
669
 }
745
 
670
 
671
+function getShareImageBackColor() {
672
+  var arr = [
673
+    "#F83B2D",
674
+    "#D81B60",
675
+    "#8E24AA",
676
+    "#6639B5",
677
+    "#3F51B5",
678
+    "#1E88E5",
679
+    "#00ACC1",
680
+    "#43A047",
681
+    "#0B8457",
682
+    "#616161",
683
+    "#634033",
684
+    "#FF5722",
685
+  ];
686
+  return arr[common.random(0, 11)];
687
+}
746
 
688
 
747
 function getPinyin(pinyin) {
689
 function getPinyin(pinyin) {
748
   var result = [];
690
   var result = [];
@@ -2269,4 +2211,5 @@ module.exports = {
2269
   checkIsIPhoneX: checkIsIPhoneX,
2211
   checkIsIPhoneX: checkIsIPhoneX,
2270
   getMemoryLevelAll: getMemoryLevelAll,
2212
   getMemoryLevelAll: getMemoryLevelAll,
2271
   getMemoryLevel: getMemoryLevel,
2213
   getMemoryLevel: getMemoryLevel,
2214
+  getShareImageBackColor: getShareImageBackColor,
2272
 }
2215
 }

+ 7 - 2
utils/util.js

@@ -1,7 +1,7 @@
1
 var Crypto = require('cryptojs.js').Crypto;
1
 var Crypto = require('cryptojs.js').Crypto;
2
 var app = getApp();
2
 var app = getApp();
3
 
3
 
4
-function formatTime(date) {
4
+function formatTime(date,format,isShort) {
5
   var year = date.getFullYear()
5
   var year = date.getFullYear()
6
   var month = date.getMonth() + 1
6
   var month = date.getMonth() + 1
7
   var day = date.getDate()
7
   var day = date.getDate()
@@ -10,8 +10,13 @@ function formatTime(date) {
10
   var minute = date.getMinutes()
10
   var minute = date.getMinutes()
11
   var second = date.getSeconds()
11
   var second = date.getSeconds()
12
 
12
 
13
+  if (!format)
14
+    format="-";
13
 
15
 
14
-  return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':')
16
+  if (isShort)
17
+    return [year, month, day].map(formatNumber).join(format);
18
+  else
19
+    return [year, month, day].map(formatNumber).join(format) + ' ' + [hour, minute, second].map(formatNumber).join(':')
15
 }
20
 }
16
 
21
 
17
 function checkIsArray(obj) {
22
 function checkIsArray(obj) {