|
@@ -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
|
+}
|