chengjie 6 年之前
父节点
当前提交
d76cafa181
共有 8 个文件被更改,包括 124 次插入57 次删除
  1. 26 1
      pages/main/add.js
  2. 26 17
      pages/main/add.wxml
  3. 48 20
      pages/main/add.wxss
  4. 0 3
      pages/main/detail.wxml
  5. 6 1
      pages/main/preview.js
  6. 5 6
      pages/main/preview.wxml
  7. 9 5
      pages/main/preview.wxss
  8. 4 4
      pages/main/searchWeb1.wxml

+ 26 - 1
pages/main/add.js

@@ -111,6 +111,14 @@ Page({
111
       });
111
       });
112
     }
112
     }
113
     else {
113
     else {
114
+      var list = app.globalData.CardList;
115
+      for (var i = 0; i < list.length; i++) {
116
+        if (this.data.MiaoguoCardID == list[i].MiaoguoCardID) {
117
+          list[i].Content[0].Content=that.data.Tags;
118
+          break;
119
+        }
120
+      }
121
+      app.globalData.CardList = list;
114
       wx.navigateTo({
122
       wx.navigateTo({
115
         url: './preview?type=preview&id=' + this.data.MiaoguoCardID,
123
         url: './preview?type=preview&id=' + this.data.MiaoguoCardID,
116
       });
124
       });
@@ -337,7 +345,24 @@ Page({
337
       Field: this.data.Field,
345
       Field: this.data.Field,
338
     });
346
     });
339
   },
347
   },
340
-  
348
+  deleteItem: function (e) {
349
+    var that = this;
350
+    var index = e.currentTarget.dataset.id;
351
+
352
+    wx.showModal({
353
+      title: '提醒',
354
+      content: '记号“'+that.data.Tags[index]+'”要删除吗?',
355
+      success(res) {
356
+        if (res.confirm) {
357
+          that.data.Tags.splice(index, 1);
358
+          that.setData({
359
+            Tags: that.data.Tags,
360
+          });
361
+        }
362
+      }
363
+    });
364
+    
365
+  },
341
   onShareAppMessage: function () {
366
   onShareAppMessage: function () {
342
     return {
367
     return {
343
       title: app.globalData.ShareTitle,
368
       title: app.globalData.ShareTitle,

+ 26 - 17
pages/main/add.wxml

@@ -1,22 +1,12 @@
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
1
 <view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-  <!-- <block wx:if="{{Tags && Tags.length>0}}">
3
-    <view class="panelTag FlexRow">
4
-      <view class="panelItem1">记号</view>
5
-      <view class="panelItem2 FlexRow">
6
-        <view class="tag" wx:for="{{Tags}}" wx:key="index">{{item}}</view>
7
-      </view>
8
-    </view>
9
-    <view class='lineFooter'></view>
10
-  </block> -->
11
-
12
-  <view class="panelItem3 FlexRow" wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">
2
+  <view class="panelTimePlan FlexRow" wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">
13
     <view class="panelItem1">
3
     <view class="panelItem1">
14
       练习时间
4
       练习时间
15
     </view>
5
     </view>
16
     <view class="panelItem2 FlexRow">
6
     <view class="panelItem2 FlexRow">
17
-      <view class="panelItem31" hidden="{{IsTodayStudy}}">智能安排</view>
18
-      <view class="panelItem311 panelItem31" hidden="{{!IsTodayStudy}}">今日必练</view>
19
-      <switch class='panelItem32' checked="{{IsTodayStudy}}" bindchange="switch1Change" />
7
+      <view class="panelTimePlan1" hidden="{{IsTodayStudy}}">智能安排</view>
8
+      <view class="panelTimePlan1" hidden="{{!IsTodayStudy}}">今日必练</view>
9
+      <switch class='panelTimePlan2' checked="{{IsTodayStudy}}" bindchange="switch1Change" />
20
     </view>
10
     </view>
21
   </view>
11
   </view>
22
   <view class='lineFooter'></view>
12
   <view class='lineFooter'></view>
@@ -25,7 +15,7 @@
25
   </view>
15
   </view>
26
   <block wx:for="{{[1,2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent">
16
   <block wx:for="{{[1,2,3]}}" wx:key="indexParent" wx:for-index="indexParent" wx:for-item="itemParent">
27
     <view class="lineWidthAll FlexRow" wx:if="{{indexParent>0}}">
17
     <view class="lineWidthAll FlexRow" wx:if="{{indexParent>0}}">
28
-      <view class="lineWidth640"></view>
18
+      <view class="lineWidth750"></view>
29
     </view>
19
     </view>
30
     <view class="panelItem FlexRow" bindtap='gotoAddItem' data-fieldid="{{itemParent}}">
20
     <view class="panelItem FlexRow" bindtap='gotoAddItem' data-fieldid="{{itemParent}}">
31
       <view class="panelItem11 FlexColumn">
21
       <view class="panelItem11 FlexColumn">
@@ -37,6 +27,8 @@
37
           <block wx:if="{{itemParent==2}}">答案</block>
27
           <block wx:if="{{itemParent==2}}">答案</block>
38
           <block wx:if="{{itemParent==3}}">其它</block>
28
           <block wx:if="{{itemParent==3}}">其它</block>
39
         </text>
29
         </text>
30
+
31
+
40
         <block wx:for="{{Field[itemParent]}}" wx:key="index">
32
         <block wx:for="{{Field[itemParent]}}" wx:key="index">
41
 
33
 
42
           <text class="textNormal" wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
34
           <text class="textNormal" wx:if="{{item.Type=='normal'}}">{{item.Content}}</text>
@@ -56,14 +48,31 @@
56
         <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image' && item.Url}}" src='{{item.Url}}' binderror="onBindError" />
48
         <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image' && item.Url}}" src='{{item.Url}}' binderror="onBindError" />
57
 
49
 
58
         <text class="textReturn" wx:if="{{item.Type=='return'}}"></text>
50
         <text class="textReturn" wx:if="{{item.Type=='return'}}"></text>
51
+
52
+
59
   </block>
53
   </block>
60
   </view>
54
   </view>
61
   </view>
55
   </view>
62
-
56
+  <block wx:if="{{Tags && Tags.length>0 && indexParent==0}}">
57
+    <view class="panelTag FlexColumn">
58
+      <view class="panelTag1">自动记号</view>
59
+      <block wx:for="{{Tags}}" wx:key="indexTag" wx:for-index="indexTag">
60
+        <view class="lineWidthAll FlexRow" wx:if="{{indexTag>0}}">
61
+          <view class="lineWidth640"></view>
62
+        </view>
63
+        <view class="panelTag2 FlexRow">
64
+          <view class="tag1">{{item}}</view>
65
+          <view class="tag2 FlexRow" bindtap='deleteItem' data-id="{{indexTag}}">
66
+            <image src='../images/universalpic_del_gray_14x14.png' class="universalpic_del_gray_14x14" />
67
+          </view>
68
+        </view>
69
+      </block>
70
+    </view>
71
+  </block>
63
   </block>
72
   </block>
64
   <view class='lineFooter'></view>
73
   <view class='lineFooter'></view>
65
 
74
 
66
-  <!-- <view class="panelItem3Remark" wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">指定该题卡必定出现在今天任务中,可能增加额外的任务量</view> -->
75
+  <!-- <view class="panelTimePlanRemark" wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">指定该题卡必定出现在今天任务中,可能增加额外的任务量</view> -->
67
   <view style='height:300rpx;'></view>
76
   <view style='height:300rpx;'></view>
68
 
77
 
69
   <view class='panelSave FlexRow'>
78
   <view class='panelSave FlexRow'>

+ 48 - 20
pages/main/add.wxss

@@ -5,18 +5,29 @@
5
   background-color: #F0F0F0;
5
   background-color: #F0F0F0;
6
 }
6
 }
7
 
7
 
8
-.panelTag{
8
+.panelTimePlan {
9
+  min-height: 120rpx;
9
   width: 100%;
10
   width: 100%;
10
   justify-content: space-between;
11
   justify-content: space-between;
11
   font-size: 28rpx;
12
   font-size: 28rpx;
12
-  min-height: 120rpx;
13
   background-color: #fff;
13
   background-color: #fff;
14
 }
14
 }
15
 
15
 
16
-.panelTag .tag{
17
-  font-size: 28rpx;
16
+
17
+.panelTimePlan .panelTimePlan2 {
18
+  margin-left: 30rpx;
19
+}
20
+
21
+.panelTimePlan .panelTimePlan1{
18
   color:#787878;
22
   color:#787878;
19
-  margin-left: 20rpx;
23
+  font-weight: 500;
24
+}
25
+
26
+.panelTimePlanRemark{
27
+  font-size:24rpx;
28
+  margin-top:30rpx;
29
+  color:#787878;
30
+  font-weight: 400;
20
 }
31
 }
21
 
32
 
22
 .panelTitle {
33
 .panelTitle {
@@ -86,7 +97,6 @@
86
 }
97
 }
87
 
98
 
88
 .panelItem .panelItem21 {
99
 .panelItem .panelItem21 {
89
-  margin-right: 30rpx;
90
   font-weight: 400;
100
   font-weight: 400;
91
   flex-wrap: wrap;
101
   flex-wrap: wrap;
92
   align-items: flex-start;
102
   align-items: flex-start;
@@ -132,32 +142,50 @@
132
   height:30rpx;
142
   height:30rpx;
133
 }
143
 }
134
 
144
 
135
-.panelItem3 {
136
-  min-height: 100rpx;
145
+
146
+.panelTag{
137
   width: 100%;
147
   width: 100%;
138
-  justify-content: space-between;
139
-  font-size: 28rpx;
148
+  font-size: 24rpx;
140
   background-color: #fff;
149
   background-color: #fff;
150
+  margin: 10rpx 0;
151
+  align-items: flex-end;
141
 }
152
 }
142
 
153
 
143
-.panelItem3 .panelItem32 {
144
-  margin-left: 30rpx;
154
+.panelTag .panelTag1{
155
+  width:640rpx;
156
+  font-size: 28rpx;
157
+  color:#1e1e1e;
158
+  text-align: left;
159
+  height:80rpx;
160
+  line-height: 100rpx;
161
+}
162
+.panelTag .panelTag2{
163
+  width:640rpx;
164
+  font-size: 28rpx;
165
+  color:#1e1e1e;
166
+  text-align: left;
167
+  line-height: 94rpx;
168
+  height:94rpx;
169
+  justify-content: space-between;
145
 }
170
 }
146
 
171
 
147
-.panelItem3 .panelItem31{
172
+.panelTag .tag1{
173
+  font-size: 24rpx;
148
   color:#787878;
174
   color:#787878;
149
 }
175
 }
150
-.panelItem3 .panelItem311{
151
-  color:#0071ef;
176
+
177
+.panelTag .tag2{
178
+  width:96rpx;
179
+  height:100rpx;
152
 }
180
 }
153
 
181
 
154
-.panelItem3Remark{
155
-  font-size:24rpx;
156
-  margin-top:30rpx;
157
-  color:#787878;
158
-  font-weight: 400;
182
+.universalpic_del_gray_14x14{
183
+  width:14rpx;
184
+  height:14rpx;
159
 }
185
 }
160
 
186
 
187
+
188
+
161
 .panelSave {
189
 .panelSave {
162
   width: 100%;
190
   width: 100%;
163
   background-color: #fff;
191
   background-color: #fff;

+ 0 - 3
pages/main/detail.wxml

@@ -56,9 +56,6 @@
56
         </view>
56
         </view>
57
 
57
 
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>
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>
59
-
60
-        <!-- <image class="imageBishun" wx:if="{{item.Type=='image'  && !item.Url}}" src='{{item.Content}}' catchtap='showImage' data-name="{{item.Content}}" /> -->
61
-
62
         <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" />
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" />
63
       
60
       
64
   </block>
61
   </block>

+ 6 - 1
pages/main/preview.js

@@ -28,7 +28,12 @@ Page({
28
 
28
 
29
     if (options.type == "share") {
29
     if (options.type == "share") {
30
       wx.setNavigationBarTitle({
30
       wx.setNavigationBarTitle({
31
-        title: "查看共享"
31
+        title: "来自分享"
32
+      });
33
+    }
34
+    else if (options.type == "show") {
35
+      wx.setNavigationBarTitle({
36
+        title: "查看题卡"
32
       });
37
       });
33
     }
38
     }
34
   },
39
   },

+ 5 - 6
pages/main/preview.wxml

@@ -62,8 +62,6 @@
62
 
62
 
63
       <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
63
       <text class="textPinyin" wx:if="{{item.Type=='sound'}}" catchtap="playSound" data-content="{{item.Content}}" data-soundmark="{{item.SoundMark}}" data-fieldid="{{itemParent}}">{{item.Content}}</text>
64
 
64
 
65
-      <!-- <image class="imageBishun" wx:if="{{item.Type=='image' && !item.Url}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" />
66
-         -->
67
       <image class="imageFree" mode="widthFix" wx:if="{{item.Type=='image'}}" src='{{item.Content}}' bindtap='showImage' data-name="{{item.Content}}" data-serverurl="{{item.ContentServer}}" binderror="onBindError" />
65
       <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
 
66
 
69
       </block>
67
       </block>
@@ -74,9 +72,10 @@
74
 
72
 
75
   <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
73
   <view class='panelSave' bindtap="close" wx:if="{{ShowType=='preview'}}">关闭</view>
76
 
74
 
77
-  <view class='panelSave FlexRow' wx:if="{{ShowType=='share'}}">
78
-    <view class='btn3' bindtap="returnDefault">首页</view>
79
-    <view class='btn31 btn3' bindtap="copyCard" wx:if="{{!IsExistCard}}">另存为我的题卡</view>
75
+  <view class='panelSaveShare panelSave FlexRow' wx:if="{{ShowType=='share'}}">
76
+    <view class='text5 text3' bindtap="returnDefault">首页</view>
77
+    <view class='btn3' bindtap="copyCard">另存为我的题卡</view>
78
+    <view class='text5'></view>
80
   </view>
79
   </view>
81
 
80
 
82
   <view class='panelSave FlexRow' wx:if="{{ShowType=='show'}}">
81
   <view class='panelSave FlexRow' wx:if="{{ShowType=='show'}}">
@@ -85,7 +84,7 @@
85
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_prev_black_30x30.png' />
84
       <image class="universalpic_prev_black_30x30" src='../images/universalpic_prev_black_30x30.png' />
86
     </view>
85
     </view>
87
     <view class='btn2 FlexRow'>
86
     <view class='btn2 FlexRow'>
88
-      <button class="btn21" open-type='share'>享给大家</button>
87
+      <button class="btn21" open-type='share'>享给大家</button>
89
     </view>
88
     </view>
90
     <view class='btn2 FlexRow' bindtap="onMore">
89
     <view class='btn2 FlexRow' bindtap="onMore">
91
       <image class="universalpic_more_40x10" src='../images/universalpic_more_40x10.png' />
90
       <image class="universalpic_more_40x10" src='../images/universalpic_more_40x10.png' />

+ 9 - 5
pages/main/preview.wxss

@@ -39,7 +39,7 @@
39
 }
39
 }
40
 
40
 
41
 .text3 {
41
 .text3 {
42
-  color: #0071ef;
42
+  color: #787878;
43
   width: 132rpx;
43
   width: 132rpx;
44
   line-height: 80rpx;
44
   line-height: 80rpx;
45
   text-align: center;
45
   text-align: center;
@@ -238,18 +238,22 @@
238
   height: 26rpx;
238
   height: 26rpx;
239
 }
239
 }
240
 
240
 
241
+.panelSaveShare{
242
+  justify-content: space-between;
243
+}
241
 
244
 
242
 .btn3 {
245
 .btn3 {
243
   width: 375rpx;
246
   width: 375rpx;
244
   line-height: 120rpx;
247
   line-height: 120rpx;
248
+  height:120rpx;
245
   background-color: #fff;
249
   background-color: #fff;
246
   text-align: center;
250
   text-align: center;
247
-  color:#1e1e1e;
248
-}
249
-
250
-.btn31 {
251
   color: #0071ef;
251
   color: #0071ef;
252
 }
252
 }
253
+.text5{
254
+  width:108rpx;
255
+  margin: 0 20rpx;
256
+}
253
 
257
 
254
 .universalpic_more_40x10 {
258
 .universalpic_more_40x10 {
255
   width: 40rpx;
259
   width: 40rpx;

+ 4 - 4
pages/main/searchWeb1.wxml

@@ -55,7 +55,7 @@
55
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
55
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
56
         <view class="lineWidth720"></view>
56
         <view class="lineWidth720"></view>
57
       </view>
57
       </view>
58
-      <view class="panelItemSearch FlexColumn" bindtap='onSearchHistory' data-index="{{index}}"  data-type="null">
58
+      <view class="panelItemSearch FlexColumn" bindtap='onSearchHistory' data-index="{{index}}" data-type="null">
59
         <view class="panelItemSearch1 FlexRow">
59
         <view class="panelItemSearch1 FlexRow">
60
           <view class="panelItemSearch11">
60
           <view class="panelItemSearch11">
61
             {{item.Key}}
61
             {{item.Key}}
@@ -85,7 +85,7 @@
85
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
85
       <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
86
         <view class="lineWidth720"></view>
86
         <view class="lineWidth720"></view>
87
       </view>
87
       </view>
88
-      <view class="panelItemSearch FlexColumn" bindtap='onSearchHistory' data-index="{{index}}"  data-type="many">
88
+      <view class="panelItemSearch FlexColumn" bindtap='onSearchHistory' data-index="{{index}}" data-type="many">
89
         <view class="panelItemSearch1 FlexRow">
89
         <view class="panelItemSearch1 FlexRow">
90
           <view class="panelItemSearch11">
90
           <view class="panelItemSearch11">
91
             {{item.Key}}
91
             {{item.Key}}
@@ -100,7 +100,7 @@
100
         <view class="panelItemSearch2 FlexRow" wx:if="{{item.Type=='shici'}}">
100
         <view class="panelItemSearch2 FlexRow" wx:if="{{item.Type=='shici'}}">
101
           {{item.Author}} {{item.Dynasty}}
101
           {{item.Author}} {{item.Dynasty}}
102
         </view>
102
         </view>
103
-        <view class="panelItemSearch3 FlexRow" wx:if="{{item.Type=='shici'}}">
103
+        <view class="panelItemSearch3 FlexRow" wx:if="{{item.Type=='shici' || item.Type=='zici'}}">
104
           {{item.Content}}
104
           {{item.Content}}
105
         </view>
105
         </view>
106
       </view>
106
       </view>
@@ -108,5 +108,5 @@
108
     <view class='lineFooter'></view>
108
     <view class='lineFooter'></view>
109
   </block>
109
   </block>
110
 
110
 
111
-
111
+  <view style='height:100rpx;'></view>
112
 </view>
112
 </view>