Commit 9907a8c2ef006c36003c73a128bc3679147b1bd7

Authored by “gaiyaguang”
1 parent eeaa715f

部分UI

1.2 KB | W: | H:

1.8 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.73 KB | W: | H:

1.93 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.58 KB | W: | H:

2.23 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.92 KB | W: | H:

2.17 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

2.22 KB | W: | H:

2.65 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.81 KB | W: | H:

1.11 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

1.92 KB | W: | H:

1.21 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
c8424a7225c7d158c8fb32a172a5bf4c
\ No newline at end of file
7babc7873f8d177769b987ba4c6c2911
\ No newline at end of file
... ...
... ... @@ -140,4 +140,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
COCOAPODS: 1.9.1
COCOAPODS: 1.9.3
... ...
... ... @@ -347,7 +347,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
CommonButton(
content: "安排包间",
width: 669,
height: 76,
height: 84,
fontSize: 34,
onPress: () async {
Map map = await NavigatorUtil
... ... @@ -366,12 +366,12 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
height: ScreenUtil().setHeight(84),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
ScreenUtil().setWidth(10)),
),
child: Row(
crossAxisAlignment:
... ...
... ... @@ -719,7 +719,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(1)),
width: ScreenUtil().setWidth(2)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_6AB6B9,
... ... @@ -773,6 +773,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> {
height: 84,
fontSize: 34,
content: "确定修改",
fontWeight: FontWeight.bold,
state: 2,
onPress: () async {
String name =
... ...
... ... @@ -33,7 +33,7 @@ class NotebookDetailPage extends StatefulWidget {
final String mid;
final bool fromNotify;
NotebookDetailPage(this.rid, {this.fromNotify=false, this.mid});
NotebookDetailPage(this.rid, {this.fromNotify = false, this.mid});
@override
State<StatefulWidget> createState() {
... ... @@ -89,16 +89,17 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
}
//设置消息状态
setMessageStatus(){
if(widget.mid==null||widget.mid.isEmpty)return;
setMessageStatus() {
if (widget.mid == null || widget.mid.isEmpty) return;
bus.emit("remove_untreated_message", widget.mid);
Map<String, String> params = {
"sid": Provider.of<UserModel>(context, listen: false).user.sellerid,
"id": widget.mid,
"status": "is_handle"
};
MessageDialogModel messageDialogModel=Provider.of<MessageDialogModel>(context,listen: false);
messageDialogModel.setMessageStatus(context,params);
MessageDialogModel messageDialogModel =
Provider.of<MessageDialogModel>(context, listen: false);
messageDialogModel.setMessageStatus(context, params);
}
@override
... ... @@ -114,7 +115,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
setState(() {
cusmanText = detailEntity.cusman.isEmpty ? "请选择" : detailEntity.cusman;
});
if(detailEntity.status == "4"){
if (detailEntity.status == "4") {
setMessageStatus();
}
}
... ... @@ -641,14 +642,17 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
top: BorderSide(
color: MyColours.color_dbe3e3,
width: ScreenUtil().setWidth(1)))),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setHeight(40),
ScreenUtil().setHeight(40),
ScreenUtil().setHeight(40),
ScreenUtil().setHeight(0)),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20)),
child: CommonButton(
content: "通知客户",
width: 669,
height: 80,
height: 84,
fontSize: 34,
onPress: () {
DialogUtil.showShareDialog(context)?.then((value) {
... ... @@ -687,7 +691,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(80),
height: ScreenUtil().setWidth(84),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
... ... @@ -695,29 +699,30 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(5)),
BorderRadius.circular(ScreenUtil().setWidth(10)),
),
// child: Text('fff'),
child: Material(
color: Colors.transparent,
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
_showCancelWidget(context);
}, '取消预订')),
],
)),
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}, '变更预订')),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
_showCancelWidget(context);
}, '取消预订')),
],
)),
),
),
VEmptyView(ScreenUtil().setWidth(60))
... ...
... ... @@ -41,8 +41,8 @@ class HomePage extends StatefulWidget {
class HomePageState extends State<HomePage> with WidgetsBindingObserver {
List<Widget> pages = List<Widget>();
int _currIndex = 1;
Color _activeColor = MyColours.color_2bb5b7;
Color _defaultColor = MyColours.color_bfbfbf;
Color _activeColor = MyColours.color_199095;
Color _defaultColor = MyColours.color_999999;
Timer timer;
... ... @@ -58,19 +58,19 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
pages
..add(ChangeNotifierProvider<MessageModel>(
create: (_) => MessageModel(),
child: MessagePage(),
child: SafeArea(child: MessagePage()),
))
..add(ChangeNotifierProvider<NoteBookModel>(
create: (_) => NoteBookModel(),
child: NoteBookPage(),
child: SafeArea(child: NoteBookPage()),
))
..add(ChangeNotifierProvider<MyModel>(
create: (_) => MyModel(),
child: MyPage(),
));
WidgetsBinding.instance.addPostFrameCallback((_){
WidgetsBinding.instance.addPostFrameCallback((_) {
initPlatformState();
if(widget.initialIndex==0)return;
if (widget.initialIndex == 0) return;
_getIntent();
Future.delayed(Duration(milliseconds: 30000), () {
ContactModel.getInstance().uploadLocalContact(context);
... ... @@ -86,9 +86,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
//获取点击通知栏的自定义参数
_getIntent() async {
Map param = await Tools().getIntent();
Map notifyParam=param;
if(Platform.isIOS&&param!=null){
notifyParam=json.decode(param['custom'].toString());
Map notifyParam = param;
if (Platform.isIOS && param != null) {
notifyParam = json.decode(param['custom'].toString());
}
if (notifyParam != null && notifyParam.isNotEmpty) {
switch (notifyParam["messageType"]) {
... ... @@ -98,11 +98,11 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
fromNotify: true);
break;
case "11":
NavigatorUtil.goNotebookDetailPage(context, notifyParam['rid'],mid:notifyParam['mid'],
fromNotify: true);
NavigatorUtil.goNotebookDetailPage(context, notifyParam['rid'],
mid: notifyParam['mid'], fromNotify: true);
break;
}
}else{
} else {
getUntreatedMessage();
}
}
... ... @@ -147,6 +147,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
},
xgPushDidSetBadge: (String msg) async {
print("flutter xgPushDidSetBadge: $msg");
/// 在此可设置应用角标
XgFlutterPlugin().setAppBadge(0);
},
... ... @@ -163,9 +164,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
print("flutter xgPushDidClearAllIdentifiers: $msg");
},
xgPushClickAction: (Map<String, dynamic> msg) async {
if(Platform.isIOS&&msg!=null&&msg['custom']!=null){
Map custom=json.decode(msg['custom'].toString());
switch(custom["messageType"].toString()){
if (Platform.isIOS && msg != null && msg['custom'] != null) {
Map custom = json.decode(msg['custom'].toString());
switch (custom["messageType"].toString()) {
case "10":
NavigatorUtil.goHandleOnlinePage(
context, custom["rid"].toString(), custom['mid'].toString(),
... ... @@ -173,8 +174,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
break;
case "11":
NavigatorUtil.goNotebookDetailPage(
context, custom['rid'].toString(),mid:custom['mid'].toString(),
fromNotify: true);
context, custom['rid'].toString(),
mid: custom['mid'].toString(), fromNotify: true);
break;
}
}
... ... @@ -252,7 +253,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
print('inactive');
break;
case AppLifecycleState.paused:
print('paused');
print('paused');
break;
case AppLifecycleState.detached:
print('detached');
... ... @@ -286,7 +287,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
// TODO: implement build
return new Scaffold(
bottomNavigationBar: BottomNavigationBar(
iconSize: ScreenUtil().setWidth(70),
iconSize: ScreenUtil().setWidth(40),
unselectedFontSize: ScreenUtil().setSp(22),
selectedFontSize: ScreenUtil().setSp(22),
backgroundColor: MyColours.color_ffffff,
... ... @@ -294,13 +295,13 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
BottomNavigationBarItem(
icon: Image(
image: AssetImage("assets/message_default.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(46),
),
activeIcon: Image(
image: AssetImage("assets/message_selected.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(46),
),
title: Text(
"消息中心",
... ... @@ -312,16 +313,16 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
BottomNavigationBarItem(
icon: Image(
image: AssetImage("assets/notebook_default.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(44),
height: ScreenUtil().setWidth(44),
),
activeIcon: Image(
image: AssetImage("assets/notebook_selected.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(44),
height: ScreenUtil().setWidth(44),
),
title: Text(
"预定本",
"已预订",
style: TextStyle(
color: _currIndex == 1 ? _activeColor : _defaultColor,
fontSize: ScreenUtil().setSp(22)),
... ... @@ -330,13 +331,13 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
BottomNavigationBarItem(
icon: Image(
image: AssetImage("assets/my_default.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(44),
height: ScreenUtil().setWidth(44),
),
activeIcon: Image(
image: AssetImage("assets/my_selected.png"),
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setWidth(70),
width: ScreenUtil().setWidth(44),
height: ScreenUtil().setWidth(44),
),
title: Text(
"我的",
... ... @@ -354,14 +355,87 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
_currIndex = index;
});
if (_currIndex == 2) {
Utils.changeStatusColor(color: MyColours.color_2bb5b7);
Utils.changeStatusColor(color: MyColours.color_199095);
} else {
Utils.changeStatusColor(color: MyColours.color_ffffff);
}
}
},
),
body: SafeArea(child: pages[_currIndex]),
// bottomNavigationBar: BottomAppBar(
// shape: CircularNotchedRectangle(),
// child: Container(
// height: ScreenUtil().setWidth(98),
// // padding: EdgeInsets.fromLTRB(0, 12, 0, 8),
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// GestureDetector(
// onTap: () {
// // onTap(0);
// },
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Image(
// image: AssetImage("assets/my_selected.png"),
// width: ScreenUtil().setWidth(44),
// height: ScreenUtil().setWidth(44),
// ),
// Text(
// "我的",
// style: TextStyle(
// color: _currIndex == 2
// ? _activeColor
// : _defaultColor,
// fontSize: ScreenUtil().setSp(22)),
// )
// ],
// )),
// GestureDetector(
// onTap: () {
// // onTap(1);
// },
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Image(
// image: AssetImage("assets/my_selected.png"),
// width: ScreenUtil().setWidth(44),
// height: ScreenUtil().setWidth(44),
// ),
// Text(
// "我的",
// style: TextStyle(
// color: _currIndex == 2
// ? _activeColor
// : _defaultColor,
// fontSize: ScreenUtil().setSp(22)),
// )
// ],
// )),
// Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Image(
// image: AssetImage("assets/my_selected.png"),
// width: ScreenUtil().setWidth(44),
// height: ScreenUtil().setWidth(44),
// ),
// Text(
// "我的",
// style: TextStyle(
// color:
// _currIndex == 2 ? _activeColor : _defaultColor,
// fontSize: ScreenUtil().setSp(22)),
// )
// ],
// )
// ])),
// ),
body: pages[_currIndex],
);
}
... ...
... ... @@ -37,11 +37,11 @@ class MessagePageState extends State<MessagePage>{
Tab(text: "未处理",),
Tab(text: "已处理",)
],
indicatorColor: MyColours.color_2bb5b7,
indicatorColor: MyColours.color_199095,
indicatorSize: TabBarIndicatorSize.label,
indicatorWeight: ScreenUtil().setHeight(4.0),
labelColor: MyColours.color_2bb5b7,
unselectedLabelColor: MyColours.color_353535,
labelColor: MyColours.color_199095,
unselectedLabelColor: MyColours.color_999999,
labelStyle: TextStyle(fontSize: ScreenUtil().setSp(32),fontWeight: FontWeight.bold),
),
),
... ... @@ -61,4 +61,4 @@ class MessagePageState extends State<MessagePage>{
),
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -108,9 +108,10 @@ class MessageItem extends StatelessWidget {
child:Offstage(
offstage: isTreated?true:false,
child: CommonButton(
width: 160,
height: 48,
fontSize: 28,
width: 152,
height: 50,
fontSize: 30,
fontWeight: FontWeight.bold,
content:message.message_type=="10"?"立即处理":"立即查看",
state: 1,
onPress: () {
... ...
... ... @@ -11,7 +11,7 @@ import 'package:one_key/widgets/my_item.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
class MyPage extends StatefulWidget{
class MyPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
// TODO: implement createState
... ... @@ -19,30 +19,201 @@ class MyPage extends StatefulWidget{
}
}
class MyPageState extends State<MyPage>{
String cur_version="";
bool newVersion=false;
class MyPageState extends State<MyPage> {
String cur_version = "";
bool newVersion = false;
@override
void initState() {
// TODO: implement initState
super.initState();
Utils.getCurrVersion().then((version){
Utils.getCurrVersion().then((version) {
setState(() {
cur_version="v"+version;
cur_version = "v" + version;
});
});
}
//检查版本更新
checkUpdate(){
UpdateModel updateModel=new UpdateModel();
checkUpdate() {
UpdateModel updateModel = new UpdateModel();
updateModel.checkUpdate(context);
}
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: ScreenUtil().setHeight(242+121)),
child: Column(
children: <Widget>[
VEmptyView(44),
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),
)
],
),
),
),
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),
))
],
),
),
),
);
},
)
],
)),
Container(
width: double.infinity,
height: ScreenUtil().setHeight(242+121),
alignment: Alignment.centerLeft,
color: MyColours.color_199095,
child: Scaffold(
backgroundColor: Colors.transparent, //把scaffold的背景色改成透明
appBar: AppBar(
backgroundColor: Colors.transparent, //把appbar的背景色改成透明
elevation: 0, //appbar的阴影
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 Padding(
padding:
EdgeInsets.only(left: ScreenUtil().setWidth(40)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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)),
),
],
));
},
)))
],
);
// TODO: implement build
return Container(
width: double.infinity,
... ... @@ -50,90 +221,155 @@ class MyPageState extends State<MyPage>{
color: MyColours.color_f5f5f5,
child: Column(
children: <Widget>[
MyAppBar("我的",showBack: false,backgroundColor: MyColours.color_2bb5b7,fontColor: MyColours.color_fefefe,),
MyAppBar(
"我的",
showBack: false,
backgroundColor: MyColours.color_199095,
fontColor: MyColours.color_fefefe,
),
Container(
width: double.infinity,
height: ScreenUtil().setHeight(242),
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: ScreenUtil().setWidth(40)),
color: MyColours.color_2bb5b7,
child: Consumer<UserModel>(builder: (BuildContext context,UserModel model,Widget child){
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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)),),
],
);
},)
),
width: double.infinity,
height: ScreenUtil().setHeight(242),
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: ScreenUtil().setWidth(40)),
color: MyColours.color_199095,
child: Consumer<UserModel>(
builder: (BuildContext context, UserModel model, Widget child) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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(44),
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),
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)),
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),),
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),),
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),)
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,),
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_2bb5b7,fontSize: ScreenUtil().setSp(34),))
],
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),
))
],
),
),
),
),
);
},)
);
},
)
],
),
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -44,7 +44,7 @@ class NotebookItemState extends State<NoteBookItem> {
return Container(
width: double.infinity,
height: ScreenUtil().setHeight(110),
height: ScreenUtil().setWidth(120),
color: (widget.index % 2 == 0)
? MyColours.color_f7fdfd
: MyColours.color_ffffff,
... ... @@ -61,9 +61,11 @@ class NotebookItemState extends State<NoteBookItem> {
width: ScreenUtil().setWidth(171),
alignment: Alignment.center,
child: Text(
notebook.tableinfoStr,
notebook.tableinfoStr?.trim(),
style: TextStyle(
color: textColor, fontSize: ScreenUtil().setSp(28)),
color: textColor,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
MyDivider(
... ... @@ -80,13 +82,17 @@ class NotebookItemState extends State<NoteBookItem> {
Text(
notebook.rnameStr,
style: TextStyle(
color: textColor, fontSize: ScreenUtil().setSp(28)),
color: textColor,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
VEmptyView(10),
Text(
notebook.phoneStr,
style: TextStyle(
color: textColor, fontSize: ScreenUtil().setSp(22)),
color: textColor,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(26)),
)
],
),
... ... @@ -102,7 +108,9 @@ class NotebookItemState extends State<NoteBookItem> {
child: Text(
notebook.ddateStr,
style: TextStyle(
color: textColor, fontSize: ScreenUtil().setSp(28)),
color: textColor,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
],
... ... @@ -126,7 +134,8 @@ class NotebookItemState extends State<NoteBookItem> {
notebook.status == "6")
? MyColours.color_bfbfbf
: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(28)),
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(30)),
),
),
),
... ...
... ... @@ -65,8 +65,9 @@ class NoteBookPageState extends State<NoteBookPage> {
_initTime() {
dateTime = DateTime.now();
dateText = Utils.addZeroNumber(dateTime.month) +
"-" +
"月" +
Utils.addZeroNumber(dateTime.day) +
"日" +
" 今天";
morning =
userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
... ... @@ -193,7 +194,7 @@ class NoteBookPageState extends State<NoteBookPage> {
"桌号",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(28)),
),
),
MyDivider(
... ... @@ -208,7 +209,7 @@ class NoteBookPageState extends State<NoteBookPage> {
"用户姓名",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(28)),
),
),
MyDivider(
... ... @@ -223,7 +224,7 @@ class NoteBookPageState extends State<NoteBookPage> {
"时间",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(28)),
),
),
MyDivider(
... ... @@ -238,7 +239,7 @@ class NoteBookPageState extends State<NoteBookPage> {
"操作",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
fontSize: ScreenUtil().setSp(28)),
),
),
],
... ... @@ -251,8 +252,10 @@ class NoteBookPageState extends State<NoteBookPage> {
if (Utils.isOneDay(day, dateTime)) return; //日期没变
setState(() {
DateTime dateNow = DateTime.now();
dateText =
Utils.addZeroNumber(day.month) + "-" + Utils.addZeroNumber(day.day);
dateText = Utils.addZeroNumber(day.month) +
"月" +
Utils.addZeroNumber(day.day) +
"日";
if (Utils.isOneDay(day, dateNow)) {
dateText += " 今天";
} else if (Utils.isOneDay(day, dateNow.add(Duration(days: 1)))) {
... ... @@ -284,7 +287,7 @@ class NoteBookPageState extends State<NoteBookPage> {
Container(
color: MyColours.color_ffffff,
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(11)),
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(16)),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
... ... @@ -299,84 +302,90 @@ class NoteBookPageState extends State<NoteBookPage> {
}
});
},
child: Text(
dateText,
style: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(32)),
child: Container(
child: Text(
dateText,
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(34)),
),
),
),
),
),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(72),
color: MyColours.color_ededed,
ScreenUtil().setHeight(68),
color: MyColours.color_E0E0E0,
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Offstage(
offstage: morning == "00:00-00:00" ? true : false,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10)),
child: CommonButton(
content: "早市",
state: currTimeIndex == 1 ? 1 : 0,
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {
if (currTimeIndex == 1) return;
setState(() {
currTimeIndex = 1;
});
_getReserveList();
},
))),
Offstage(
offstage: noon == "00:00-00:00" ? true : false,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10)),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(30)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Offstage(
offstage: morning == "00:00-00:00" ? true : false,
child: Padding(
padding: EdgeInsets.only(
right: ScreenUtil().setWidth(18)),
child: CommonButton(
content: "早市",
state: currTimeIndex == 1 ? 1 : 0,
width: 92,
height: 48,
fontSize: 32,
onPress: () {
if (currTimeIndex == 1) return;
setState(() {
currTimeIndex = 1;
});
_getReserveList();
},
))),
Offstage(
offstage: noon == "00:00-00:00" ? true : false,
child: Padding(
padding: EdgeInsets.only(
right: ScreenUtil().setWidth(18)),
child: CommonButton(
content: "午市",
state: currTimeIndex == 2 ? 1 : 0,
width: 92,
height: 48,
fontSize: 32,
onPress: () {
if (currTimeIndex == 2) return;
setState(() {
currTimeIndex = 2;
});
_getReserveList();
},
))),
Offstage(
offstage: night == "00:00-00:00" ? true : false,
child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(10)),
child: CommonButton(
content: "午市",
state: currTimeIndex == 2 ? 1 : 0,
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {
if (currTimeIndex == 2) return;
setState(() {
currTimeIndex = 2;
});
_getReserveList();
},
))),
Offstage(
offstage: night == "00:00-00:00" ? true : false,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10)),
child: CommonButton(
content: "晚市",
state: currTimeIndex == 3 ? 1 : 0,
width: ScreenUtil().setWidth(180),
height: ScreenUtil().setHeight(100),
fontSize: 32,
onPress: () {
if (currTimeIndex == 3) return;
setState(() {
currTimeIndex = 3;
});
_getReserveList();
},
)),
),
],
content: "晚市",
state: currTimeIndex == 3 ? 1 : 0,
width: 92,
height: 48,
fontSize: 32,
onPress: () {
if (currTimeIndex == 3) return;
setState(() {
currTimeIndex = 3;
});
_getReserveList();
},
)),
),
],
),
),
)
],
... ... @@ -394,8 +403,8 @@ class NoteBookPageState extends State<NoteBookPage> {
child: Text(
total,
style: TextStyle(
color: MyColours.color_131313,
fontSize: ScreenUtil().setSp(24)),
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(26)),
),
);
},
... ...
... ... @@ -98,7 +98,7 @@ class SmsPageState extends State<SmsPage>{
children: <Widget>[
CommonButton(
width: 672,
height: 76,
height: 84,
fontSize: 34,
content: "直接发送",
state: 1,
... ... @@ -109,7 +109,7 @@ class SmsPageState extends State<SmsPage>{
VEmptyView(20),
CommonButton(
width: 672,
height: 76,
height: 84,
fontSize: 34,
content: "复制短信",
state: 0,
... ... @@ -127,4 +127,4 @@ class SmsPageState extends State<SmsPage>{
);
}
}
\ No newline at end of file
}
... ...
... ... @@ -260,7 +260,7 @@ class SelectTablePageState extends State<SelectTablePage> {
child: CommonButton(
content: "确定",
width: 600,
height: 76,
height: 84,
fontSize: 34,
state: 1,
onPress: () {
... ...
... ... @@ -43,4 +43,5 @@ class MyColours {
static const Color color_F1F0F4 = Color(0xffF1F0F4);
static const Color color_6AB6B9 = Color(0xff6AB6B9);
static const Color color_74BBBE = Color(0xff74BBBE);
static const Color color_E0E0E0 = Color(0xffE0E0E0);
}
... ...
... ... @@ -9,15 +9,16 @@ class CommonButton extends StatelessWidget {
final double height;
final double fontSize;
final int state; //-1 不可用 0 默认 1 选中
final FontWeight fontWeight;
CommonButton({
@required this.onPress,
@required this.content,
this.state = 0,
this.width = 250,
this.height = 50,
this.fontSize = 18,
});
CommonButton(
{@required this.onPress,
@required this.content,
this.state = 0,
this.width = 250,
this.height = 50,
this.fontSize = 18,
this.fontWeight = FontWeight.normal});
@override
Widget build(BuildContext context) {
... ... @@ -27,7 +28,7 @@ class CommonButton extends StatelessWidget {
case -1:
boxDecoration = BoxDecoration(
color: MyColours.color_d8d8d8,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_ffffff;
break;
... ... @@ -35,38 +36,39 @@ class CommonButton extends StatelessWidget {
boxDecoration = BoxDecoration(
border: Border.all(
color: MyColours.color_199095, width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_199095;
break;
case 1:
boxDecoration = BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xff199095), Color(0xff36C3C7)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
color: MyColours.color_199095,
// gradient: LinearGradient(
// colors: [Color(0xff199095), Color(0xff36C3C7)],
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_fefefe;
break;
case 2:
boxDecoration = BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_fefefe;
break;
case -2:
boxDecoration = BoxDecoration(
color: MyColours.color_74BBBE,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_fefefe;
break;
default:
boxDecoration = BoxDecoration(
border: Border.all(color: MyColours.color_199095),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10)),
);
fontColor = MyColours.color_fefefe;
break;
... ... @@ -85,7 +87,9 @@ class CommonButton extends StatelessWidget {
child: Text(
content,
style: TextStyle(
color: fontColor, fontSize: ScreenUtil().setSp(fontSize)),
color: fontColor,
fontWeight: fontWeight,
fontSize: ScreenUtil().setSp(fontSize)),
),
),
),
... ...