Yansen 1 年之前
父節點
當前提交
9ef923a9e6

二進制
images/main/upgrade.png 查看文件


二進制
images/main/workinshifts.png 查看文件


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

@@ -16,3 +16,6 @@ export 'withdrawal/index.dart';
16 16
 export 'aboutUs/index.dart';
17 17
 export 'agreement/index.dart';
18 18
 export 'feedback/index.dart';
19
+export 'upgrade/index.dart';
20
+export 'workInShifts/index.dart';
21
+export 'resetPassword/index.dart';

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

@@ -249,6 +249,26 @@ class Main extends BasicPage {
249 249
                         EdgeInsets.symmetric(horizontal: 15.w, vertical: 0),
250 250
                     child: Column(
251 251
                       children: [
252
+                        MyCell(
253
+                          head: Image.asset(
254
+                            'images/main/workinshifts.png',
255
+                            width: 19.w,
256
+                          ),
257
+                          body: Text(
258
+                            '我的排班',
259
+                            style: TextStyle(
260
+                                fontSize: 17.sp,
261
+                                fontWeight: FontWeight.bold,
262
+                                color: Color(0xff333333)),
263
+                          ),
264
+                          action: Image.asset(
265
+                            'images/main/goto.png',
266
+                            width: 10.w,
267
+                          ),
268
+                          onClick: () {
269
+                            Get.toNamed('/workInShifts');
270
+                          },
271
+                        ),
252 272
                         MyCell(
253 273
                           head: Image.asset(
254 274
                             'images/main/account.png',
@@ -330,6 +350,26 @@ class Main extends BasicPage {
330 350
                             goFeedback();
331 351
                           },
332 352
                         ),
353
+                        MyCell(
354
+                          head: Image.asset(
355
+                            'images/main/upgrade.png',
356
+                            width: 19.w,
357
+                          ),
358
+                          body: Text(
359
+                            '系统更新',
360
+                            style: TextStyle(
361
+                                fontSize: 17.sp,
362
+                                fontWeight: FontWeight.bold,
363
+                                color: Color(0xff333333)),
364
+                          ),
365
+                          action: Image.asset(
366
+                            'images/main/goto.png',
367
+                            width: 10.w,
368
+                          ),
369
+                          onClick: () {
370
+                            Get.toNamed('/upgrade');
371
+                          },
372
+                        ),
333 373
                         Container(
334 374
                           height: 45.5.h,
335 375
                           width: 345.w,

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

@@ -0,0 +1,188 @@
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:worker_client/utils/timer.dart';
8
+import 'package:worker_client/widgets/layout/BasicPage.dart';
9
+
10
+import 'package:worker_client/widgets/MyButton/index.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/main/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/main/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: MyButton(
167
+              text: '保存',
168
+              type: 0,
169
+              pwith: 30.w,
170
+              disable: false,
171
+              onClick: () {
172
+                EasyLoading.show(status: '请稍候...');
173
+                setTimeout(() {
174
+                  EasyLoading.showToast("网络超时, 请稍后再试");
175
+
176
+                  setTimeout(() {
177
+                    EasyLoading.dismiss();
178
+                  }, 1500);
179
+                }, 3000);
180
+              },
181
+            ),
182
+          ),
183
+        ],
184
+      ),
185
+    );
186
+  }
187
+
188
+}

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

@@ -0,0 +1,45 @@
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:worker_client/widgets/MyButton/index.dart';
7
+import 'package:worker_client/widgets/layout/BasicPage.dart';
8
+
9
+import 'package:worker_client/utils/timer.dart';
10
+
11
+class UpgradePage extends BasicPage {
12
+  UpgradePage({Key? key}) : super(key: key) {
13
+    naviTitle = '检查更新';
14
+  }
15
+
16
+  @override
17
+  Widget builder(BuildContext context) {
18
+
19
+    return Container(
20
+      margin: EdgeInsets.only(top: 24.h),
21
+      padding: EdgeInsets.symmetric(horizontal: 32.w),
22
+      child: Column(
23
+        children: [
24
+          MyButton (
25
+            text: '检查更新',
26
+            type: 0,
27
+            disable: false,
28
+            onClick: () {
29
+              EasyLoading.show(status: '正在检查更新...');
30
+
31
+              setTimeout(() {
32
+                EasyLoading.showToast('当前已是最新版本');
33
+
34
+                setTimeout(() {
35
+                  EasyLoading.dismiss();
36
+                }, 1500);
37
+              }, 3000);
38
+            },
39
+          )
40
+        ],
41
+      ),
42
+    );
43
+  }
44
+
45
+}

+ 29
- 14
lib/pages/userInfo/index.dart 查看文件

@@ -80,23 +80,38 @@ class UserInfo extends BasicPage {
80 80
                           color: Color(0x1f000000), offset: Offset(0, 1.w))
81 81
                     ],
82 82
                   ),
83
-                  child: store.user().avatar != null
84
-                      ? Container(
85
-                          clipBehavior: Clip.hardEdge,
86
-                          decoration: BoxDecoration(
87
-                              borderRadius:
88
-                                  BorderRadius.all(Radius.circular(31.w))),
89
-                          child: Image.network(
90
-                            store.user().avatar.toString(),
91
-                            width: 62.w,
92
-                            height: 62.w,
93
-                          ),
94
-                        )
95
-                      : Image.asset(
96
-                          'images/main/defaultAvatar.png',
83
+                  child: Row(
84
+                    children: [
85
+                      store.user().avatar != null
86
+                          ? Container(
87
+                        clipBehavior: Clip.hardEdge,
88
+                        decoration: BoxDecoration(
89
+                            borderRadius:
90
+                            BorderRadius.all(Radius.circular(31.w))),
91
+                        child: Image.network(
92
+                          store.user().avatar.toString(),
97 93
                           width: 62.w,
98 94
                           height: 62.w,
99 95
                         ),
96
+                      )
97
+                          : Image.asset(
98
+                        'images/main/defaultAvatar.png',
99
+                        width: 62.w,
100
+                        height: 62.w,
101
+                      ),
102
+                      const Expanded(child: SizedBox()),
103
+                      GestureDetector(
104
+                        onTap: () {
105
+                          Get.toNamed("/resetPassword");
106
+                        },
107
+                        child: Text("修改密码", style: TextStyle(
108
+                            color: const Color(0xFF333333),
109
+                            fontSize: 17.sp,
110
+                            fontWeight: FontWeight.bold,
111
+                            letterSpacing: 2),),
112
+                      )
113
+                    ],
114
+                  )
100 115
                 ),
101 116
                 Container(
102 117
                   width: 345.w,

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

@@ -0,0 +1,25 @@
1
+
2
+import 'package:flutter/cupertino.dart';
3
+import 'package:flutter_screenutil/flutter_screenutil.dart';
4
+import 'package:get/get.dart';
5
+import 'package:worker_client/widgets/layout/BasicPage.dart';
6
+
7
+class WorkInShifts extends BasicPage {
8
+  WorkInShifts({Key? key}) : super(key: key) {
9
+    naviTitle = '我的排班';
10
+  }
11
+
12
+  @override
13
+  Widget builder(BuildContext context) {
14
+    //
15
+    return Container(
16
+      margin: EdgeInsets.only(top: 50.h),
17
+      child: Image.network(
18
+        'https://dz-machinery.oss-cn-nanjing.aliyuncs.com/images/%E6%8E%92%E7%8F%AD%E7%A4%BA%E4%BE%8B.png',
19
+        width: Get.width,
20
+        fit: BoxFit.cover,
21
+      ),
22
+    );
23
+  }
24
+
25
+}

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

@@ -33,4 +33,7 @@ List<GetPage> pages = [
33 33
   GetPage(name: '/aboutUs', page: () => AboutUs()),
34 34
   GetPage(name: '/agreement', page: () => Agreement()),
35 35
   GetPage(name: '/feedback', page: () => Feedback()),
36
+  GetPage(name: '/upgrade', page: () => UpgradePage()),
37
+  GetPage(name: '/workInShifts', page: () => WorkInShifts()),
38
+  GetPage(name: '/resetPassword', page: () => ResetPassword()),
36 39
 ];