Yansen 1年前
父节点
当前提交
6c4f5b67c1

二进制
images/icons_update.png 查看文件


二进制
images/resetpassword.png 查看文件


+ 341
- 0
lib/pages/citySelect/cityList.dart 查看文件

@@ -0,0 +1,341 @@
1
+
2
+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
+];

+ 26
- 0
lib/pages/citySelect/index.dart 查看文件

@@ -0,0 +1,26 @@
1
+
2
+import 'package:farmer_client/pages/citySelect/cityList.dart';
3
+import 'package:farmer_client/utils/timer.dart';
4
+import 'package:farmer_client/widgets/layout/BasicPage.dart';
5
+import 'package:flutter/cupertino.dart';
6
+import 'package:flutter/material.dart';
7
+import 'package:flutter/src/widgets/framework.dart';
8
+import 'package:flutter_easyloading/flutter_easyloading.dart';
9
+
10
+class CitySelectPage extends BasicPage {
11
+  CitySelectPage({Key? key}) : super(key: key) {
12
+    naviTitle = '选择城市';
13
+  }
14
+
15
+  @override
16
+  Widget builder(BuildContext context) {
17
+    return ListView(
18
+      children: cityList.map((city) => (
19
+        ListTile(title: Text(city), onTap: () {
20
+          EasyLoading.showToast("该地区尚未开通相关服务");
21
+        },)
22
+      )).toList(),
23
+    );
24
+  }
25
+
26
+}

+ 7
- 3
lib/pages/home/widgets/headers.dart 查看文件

@@ -15,8 +15,11 @@ class _TypeHeaderState extends State<TypeHeader> {
15 15
   @override
16 16
   Widget build(BuildContext context) {
17 17
     if (widget.type) {
18
-      return
19
-          Container(
18
+      return GestureDetector(
19
+        onTap: () {
20
+          Get.toNamed("/citySelect");
21
+        },
22
+          child: Container(
20 23
             height: 32.w,
21 24
             decoration: BoxDecoration(color: Colors.white),
22 25
             child: Row(
@@ -48,7 +51,8 @@ class _TypeHeaderState extends State<TypeHeader> {
48 51
                 ),
49 52
               ],
50 53
             ),
51
-          );
54
+          )
55
+      );
52 56
     } else {
53 57
       return _initWidget();
54 58
     }

+ 3
- 0
lib/pages/index.dart 查看文件

@@ -16,4 +16,7 @@ export 'splash/splash.dart';
16 16
 export 'login/login.dart';
17 17
 export 'machinery/map/index.dart';
18 18
 export 'machinery/detail/index.dart';
19
+export 'upgrade/index.dart';
20
+export 'resetPassword/index.dart';
21
+export 'citySelect/index.dart';
19 22
 // export 'main/index.dart';

+ 56
- 0
lib/pages/main/widgets/main/widgets/MenuItem.dart 查看文件

@@ -0,0 +1,56 @@
1
+
2
+import 'package:flutter/cupertino.dart';
3
+import 'package:flutter/material.dart';
4
+import 'package:flutter_screenutil/flutter_screenutil.dart';
5
+import 'package:get/get.dart';
6
+
7
+class MenuItem extends StatelessWidget {
8
+
9
+  String icon;
10
+  String label;
11
+  String link;
12
+
13
+  MenuItem({Key? key, required this.icon, required this.label, required this.link  }) : super(key: key);
14
+
15
+  @override
16
+  Widget build(BuildContext context) {
17
+
18
+    return GestureDetector(
19
+      onTap: () {
20
+        Get.toNamed(link);
21
+      },
22
+      child: Container(
23
+        height: 45.w,
24
+        width: 310.w,
25
+        margin: EdgeInsets.fromLTRB(0, 10.w, 0, 0),
26
+        decoration: const BoxDecoration(
27
+            border: Border(
28
+                bottom: BorderSide(
29
+                    width: 0.5, color: Color(0x20000000)
30
+                  // 0x17000000
31
+                ))),
32
+        child: ListTile(
33
+          contentPadding: const EdgeInsets.symmetric(horizontal: 0.0),
34
+          // 这边使用了contentPadding
35
+          leading: Image(
36
+            image: AssetImage(icon),
37
+            width: 18.w,
38
+            height: 21.w,
39
+          ),
40
+          title: Transform(
41
+            transform: Matrix4.translationValues(-20, 0.0, 0.0),
42
+            child: Text(label,
43
+                style: TextStyle(
44
+                    fontSize: 17.sp, color: const Color(0xff333333))),
45
+          ),
46
+          trailing: Image(
47
+            image: const AssetImage('images/userRight.png'),
48
+            width: 10.w,
49
+            height: 18.w,
50
+          ),
51
+        ),
52
+      ),
53
+    );
54
+  }
55
+
56
+}

+ 20
- 104
lib/pages/main/widgets/main/widgets/OtherColumn.dart 查看文件

@@ -1,6 +1,7 @@
1 1
 import 'package:flutter/material.dart';
2 2
 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 3
 import 'package:get/get.dart';
4
+import './MenuItem.dart';
4 5
 
5 6
 class OtherColumn extends StatelessWidget {
6 7
   const OtherColumn({Key? key}) : super(key: key);
@@ -11,6 +12,7 @@ class OtherColumn extends StatelessWidget {
11 12
         alignment: Alignment.center,
12 13
         width: 345.w,
13 14
         margin: EdgeInsets.fromLTRB(0, 15.w, 0, 15.w),
15
+        padding: EdgeInsets.only(bottom: 24.w),
14 16
         decoration: BoxDecoration(
15 17
           borderRadius: BorderRadius.circular(30),
16 18
           color: Colors.white,
@@ -25,7 +27,7 @@ class OtherColumn extends StatelessWidget {
25 27
         child: Column(
26 28
           children: [
27 29
             Container(
28
-                margin: EdgeInsets.fromLTRB(0, 30.w, 0, 20.w),
30
+                margin: EdgeInsets.fromLTRB(0, 30.w, 0, 15.w),
29 31
                 alignment: Alignment.topLeft,
30 32
                 decoration: const BoxDecoration(
31 33
                     border: Border(
@@ -46,111 +48,25 @@ class OtherColumn extends StatelessWidget {
46 48
             Container(
47 49
               child: Column(
48 50
                 children: [
49
-                  GestureDetector(
50
-                    onTap: () {
51
-                      Get.toNamed('/aboutUs');
52
-                    },
53
-                    child: Container(
54
-                      height: 45.w,
55
-                      width: 310.w,
56
-                      margin: EdgeInsets.fromLTRB(0, 10.w, 0, 0),
57
-                      decoration: const BoxDecoration(
58
-                          border: Border(
59
-                              bottom: BorderSide(
60
-                                  width: 0.5, color: Color(0x20000000)
61
-                                  // 0x17000000
62
-                                  ))),
63
-                      child: ListTile(
64
-                        contentPadding: EdgeInsets.symmetric(horizontal: 0.0),
65
-                        // 这边使用了contentPadding
66
-                        leading: Image(
67
-                          image: AssetImage('images/aboutUs.png'),
68
-                          width: 18.w,
69
-                          height: 21.w,
70
-                        ),
71
-                        title: Transform(
72
-                          transform: Matrix4.translationValues(-20, 0.0, 0.0),
73
-                          child: Text("关于我们",
74
-                              style: TextStyle(
75
-                                  fontSize: 17.sp, color: Color(0xff333333))),
76
-                        ),
77
-                        trailing: Image(
78
-                          image: AssetImage('images/userRight.png'),
79
-                          width: 10.w,
80
-                          height: 18.w,
81
-                        ),
82
-                      ),
83
-                    ),
51
+                  MenuItem(
52
+                    icon: 'images/aboutUs.png',
53
+                    label: '关于我们',
54
+                    link: '/aboutUs',
84 55
                   ),
85
-                  GestureDetector(
86
-                    onTap: () {
87
-                      Get.toNamed('/agreement');
88
-                    },
89
-                    child: Container(
90
-                      margin: EdgeInsets.fromLTRB(0, 10.w, 0, 0),
91
-                      width: 310.w,
92
-                      height: 45.w,
93
-                      decoration: const BoxDecoration(
94
-                          border: Border(
95
-                              bottom: BorderSide(
96
-                                  width: 0.5, color: Color(0x20000000)
97
-                                  // 0x17000000
98
-                                  ))),
99
-                      child: ListTile(
100
-                        contentPadding: EdgeInsets.symmetric(horizontal: 0.0),
101
-                        leading: Image(
102
-                          image: AssetImage('images/versionUpdate.png'),
103
-                          width: 18.w,
104
-                          height: 21.w,
105
-                        ),
106
-                        title: Transform(
107
-                          transform: Matrix4.translationValues(-20, 0.0, 0.0),
108
-                          child: Text("用户协议及隐私政策",
109
-                              style: TextStyle(
110
-                                  fontSize: 17.sp, color: Color(0xff333333))),
111
-                        ),
112
-                        trailing: Image(
113
-                          image: AssetImage('images/userRight.png'),
114
-                          width: 10.w,
115
-                          height: 18.w,
116
-                        ),
117
-                      ),
118
-                    ),
56
+                  MenuItem(
57
+                    icon: 'images/versionUpdate.png',
58
+                    label: '用户协议及隐私政策',
59
+                    link: '/agreement',
119 60
                   ),
120
-                  GestureDetector(
121
-                    onTap: () {
122
-                      Get.toNamed('/feedback');
123
-                    },
124
-                    child: Container(
125
-                      margin: EdgeInsets.fromLTRB(0, 10.w, 0, 20.w),
126
-                      width: 310.w,
127
-                      height: 45.w,
128
-                      decoration: const BoxDecoration(
129
-                          border: Border(
130
-                              bottom: BorderSide(
131
-                                  width: 0.5, color: Color(0x20000000)
132
-                                  // 0x17000000
133
-                                  ))),
134
-                      child: ListTile(
135
-                        contentPadding: EdgeInsets.symmetric(horizontal: 0.0),
136
-                        leading: Image(
137
-                          image: AssetImage('images/feedbacks.png'),
138
-                          width: 18.w,
139
-                          height: 21.w,
140
-                        ),
141
-                        title: Transform(
142
-                          transform: Matrix4.translationValues(-20, 0.0, 0.0),
143
-                          child: Text("意见反馈",
144
-                              style: TextStyle(
145
-                                  fontSize: 17.sp, color: Color(0xff333333))),
146
-                        ),
147
-                        trailing: Image(
148
-                          image: AssetImage('images/userRight.png'),
149
-                          width: 10.w,
150
-                          height: 18.w,
151
-                        ),
152
-                      ),
153
-                    ),
61
+                  MenuItem(
62
+                    icon: 'images/feedbacks.png',
63
+                    label: '意见反馈',
64
+                    link: '/feedback',
65
+                  ),
66
+                  MenuItem(
67
+                    icon: 'images/icons_update.png',
68
+                    label: '版本更新',
69
+                    link: '/upgrade',
154 70
                   ),
155 71
                 ],
156 72
               ),

+ 1
- 2
lib/pages/main/widgets/main/widgets/UserAddress.dart 查看文件

@@ -1,8 +1,7 @@
1 1
 import 'package:flutter/material.dart';
2 2
 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 3
 import 'package:get/get.dart';
4
-
5
-import '../../../../../models/entities/Address.dart';
4
+import 'package:farmer_client/models/entities/Address.dart';
6 5
 
7 6
 class UserAddress extends StatelessWidget {
8 7
   final Address item;

+ 1
- 2
lib/pages/main/widgets/main/widgets/UserInfo.dart 查看文件

@@ -1,8 +1,7 @@
1 1
 import 'package:flutter/material.dart';
2 2
 import 'package:flutter_screenutil/flutter_screenutil.dart';
3 3
 import 'package:get/get.dart';
4
-
5
-import '../../../../../models/app.dart';
4
+import 'package:farmer_client/models/app.dart';
6 5
 
7 6
 class UserInfo extends StatelessWidget {
8 7
   AppController userInfo = AppController.t;

+ 192
- 0
lib/pages/resetPassword/index.dart 查看文件

@@ -0,0 +1,192 @@
1
+
2
+
3
+import 'package:flutter/material.dart';
4
+import 'package:flutter/src/widgets/framework.dart';
5
+import 'package:flutter_easyloading/flutter_easyloading.dart';
6
+import 'package:flutter_screenutil/flutter_screenutil.dart';
7
+import 'package:farmer_client/widgets/layout/BasicPage.dart';
8
+
9
+import 'package:farmer_client/utils/timer.dart';
10
+import 'package:farmer_client/widgets/DefaultButton.dart';
11
+
12
+class ResetPassword extends BasicPage {
13
+  ResetPassword({Key? key}) : super(key: key) {
14
+    naviTitle = '修改密码';
15
+  }
16
+
17
+  @override
18
+  Widget builder(BuildContext context) {
19
+    return Container(
20
+      padding: EdgeInsets.all(15.w),
21
+      decoration: const BoxDecoration(color: Colors.white),
22
+      child: Column(
23
+        children: [
24
+          Expanded(
25
+            flex: 1,
26
+            child: ListView(
27
+              children: [
28
+                Container(
29
+                  width: 345.w,
30
+                  alignment: Alignment.centerLeft,
31
+                  margin: EdgeInsets.only(top: 40.h),
32
+                  decoration: BoxDecoration(
33
+                    color: Colors.white,
34
+                    boxShadow: [
35
+                      BoxShadow(
36
+                          color: const Color(0x1f000000),
37
+                          offset: Offset(0, 1.w))
38
+                    ],
39
+                  ),
40
+                  child: Column(
41
+                    crossAxisAlignment: CrossAxisAlignment.start,
42
+                    children: [
43
+                      Text(
44
+                        '原始密码:',
45
+                        style: TextStyle(
46
+                            color: const Color(0xFF333333),
47
+                            fontSize: 17.sp,
48
+                            fontWeight: FontWeight.bold,
49
+                            letterSpacing: 2),
50
+                      ),
51
+                      Container(
52
+                        height: 54.h,
53
+                        alignment: Alignment.centerLeft,
54
+                        child: Row(
55
+                          children: [
56
+                            Expanded(
57
+                              flex: 1,
58
+                              child: TextField(
59
+                                style: TextStyle(
60
+                                    fontSize: 17.sp,
61
+                                    fontWeight: FontWeight.bold,
62
+                                    color: const Color(0xff333333)),
63
+                                decoration: const InputDecoration(
64
+                                  isCollapsed: true,
65
+                                  hintText: '请输入原始密码',
66
+                                  counterText: '', //去掉右下角的东西
67
+                                  border: InputBorder.none,
68
+                                  floatingLabelBehavior:
69
+                                  FloatingLabelBehavior.never,
70
+                                ),
71
+                                onChanged: (val) {
72
+                                },
73
+                              ),
74
+                            ),
75
+                            GestureDetector(
76
+                              behavior: HitTestBehavior.opaque,
77
+                              onTap: () {},
78
+                              child: Container(
79
+                                width: 50.w,
80
+                                alignment: Alignment.center,
81
+                                child: Image.asset(
82
+                                  'images/icons/cancel.png',
83
+                                  width: 18.w,
84
+                                ),
85
+                              ),
86
+                            )
87
+                          ],
88
+                        ),
89
+                      ),
90
+                    ],
91
+                  ),
92
+                ),
93
+                Container(
94
+                  width: 345.w,
95
+                  alignment: Alignment.centerLeft,
96
+                  margin: EdgeInsets.only(top: 40.h),
97
+                  decoration: BoxDecoration(
98
+                    color: Colors.white,
99
+                    boxShadow: [
100
+                      BoxShadow(
101
+                          color: Color(0x1f000000), offset: Offset(0, 1.w))
102
+                    ],
103
+                  ),
104
+                  child: Column(
105
+                    crossAxisAlignment: CrossAxisAlignment.start,
106
+                    children: [
107
+                      Text(
108
+                        '新密码:',
109
+                        style: TextStyle(
110
+                            color: const Color(0xFF333333),
111
+                            letterSpacing: 2,
112
+                            fontSize: 17.sp,
113
+                            fontWeight: FontWeight.bold),
114
+                      ),
115
+                      Container(
116
+                        height: 54.h,
117
+                        alignment: Alignment.centerLeft,
118
+                        child: Row(
119
+                          children: [
120
+                            Expanded(
121
+                              flex: 1,
122
+                              child: TextField(
123
+                                //赋初值
124
+                                maxLength: 11,
125
+                                keyboardType: TextInputType.number,
126
+                                style: TextStyle(
127
+                                    fontSize: 17.sp,
128
+                                    fontWeight: FontWeight.bold,
129
+                                    color: const Color(0xff333333)),
130
+                                decoration: const InputDecoration(
131
+                                  isCollapsed: true,
132
+                                  hintText: '请输入新密码',
133
+                                  counterText: '', //去掉右下角的东西
134
+                                  border: InputBorder.none,
135
+                                  floatingLabelBehavior:
136
+                                  FloatingLabelBehavior.never,
137
+                                ),
138
+                                onChanged: (val) {
139
+                                },
140
+                              ),
141
+                            ),
142
+                            GestureDetector(
143
+                              behavior: HitTestBehavior.opaque,
144
+                              onTap: () {
145
+                              },
146
+                              child: Container(
147
+                                width: 50.w,
148
+                                alignment: Alignment.center,
149
+                                child: Image.asset(
150
+                                  'images/icons/cancel.png',
151
+                                  width: 18.w,
152
+                                ),
153
+                              ),
154
+                            ),
155
+                          ],
156
+                        ),
157
+                      ),
158
+                    ],
159
+                  ),
160
+                ),
161
+              ],
162
+            ),
163
+          ),
164
+          Padding(
165
+            padding: EdgeInsets.only(bottom: 15.w),
166
+            child: DefaultButton(
167
+              text: '保存',
168
+              color: const Color(0xffffffff),
169
+              backColor: const Color(0xFFFF703B),
170
+              width: 345.w,
171
+              height: 49.h,
172
+              onPressed: () {
173
+                EasyLoading.show(status: '请稍候...');
174
+                setTimeout(() {
175
+                  EasyLoading.showToast("网络超时, 请稍后再试");
176
+
177
+                  setTimeout(() {
178
+                    EasyLoading.dismiss();
179
+                  }, 1500);
180
+                }, 3000);
181
+              },
182
+              margin: const EdgeInsets.all(0),
183
+              fontSize: 20.sp,
184
+              radius: 24.5.w,
185
+            ),
186
+          ),
187
+        ],
188
+      ),
189
+    );
190
+  }
191
+
192
+}

+ 51
- 0
lib/pages/upgrade/index.dart 查看文件

@@ -0,0 +1,51 @@
1
+
2
+import 'package:flutter/cupertino.dart';
3
+import 'package:flutter_easyloading/flutter_easyloading.dart';
4
+import 'package:flutter_screenutil/flutter_screenutil.dart';
5
+
6
+import 'package:farmer_client/widgets/DefaultButton.dart';
7
+import 'package:farmer_client/widgets/layout/BasicPage.dart';
8
+import 'package:get/get.dart';
9
+
10
+import 'package:farmer_client/utils/timer.dart';
11
+
12
+class UpgradePage extends BasicPage {
13
+  UpgradePage({Key? key}) : super(key: key) {
14
+    naviTitle = '检查更新';
15
+  }
16
+
17
+  @override
18
+  Widget builder(BuildContext context) {
19
+
20
+    return Container(
21
+      margin: EdgeInsets.only(top: 24.h),
22
+      padding: EdgeInsets.symmetric(horizontal: 32.w),
23
+      child: Column(
24
+        children: [
25
+          DefaultButton(
26
+            color: const Color(0xffffffff),
27
+            backColor: const Color(0xFFFF703B),
28
+            width: Get.width - 64.w,
29
+            height: 49.h,
30
+            text: '检查更新',
31
+            margin: const EdgeInsets.all(0),
32
+            fontSize: 20.sp,
33
+            radius: 24.5.w,
34
+            onPressed: () {
35
+              EasyLoading.show(status: '正在检查更新...');
36
+
37
+              setTimeout(() {
38
+                EasyLoading.showToast('当前已是最新版本');
39
+
40
+                setTimeout(() {
41
+                  EasyLoading.dismiss();
42
+                }, 1500);
43
+              }, 3000);
44
+            },
45
+          )
46
+        ],
47
+      ),
48
+    );
49
+  }
50
+
51
+}

+ 10
- 0
lib/pages/userInfo/index.dart 查看文件

@@ -107,6 +107,16 @@ class UserInfo extends BasicPage {
107 107
                               image: AssetImage('images/userMoren.png')),
108 108
                     ),
109 109
                   ),
110
+                  GestureDetector(
111
+                    onTap: () {
112
+                      Get.toNamed("/resetPassword");
113
+                    },
114
+                    child: Text("修改密码", style: TextStyle(
115
+                        color: const Color(0xFF333333),
116
+                        fontSize: 17.sp,
117
+                        fontWeight: FontWeight.bold,
118
+                        letterSpacing: 2),),
119
+                  )
110 120
                 ]),
111 121
           ),
112 122
           Text(

+ 3
- 0
lib/routes/pages.dart 查看文件

@@ -33,5 +33,8 @@ List<GetPage> pages = [
33 33
   GetPage(name: '/orderConfirmation', page: () => OrderConfirmation()),
34 34
   GetPage(name: '/orderPageInfo', page: () => OrderPageInfo()),
35 35
   GetPage(name: '/searchPage', page: () => SearchPage()),
36
+  GetPage(name: '/upgrade', page: () => UpgradePage()),
37
+  GetPage(name: '/resetPassword', page: () => ResetPassword()),
38
+  GetPage(name: '/citySelect', page: () => CitySelectPage()),
36 39
   // GetPage(name: '/welcome', page: () => WelcomePage()),
37 40
 ];