Yansen 1 year ago
parent
commit
2191a47bbe

+ 1
- 0
package.json View File

@@ -47,6 +47,7 @@
47 47
   },
48 48
   "devDependencies": {
49 49
     "@babel/core": "^7.8.0",
50
+    "@tarojs/cli": "3.3.15",
50 51
     "@tarojs/mini-runner": "3.3.15",
51 52
     "@tarojs/webpack-runner": "3.3.15",
52 53
     "@types/react": "^17.0.2",

+ 3
- 0
src/app.config.js View File

@@ -8,6 +8,9 @@ export default {
8 8
     navigationBarTitleText: 'WeChat',
9 9
     navigationBarTextStyle: 'black'
10 10
   },
11
+  useExtendedLib: {
12
+    weui: true,
13
+  },
11 14
   permission: {
12 15
     'scope.userLocation': {
13 16
       desc: '您的位置信息将方便您更好的小程序体验'

BIN
src/assets/user/helpcenter.png View File


BIN
src/assets/user/upgrade.png View File


BIN
src/assets/user/workinshifts.png View File


+ 341
- 0
src/pages/CitySelect/cityList.js View File

@@ -0,0 +1,341 @@
1
+
2
+export const cityList = [
3
+  '阿坝藏族羌族自治州',
4
+  '阿克苏地区',
5
+  '阿勒泰地区',
6
+  '阿拉善盟',
7
+  '安康市',
8
+  '安庆市',
9
+  '鞍山市',
10
+  '安顺市',
11
+  '安阳市',
12
+  '白城市',
13
+  '百色市',
14
+  '白山市',
15
+  '白银市',
16
+  '保定市',
17
+  '宝鸡市',
18
+  '保山市',
19
+  '包头市',
20
+  '巴彦淖尔市',
21
+  '巴音郭楞蒙古自治州',
22
+  '巴中市',
23
+  '北海市',
24
+  '北京市',
25
+  '蚌埠市',
26
+  '本溪市',
27
+  '毕节市',
28
+  '滨州市',
29
+  '博尔塔拉蒙古自治州',
30
+  '亳州市',
31
+  '沧州市',
32
+  '长春市',
33
+  '常德市',
34
+  '昌吉回族自治州',
35
+  '长沙市',
36
+  '长治市',
37
+  '常州市',
38
+  '朝阳市',
39
+  '潮州市',
40
+  '承德市',
41
+  '成都市',
42
+  '郴州市',
43
+  '赤峰市',
44
+  '池州市',
45
+  '重庆',
46
+  '崇左市',
47
+  '楚雄彝族自治州',
48
+  '滁州市',
49
+  '大理白族自治州',
50
+  '大连市',
51
+  '丹东市',
52
+  '儋州市',
53
+  '大庆市',
54
+  '大同市',
55
+  '大兴安岭地区',
56
+  '达州市',
57
+  '德宏傣族景颇族自治州',
58
+  '迪庆藏族自治州',
59
+  '德阳市',
60
+  '德州市',
61
+  '定西市',
62
+  '东莞市',
63
+  '东营市',
64
+  '恩施土家族苗族自治州',
65
+  '鄂州市',
66
+  '防城港市',
67
+  '佛山市',
68
+  '抚顺市',
69
+  '阜新市',
70
+  '阜阳市',
71
+  '福州市',
72
+  '抚州市',
73
+  '甘南藏族自治州',
74
+  '赣州市',
75
+  '甘孜藏族自治州',
76
+  '果洛藏族自治州',
77
+  '广安市',
78
+  '广元市',
79
+  '广州市',
80
+  '贵港市',
81
+  '桂林市',
82
+  '贵阳市',
83
+  '固原市',
84
+  '海北藏族自治州',
85
+  '海东市',
86
+  '海口市',
87
+  '海南藏族自治州',
88
+  '海西蒙古族藏族自治州',
89
+  '哈密市',
90
+  '邯郸市',
91
+  '杭州市',
92
+  '汉中市',
93
+  '哈尔滨市',
94
+  '鹤壁市',
95
+  '河池市',
96
+  '合肥市',
97
+  '鹤岗市',
98
+  '黑河市',
99
+  '衡水市',
100
+  '衡阳市',
101
+  '河源市',
102
+  '菏泽市',
103
+  '贺州市',
104
+  '兴安盟',
105
+  '呼和浩特市',
106
+  '红河哈尼族彝族自治州',
107
+  '和田地区',
108
+  '淮安市',
109
+  '淮北市',
110
+  '怀化市',
111
+  '淮南市',
112
+  '黄冈市',
113
+  '黄南藏族自治州',
114
+  '黄山市',
115
+  '黄石市',
116
+  '惠州市',
117
+  '葫芦岛市',
118
+  '呼伦贝尔市',
119
+  '湖州市',
120
+  '伊犁哈萨克自治州',
121
+  '吉安市',
122
+  '佳木斯市',
123
+  '江门市',
124
+  '焦作市',
125
+  '嘉兴市',
126
+  '嘉峪关市',
127
+  '揭阳市',
128
+  '吉林市',
129
+  '济南市',
130
+  '金昌市',
131
+  '晋城市',
132
+  '景德镇市',
133
+  '荆门市',
134
+  '荆州市',
135
+  '金华市',
136
+  '济宁市',
137
+  '晋中市',
138
+  '锦州市',
139
+  '九江市',
140
+  '酒泉市',
141
+  '鸡西市',
142
+  '开封市',
143
+  '克拉玛依市',
144
+  '喀什地区',
145
+  '克孜勒苏柯尔克孜自治州',
146
+  '昆明市',
147
+  '来宾市',
148
+  '廊坊市',
149
+  '兰州市',
150
+  '乐山市',
151
+  '拉萨市',
152
+  '凉山彝族自治州',
153
+  '连云港市',
154
+  '聊城市',
155
+  '辽阳市',
156
+  '辽源市',
157
+  '丽江市',
158
+  '临沧市',
159
+  '临汾市',
160
+  '临夏回族自治州',
161
+  '临沂市',
162
+  '林芝市',
163
+  '丽水市',
164
+  '六盘水市',
165
+  '柳州市',
166
+  '陇南市',
167
+  '龙岩市',
168
+  '娄底市',
169
+  '六安市',
170
+  '漯河市',
171
+  '洛阳市',
172
+  '泸州市',
173
+  '吕梁市',
174
+  '马鞍山市',
175
+  '茂名市',
176
+  '眉山市',
177
+  '梅州市',
178
+  '绵阳市',
179
+  '牡丹江市',
180
+  '那曲市',
181
+  '南昌市',
182
+  '南充市',
183
+  '南京市',
184
+  '南宁市',
185
+  '南平市',
186
+  '南通市',
187
+  '南阳市',
188
+  '内江市',
189
+  '阿里地区',
190
+  '宁波市',
191
+  '宁德市',
192
+  '怒江傈僳族自治州',
193
+  '鄂尔多斯市',
194
+  '盘锦市',
195
+  '攀枝花市',
196
+  '平顶山市',
197
+  '平凉市',
198
+  '萍乡市',
199
+  '普洱市',
200
+  '莆田市',
201
+  '濮阳市',
202
+  '昌都市',
203
+  '黔东南苗族侗族自治州',
204
+  '黔南布依族苗族自治州',
205
+  '黔西南布依族苗族自治州',
206
+  '青岛市',
207
+  '庆阳市',
208
+  '清远市',
209
+  '秦皇岛市',
210
+  '钦州市',
211
+  '齐齐哈尔市',
212
+  '七台河市',
213
+  '塔城地区',
214
+  '泉州市',
215
+  '曲靖市',
216
+  '衢州市',
217
+  '日喀则市',
218
+  '日照市',
219
+  '三门峡市',
220
+  '三明市',
221
+  '三沙市',
222
+  '三亚市',
223
+  '上海市',
224
+  '商洛市',
225
+  '商丘市',
226
+  '上饶市',
227
+  '山南市',
228
+  '汕头市',
229
+  '汕尾市',
230
+  '韶关市',
231
+  '绍兴市',
232
+  '邵阳市',
233
+  '沈阳市',
234
+  '深圳市',
235
+  '石家庄市',
236
+  '十堰市',
237
+  '石嘴山市',
238
+  '双鸭山市',
239
+  '朔州市',
240
+  '四平市',
241
+  '松原市',
242
+  '绥化市',
243
+  '遂宁市',
244
+  '随州市',
245
+  '宿迁市',
246
+  '苏州市',
247
+  '宿州市',
248
+  '泰安市',
249
+  '太原市',
250
+  '泰州市',
251
+  '台州市',
252
+  '唐山市',
253
+  '天津市',
254
+  '天水市',
255
+  '铁岭市',
256
+  '铜川市',
257
+  '通化市',
258
+  '通辽市',
259
+  '铜陵市',
260
+  '铜仁市',
261
+  '吐鲁番市',
262
+  '乌兰察布市',
263
+  '乌鲁木齐市',
264
+  '潍坊市',
265
+  '威海市',
266
+  '渭南市',
267
+  '文昌市',
268
+  '文山壮族苗族自治州',
269
+  '温州市',
270
+  '乌海市',
271
+  '武汉市',
272
+  '芜湖市',
273
+  '武威市',
274
+  '无锡市',
275
+  '吴忠市',
276
+  '梧州市',
277
+  '西安市',
278
+  '厦门市',
279
+  '湘潭市',
280
+  '湘西土家族苗族自治州',
281
+  '襄阳市',
282
+  '咸宁市',
283
+  '咸阳市',
284
+  '孝感市',
285
+  '锡林郭勒盟',
286
+  '邢台市',
287
+  '西宁市',
288
+  '新乡市',
289
+  '信阳市',
290
+  '新余市',
291
+  '忻州市',
292
+  '西双版纳傣族自治州',
293
+  '宣城市',
294
+  '许昌市',
295
+  '徐州市',
296
+  '雅安市',
297
+  '延安市',
298
+  '延边朝鲜族自治州',
299
+  '盐城市',
300
+  '阳江市',
301
+  '阳泉市',
302
+  '扬州市',
303
+  '烟台市',
304
+  '宜宾市',
305
+  '宜昌市',
306
+  '伊春市',
307
+  '宜春市',
308
+  '银川市',
309
+  '营口市',
310
+  '鹰潭市',
311
+  '益阳市',
312
+  '永州市',
313
+  '岳阳市',
314
+  '玉林市',
315
+  '榆林市',
316
+  '运城市',
317
+  '云浮市',
318
+  '玉树藏族自治州',
319
+  '玉溪市',
320
+  '枣庄市',
321
+  '张家界市',
322
+  '张家口市',
323
+  '张掖市',
324
+  '漳州市',
325
+  '湛江市',
326
+  '肇庆市',
327
+  '昭通市',
328
+  '郑州市',
329
+  '镇江市',
330
+  '中山市',
331
+  '中卫市',
332
+  '周口市',
333
+  '舟山市',
334
+  '珠海市',
335
+  '驻马店市',
336
+  '株洲市',
337
+  '淄博市',
338
+  '自贡市',
339
+  '资阳市',
340
+  '遵义市',
341
+];

+ 12
- 0
src/pages/CitySelect/index.config.js View File

@@ -0,0 +1,12 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '城市选择',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+    "mp-cells": "weui-miniprogram/cells/cells",
8
+    "mp-cell": "weui-miniprogram/cell/cell"
9
+  }
10
+
11
+
12
+}

+ 33
- 0
src/pages/CitySelect/index.jsx View File

@@ -0,0 +1,33 @@
1
+import React from 'react';
2
+import Taro from '@tarojs/taro';
3
+import { View, ScrollView } from '@tarojs/components';
4
+import withLayout from '@/layouts'
5
+import CustomNav from '@/components/CustomNav'
6
+
7
+import { cityList } from './cityList';
8
+
9
+export default withLayout(function (props) {
10
+
11
+  const onClick = () => {
12
+    Taro.showToast({ title: '该地区服务尚未开通', icon: 'none' });
13
+  }
14
+  
15
+  return (
16
+    <View className='page-index'>
17
+      <View className='index-navbar'>
18
+        <CustomNav title='城市列表' />
19
+      </View>
20
+      <ScrollView scrollY style={{ height: '100%' }}>
21
+        <mp-cells>
22
+          {
23
+            cityList.map(city => (
24
+              <view key={city} onClick={onClick} >
25
+                <mp-cell title={city} />
26
+              </view>
27
+            ))
28
+          }
29
+        </mp-cells>
30
+      </ScrollView>
31
+    </View>
32
+  );
33
+})

+ 9
- 0
src/pages/HelpCenter/index.config.js View File

@@ -0,0 +1,9 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '帮助中心',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+}

+ 20
- 0
src/pages/HelpCenter/index.jsx View File

@@ -0,0 +1,20 @@
1
+import React from 'react';
2
+import Taro from '@tarojs/taro';
3
+import { View } from '@tarojs/components';
4
+import withLayout from '@/layouts'
5
+import CustomNav from '@/components/CustomNav'
6
+import NullCard from "@/components/NullCard";
7
+
8
+export default withLayout(function (props) {
9
+  
10
+  return (
11
+    <View className='page-index'>
12
+      <View className='index-navbar'>
13
+        <CustomNav title='帮助中心' />
14
+      </View>
15
+      <View style={{ padding: '16px' }}>
16
+        <NullCard value='暂无内容' />
17
+      </View>
18
+    </View>
19
+  );
20
+})

+ 9
- 0
src/pages/Upgrade/index.config.js View File

@@ -0,0 +1,9 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '系统更新',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+}

+ 28
- 0
src/pages/Upgrade/index.jsx View File

@@ -0,0 +1,28 @@
1
+import React from 'react';
2
+import Taro from '@tarojs/taro';
3
+import { View } from '@tarojs/components';
4
+import withLayout from '@/layouts'
5
+import CustomNav from '@/components/CustomNav'
6
+import MyButton from "@/components/MyButton"
7
+
8
+export default withLayout(function (props) {
9
+
10
+  const onClick = () => {
11
+    Taro.showLoading({ title: '请稍候...' });
12
+    setTimeout(() => {
13
+      Taro.hideLoading();
14
+      Taro.showToast({ title: '当前已是最新版本', icon: 'none' })
15
+    }, 1500);
16
+  }
17
+  
18
+  return (
19
+    <View className='page-index'>
20
+      <View className='index-navbar'>
21
+        <CustomNav title='系统更新' />
22
+      </View>
23
+      <View style={{ padding: '16px' }}>
24
+        <MyButton onClick={onClick} value='检查更新' />
25
+      </View>
26
+    </View>
27
+  );
28
+})

+ 9
- 0
src/pages/WorkInShifts/index.config.js View File

@@ -0,0 +1,9 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '我的考勤',
4
+  navigationStyle: 'custom',
5
+  disableScroll: true,
6
+  usingComponents: {
7
+  }
8
+
9
+}

+ 23
- 0
src/pages/WorkInShifts/index.jsx View File

@@ -0,0 +1,23 @@
1
+import React from 'react';
2
+import Taro from '@tarojs/taro';
3
+import { View, Image } from '@tarojs/components';
4
+import withLayout from '@/layouts'
5
+import CustomNav from '@/components/CustomNav'
6
+
7
+export default withLayout(function (props) {
8
+  
9
+  return (
10
+    <View className='page-index'>
11
+      <View className='index-navbar'>
12
+        <CustomNav title='我的考勤' />
13
+      </View>
14
+      <View style={{ padding: '8px' }}>
15
+        <Image
16
+          mode='widthFix'
17
+          src='https://dz-machinery.oss-cn-nanjing.aliyuncs.com/images/%E6%8E%92%E7%8F%AD%E7%A4%BA%E4%BE%8B.png'
18
+          style={{ width: '100%' }}
19
+        />
20
+      </View>
21
+    </View>
22
+  );
23
+})

+ 12
- 0
src/pages/index/components/User/index.jsx View File

@@ -12,6 +12,9 @@ import goto from '@/assets/user/goto.png'
12 12
 import machinery from '@/assets/user/machinery.png'
13 13
 import wallet from '@/assets/user/wallet.png'
14 14
 import bankCard from '@/assets/user/bankCard.png'
15
+import workinshifts from '@/assets/user/workinshifts.png'
16
+import upgrade from '@/assets/user/upgrade.png'
17
+import helpcenter from '@/assets/user/helpcenter.png'
15 18
 import './style.less'
16 19
 
17 20
 export default (props) => {
@@ -81,6 +84,9 @@ export default (props) => {
81 84
         </View>
82 85
       </View>
83 86
       <View className='userContent'>
87
+        <View className='userBox'>
88
+          <MyCell icon={workinshifts} action={goto} user handleAction={() => Taro.navigateTo({ url: '/pages/WorkInShifts/index' })} >我的考勤</MyCell>
89
+        </View>
84 90
         <View className='userBox'>
85 91
           <MyCell icon={account} action={goto} user handleAction={handleAccount} >账号与安全</MyCell>
86 92
         </View>
@@ -93,6 +99,12 @@ export default (props) => {
93 99
         <View className='userBox'>
94 100
           <MyCell icon={feedback} action={goto} user handleAction={handleFeedback}>意见反馈</MyCell>
95 101
         </View>
102
+        <View className='userBox'>
103
+          <MyCell icon={upgrade} action={goto} user handleAction={() => Taro.navigateTo({ url: '/pages/Upgrade/index' })}>系统更新</MyCell>
104
+        </View>
105
+        <View className='userBox'>
106
+          <MyCell icon={helpcenter} action={goto} user handleAction={() => Taro.navigateTo({ url: '/pages/HelpCenter/index' })}>帮助中心</MyCell>
107
+        </View>
96 108
       </View>
97 109
     </ScrollView>
98 110
   )

+ 1
- 1
src/pages/index/components/order/index.jsx View File

@@ -136,7 +136,7 @@ export default (props) => {
136 136
       <View className='top'>
137 137
         <View className='left'>
138 138
           <Image src={positionImg} className='pImg' />
139
-          <Text>邓州市</Text>
139
+          <Text onClick={() => Taro.navigateTo({ url: '/pages/CitySelect/index' })}>邓州市</Text>
140 140
           <View className='icon' />
141 141
         </View>
142 142
         <View className='searchClass' onClick={handleSearch}>

+ 5
- 8
src/pages/versionUpdate/index.jsx View File

@@ -12,14 +12,11 @@ export default withLayout((props) => {
12 12
       </View>
13 13
       <View className='index-container version'>
14 14
         <ScrollView scrollY style={{ height: '100%' }}>
15
-          <View className='title'>
16
-            <Image src={micon} className='titleicon' />
17
-            版本V1.0
18
-            <Image src={micon} className='titleicon' />
19
-          </View>
20
-          <View className='updateContent'>
21
-            <View>最新版本</View>
22
-          </View>
15
+          <Image
16
+            src='https://dz-machinery.oss-cn-nanjing.aliyuncs.com/images/privacy_policy.png'
17
+            // style={{ paddingBottom: '60px', width: '100%' }}
18
+            mode='widthFix'
19
+          />
23 20
         </ScrollView>
24 21
       </View>
25 22
     </View>

+ 18
- 2
src/routes.js View File

@@ -51,13 +51,29 @@ const mainPages = [
51 51
     page: 'pages/aboutUs/index',
52 52
   },  
53 53
   {
54
-    title: '版本更新',
54
+    title: '用户协议',
55 55
     page: 'pages/versionUpdate/index',
56 56
   },  
57 57
   {
58 58
     title: '意见反馈',
59 59
     page: 'pages/feedback/index',
60
-  },  
60
+  }, 
61
+  {
62
+    title: '城市列表',
63
+    page: 'pages/CitySelect/index',
64
+  },
65
+  {
66
+    title: '系统更新',
67
+    page: 'pages/Upgrade/index',
68
+  },
69
+  {
70
+    title: '帮助中心',
71
+    page: 'pages/HelpCenter/index',
72
+  }, 
73
+  {
74
+    title: '我的考勤',
75
+    page: 'pages/WorkInShifts/index',
76
+  }, 
61 77
 ];
62 78
 
63 79
 // 所有的页面