|
...
|
...
|
@@ -57,28 +57,28 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
},
|
|
|
|
),
|
|
|
|
body: WillPopScope(
|
|
|
|
onWillPop: () {
|
|
|
|
EventBus().emit('changeStatusColor');
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(child: Consumer<MenuManageProvider>(
|
|
|
|
builder: (context, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () {
|
|
|
|
// offset = 0;
|
|
|
|
// getMessage(showLoading: true);
|
|
|
|
// _couponNetworkData();
|
|
|
|
},
|
|
|
|
emptyMsg: "菜品是空哒,快点击分类管理添加分类和菜品吧",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return ListView.builder(
|
|
|
|
onWillPop: () {
|
|
|
|
EventBus().emit('changeStatusColor');
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
child: Consumer<MenuManageProvider>(
|
|
|
|
builder: (context, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () {
|
|
|
|
// offset = 0;
|
|
|
|
// getMessage(showLoading: true);
|
|
|
|
// _couponNetworkData();
|
|
|
|
},
|
|
|
|
emptyMsg: "菜品是空哒,快点击分类管理添加分类和菜品吧",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(40)),
|
|
...
|
...
|
@@ -215,65 +215,68 @@ class _MenuManagePageState extends State<MenuManagePage> { |
|
|
|
// // getMessage(showLoading: false);
|
|
|
|
// },
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
// VEmptyView(20),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
0,
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '添加\n菜品',
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
height: ScreenUtil().setWidth(120),
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
radius: ScreenUtil().setWidth(60),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
0,
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类\n管理',
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
height: ScreenUtil().setWidth(120),
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
radius: ScreenUtil().setWidth(60),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
})),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
model.pageState == PageState.Empty
|
|
|
|
? SizedBox()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
0,
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goCouponEditPage(
|
|
|
|
context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '添加\n菜品',
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
height: ScreenUtil().setWidth(120),
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
radius: ScreenUtil().setWidth(60),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
0,
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
child: RoundButton(
|
|
|
|
onPressed: () async {
|
|
|
|
bool needRefresh =
|
|
|
|
await NavigatorUtil.goCouponEditPage(context);
|
|
|
|
print(needRefresh);
|
|
|
|
if (needRefresh != null && needRefresh) {
|
|
|
|
//刷新页面数据
|
|
|
|
// _controller.callRefresh();
|
|
|
|
// _couponNetworkData();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
text: '分类\n管理',
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
height: ScreenUtil().setWidth(120),
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
radius: ScreenUtil().setWidth(60),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
// VEmptyView(20),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|