|
...
|
...
|
@@ -104,233 +104,283 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { |
|
|
|
Widget build(BuildContext context) {
|
|
|
|
myModel = Provider.of<MyModel>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
backgroundColor: MyColours.color_199095, //把appbar的背景色改成透明
|
|
|
|
elevation: 0, //appbar的阴影
|
|
|
|
centerTitle: true, // 标题居中
|
|
|
|
title: Text(
|
|
|
|
'我的',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_fefefe,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
decoration: TextDecoration.none),
|
|
|
|
)),
|
|
|
|
body: Consumer<UserModel>(
|
|
|
|
builder: (BuildContext context, UserModel model, Widget child) {
|
|
|
|
return MediaQuery.removePadding(
|
|
|
|
context: context,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
Stack(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setHeight(200),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
VEmptyView(38),
|
|
|
|
Text(
|
|
|
|
model.user.sellername,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(36)),
|
|
|
|
),
|
|
|
|
VEmptyView(38),
|
|
|
|
Text(
|
|
|
|
model.user.account +
|
|
|
|
" | " +
|
|
|
|
model.user.role_name,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
MyItem(
|
|
|
|
title: "短信管理",
|
|
|
|
content: myModel.smsInfo.isNotEmpty
|
|
|
|
? '剩余${myModel.smsInfo}条'
|
|
|
|
: '',
|
|
|
|
callback: () {
|
|
|
|
Utils.goMiniProgramZm(context, "setting/sms");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "包间类型置满管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
Utils.goMiniProgramZm(context, "roomtype/roomtype");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "可订时段管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goBookTimeSetPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "接单时间管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goReceiveOrdersTimeSetPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "常用备注管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goRemarkManagerPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
MyItem(
|
|
|
|
title: "联系客服",
|
|
|
|
content: "09:00~21:00",
|
|
|
|
callback: () {
|
|
|
|
Utils.goPhone("400-000-9690");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "帮助与反馈",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
Utils.goHelp(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(double.infinity, ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: checkUpdate,
|
|
|
|
child: Container(
|
|
|
|
appBar: AppBar(
|
|
|
|
backgroundColor: MyColours.color_199095, //把appbar的背景色改成透明
|
|
|
|
elevation: 0, //appbar的阴影
|
|
|
|
centerTitle: true, // 标题居中
|
|
|
|
title: Text(
|
|
|
|
'我的',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_fefefe,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
decoration: TextDecoration.none),
|
|
|
|
)),
|
|
|
|
body: NestedScrollView(
|
|
|
|
// controller: _scrollViewController,
|
|
|
|
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
|
|
|
return <Widget>[
|
|
|
|
SliverAppBar(
|
|
|
|
pinned: false,
|
|
|
|
floating: false,
|
|
|
|
expandedHeight: ScreenUtil().setWidth(200),
|
|
|
|
flexibleSpace: FlexibleSpaceBar(
|
|
|
|
collapseMode: CollapseMode.pin,
|
|
|
|
background: Consumer<UserModel>(builder:
|
|
|
|
(BuildContext context, UserModel model, Widget child) {
|
|
|
|
return Stack(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setHeight(122),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
"版本更新",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
newVersion
|
|
|
|
? Container(
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
height: ScreenUtil().setWidth(34),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_E14553,
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(
|
|
|
|
ScreenUtil().setWidth(6))),
|
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
"发现新版本",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_ffffff),
|
|
|
|
),
|
|
|
|
height: ScreenUtil().setHeight(200),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
VEmptyView(38),
|
|
|
|
Text(
|
|
|
|
model.user.sellername,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(36)),
|
|
|
|
),
|
|
|
|
VEmptyView(38),
|
|
|
|
Text(
|
|
|
|
model.user.account +
|
|
|
|
" | " +
|
|
|
|
model.user.role_name,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
];
|
|
|
|
}, body: Consumer<UserModel>(
|
|
|
|
builder: (BuildContext context, UserModel model, Widget child) {
|
|
|
|
return MediaQuery.removePadding(
|
|
|
|
context: context,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
// Stack(
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: ScreenUtil().setHeight(200),
|
|
|
|
// alignment: Alignment.centerLeft,
|
|
|
|
// color: MyColours.color_199095,
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.only(left: ScreenUtil().setWidth(40)),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(38),
|
|
|
|
// Text(
|
|
|
|
// model.user.sellername,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// fontSize: ScreenUtil().setSp(36)),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(38),
|
|
|
|
// Text(
|
|
|
|
// model.user.account +
|
|
|
|
// " | " +
|
|
|
|
// model.user.role_name,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// fontSize: ScreenUtil().setSp(30)),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ))
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
VEmptyView(40),
|
|
|
|
MyItem(
|
|
|
|
title: "短信管理",
|
|
|
|
content:
|
|
|
|
myModel.smsInfo.isNotEmpty ? '剩余${myModel.smsInfo}条' : '',
|
|
|
|
callback: () {
|
|
|
|
Utils.goMiniProgramZm(context, "setting/sms");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "包间类型置满管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
Utils.goMiniProgramZm(context, "roomtype/roomtype");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "可订时段管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goBookTimeSetPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "接单时间管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goReceiveOrdersTimeSetPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "常用备注管理",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
NavigatorUtil.goRemarkManagerPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
MyItem(
|
|
|
|
title: "联系客服",
|
|
|
|
content: "09:00~21:00",
|
|
|
|
callback: () {
|
|
|
|
Utils.goPhone("400-000-9690");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
MyItem(
|
|
|
|
title: "帮助与反馈",
|
|
|
|
content: "",
|
|
|
|
callback: () {
|
|
|
|
Utils.goHelp(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
MyDivider(double.infinity, ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: checkUpdate,
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setHeight(122),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
"版本更新",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
newVersion
|
|
|
|
? Container(
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
height: ScreenUtil().setWidth(34),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_E14553,
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(
|
|
|
|
ScreenUtil().setWidth(6))),
|
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
"发现新版本",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_ffffff),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Text(
|
|
|
|
cur_version,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_666666),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Image.asset(
|
|
|
|
"assets/arr_right_gray.png",
|
|
|
|
width: ScreenUtil().setWidth(14),
|
|
|
|
height: ScreenUtil().setWidth(22),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Text(
|
|
|
|
cur_version,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_666666),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Image.asset(
|
|
|
|
"assets/arr_right_gray.png",
|
|
|
|
width: ScreenUtil().setWidth(14),
|
|
|
|
height: ScreenUtil().setWidth(22),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
Consumer<UserModel>(
|
|
|
|
builder:
|
|
|
|
(BuildContext context, UserModel model, Widget child) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
model.showLoginOutDialog(context);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setHeight(122),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Center(
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
"assets/icon_exist.png",
|
|
|
|
width: ScreenUtil().setWidth(30),
|
|
|
|
height: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
HEmptyView(18),
|
|
|
|
Text("退出登录",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setHeight(1),
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
Consumer<UserModel>(
|
|
|
|
builder:
|
|
|
|
(BuildContext context, UserModel model, Widget child) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
model.showLoginOutDialog(context);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setHeight(122),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Center(
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Image.asset(
|
|
|
|
"assets/icon_exist.png",
|
|
|
|
width: ScreenUtil().setWidth(30),
|
|
|
|
height: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
HEmptyView(18),
|
|
|
|
Text("退出登录",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
}));
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
})),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|