chengjie 6 年之前
父节点
当前提交
59bf8c6334
共有 13 个文件被更改,包括 452 次插入197 次删除
  1. 3 1
      app.json
  2. 0 104
      pages/index/test.js
  3. 0 19
      pages/index/test.wxml
  4. 0 65
      pages/index/test.wxss
  5. 97 0
      pages/test/index.js
  6. 3 0
      pages/test/index.json
  7. 21 0
      pages/test/index.wxml
  8. 61 0
      pages/test/index.wxss
  9. 30 0
      pages/test/item.js
  10. 0 0
      pages/test/item.json
  11. 6 0
      pages/test/item.wxml
  12. 230 0
      pages/test/item.wxss
  13. 1 8
      project.config.json

+ 3 - 1
app.json

@@ -1,10 +1,12 @@
1 1
 {
2 2
   "pages": [
3 3
     "pages/index/index",
4
-    "pages/index/test",
5 4
     "pages/index/accredit",
6 5
     "pages/index/openSetting",
7 6
 
7
+    "pages/test/index",
8
+    "pages/test/item",
9
+
8 10
     "pages/main/default",
9 11
     "pages/main/cardInfo",
10 12
     "pages/main/preview",

+ 0 - 104
pages/index/test.js

@@ -1,104 +0,0 @@
1
-Page({
2
-  data:{
3
-    optionList:[
4
-      {
5
-        name: "标题1",
6
-        subname: "副标题1"
7
-      }, {
8
-        name: "标题2",
9
-        subname: "副标题2"
10
-      }, {
11
-        name: "标题3",
12
-        subname: "副标题3"
13
-      }, {
14
-        name: "标题4",
15
-        subname: "副标题4"
16
-      },
17
-    ],
18
-    kelong: {
19
-      top: 0,
20
-      xt: '',
21
-      name: '',
22
-      subname: ''
23
-    },
24
-    replace: {
25
-      xt: '',
26
-      name: '',
27
-      subname: ''
28
-    },
29
-  },
30
-  dragStart: function (e) {
31
-    var that = this
32
-    var kelong = that.data.kelong
33
-    var i = e.currentTarget.dataset.index
34
-    kelong.name = this.data.optionList[i].name
35
-    kelong.subname = this.data.optionList[i].subname
36
-
37
-    var query = wx.createSelectorQuery();
38
-    //选择id
39
-    query.select('.listbox').boundingClientRect(function (rect) {
40
-      // console.log(rect.top)
41
-      kelong.top = e.changedTouches[0].clientY - rect.top - 30
42
-      that.setData({
43
-        kelong: kelong,
44
-        showkelong: true
45
-      })
46
-    }).exec();
47
-  },
48
-  dragMove: function (e) {
49
-    var that = this
50
-    var i = e.currentTarget.dataset.index
51
-    var query = wx.createSelectorQuery();
52
-    var kelong = that.data.kelong
53
-    var listnum = that.data.optionList.length
54
-    var optionList = that.data.optionList
55
-    query.select('.listbox').boundingClientRect(function (rect) {
56
-      kelong.top = e.changedTouches[0].clientY - rect.top - 30
57
-      if (kelong.top < -60) {
58
-        kelong.top = -60
59
-      } else if (kelong.top > rect.height) {
60
-        kelong.top = rect.height - 60
61
-      }
62
-      that.setData({
63
-        kelong: kelong,
64
-      })
65
-
66
-      console.log(kelong.top);
67
-    }).exec();
68
-
69
-    
70
-  },
71
-  dragEnd: function (e) {
72
-    var that = this
73
-    var i = e.currentTarget.dataset.index
74
-    var query = wx.createSelectorQuery();
75
-    var kelong = that.data.kelong
76
-    var listnum = that.data.optionList.length
77
-    var optionList = that.data.optionList
78
-    query.select('.listbox').boundingClientRect(function (rect) {
79
-      kelong.top = e.changedTouches[0].clientY - rect.top - 30
80
-      if (kelong.top < -20) {
81
-        wx.showModal({
82
-          title: '删除提示',
83
-          content: '确定要删除此条记录?',
84
-          confirmColor: '#e4463b'
85
-        })
86
-      }
87
-      var target = parseInt(kelong.top / 60)
88
-      var replace = that.data.replace
89
-      if (target >= 0) {
90
-        replace.xt = optionList[target].xt
91
-        replace.name = optionList[target].name
92
-        replace.subname = optionList[target].subname
93
-        optionList[target].name = optionList[i].name
94
-        optionList[target].subname = optionList[i].subname
95
-        optionList[i].name = replace.name
96
-        optionList[i].subname = replace.subname
97
-      }
98
-      that.setData({
99
-        optionList: optionList,
100
-        showkelong: false
101
-      })
102
-    }).exec();
103
-  },
104
-})

+ 0 - 19
pages/index/test.wxml

@@ -1,19 +0,0 @@
1
-<view class='listbox'>
2
-    <view class='kelong list' hidden='{{!showkelong}}' style='top:{{kelong.top}}px'>
3
-      <view class='index'>?</view>
4
-      <view class='info'>
5
-        <view class="name">{{kelong.name}}</view>
6
-        <view class='sub-name'>{{kelong.subname}}</view>
7
-      </view>
8
-      <view class='moreiconpl'>三</view>
9
-    </view>
10
-
11
-    <view class='list FlexRow' wx:for="{{optionList}}" wx:key="">
12
-      <view class='index'>{{index+1}}</view>
13
-      <view class='info'>
14
-        <view class="name">{{item.name}}</view>
15
-        <view class='sub-name'>{{item.subname}}</view>
16
-      </view>
17
-      <view class='moreiconpl' data-index='{{index}}' catchtouchstart='dragStart' catchtouchmove='dragMove' catchtouchend='dragEnd'>三</view>
18
-    </view>
19
-  </view>

+ 0 - 65
pages/index/test.wxss

@@ -1,65 +0,0 @@
1
-.map-list .list {
2
-  position: relative;
3
-  height: 120rpx;
4
-  width: 100%;
5
-  justify-content: space-between;
6
-}
7
-
8
-.map-list .kelong {
9
-  position: absolute;
10
-}
11
-
12
-.map-list .list::after {
13
-  content: '';
14
-  width: 660rpx;
15
-  height: 2rpx;
16
-  background-color: #eee;
17
-  position: absolute;
18
-  right: 0;
19
-  bottom: 0;
20
-}
21
-
22
-.map-list .list .xt {
23
-  display: block;
24
-  width: 95rpx;
25
-  height: 77rpx;
26
-  position: absolute;
27
-  left: 93rpx;
28
-  top: 20rpx;
29
-}
30
-
31
-.map-list .list .more {
32
-  display: block;
33
-  width: 48rpx;
34
-  height: 38rpx;
35
-  position: absolute;
36
-  right: 30rpx;
37
-  top: 40rpx;
38
-}
39
-
40
-.map-list .list .info {
41
-  display: block;
42
-  width: 380rpx;
43
-  height: 80rpx;
44
-  position: absolute;
45
-  left: 220rpx;
46
-  top: 20rpx;
47
-  font-size: 30rpx;
48
-}
49
-
50
-.map-list .list .info .sub-name {
51
-  font-size: 28rpx;
52
-  white-space: nowrap;
53
-  overflow: hidden;
54
-  text-overflow: ellipsis;
55
-  color: #646567;
56
-}
57
-
58
-.map-list .list .index {
59
-  color: #e4463b;
60
-  font-size: 32rpx;
61
-  font-weight: bold;
62
-  position: absolute;
63
-  left: 35rpx;
64
-  top: 40rpx;
65
-}

+ 97 - 0
pages/test/index.js

@@ -0,0 +1,97 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    MainList: [
9
+      {
10
+        Category: "数学",
11
+        List: [
12
+          {
13
+            ID: 1,
14
+            Name: "20以内加减法",
15
+          }, {
16
+            ID: 2,
17
+            Name: "乘法口诀",
18
+          },
19
+        ]
20
+      },
21
+      {
22
+        Category: "识字",
23
+        List: [
24
+          {
25
+            ID: 1,
26
+            Name: "一年级上学期",
27
+          }, {
28
+            ID: 2,
29
+            Name: "一年级下学期",
30
+          }, {
31
+            ID: 3,
32
+            Name: "二年级上学期",
33
+          }, {
34
+            ID: 4,
35
+            Name: "二年级下学期",
36
+          }, {
37
+            ID: 5,
38
+            Name: "三年级上学期",
39
+          }, {
40
+            ID: 6,
41
+            Name: "三年级下学期",
42
+          },
43
+        ]
44
+      }, {
45
+        Category: "写字",
46
+        List: [
47
+          {
48
+            ID: 1,
49
+            Name: "一年级上学期",
50
+          }, {
51
+            ID: 2,
52
+            Name: "一年级下学期",
53
+          }, {
54
+            ID: 3,
55
+            Name: "二年级上学期",
56
+          }, {
57
+            ID: 4,
58
+            Name: "二年级下学期",
59
+          }, {
60
+            ID: 5,
61
+            Name: "三年级上学期",
62
+          }, {
63
+            ID: 6,
64
+            Name: "三年级下学期",
65
+          },
66
+        ]
67
+      }, {
68
+        Category: "英语",
69
+        List: [
70
+          {
71
+            ID: 1,
72
+            Name: "动物",
73
+          }, {
74
+            ID: 1,
75
+            Name: "食物",
76
+          }, {
77
+            ID: 1,
78
+            Name: "人体",
79
+          },
80
+        ]
81
+      },
82
+    ]
83
+  },
84
+  onLoad: function (options) {
85
+    var that = this;
86
+    that.setData({
87
+      Containnerheight: main.getWindowHeight(),
88
+    });
89
+  },
90
+  onShareAppMessage: function () {
91
+    return {
92
+      title: app.globalData.ShareTitle,
93
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
94
+      imageUrl: app.globalData.ShareImage,
95
+    }
96
+  },
97
+})

+ 3 - 0
pages/test/index.json

@@ -0,0 +1,3 @@
1
+{
2
+  "navigationBarTitleText": "测一测"
3
+}

+ 21 - 0
pages/test/index.wxml

@@ -0,0 +1,21 @@
1
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
+  <block wx:for="{{MainList}}" wx:key="index">
3
+    <view class="panelTitle FlexRow">
4
+      <view class="panelTitle1">{{item.Category}}</view>
5
+      <view class="panelTitle2"></view>
6
+    </view>
7
+    <block wx:for="{{item.List}}" wx:key="indexChild" wx:for-item="itemChild">
8
+      <view class="lineWidthAll FlexRow" wx:if="{{index>0}}">
9
+        <view class="lineWidth720"></view>
10
+      </view>
11
+      <view class="panelItem FlexRow" bindtap='goto' data-url="./item?id=">
12
+        <view class="panelItem1">{{itemChild.Name}}</view>
13
+        <view class="panelItem2 FlexRow">
14
+          <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
15
+        </view>
16
+      </view>
17
+    </block>
18
+    <view class='lineFooter'></view>
19
+  </block>
20
+  <view style='width:100%;height:100rpx;'></view>
21
+</view>

+ 61 - 0
pages/test/index.wxss

@@ -0,0 +1,61 @@
1
+.panelTitle{
2
+  width:100%;
3
+  margin-top: 50rpx;
4
+  justify-content: space-between;
5
+}
6
+.panelTitle .panelTitle1{
7
+  font-size:32rpx;
8
+  margin-left: 30rpx;
9
+  margin-bottom: 30rpx;
10
+}
11
+.panelTitle .panelTitle2{
12
+  font-size:28rpx;
13
+  margin-right: 30rpx;
14
+  background-color: #1e1e1e;
15
+  color:#fff;
16
+  border-radius: 22rpx;
17
+  text-align: center;
18
+  padding: 0 20rpx;
19
+  margin-bottom: 32rpx;
20
+}
21
+
22
+.panelItem{
23
+  width:100%;
24
+  justify-content: space-between;
25
+  font-size:28rpx;
26
+  height:100rpx;
27
+  background-color: #fff;
28
+}
29
+.panelItem0{
30
+  height:133rpx;
31
+}
32
+.panelItem00{
33
+  margin-top: 50rpx;
34
+  line-height: 100rpx;
35
+  font-size:28rpx;
36
+  font-weight: 400;
37
+  justify-content: center;
38
+}
39
+
40
+.panelItem .panelItem1{
41
+  margin-left: 30rpx;
42
+  font-weight: 400;
43
+}
44
+.panelItem .panelItem2{
45
+  margin-right: 30rpx;
46
+  color:#787878;
47
+  font-weight: 400;
48
+}
49
+
50
+.Arrow{
51
+  width:16rpx;
52
+  height:26rpx;
53
+  margin-left: 30rpx;
54
+}
55
+
56
+
57
+.text1{
58
+  font-size:24rpx;
59
+  text-align: center;
60
+  color:#787878;
61
+}

+ 30 - 0
pages/test/item.js

@@ -0,0 +1,30 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+  },
9
+  onLoad: function (options) {
10
+    var that = this;
11
+    that.setData({
12
+      Containnerheight: main.getWindowHeight(),
13
+      Color: {
14
+        ID: 0,
15
+        Name: "黑白",
16
+        BackColor: "#fff",
17
+        BackColor2: "#eee",
18
+        LineColor: "#eee",
19
+        FieldColor: "#ddd",
20
+      },
21
+    });
22
+  },
23
+  onShareAppMessage: function () {
24
+    return {
25
+      title: app.globalData.ShareTitle,
26
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
27
+      imageUrl: app.globalData.ShareImage,
28
+    }
29
+  },
30
+})

pages/index/test.json → pages/test/item.json


+ 6 - 0
pages/test/item.wxml

@@ -0,0 +1,6 @@
1
+<import src="../template/cardShow.wxml" />
2
+<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
3
+  <template is="CardShow" data="{{Color:Color,Field:Field,Tags:Tags,IsShowAnswer:IsShowAnswer,TagWidth:TagWidth,FontSize:FontSize,LimitTimeStr:LimitTimeStr,ShowType:ShowType}}" />
4
+  
5
+  <view style='width:100%;height:100rpx;'></view>
6
+</view>

+ 230 - 0
pages/test/item.wxss

@@ -0,0 +1,230 @@
1
+
2
+/* 段落显示************************ */
3
+
4
+.editFieldNull{
5
+  height:50rpx;
6
+}
7
+.editFieldNull1{
8
+  height:40rpx;
9
+}
10
+.editFieldNull2{
11
+  height:60rpx;
12
+}
13
+.editFieldNull3{
14
+  height:30rpx;
15
+}
16
+
17
+.panelItem {
18
+  width: 650rpx;
19
+  font-weight: 400;
20
+  flex-wrap: wrap;
21
+  justify-content: flex-start;
22
+  z-index: 5; 
23
+  position: relative;
24
+}
25
+
26
+.panelField1 {
27
+  width: 100%;
28
+  justify-content: flex-start;
29
+  z-index: 5; 
30
+  position: relative;
31
+}
32
+
33
+.panelField11 {
34
+  font-size: 48rpx;
35
+  justify-content: flex-start;
36
+  color: #fff;
37
+}
38
+
39
+.panelTag {
40
+  width: 100%;
41
+  min-height: 95rpx;
42
+  align-items: flex-start;
43
+  justify-content: flex-start;
44
+  margin-top: 60rpx;
45
+  z-index: 5;
46
+}
47
+
48
+.panelTag .panelTagLine {
49
+  margin: 0 0 0 50rpx;
50
+  max-width: 650rpx;
51
+  height: 10rpx;
52
+}
53
+
54
+.panelTag .panelTag1 {
55
+  margin: 0 0 0 50rpx;
56
+  width: 650rpx;
57
+  flex-wrap: wrap;
58
+  align-items: flex-start;
59
+  justify-content: flex-start;
60
+}
61
+
62
+.panelTag .tag {
63
+  font-size: 46rpx;
64
+  margin: 0 30rpx 20rpx 0;
65
+  font-weight: 400;
66
+  color: #F1AB1E;
67
+}
68
+
69
+.right2 {
70
+  position: absolute;
71
+  top: 0;
72
+  right: 0;
73
+  width: 134rpx;
74
+  height: 150rpx;
75
+  align-items: flex-start;
76
+}
77
+
78
+.universalpic_show_white_30x30 {
79
+  width: 36rpx;
80
+  height: 36rpx;
81
+  margin: 68rpx 50rpx 0 50rpx;
82
+}
83
+
84
+.universalpic_hide_white_34x34 {
85
+  width: 36rpx;
86
+  height: 20rpx;
87
+  margin: 68rpx 50rpx 0 50rpx;
88
+}
89
+
90
+.panelField20 {
91
+  width: 100%;
92
+  justify-content: flex-start;
93
+  z-index: 5; 
94
+  position: relative;
95
+}
96
+
97
+.panelField2 {
98
+  width: 710rpx;
99
+  margin-bottom: 20rpx;
100
+  border-radius: 20rpx;
101
+}
102
+
103
+.panelField21 {
104
+  width: 650rpx;
105
+  font-size: 36rpx;
106
+  margin: 40rpx;
107
+  line-height: 66rpx;
108
+}
109
+
110
+.panelItem .panelSound {
111
+  width: 40rpx;
112
+  height: 40rpx;
113
+  margin: 0 10rpx 0 0;
114
+  background-color: #fff;
115
+  border-radius: 50%;
116
+}
117
+
118
+.panelItem .panelSoundHover {
119
+  background-color: #d2d2d2;
120
+}
121
+.panelItem .panelSoundHover1 {
122
+  color: #d2d2d2;
123
+}
124
+
125
+.panelItem .universalpic_starting_tc01_26x26{
126
+  width: 26rpx;
127
+  height: 26rpx;
128
+  margin: 10rpx 20rpx 10rpx 0;
129
+}
130
+
131
+.panelItem .universalpic_read_mark_black_20x20 {
132
+  width: 21rpx;
133
+  height: 20rpx;
134
+}
135
+
136
+.panelItem .panelRecorder {
137
+  width:100%;
138
+  justify-content: flex-start;
139
+}
140
+.panelItem .panelRecorder0 {
141
+  width: 168rpx;
142
+  height: 70rpx;
143
+  background-color: #fff;
144
+  border-radius: 10rpx;
145
+}
146
+
147
+.panelItem .universalpic_voicerecorder_transmit_black_44x34{
148
+  width: 44rpx;
149
+  height: 34rpx;
150
+}
151
+
152
+.panelItem .textProblem{
153
+  padding: 3rpx 20rpx;
154
+  background-color: #F1AB1E;
155
+  border-radius: 22rpx;
156
+  text-align: center;
157
+  font-size:28rpx;
158
+  line-height: 45rpx;
159
+  font-weight: 500;
160
+  color:#1e1e1e;
161
+  margin: 0 0 10rpx 0;
162
+}
163
+
164
+.panelItem .textDot{
165
+  color: #F1AB1E;
166
+  font-size:36rpx;
167
+  margin-right: 20rpx;
168
+}
169
+
170
+.panelItem .textLine {
171
+  text-decoration: underline;
172
+}
173
+
174
+
175
+.panelItem .textHighlighter {
176
+  color:#1E1E1E;
177
+}
178
+
179
+.panelItem .textNormal {
180
+  min-height: 50rpx;
181
+}
182
+
183
+.panelItem .textNormal2 {
184
+  font-size: 36rpx;
185
+}
186
+
187
+.panelItem .textPinyin {
188
+  text-decoration: underline;
189
+  margin-right: 10rpx;
190
+}
191
+
192
+
193
+.panelItem .imageContainer {
194
+  width: 650rpx;
195
+  margin: 6rpx 0;
196
+  border-radius: 20rpx;
197
+  background-color: rgba(0,0,0,0.1);
198
+}
199
+
200
+.panelItem .imageFree {
201
+  width: 650rpx;
202
+  border-radius: 6rpx;
203
+}
204
+
205
+
206
+.panelItem .imageContainer2 {
207
+  width: 650rpx;
208
+  border-radius: 10rpx;
209
+  background-color: rgba(0,0,0,0.1);
210
+}
211
+.panelItem .imageFree2 {
212
+  width: 650rpx;
213
+  border-radius: 10rpx;
214
+}
215
+
216
+.panelItem .textBr {
217
+  width: 100%;
218
+  height: 24rpx;
219
+}
220
+
221
+.panelItem .textReturn {
222
+  width: 100%;
223
+}
224
+
225
+.panelItem .textReturn2 {
226
+  width: 100%;
227
+  height: 30rpx;
228
+}
229
+
230
+/* ******************************** */

+ 1 - 8
project.config.json

@@ -49,7 +49,7 @@
49 49
 			"list": []
50 50
 		},
51 51
 		"miniprogram": {
52
-			"current": 9,
52
+			"current": -1,
53 53
 			"list": [
54 54
 				{
55 55
 					"id": 0,
@@ -107,13 +107,6 @@
107 107
 					"query": "",
108 108
 					"scene": null
109 109
 				},
110
-				{
111
-					"id": -1,
112
-					"name": "pages/index/test",
113
-					"pathName": "pages/index/test",
114
-					"query": "",
115
-					"scene": null
116
-				},
117 110
 				{
118 111
 					"id": 9,
119 112
 					"name": "pages/index/index",