|
@@ -57,28 +57,28 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
@@ -57,28 +57,28 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
57
|
},
|
57
|
},
|
|
58
|
),
|
58
|
),
|
|
59
|
body: WillPopScope(
|
59
|
body: WillPopScope(
|
|
60
|
- onWillPop: () {
|
|
|
|
61
|
- EventBus().emit('changeStatusColor');
|
|
|
|
62
|
- Navigator.of(context).pop();
|
|
|
|
63
|
- },
|
|
|
|
64
|
- child: Column(
|
|
|
|
65
|
- children: [
|
|
|
|
66
|
- Expanded(child: Consumer<MenuManageProvider>(
|
|
|
|
67
|
- builder: (context, model, _) {
|
|
|
|
68
|
- if (model.pageState != PageState.Success) {
|
|
|
|
69
|
- return ExceptionPage(
|
|
|
|
70
|
- pageState: model.pageState,
|
|
|
|
71
|
- callback: () {
|
|
|
|
72
|
- // offset = 0;
|
|
|
|
73
|
- // getMessage(showLoading: true);
|
|
|
|
74
|
- // _couponNetworkData();
|
|
|
|
75
|
- },
|
|
|
|
76
|
- emptyMsg: "菜品是空哒,快点击分类管理添加分类和菜品吧",
|
|
|
|
77
|
- emptyImg: "empty_search",
|
|
|
|
78
|
- showMsg: "加载中,请稍后...",
|
|
|
|
79
|
- );
|
|
|
|
80
|
- } else {
|
|
|
|
81
|
- return ListView.builder(
|
60
|
+ onWillPop: () {
|
|
|
|
61
|
+ EventBus().emit('changeStatusColor');
|
|
|
|
62
|
+ Navigator.of(context).pop();
|
|
|
|
63
|
+ },
|
|
|
|
64
|
+ child: Consumer<MenuManageProvider>(
|
|
|
|
65
|
+ builder: (context, model, _) {
|
|
|
|
66
|
+ if (model.pageState != PageState.Success) {
|
|
|
|
67
|
+ return ExceptionPage(
|
|
|
|
68
|
+ pageState: model.pageState,
|
|
|
|
69
|
+ callback: () {
|
|
|
|
70
|
+ // offset = 0;
|
|
|
|
71
|
+ // getMessage(showLoading: true);
|
|
|
|
72
|
+ // _couponNetworkData();
|
|
|
|
73
|
+ },
|
|
|
|
74
|
+ emptyMsg: "菜品是空哒,快点击分类管理添加分类和菜品吧",
|
|
|
|
75
|
+ emptyImg: "empty_search",
|
|
|
|
76
|
+ showMsg: "加载中,请稍后...",
|
|
|
|
77
|
+ );
|
|
|
|
78
|
+ } else {
|
|
|
|
79
|
+ return Column(children: [
|
|
|
|
80
|
+ Expanded(
|
|
|
|
81
|
+ child: ListView.builder(
|
|
82
|
padding: EdgeInsets.symmetric(
|
82
|
padding: EdgeInsets.symmetric(
|
|
83
|
horizontal: ScreenUtil().setWidth(40),
|
83
|
horizontal: ScreenUtil().setWidth(40),
|
|
84
|
vertical: ScreenUtil().setWidth(40)),
|
84
|
vertical: ScreenUtil().setWidth(40)),
|
|
@@ -215,65 +215,68 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
@@ -215,65 +215,68 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
215
|
// // getMessage(showLoading: false);
|
215
|
// // getMessage(showLoading: false);
|
|
216
|
// },
|
216
|
// },
|
|
217
|
);
|
217
|
);
|
|
218
|
- });
|
|
|
|
219
|
- }
|
|
|
|
220
|
- },
|
|
|
|
221
|
- )),
|
|
|
|
222
|
- // VEmptyView(20),
|
|
|
|
223
|
- Row(
|
|
|
|
224
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
225
|
- children: [
|
|
|
|
226
|
- Padding(
|
|
|
|
227
|
- padding: EdgeInsets.fromLTRB(
|
|
|
|
228
|
- ScreenUtil().setWidth(40),
|
|
|
|
229
|
- 0,
|
|
|
|
230
|
- ScreenUtil().setWidth(40),
|
|
|
|
231
|
- ScreenUtil().setWidth(40)),
|
|
|
|
232
|
- child: RoundButton(
|
|
|
|
233
|
- onPressed: () async {
|
|
|
|
234
|
- bool needRefresh =
|
|
|
|
235
|
- await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
236
|
- print(needRefresh);
|
|
|
|
237
|
- if (needRefresh != null && needRefresh) {
|
|
|
|
238
|
- //刷新页面数据
|
|
|
|
239
|
- // _controller.callRefresh();
|
|
|
|
240
|
- // _couponNetworkData();
|
|
|
|
241
|
- }
|
|
|
|
242
|
- },
|
|
|
|
243
|
- text: '添加\n菜品',
|
|
|
|
244
|
- fontSize: 26,
|
|
|
|
245
|
- isBold: false,
|
|
|
|
246
|
- height: ScreenUtil().setWidth(120),
|
|
|
|
247
|
- width: ScreenUtil().setWidth(120),
|
|
|
|
248
|
- radius: ScreenUtil().setWidth(60),
|
|
|
|
249
|
- )),
|
|
|
|
250
|
- Padding(
|
|
|
|
251
|
- padding: EdgeInsets.fromLTRB(
|
|
|
|
252
|
- ScreenUtil().setWidth(40),
|
|
|
|
253
|
- 0,
|
|
|
|
254
|
- ScreenUtil().setWidth(40),
|
|
|
|
255
|
- ScreenUtil().setWidth(40)),
|
|
|
|
256
|
- child: RoundButton(
|
|
|
|
257
|
- onPressed: () async {
|
|
|
|
258
|
- bool needRefresh =
|
|
|
|
259
|
- await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
260
|
- print(needRefresh);
|
|
|
|
261
|
- if (needRefresh != null && needRefresh) {
|
|
|
|
262
|
- //刷新页面数据
|
|
|
|
263
|
- // _controller.callRefresh();
|
|
|
|
264
|
- // _couponNetworkData();
|
|
|
|
265
|
- }
|
|
|
|
266
|
- },
|
|
|
|
267
|
- text: '分类\n管理',
|
|
|
|
268
|
- fontSize: 26,
|
|
|
|
269
|
- isBold: false,
|
|
|
|
270
|
- height: ScreenUtil().setWidth(120),
|
|
|
|
271
|
- width: ScreenUtil().setWidth(120),
|
|
|
|
272
|
- radius: ScreenUtil().setWidth(60),
|
|
|
|
273
|
- ))
|
|
|
|
274
|
- ],
|
|
|
|
275
|
- )
|
|
|
|
276
|
- ],
|
|
|
|
277
|
- )));
|
218
|
+ })),
|
|
|
|
219
|
+ Row(
|
|
|
|
220
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
221
|
+ children: [
|
|
|
|
222
|
+ model.pageState == PageState.Empty
|
|
|
|
223
|
+ ? SizedBox()
|
|
|
|
224
|
+ : Padding(
|
|
|
|
225
|
+ padding: EdgeInsets.fromLTRB(
|
|
|
|
226
|
+ ScreenUtil().setWidth(40),
|
|
|
|
227
|
+ 0,
|
|
|
|
228
|
+ ScreenUtil().setWidth(40),
|
|
|
|
229
|
+ ScreenUtil().setWidth(40)),
|
|
|
|
230
|
+ child: RoundButton(
|
|
|
|
231
|
+ onPressed: () async {
|
|
|
|
232
|
+ bool needRefresh =
|
|
|
|
233
|
+ await NavigatorUtil.goCouponEditPage(
|
|
|
|
234
|
+ context);
|
|
|
|
235
|
+ print(needRefresh);
|
|
|
|
236
|
+ if (needRefresh != null && needRefresh) {
|
|
|
|
237
|
+ //刷新页面数据
|
|
|
|
238
|
+ // _controller.callRefresh();
|
|
|
|
239
|
+ // _couponNetworkData();
|
|
|
|
240
|
+ }
|
|
|
|
241
|
+ },
|
|
|
|
242
|
+ text: '添加\n菜品',
|
|
|
|
243
|
+ fontSize: 26,
|
|
|
|
244
|
+ isBold: false,
|
|
|
|
245
|
+ height: ScreenUtil().setWidth(120),
|
|
|
|
246
|
+ width: ScreenUtil().setWidth(120),
|
|
|
|
247
|
+ radius: ScreenUtil().setWidth(60),
|
|
|
|
248
|
+ )),
|
|
|
|
249
|
+ Padding(
|
|
|
|
250
|
+ padding: EdgeInsets.fromLTRB(
|
|
|
|
251
|
+ ScreenUtil().setWidth(40),
|
|
|
|
252
|
+ 0,
|
|
|
|
253
|
+ ScreenUtil().setWidth(40),
|
|
|
|
254
|
+ ScreenUtil().setWidth(40)),
|
|
|
|
255
|
+ child: RoundButton(
|
|
|
|
256
|
+ onPressed: () async {
|
|
|
|
257
|
+ bool needRefresh =
|
|
|
|
258
|
+ await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
259
|
+ print(needRefresh);
|
|
|
|
260
|
+ if (needRefresh != null && needRefresh) {
|
|
|
|
261
|
+ //刷新页面数据
|
|
|
|
262
|
+ // _controller.callRefresh();
|
|
|
|
263
|
+ // _couponNetworkData();
|
|
|
|
264
|
+ }
|
|
|
|
265
|
+ },
|
|
|
|
266
|
+ text: '分类\n管理',
|
|
|
|
267
|
+ fontSize: 26,
|
|
|
|
268
|
+ isBold: false,
|
|
|
|
269
|
+ height: ScreenUtil().setWidth(120),
|
|
|
|
270
|
+ width: ScreenUtil().setWidth(120),
|
|
|
|
271
|
+ radius: ScreenUtil().setWidth(60),
|
|
|
|
272
|
+ ))
|
|
|
|
273
|
+ ],
|
|
|
|
274
|
+ )
|
|
|
|
275
|
+ ]);
|
|
|
|
276
|
+ }
|
|
|
|
277
|
+ },
|
|
|
|
278
|
+ ),
|
|
|
|
279
|
+ // VEmptyView(20),
|
|
|
|
280
|
+ ));
|
|
278
|
}
|
281
|
}
|
|
279
|
} |
282
|
} |