Commit 1e164fb09c133ef5ae4b54f5637ea9053a59fb16

Authored by wdn127929
1 parent b585abcf

我的页面过期置灰

@@ -17,9 +17,9 @@ if (flutterRoot == null) { @@ -17,9 +17,9 @@ if (flutterRoot == null) {
17 17
18 18
19 19
20 -def flutterVersionCode = "499" 20 +def flutterVersionCode = "501"
21 if (flutterVersionCode == null) { 21 if (flutterVersionCode == null) {
22 - flutterVersionCode = '499' 22 + flutterVersionCode = '501'
23 23
24 24
25 } 25 }
@@ -28,9 +28,9 @@ if (flutterVersionCode == null) { @@ -28,9 +28,9 @@ if (flutterVersionCode == null) {
28 28
29 29
30 30
31 -def flutterVersionName = "4.9.9" 31 +def flutterVersionName = "5.0.1"
32 if (flutterVersionName == null) { 32 if (flutterVersionName == null) {
33 - flutterVersionName = '4.9.9' 33 + flutterVersionName = '5.0.1'
34 34
35 } 35 }
36 36
@@ -510,7 +510,7 @@ @@ -510,7 +510,7 @@
510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
511 CODE_SIGN_IDENTITY = "Apple Development"; 511 CODE_SIGN_IDENTITY = "Apple Development";
512 CODE_SIGN_STYLE = Automatic; 512 CODE_SIGN_STYLE = Automatic;
513 - CURRENT_PROJECT_VERSION = 499; 513 + CURRENT_PROJECT_VERSION = 500;
514 DEVELOPMENT_TEAM = 8J59HM8B82; 514 DEVELOPMENT_TEAM = 8J59HM8B82;
515 ENABLE_BITCODE = NO; 515 ENABLE_BITCODE = NO;
516 FLUTTER_BUILD_MODE = release; 516 FLUTTER_BUILD_MODE = release;
@@ -525,7 +525,7 @@ @@ -525,7 +525,7 @@
525 "$(inherited)", 525 "$(inherited)",
526 "$(PROJECT_DIR)/Flutter", 526 "$(PROJECT_DIR)/Flutter",
527 ); 527 );
528 - MARKETING_VERSION = 4.9.9; 528 + MARKETING_VERSION = 5.0.0;
529 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 529 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
530 PRODUCT_NAME = Runner; 530 PRODUCT_NAME = Runner;
531 PROVISIONING_PROFILE_SPECIFIER = ""; 531 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -656,7 +656,7 @@ @@ -656,7 +656,7 @@
656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
657 CODE_SIGN_IDENTITY = "Apple Development"; 657 CODE_SIGN_IDENTITY = "Apple Development";
658 CODE_SIGN_STYLE = Automatic; 658 CODE_SIGN_STYLE = Automatic;
659 - CURRENT_PROJECT_VERSION = 499; 659 + CURRENT_PROJECT_VERSION = 500;
660 DEVELOPMENT_TEAM = 8J59HM8B82; 660 DEVELOPMENT_TEAM = 8J59HM8B82;
661 ENABLE_BITCODE = NO; 661 ENABLE_BITCODE = NO;
662 FLUTTER_BUILD_MODE = release; 662 FLUTTER_BUILD_MODE = release;
@@ -671,7 +671,7 @@ @@ -671,7 +671,7 @@
671 "$(inherited)", 671 "$(inherited)",
672 "$(PROJECT_DIR)/Flutter", 672 "$(PROJECT_DIR)/Flutter",
673 ); 673 );
674 - MARKETING_VERSION = 4.9.9; 674 + MARKETING_VERSION = 5.0.0;
675 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 675 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
676 PRODUCT_NAME = Runner; 676 PRODUCT_NAME = Runner;
677 PROVISIONING_PROFILE_SPECIFIER = ""; 677 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -692,7 +692,7 @@ @@ -692,7 +692,7 @@
692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
693 CODE_SIGN_IDENTITY = "Apple Development"; 693 CODE_SIGN_IDENTITY = "Apple Development";
694 CODE_SIGN_STYLE = Automatic; 694 CODE_SIGN_STYLE = Automatic;
695 - CURRENT_PROJECT_VERSION = 499; 695 + CURRENT_PROJECT_VERSION = 500;
696 DEVELOPMENT_TEAM = 8J59HM8B82; 696 DEVELOPMENT_TEAM = 8J59HM8B82;
697 ENABLE_BITCODE = NO; 697 ENABLE_BITCODE = NO;
698 FLUTTER_BUILD_MODE = release; 698 FLUTTER_BUILD_MODE = release;
@@ -707,7 +707,7 @@ @@ -707,7 +707,7 @@
707 "$(inherited)", 707 "$(inherited)",
708 "$(PROJECT_DIR)/Flutter", 708 "$(PROJECT_DIR)/Flutter",
709 ); 709 );
710 - MARKETING_VERSION = 4.9.9; 710 + MARKETING_VERSION = 5.0.0;
711 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 711 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
712 PRODUCT_NAME = Runner; 712 PRODUCT_NAME = Runner;
713 PROVISIONING_PROFILE_SPECIFIER = ""; 713 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -10,6 +10,10 @@ class Constant { @@ -10,6 +10,10 @@ class Constant {
10 // static const WXMiniProgramType wxMiniProgramType = 10 // static const WXMiniProgramType wxMiniProgramType =
11 // WXMiniProgramType.TEST; //开发版 11 // WXMiniProgramType.TEST; //开发版
12 12
  13 + // static const Map<String, List<String>> paidVersionsConfig = {
  14 + // '经理排菜': ['查看详情', '删除', '复用', '创建排菜'],
  15 + // };
  16 +
13 static const Map<String, List<String>> authorityConfig = { 17 static const Map<String, List<String>> authorityConfig = {
14 '充值短信': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'], 18 '充值短信': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
15 '有效期': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'], 19 '有效期': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
@@ -141,6 +141,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -141,6 +141,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
141 _currIndex = 4; 141 _currIndex = 4;
142 } 142 }
143 } 143 }
  144 +
144 _pageController = PageController(initialPage: _currIndex); 145 _pageController = PageController(initialPage: _currIndex);
145 pages 146 pages
146 // ..add(ChangeNotifierProvider<HomeEnterModel>( 147 // ..add(ChangeNotifierProvider<HomeEnterModel>(
@@ -53,7 +53,7 @@ class _FirstPageState extends State<FirstPage> { @@ -53,7 +53,7 @@ class _FirstPageState extends State<FirstPage> {
53 App.sp.setBool("isFirst", false); 53 App.sp.setBool("isFirst", false);
54 //进入应用 54 //进入应用
55 NavigatorUtil.goLoginPage(context); 55 NavigatorUtil.goLoginPage(context);
56 - FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e"); 56 + // FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
57 } 57 }
58 58
59 //初始化微信SDK 59 //初始化微信SDK
@@ -161,7 +161,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -161,7 +161,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
161 rechargeData = 161 rechargeData =
162 marketingCenterProvider.markDataModel.marketing.rechargeData; 162 marketingCenterProvider.markDataModel.marketing.rechargeData;
163 couponDataList = 163 couponDataList =
164 - marketingCenterProvider.markDataModel.marketing.couponDataList; 164 + marketingCenterProvider.markDataModel.marketing.couponDataList ?? [];
165 165
166 _uploadImageProvider.firstImage.qiniuUrl = 166 _uploadImageProvider.firstImage.qiniuUrl =
167 marketingCenterProvider.markDataModel.marketing.logo ?? null; 167 marketingCenterProvider.markDataModel.marketing.logo ?? null;
@@ -482,6 +482,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -482,6 +482,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
482 children: [ 482 children: [
483 InkWell( 483 InkWell(
484 onTap: () { 484 onTap: () {
  485 + if (outDay == '0') {
  486 + return;
  487 + }
485 if (Utils.getAuthority( 488 if (Utils.getAuthority(
486 context, '全店-月订单量')) { 489 context, '全店-月订单量')) {
487 NavigatorUtil.goMonthOrderPage( 490 NavigatorUtil.goMonthOrderPage(
@@ -550,6 +553,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -550,6 +553,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
550 ), 553 ),
551 InkWell( 554 InkWell(
552 onTap: () { 555 onTap: () {
  556 + if (outDay == '0') {
  557 + return;
  558 + }
553 if (Utils.getAuthority(context, '充值短信')) { 559 if (Utils.getAuthority(context, '充值短信')) {
554 NavigatorUtil.goSmsManagePage(context, 560 NavigatorUtil.goSmsManagePage(context,
555 smsInfoData: smsInfoData); 561 smsInfoData: smsInfoData);
@@ -590,16 +596,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -590,16 +596,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
590 RoundButton( 596 RoundButton(
591 text: '充值短信', 597 text: '充值短信',
592 gradientStart: 598 gradientStart:
593 - !Utils.getAuthority(  
594 - context, '充值短信') 599 + (!Utils.getAuthority(context,
  600 + '充值短信') ||
  601 + outDay == '0')
595 ? MyColours.color_999999 602 ? MyColours.color_999999
596 : MyColours.color_438E93, 603 : MyColours.color_438E93,
597 - gradientEnd: !Utils.getAuthority(  
598 - context, '充值短信') 604 + gradientEnd: (!Utils.getAuthority(
  605 + context, '充值短信') ||
  606 + outDay == '0')
599 ? MyColours.color_999999 607 ? MyColours.color_999999
600 : MyColours.color_438E93, 608 : MyColours.color_438E93,
601 - borderColor: !Utils.getAuthority(  
602 - context, '充值短信') 609 + borderColor: (!Utils.getAuthority(
  610 + context, '充值短信') ||
  611 + outDay == '0')
603 ? MyColours.color_999999 612 ? MyColours.color_999999
604 : MyColours.color_438E93, 613 : MyColours.color_438E93,
605 width: 614 width:
@@ -611,6 +620,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -611,6 +620,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
611 textColor: MyColours.color_ffffff, 620 textColor: MyColours.color_ffffff,
612 radius: ScreenUtil().setWidth(8), 621 radius: ScreenUtil().setWidth(8),
613 onPressed: () { 622 onPressed: () {
  623 + if (outDay == '0') {
  624 + return;
  625 + }
614 if (Utils.getAuthority( 626 if (Utils.getAuthority(
615 context, '充值短信')) { 627 context, '充值短信')) {
616 NavigatorUtil.goSmsManagePage( 628 NavigatorUtil.goSmsManagePage(
@@ -860,59 +872,85 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -860,59 +872,85 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
860 children: [ 872 children: [
861 InkWell( 873 InkWell(
862 onTap: () { 874 onTap: () {
  875 + if (outDay == '0') {
  876 + return;
  877 + }
  878 +
863 if (Utils.getAuthority(context, '个人信息')) { 879 if (Utils.getAuthority(context, '个人信息')) {
864 NavigatorUtil.goBaseInfoPage( 880 NavigatorUtil.goBaseInfoPage(
865 context, FromPage.FromPageMyPage); 881 context, FromPage.FromPageMyPage);
866 } 882 }
867 }, 883 },
868 child: _item( 884 child: _item(
869 - !Utils.getAuthority(context, '个人信息') 885 + !Utils.getAuthority(context, '个人信息') ||
  886 + outDay == '0'
870 ? Utils.getImgPath('grxx_un') 887 ? Utils.getImgPath('grxx_un')
871 : Utils.getImgPath('grxx'), 888 : Utils.getImgPath('grxx'),
872 '个人信息', 889 '个人信息',
873 - isRowLow: 890 + isRowLow: outDay == '0' ||
874 !Utils.getAuthority(context, '个人信息')), 891 !Utils.getAuthority(context, '个人信息')),
875 ), 892 ),
876 InkWell( 893 InkWell(
877 onTap: () { 894 onTap: () {
  895 + if (outDay == '0') {
  896 + return;
  897 + }
  898 +
878 if (Utils.getAuthority(context, '我的客情')) { 899 if (Utils.getAuthority(context, '我的客情')) {
879 NavigatorUtil.goMyCustomerPage(context); 900 NavigatorUtil.goMyCustomerPage(context);
880 } 901 }
881 }, 902 },
882 child: _item( 903 child: _item(
883 - !Utils.getAuthority(context, '我的客情') 904 + outDay == '0' ||
  905 + !Utils.getAuthority(
  906 + context, '我的客情')
884 ? Utils.getImgPath('wdkq_un') 907 ? Utils.getImgPath('wdkq_un')
885 : Utils.getImgPath('wdkq'), 908 : Utils.getImgPath('wdkq'),
886 '我的客情', 909 '我的客情',
887 - isRowLow: !Utils.getAuthority(  
888 - context, '我的客情'))), 910 + isRowLow: outDay == '0' ||
  911 + !Utils.getAuthority(
  912 + context, '我的客情'))),
889 InkWell( 913 InkWell(
890 onTap: () { 914 onTap: () {
  915 + if (outDay == '0') {
  916 + return;
  917 + }
  918 +
891 if (Utils.getAuthority(context, '优惠券')) { 919 if (Utils.getAuthority(context, '优惠券')) {
892 NavigatorUtil.goCouponPage(context); 920 NavigatorUtil.goCouponPage(context);
893 } 921 }
894 }, 922 },
895 child: _item( 923 child: _item(
896 - !Utils.getAuthority(context, '优惠券') 924 + outDay == '0' ||
  925 + !Utils.getAuthority(
  926 + context, '优惠券')
897 ? Utils.getImgPath('yhq_un') 927 ? Utils.getImgPath('yhq_un')
898 : Utils.getImgPath('yhq'), 928 : Utils.getImgPath('yhq'),
899 '优惠券', 929 '优惠券',
900 - isRowLow: !Utils.getAuthority(  
901 - context, '优惠券'))), 930 + isRowLow: outDay == '0' ||
  931 + !Utils.getAuthority(
  932 + context, '优惠券'))),
902 InkWell( 933 InkWell(
903 onTap: () { 934 onTap: () {
  935 + if (outDay == '0') {
  936 + return;
  937 + }
  938 +
904 if (Utils.getAuthority(context, '常用备注')) { 939 if (Utils.getAuthority(context, '常用备注')) {
905 NavigatorUtil.goRemarkManagerPage( 940 NavigatorUtil.goRemarkManagerPage(
906 context); 941 context);
907 } 942 }
908 }, 943 },
909 child: _item( 944 child: _item(
910 - !Utils.getAuthority(context, '常用备注') 945 + outDay == '0' ||
  946 + !Utils.getAuthority(
  947 + context, '常用备注')
911 ? Utils.getImgPath('cybz_un') 948 ? Utils.getImgPath('cybz_un')
912 : Utils.getImgPath('cybz'), 949 : Utils.getImgPath('cybz'),
913 '常用备注', 950 '常用备注',
914 - isRowLow: !Utils.getAuthority(  
915 - context, '常用备注'))), 951 + isRowLow: outDay == '0' ||
  952 + !Utils.getAuthority(
  953 + context, '常用备注'))),
916 ], 954 ],
917 ), 955 ),
918 VEmptyView(68), 956 VEmptyView(68),
@@ -922,6 +960,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -922,6 +960,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
922 children: [ 960 children: [
923 InkWell( 961 InkWell(
924 onTap: () { 962 onTap: () {
  963 + if (outDay == '0') {
  964 + return;
  965 + }
925 if (Utils.getAuthority( 966 if (Utils.getAuthority(
926 context, '套餐排菜')) { 967 context, '套餐排菜')) {
927 NavigatorUtil.goMyPlanDishHomePage( 968 NavigatorUtil.goMyPlanDishHomePage(
@@ -929,14 +970,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -929,14 +970,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
929 } 970 }
930 }, 971 },
931 child: _item( 972 child: _item(
932 - !Utils.getAuthority(context, '套餐排菜') 973 + outDay == '0' ||
  974 + !Utils.getAuthority(
  975 + context, '套餐排菜')
933 ? Utils.getImgPath('cdgl_un') 976 ? Utils.getImgPath('cdgl_un')
934 : Utils.getImgPath('cdgl'), 977 : Utils.getImgPath('cdgl'),
935 '套餐排菜', 978 '套餐排菜',
936 - isRowLow: !Utils.getAuthority(  
937 - context, '套餐排菜'))), 979 + isRowLow: outDay == '0' ||
  980 + !Utils.getAuthority(
  981 + context, '套餐排菜'))),
938 InkWell( 982 InkWell(
939 onTap: () { 983 onTap: () {
  984 + if (outDay == '0') {
  985 + return;
  986 + }
940 if (Utils.getAuthority( 987 if (Utils.getAuthority(
941 context, '客户存酒')) { 988 context, '客户存酒')) {
942 NavigatorUtil 989 NavigatorUtil
@@ -945,12 +992,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -945,12 +992,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
945 } 992 }
946 }, 993 },
947 child: _item( 994 child: _item(
948 - !Utils.getAuthority(context, '客户存酒') 995 + outDay == '0' ||
  996 + !Utils.getAuthority(
  997 + context, '客户存酒')
949 ? Utils.getImgPath('khcj_un') 998 ? Utils.getImgPath('khcj_un')
950 : Utils.getImgPath('khcj'), 999 : Utils.getImgPath('khcj'),
951 '客户存酒', 1000 '客户存酒',
952 - isRowLow: !Utils.getAuthority(  
953 - context, '客户存酒'))), 1001 + isRowLow: outDay == '0' ||
  1002 + !Utils.getAuthority(
  1003 + context, '客户存酒'))),
954 InkWell( 1004 InkWell(
955 onTap: () {}, child: _item('', '空空空空')), 1005 onTap: () {}, child: _item('', '空空空空')),
956 InkWell( 1006 InkWell(
@@ -990,6 +1040,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -990,6 +1040,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
990 children: [ 1040 children: [
991 InkWell( 1041 InkWell(
992 onTap: () async { 1042 onTap: () async {
  1043 + if (outDay == '0') {
  1044 + return;
  1045 + }
993 if (Utils.getAuthority( 1046 if (Utils.getAuthority(
994 context, '店铺信息')) { 1047 context, '店铺信息')) {
995 await NavigatorUtil 1048 await NavigatorUtil
@@ -1007,14 +1060,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1007,14 +1060,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1007 } 1060 }
1008 }, 1061 },
1009 child: _item( 1062 child: _item(
1010 - !Utils.getAuthority(context, '店铺信息') 1063 + outDay == '0' ||
  1064 + !Utils.getAuthority(
  1065 + context, '店铺信息')
1011 ? Utils.getImgPath('dpxx_un') 1066 ? Utils.getImgPath('dpxx_un')
1012 : Utils.getImgPath('dpxx'), 1067 : Utils.getImgPath('dpxx'),
1013 '店铺信息', 1068 '店铺信息',
1014 - isRowLow: !Utils.getAuthority(  
1015 - context, '店铺信息'))), 1069 + isRowLow: outDay == '0' ||
  1070 + !Utils.getAuthority(
  1071 + context, '店铺信息'))),
1016 InkWell( 1072 InkWell(
1017 onTap: () { 1073 onTap: () {
  1074 + if (outDay == '0') {
  1075 + return;
  1076 + }
1018 if (Utils.getAuthority( 1077 if (Utils.getAuthority(
1019 context, '全店客情')) { 1078 context, '全店客情')) {
1020 NavigatorUtil.goStoreCustomerPage( 1079 NavigatorUtil.goStoreCustomerPage(
@@ -1022,14 +1081,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1022,14 +1081,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1022 } 1081 }
1023 }, 1082 },
1024 child: _item( 1083 child: _item(
1025 - !Utils.getAuthority(context, '全店客情') 1084 + outDay == '0' ||
  1085 + !Utils.getAuthority(
  1086 + context, '全店客情')
1026 ? Utils.getImgPath('qdkq_un') 1087 ? Utils.getImgPath('qdkq_un')
1027 : Utils.getImgPath('qdkq'), 1088 : Utils.getImgPath('qdkq'),
1028 '全店客情', 1089 '全店客情',
1029 - isRowLow: !Utils.getAuthority(  
1030 - context, '全店客情'))), 1090 + isRowLow: outDay == '0' ||
  1091 + !Utils.getAuthority(
  1092 + context, '全店客情'))),
1031 InkWell( 1093 InkWell(
1032 onTap: () { 1094 onTap: () {
  1095 + if (outDay == '0') {
  1096 + return;
  1097 + }
1033 if (Utils.getAuthority( 1098 if (Utils.getAuthority(
1034 context, '桌位管理')) { 1099 context, '桌位管理')) {
1035 NavigatorUtil 1100 NavigatorUtil
@@ -1038,15 +1103,21 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1038,15 +1103,21 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1038 } 1103 }
1039 }, 1104 },
1040 child: _item( 1105 child: _item(
1041 - !Utils.getAuthority(context, '桌位管理') 1106 + outDay == '0' ||
  1107 + !Utils.getAuthority(
  1108 + context, '桌位管理')
1042 ? Utils.getImgPath('zwgl_un') 1109 ? Utils.getImgPath('zwgl_un')
1043 : Utils.getImgPath('zwgl'), 1110 : Utils.getImgPath('zwgl'),
1044 '桌位管理', 1111 '桌位管理',
1045 - isRowLow: !Utils.getAuthority(  
1046 - context, '桌位管理')), 1112 + isRowLow: outDay == '0' ||
  1113 + !Utils.getAuthority(
  1114 + context, '桌位管理')),
1047 ), 1115 ),
1048 InkWell( 1116 InkWell(
1049 onTap: () async { 1117 onTap: () async {
  1118 + if (outDay == '0') {
  1119 + return;
  1120 + }
1050 if (Utils.getAuthority( 1121 if (Utils.getAuthority(
1051 context, '桌位照片')) { 1122 context, '桌位照片')) {
1052 // Map temp = 1123 // Map temp =
@@ -1070,12 +1141,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1070,12 +1141,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1070 } 1141 }
1071 }, 1142 },
1072 child: _item( 1143 child: _item(
1073 - !Utils.getAuthority(context, '桌位照片') 1144 + outDay == '0' ||
  1145 + !Utils.getAuthority(
  1146 + context, '桌位照片')
1074 ? Utils.getImgPath('zwzp_un') 1147 ? Utils.getImgPath('zwzp_un')
1075 : Utils.getImgPath('zwzp'), 1148 : Utils.getImgPath('zwzp'),
1076 '桌位照片', 1149 '桌位照片',
1077 - isRowLow: !Utils.getAuthority(  
1078 - context, '桌位照片'))) 1150 + isRowLow: outDay == '0' ||
  1151 + !Utils.getAuthority(
  1152 + context, '桌位照片')))
1079 ], 1153 ],
1080 ), 1154 ),
1081 VEmptyView(68), 1155 VEmptyView(68),
@@ -1085,6 +1159,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1085,6 +1159,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1085 children: [ 1159 children: [
1086 InkWell( 1160 InkWell(
1087 onTap: () { 1161 onTap: () {
  1162 + if (outDay == '0') {
  1163 + return;
  1164 + }
1088 if (Utils.getAuthority( 1165 if (Utils.getAuthority(
1089 context, '员工管理')) { 1166 context, '员工管理')) {
1090 NavigatorUtil.goPersonnelManagePage( 1167 NavigatorUtil.goPersonnelManagePage(
@@ -1092,14 +1169,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1092,14 +1169,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1092 } 1169 }
1093 }, 1170 },
1094 child: _item( 1171 child: _item(
1095 - !Utils.getAuthority(context, '员工管理') 1172 + outDay == '0' ||
  1173 + !Utils.getAuthority(
  1174 + context, '员工管理')
1096 ? Utils.getImgPath('yggl_un') 1175 ? Utils.getImgPath('yggl_un')
1097 : Utils.getImgPath('yggl'), 1176 : Utils.getImgPath('yggl'),
1098 '员工管理', 1177 '员工管理',
1099 - isRowLow: !Utils.getAuthority(  
1100 - context, '员工管理'))), 1178 + isRowLow: outDay == '0' ||
  1179 + !Utils.getAuthority(
  1180 + context, '员工管理'))),
1101 InkWell( 1181 InkWell(
1102 onTap: () { 1182 onTap: () {
  1183 + if (outDay == '0') {
  1184 + return;
  1185 + }
1103 if (Utils.getAuthority( 1186 if (Utils.getAuthority(
1104 context, '菜单管理')) { 1187 context, '菜单管理')) {
1105 NavigatorUtil.goMenuManagePage( 1188 NavigatorUtil.goMenuManagePage(
@@ -1107,14 +1190,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1107,14 +1190,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1107 } 1190 }
1108 }, 1191 },
1109 child: _item( 1192 child: _item(
1110 - !Utils.getAuthority(context, '菜单管理') 1193 + outDay == '0' ||
  1194 + !Utils.getAuthority(
  1195 + context, '菜单管理')
1111 ? Utils.getImgPath('cdgl_un') 1196 ? Utils.getImgPath('cdgl_un')
1112 : Utils.getImgPath('cdgl'), 1197 : Utils.getImgPath('cdgl'),
1113 '菜单管理', 1198 '菜单管理',
1114 - isRowLow: !Utils.getAuthority(  
1115 - context, '菜单管理'))), 1199 + isRowLow: outDay == '0' ||
  1200 + !Utils.getAuthority(
  1201 + context, '菜单管理'))),
1116 InkWell( 1202 InkWell(
1117 onTap: () { 1203 onTap: () {
  1204 + if (outDay == '0') {
  1205 + return;
  1206 + }
1118 if (Utils.getAuthority( 1207 if (Utils.getAuthority(
1119 context, '包间类型')) { 1208 context, '包间类型')) {
1120 NavigatorUtil.goRoomTypeManagePage( 1209 NavigatorUtil.goRoomTypeManagePage(
@@ -1122,14 +1211,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1122,14 +1211,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1122 } 1211 }
1123 }, 1212 },
1124 child: _item( 1213 child: _item(
1125 - !Utils.getAuthority(context, '包间类型') 1214 + outDay == '0' ||
  1215 + !Utils.getAuthority(
  1216 + context, '包间类型')
1126 ? Utils.getImgPath('bjlx_un') 1217 ? Utils.getImgPath('bjlx_un')
1127 : Utils.getImgPath('bjlx'), 1218 : Utils.getImgPath('bjlx'),
1128 '包间类型', 1219 '包间类型',
1129 - isRowLow: !Utils.getAuthority(  
1130 - context, '包间类型'))), 1220 + isRowLow: outDay == '0' ||
  1221 + !Utils.getAuthority(
  1222 + context, '包间类型'))),
1131 InkWell( 1223 InkWell(
1132 onTap: () { 1224 onTap: () {
  1225 + if (outDay == '0') {
  1226 + return;
  1227 + }
1133 if (Utils.getAuthority( 1228 if (Utils.getAuthority(
1134 context, '包间置满')) { 1229 context, '包间置满')) {
1135 NavigatorUtil 1230 NavigatorUtil
@@ -1138,12 +1233,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1138,12 +1233,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1138 } 1233 }
1139 }, 1234 },
1140 child: _item( 1235 child: _item(
1141 - !Utils.getAuthority(context, '包间置满') 1236 + outDay == '0' ||
  1237 + !Utils.getAuthority(
  1238 + context, '包间置满')
1142 ? Utils.getImgPath('bjzm_un') 1239 ? Utils.getImgPath('bjzm_un')
1143 : Utils.getImgPath('bjzm'), 1240 : Utils.getImgPath('bjzm'),
1144 '包间置满', 1241 '包间置满',
1145 - isRowLow: !Utils.getAuthority(  
1146 - context, '包间置满'))) 1242 + isRowLow: outDay == '0' ||
  1243 + !Utils.getAuthority(
  1244 + context, '包间置满')))
1147 ], 1245 ],
1148 ), 1246 ),
1149 VEmptyView(68), 1247 VEmptyView(68),
@@ -1153,6 +1251,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1153,6 +1251,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1153 children: [ 1251 children: [
1154 InkWell( 1252 InkWell(
1155 onTap: () { 1253 onTap: () {
  1254 + if (outDay == '0') {
  1255 + return;
  1256 + }
1156 if (Utils.getAuthority( 1257 if (Utils.getAuthority(
1157 context, '宴会管理')) { 1258 context, '宴会管理')) {
1158 NavigatorUtil.goFeastManageHomePage( 1259 NavigatorUtil.goFeastManageHomePage(
@@ -1160,14 +1261,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1160,14 +1261,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1160 } 1261 }
1161 }, 1262 },
1162 child: _item( 1263 child: _item(
1163 - !Utils.getAuthority(context, '宴会管理') 1264 + outDay == '0' ||
  1265 + !Utils.getAuthority(
  1266 + context, '宴会管理')
1164 ? Utils.getImgPath('yhgl_un') 1267 ? Utils.getImgPath('yhgl_un')
1165 : Utils.getImgPath('yhgl'), 1268 : Utils.getImgPath('yhgl'),
1166 '宴会管理', 1269 '宴会管理',
1167 - isRowLow: !Utils.getAuthority(  
1168 - context, '宴会管理'))), 1270 + isRowLow: outDay == '0' ||
  1271 + !Utils.getAuthority(
  1272 + context, '宴会管理'))),
1169 InkWell( 1273 InkWell(
1170 onTap: () { 1274 onTap: () {
  1275 + if (outDay == '0') {
  1276 + return;
  1277 + }
1171 if (Utils.getAuthority( 1278 if (Utils.getAuthority(
1172 context, '营销中心')) { 1279 context, '营销中心')) {
1173 NavigatorUtil 1280 NavigatorUtil
@@ -1176,12 +1283,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1176,12 +1283,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1176 } 1283 }
1177 }, 1284 },
1178 child: _item( 1285 child: _item(
1179 - !Utils.getAuthority(context, '营销中心') 1286 + outDay == '0' ||
  1287 + !Utils.getAuthority(
  1288 + context, '营销中心')
1180 ? Utils.getImgPath('bjzm_un') 1289 ? Utils.getImgPath('bjzm_un')
1181 : Utils.getImgPath('bjzm'), 1290 : Utils.getImgPath('bjzm'),
1182 '营销中心', 1291 '营销中心',
1183 - isRowLow: !Utils.getAuthority(  
1184 - context, '营销中心'))), 1292 + isRowLow: outDay == '0' ||
  1293 + !Utils.getAuthority(
  1294 + context, '营销中心'))),
1185 InkWell( 1295 InkWell(
1186 onTap: () {}, child: _item('', '空空空空')), 1296 onTap: () {}, child: _item('', '空空空空')),
1187 InkWell( 1297 InkWell(
@@ -22,6 +22,7 @@ import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; @@ -22,6 +22,7 @@ import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
22 22
23 import '../app.dart'; 23 import '../app.dart';
24 import '../models/set_xuan_tai_model.dart'; 24 import '../models/set_xuan_tai_model.dart';
  25 +import '../utils/screen_util.dart';
25 26
26 class UserModel with ChangeNotifier { 27 class UserModel with ChangeNotifier {
27 String _registrationId; //极光推送registrationId 28 String _registrationId; //极光推送registrationId
@@ -255,94 +256,86 @@ class UserModel with ChangeNotifier { @@ -255,94 +256,86 @@ class UserModel with ChangeNotifier {
255 showDialog( 256 showDialog(
256 context: pageContext, 257 context: pageContext,
257 builder: (context) { 258 builder: (context) {
258 - Widget widget = Container(  
259 - decoration: BoxDecoration(  
260 - color: MyColours.color_ffffff,  
261 - borderRadius: BorderRadius.all(  
262 - Radius.circular(ScreenUtil().setWidth(30)))),  
263 - padding: EdgeInsets.only(top: ScreenUtil().setWidth(88)),  
264 - child: Column(  
265 - mainAxisSize: MainAxisSize.min,  
266 - crossAxisAlignment: CrossAxisAlignment.start,  
267 - children: <Widget>[  
268 - Center(  
269 - child: Text(  
270 - "确定要退出登录吗?",  
271 - style: TextStyle(  
272 - fontSize: ScreenUtil().setSp(36),  
273 - color: MyColours.color_353535),  
274 - ),  
275 - ),  
276 - VEmptyView(66),  
277 - MyDivider(double.infinity, ScreenUtil().setWidth(1)),  
278 - Container(  
279 - // height: ScreenUtil().setWidth(94),  
280 - child: Row(  
281 - children: <Widget>[  
282 - Expanded(  
283 - child: GestureDetector(  
284 - onTap: () {  
285 - Navigator.of(context).pop();  
286 - },  
287 - child: Container(  
288 - color: MyColours.color_ffffff,  
289 - height: ScreenUtil().setWidth(94),  
290 - alignment: Alignment.center,  
291 - child: Text(  
292 - "取消",  
293 - style: TextStyle(  
294 - fontSize: ScreenUtil().setSp(34),  
295 - color: MyColours.color_777777),  
296 - textAlign: TextAlign.center,  
297 - )),  
298 - ), 259 + return Center(
  260 + child: Card(
  261 + margin: EdgeInsets.symmetric(horizontal: w(30)),
  262 + shape: RoundedRectangleBorder(
  263 + borderRadius: BorderRadius.all(
  264 + Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角
  265 + child: Column(
  266 + mainAxisSize: MainAxisSize.min,
  267 + crossAxisAlignment: CrossAxisAlignment.start,
  268 + children: <Widget>[
  269 + VEmptyView(88),
  270 + Center(
  271 + child: Text(
  272 + "确定要退出登录吗?",
  273 + style: TextStyle(
  274 + fontSize: ScreenUtil().setSp(36),
  275 + color: MyColours.color_353535),
299 ), 276 ),
300 - MyDivider(  
301 - ScreenUtil().setWidth(1), ScreenUtil().setWidth(94)),  
302 - Expanded(  
303 - child: GestureDetector(  
304 - onTap: () {  
305 - Navigator.of(context).pop();  
306 - loginOut(pageContext, {  
307 - "seller_code": user.sellercode,  
308 - "account": user.account  
309 - });  
310 - },  
311 - child: Container(  
312 - color: MyColours.color_ffffff,  
313 - height: ScreenUtil().setWidth(94),  
314 - alignment: Alignment.center,  
315 - child: Text(  
316 - "确定",  
317 - style: TextStyle(  
318 - fontSize: ScreenUtil().setSp(34),  
319 - color: MyColours.color_2bb5b7),  
320 - textAlign: TextAlign.center, 277 + ),
  278 + VEmptyView(66),
  279 + MyDivider(double.infinity, ScreenUtil().setWidth(1)),
  280 + Container(
  281 + child: Row(
  282 + children: <Widget>[
  283 + Expanded(
  284 + child: GestureDetector(
  285 + onTap: () {
  286 + Navigator.of(context).pop();
  287 + },
  288 + child: Container(
  289 + decoration: BoxDecoration(
  290 + color: MyColours.color_ffffff,
  291 + borderRadius: BorderRadius.all(
  292 + Radius.circular(
  293 + ScreenUtil().setWidth(30)))),
  294 + height: ScreenUtil().setWidth(94),
  295 + alignment: Alignment.center,
  296 + child: Text(
  297 + "取消",
  298 + style: TextStyle(
  299 + fontSize: ScreenUtil().setSp(34),
  300 + color: MyColours.color_777777),
  301 + textAlign: TextAlign.center,
  302 + )),
321 ), 303 ),
322 ), 304 ),
323 - ),  
324 - )  
325 - ],  
326 - ),  
327 - )  
328 - ],  
329 - ),  
330 - );  
331 - return Center(  
332 - child: UnconstrainedBox(  
333 - constrainedAxis: Axis.vertical,  
334 - child: ConstrainedBox(  
335 - constraints:  
336 - BoxConstraints(maxWidth: ScreenUtil().setWidth(560)),  
337 - child: DefaultTextStyle(  
338 - style: TextStyle(decoration: TextDecoration.none),  
339 - child: widget,  
340 - )),  
341 - ),  
342 - );  
343 - return AlertDialog(  
344 - content: widget,  
345 - contentPadding: EdgeInsets.zero, 305 + MyDivider(ScreenUtil().setWidth(1),
  306 + ScreenUtil().setWidth(94)),
  307 + Expanded(
  308 + child: GestureDetector(
  309 + onTap: () {
  310 + Navigator.of(context).pop();
  311 + loginOut(pageContext, {
  312 + "seller_code": user.sellercode,
  313 + "account": user.account
  314 + });
  315 + },
  316 + child: Container(
  317 + decoration: BoxDecoration(
  318 + color: MyColours.color_ffffff,
  319 + borderRadius: BorderRadius.all(
  320 + Radius.circular(
  321 + ScreenUtil().setWidth(30)))),
  322 + height: ScreenUtil().setWidth(94),
  323 + alignment: Alignment.center,
  324 + child: Text(
  325 + "确定",
  326 + style: TextStyle(
  327 + fontSize: ScreenUtil().setSp(34),
  328 + color: MyColours.color_2bb5b7),
  329 + textAlign: TextAlign.center,
  330 + ),
  331 + ),
  332 + ),
  333 + )
  334 + ],
  335 + ),
  336 + )
  337 + ],
  338 + )),
346 ); 339 );
347 }); 340 });
348 } 341 }
@@ -39,6 +39,7 @@ import 'package:path_provider/path_provider.dart'; @@ -39,6 +39,7 @@ import 'package:path_provider/path_provider.dart';
39 import 'package:image_cropper/image_cropper.dart'; 39 import 'package:image_cropper/image_cropper.dart';
40 import 'dart:math'; 40 import 'dart:math';
41 41
  42 +import '../app.dart';
42 import '../constant/constant.dart'; 43 import '../constant/constant.dart';
43 import '../models/cookbook_model.dart'; 44 import '../models/cookbook_model.dart';
44 import '../models/coupon_model.dart'; 45 import '../models/coupon_model.dart';
@@ -48,6 +49,18 @@ import '../models/recharge_list_model.dart'; @@ -48,6 +49,18 @@ import '../models/recharge_list_model.dart';
48 typedef BookTimeSetCallback = void Function(bool needChange); 49 typedef BookTimeSetCallback = void Function(bool needChange);
49 50
50 class Utils { 51 class Utils {
  52 + ///店铺是否过期
  53 + static isStoreEdate() {
  54 + if (App.sp.containsKey('sellerEdate')) {
  55 + List<String> data = App.sp.getStringList('sellerEdate');
  56 + if (data.contains('-1')) {
  57 + //已经弹过过期弹窗
  58 + return true;
  59 + }
  60 + }
  61 + return false;
  62 + }
  63 +
51 ///权限获取 64 ///权限获取
52 static getAuthority(BuildContext context, String key) { 65 static getAuthority(BuildContext context, String key) {
53 bool hasAuthority = Constant.authorityConfig[key].contains( 66 bool hasAuthority = Constant.authorityConfig[key].contains(