|
@@ -198,87 +198,84 @@ class Home extends BasicPage {
|
198
|
198
|
return Container(
|
199
|
199
|
decoration: const BoxDecoration(color: Colors.white),
|
200
|
200
|
padding: EdgeInsets.only(top: 15.w, left: 15.w, right: 15.w),
|
201
|
|
- child: Column(
|
202
|
|
- children: [
|
203
|
|
- const headers(),
|
204
|
|
- //banner
|
205
|
|
- Container(
|
206
|
|
- margin: EdgeInsets.fromLTRB(0, 15.h, 0, 15.h),
|
207
|
|
- child: Obx(() => CarouselSlider(
|
208
|
|
- items: bannerList.value
|
209
|
|
- .map((item) => Center(
|
210
|
|
- child: Image.network(item.thumb.toString(),
|
211
|
|
- fit: BoxFit.cover, width: 345.w)))
|
|
201
|
+ child: RefreshMoreList(
|
|
202
|
+ pPrams: params,
|
|
203
|
+ cardText: '暂无订单',
|
|
204
|
+ fetch: getJobList,
|
|
205
|
+ isHome: true,
|
|
206
|
+ useState: (state) {
|
|
207
|
+ jobList(GetList(state));
|
|
208
|
+ },
|
|
209
|
+ builder: ({required BuildContext context, required Function toggle}) {
|
|
210
|
+ Refresh = toggle;
|
|
211
|
+ return Column(
|
|
212
|
+ children: [
|
|
213
|
+ const headers(),
|
|
214
|
+ //banner
|
|
215
|
+ Container(
|
|
216
|
+ margin: EdgeInsets.fromLTRB(0, 15.h, 0, 15.h),
|
|
217
|
+ child: Obx(() => CarouselSlider(
|
|
218
|
+ items: bannerList.value
|
|
219
|
+ .map((item) => Center(
|
|
220
|
+ child: Image.network(item.thumb.toString(),
|
|
221
|
+ fit: BoxFit.cover, width: 345.w)))
|
|
222
|
+ .toList(),
|
|
223
|
+ options: CarouselOptions(
|
|
224
|
+ autoPlay: true,
|
|
225
|
+ enlargeCenterPage: false,
|
|
226
|
+ //图片中心放大
|
|
227
|
+ viewportFraction: 1,
|
|
228
|
+ //每个页面应占据的视口部分。默认为 0.8,这意味着每个页面填充 80% 的轮播。
|
|
229
|
+ // aspectRatio: 1.6,//纵横比
|
|
230
|
+ height: 214.w,
|
|
231
|
+ initialPage: 1, //初始页
|
|
232
|
+ ),
|
|
233
|
+ )),
|
|
234
|
+ ),
|
|
235
|
+ Container(
|
|
236
|
+ margin: EdgeInsets.fromLTRB(0, 15.h, 0, 20.h),
|
|
237
|
+ child: Row(
|
|
238
|
+ children: [
|
|
239
|
+ Padding(
|
|
240
|
+ padding: EdgeInsets.fromLTRB(0, 0, 10.w, 0),
|
|
241
|
+ child: Image.asset(
|
|
242
|
+ 'images/index/orderList.png',
|
|
243
|
+ width: 20.w,
|
|
244
|
+ ),
|
|
245
|
+ ),
|
|
246
|
+ Text(
|
|
247
|
+ '作业列表',
|
|
248
|
+ style: TextStyle(
|
|
249
|
+ color: Color(0xff222222),
|
|
250
|
+ fontSize: 20.sp,
|
|
251
|
+ fontWeight: FontWeight.w800),
|
|
252
|
+ )
|
|
253
|
+ ],
|
|
254
|
+ ),
|
|
255
|
+ ),
|
|
256
|
+ Obx(
|
|
257
|
+ () => Column(
|
|
258
|
+ children: jobList.value
|
|
259
|
+ .map(
|
|
260
|
+ (item) => MyCard(
|
|
261
|
+ item: item,
|
|
262
|
+ job: true,
|
|
263
|
+ detail: false,
|
|
264
|
+ onClick: () {
|
|
265
|
+ changeJob(item);
|
|
266
|
+ },
|
|
267
|
+ goDetail: () {
|
|
268
|
+ goDetail(item);
|
|
269
|
+ },
|
|
270
|
+ buttomText: item.status == 0 ? '开始作业' : '完成作业',
|
|
271
|
+ ),
|
|
272
|
+ )
|
212
|
273
|
.toList(),
|
213
|
|
- options: CarouselOptions(
|
214
|
|
- autoPlay: true,
|
215
|
|
- enlargeCenterPage: false,
|
216
|
|
- //图片中心放大
|
217
|
|
- viewportFraction: 1,
|
218
|
|
- //每个页面应占据的视口部分。默认为 0.8,这意味着每个页面填充 80% 的轮播。
|
219
|
|
- // aspectRatio: 1.6,//纵横比
|
220
|
|
- height: 214.w,
|
221
|
|
- initialPage: 1, //初始页
|
222
|
|
- ),
|
223
|
|
- )),
|
224
|
|
- ),
|
225
|
|
- Container(
|
226
|
|
- margin: EdgeInsets.fromLTRB(0, 15.h, 0, 20.h),
|
227
|
|
- child: Row(
|
228
|
|
- children: [
|
229
|
|
- Padding(
|
230
|
|
- padding: EdgeInsets.fromLTRB(0, 0, 10.w, 0),
|
231
|
|
- child: Image.asset(
|
232
|
|
- 'images/index/orderList.png',
|
233
|
|
- width: 20.w,
|
234
|
|
- ),
|
235
|
274
|
),
|
236
|
|
- Text(
|
237
|
|
- '作业列表',
|
238
|
|
- style: TextStyle(
|
239
|
|
- color: Color(0xff222222),
|
240
|
|
- fontSize: 20.sp,
|
241
|
|
- fontWeight: FontWeight.w800),
|
242
|
|
- )
|
243
|
|
- ],
|
244
|
|
- ),
|
245
|
|
- ),
|
246
|
|
- Expanded(
|
247
|
|
- flex: 1,
|
248
|
|
- child: RefreshMoreList(
|
249
|
|
- pPrams: params,
|
250
|
|
- cardText: '暂无订单',
|
251
|
|
- fetch: getJobList,
|
252
|
|
- useState: (state) {
|
253
|
|
- jobList(GetList(state));
|
254
|
|
- },
|
255
|
|
- builder: (
|
256
|
|
- {required BuildContext context, required Function toggle}) {
|
257
|
|
- Refresh = toggle;
|
258
|
|
- return Obx(
|
259
|
|
- () => Column(
|
260
|
|
- children: jobList.value
|
261
|
|
- .map(
|
262
|
|
- (item) => MyCard(
|
263
|
|
- item: item,
|
264
|
|
- job: true,
|
265
|
|
- detail: false,
|
266
|
|
- onClick: () {
|
267
|
|
- changeJob(item);
|
268
|
|
- },
|
269
|
|
- goDetail: () {
|
270
|
|
- goDetail(item);
|
271
|
|
- },
|
272
|
|
- buttomText: item.status == 0 ? '开始作业' : '完成作业',
|
273
|
|
- ),
|
274
|
|
- )
|
275
|
|
- .toList(),
|
276
|
|
- ),
|
277
|
|
- );
|
278
|
|
- },
|
279
|
|
- ),
|
280
|
|
- )
|
281
|
|
- ],
|
|
275
|
+ )
|
|
276
|
+ ],
|
|
277
|
+ );
|
|
278
|
+ },
|
282
|
279
|
),
|
283
|
280
|
);
|
284
|
281
|
}
|