Showing
2 changed files
with
15 additions
and
4 deletions
| @@ -548,7 +548,7 @@ | @@ -548,7 +548,7 @@ | ||
| 548 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | 548 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; |
| 549 | CODE_SIGN_IDENTITY = "Apple Development"; | 549 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 550 | CODE_SIGN_STYLE = Automatic; | 550 | CODE_SIGN_STYLE = Automatic; |
| 551 | - CURRENT_PROJECT_VERSION = 5324; | 551 | + CURRENT_PROJECT_VERSION = 5325; |
| 552 | DEVELOPMENT_TEAM = 8J59HM8B82; | 552 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 553 | ENABLE_BITCODE = NO; | 553 | ENABLE_BITCODE = NO; |
| 554 | FLUTTER_BUILD_MODE = release; | 554 | FLUTTER_BUILD_MODE = release; |
| @@ -696,7 +696,7 @@ | @@ -696,7 +696,7 @@ | ||
| 696 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; | 696 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; |
| 697 | CODE_SIGN_IDENTITY = "Apple Development"; | 697 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 698 | CODE_SIGN_STYLE = Automatic; | 698 | CODE_SIGN_STYLE = Automatic; |
| 699 | - CURRENT_PROJECT_VERSION = 5324; | 699 | + CURRENT_PROJECT_VERSION = 5325; |
| 700 | DEVELOPMENT_TEAM = 8J59HM8B82; | 700 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 701 | ENABLE_BITCODE = NO; | 701 | ENABLE_BITCODE = NO; |
| 702 | FLUTTER_BUILD_MODE = release; | 702 | FLUTTER_BUILD_MODE = release; |
| @@ -732,7 +732,7 @@ | @@ -732,7 +732,7 @@ | ||
| 732 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 732 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 733 | CODE_SIGN_IDENTITY = "Apple Development"; | 733 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 734 | CODE_SIGN_STYLE = Automatic; | 734 | CODE_SIGN_STYLE = Automatic; |
| 735 | - CURRENT_PROJECT_VERSION = 5324; | 735 | + CURRENT_PROJECT_VERSION = 5325; |
| 736 | DEVELOPMENT_TEAM = 8J59HM8B82; | 736 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 737 | ENABLE_BITCODE = NO; | 737 | ENABLE_BITCODE = NO; |
| 738 | FLUTTER_BUILD_MODE = release; | 738 | FLUTTER_BUILD_MODE = release; |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 3 | +import 'package:one_key/provider/user_model.dart'; | ||
| 3 | import 'package:one_key/route/navigator_util.dart'; | 4 | import 'package:one_key/route/navigator_util.dart'; |
| 4 | import 'package:provider/provider.dart'; | 5 | import 'package:provider/provider.dart'; |
| 5 | 6 | ||
| @@ -110,6 +111,7 @@ class _FeastManageHomePageState extends State<FeastManageHomePage> { | @@ -110,6 +111,7 @@ class _FeastManageHomePageState extends State<FeastManageHomePage> { | ||
| 110 | }), | 111 | }), |
| 111 | feastManegeItem('宴会员工', onTap: () { | 112 | feastManegeItem('宴会员工', onTap: () { |
| 112 | // //宴会 | 113 | // //宴会 |
| 114 | + | ||
| 113 | if (!collectStoreProvider.sellerFeast) { | 115 | if (!collectStoreProvider.sellerFeast) { |
| 114 | //没有购买宴会模块 | 116 | //没有购买宴会模块 |
| 115 | //提示购买 | 117 | //提示购买 |
| @@ -118,7 +120,16 @@ class _FeastManageHomePageState extends State<FeastManageHomePage> { | @@ -118,7 +120,16 @@ class _FeastManageHomePageState extends State<FeastManageHomePage> { | ||
| 118 | context, '宴会', (v) {}); | 120 | context, '宴会', (v) {}); |
| 119 | return; | 121 | return; |
| 120 | } | 122 | } |
| 121 | - NavigatorUtil.goFeastPersonalPage(context); | 123 | + String rolename = |
| 124 | + Provider.of<UserModel>(context).user.role_name; | ||
| 125 | + // 管理员和店长,其他人没有权限 | ||
| 126 | + if (rolename == '店长' || rolename == '管理员') { | ||
| 127 | + NavigatorUtil.goFeastPersonalPage(context); | ||
| 128 | + } else { | ||
| 129 | + Utils.showToast('您不是店铺的管理员或者店长,无权进行相关操作。'); | ||
| 130 | + | ||
| 131 | + return; | ||
| 132 | + } | ||
| 122 | }), | 133 | }), |
| 123 | feastManegeItem('宴会套餐管理', onTap: () { | 134 | feastManegeItem('宴会套餐管理', onTap: () { |
| 124 | // //宴会 | 135 | // //宴会 |
-
Please register or login to post a comment