Commit 1e164fb09c133ef5ae4b54f5637ea9053a59fb16

Authored by wdn127929
1 parent b585abcf

我的页面过期置灰

... ... @@ -17,9 +17,9 @@ if (flutterRoot == null) {
def flutterVersionCode = "499"
def flutterVersionCode = "501"
if (flutterVersionCode == null) {
flutterVersionCode = '499'
flutterVersionCode = '501'
}
... ... @@ -28,9 +28,9 @@ if (flutterVersionCode == null) {
def flutterVersionName = "4.9.9"
def flutterVersionName = "5.0.1"
if (flutterVersionName == null) {
flutterVersionName = '4.9.9'
flutterVersionName = '5.0.1'
}
... ...
... ... @@ -510,7 +510,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 499;
CURRENT_PROJECT_VERSION = 500;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -525,7 +525,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.9.9;
MARKETING_VERSION = 5.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -656,7 +656,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 499;
CURRENT_PROJECT_VERSION = 500;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -671,7 +671,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.9.9;
MARKETING_VERSION = 5.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -692,7 +692,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 499;
CURRENT_PROJECT_VERSION = 500;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -707,7 +707,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 4.9.9;
MARKETING_VERSION = 5.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -10,6 +10,10 @@ class Constant {
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.TEST; //开发版
// static const Map<String, List<String>> paidVersionsConfig = {
// '经理排菜': ['查看详情', '删除', '复用', '创建排菜'],
// };
static const Map<String, List<String>> authorityConfig = {
'充值短信': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
'有效期': ['管理员', '店长', '客户经理', '收银员', '服务员', '前台'],
... ...
... ... @@ -141,6 +141,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
_currIndex = 4;
}
}
_pageController = PageController(initialPage: _currIndex);
pages
// ..add(ChangeNotifierProvider<HomeEnterModel>(
... ...
... ... @@ -53,7 +53,7 @@ class _FirstPageState extends State<FirstPage> {
App.sp.setBool("isFirst", false);
//进入应用
NavigatorUtil.goLoginPage(context);
FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
// FlutterBugly.init(androidAppId: "f71a313f42", iOSAppId: "3089e4587e");
}
//初始化微信SDK
... ...
... ... @@ -161,7 +161,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
rechargeData =
marketingCenterProvider.markDataModel.marketing.rechargeData;
couponDataList =
marketingCenterProvider.markDataModel.marketing.couponDataList;
marketingCenterProvider.markDataModel.marketing.couponDataList ?? [];
_uploadImageProvider.firstImage.qiniuUrl =
marketingCenterProvider.markDataModel.marketing.logo ?? null;
... ...
... ... @@ -482,6 +482,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '全店-月订单量')) {
NavigatorUtil.goMonthOrderPage(
... ... @@ -550,6 +553,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(context, '充值短信')) {
NavigatorUtil.goSmsManagePage(context,
smsInfoData: smsInfoData);
... ... @@ -590,16 +596,19 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
RoundButton(
text: '充值短信',
gradientStart:
!Utils.getAuthority(
context, '充值短信')
(!Utils.getAuthority(context,
'充值短信') ||
outDay == '0')
? MyColours.color_999999
: MyColours.color_438E93,
gradientEnd: !Utils.getAuthority(
context, '充值短信')
gradientEnd: (!Utils.getAuthority(
context, '充值短信') ||
outDay == '0')
? MyColours.color_999999
: MyColours.color_438E93,
borderColor: !Utils.getAuthority(
context, '充值短信')
borderColor: (!Utils.getAuthority(
context, '充值短信') ||
outDay == '0')
? MyColours.color_999999
: MyColours.color_438E93,
width:
... ... @@ -611,6 +620,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
textColor: MyColours.color_ffffff,
radius: ScreenUtil().setWidth(8),
onPressed: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '充值短信')) {
NavigatorUtil.goSmsManagePage(
... ... @@ -860,59 +872,85 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(context, '个人信息')) {
NavigatorUtil.goBaseInfoPage(
context, FromPage.FromPageMyPage);
}
},
child: _item(
!Utils.getAuthority(context, '个人信息')
!Utils.getAuthority(context, '个人信息') ||
outDay == '0'
? Utils.getImgPath('grxx_un')
: Utils.getImgPath('grxx'),
'个人信息',
isRowLow:
isRowLow: outDay == '0' ||
!Utils.getAuthority(context, '个人信息')),
),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(context, '我的客情')) {
NavigatorUtil.goMyCustomerPage(context);
}
},
child: _item(
!Utils.getAuthority(context, '我的客情')
outDay == '0' ||
!Utils.getAuthority(
context, '我的客情')
? Utils.getImgPath('wdkq_un')
: Utils.getImgPath('wdkq'),
'我的客情',
isRowLow: !Utils.getAuthority(
context, '我的客情'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '我的客情'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(context, '优惠券')) {
NavigatorUtil.goCouponPage(context);
}
},
child: _item(
!Utils.getAuthority(context, '优惠券')
outDay == '0' ||
!Utils.getAuthority(
context, '优惠券')
? Utils.getImgPath('yhq_un')
: Utils.getImgPath('yhq'),
'优惠券',
isRowLow: !Utils.getAuthority(
context, '优惠券'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '优惠券'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(context, '常用备注')) {
NavigatorUtil.goRemarkManagerPage(
context);
}
},
child: _item(
!Utils.getAuthority(context, '常用备注')
outDay == '0' ||
!Utils.getAuthority(
context, '常用备注')
? Utils.getImgPath('cybz_un')
: Utils.getImgPath('cybz'),
'常用备注',
isRowLow: !Utils.getAuthority(
context, '常用备注'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '常用备注'))),
],
),
VEmptyView(68),
... ... @@ -922,6 +960,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '套餐排菜')) {
NavigatorUtil.goMyPlanDishHomePage(
... ... @@ -929,14 +970,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '套餐排菜')
outDay == '0' ||
!Utils.getAuthority(
context, '套餐排菜')
? Utils.getImgPath('cdgl_un')
: Utils.getImgPath('cdgl'),
'套餐排菜',
isRowLow: !Utils.getAuthority(
context, '套餐排菜'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '套餐排菜'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '客户存酒')) {
NavigatorUtil
... ... @@ -945,12 +992,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '客户存酒')
outDay == '0' ||
!Utils.getAuthority(
context, '客户存酒')
? Utils.getImgPath('khcj_un')
: Utils.getImgPath('khcj'),
'客户存酒',
isRowLow: !Utils.getAuthority(
context, '客户存酒'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '客户存酒'))),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
... ... @@ -990,6 +1040,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () async {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '店铺信息')) {
await NavigatorUtil
... ... @@ -1007,14 +1060,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '店铺信息')
outDay == '0' ||
!Utils.getAuthority(
context, '店铺信息')
? Utils.getImgPath('dpxx_un')
: Utils.getImgPath('dpxx'),
'店铺信息',
isRowLow: !Utils.getAuthority(
context, '店铺信息'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '店铺信息'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '全店客情')) {
NavigatorUtil.goStoreCustomerPage(
... ... @@ -1022,14 +1081,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '全店客情')
outDay == '0' ||
!Utils.getAuthority(
context, '全店客情')
? Utils.getImgPath('qdkq_un')
: Utils.getImgPath('qdkq'),
'全店客情',
isRowLow: !Utils.getAuthority(
context, '全店客情'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '全店客情'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '桌位管理')) {
NavigatorUtil
... ... @@ -1038,15 +1103,21 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '桌位管理')
outDay == '0' ||
!Utils.getAuthority(
context, '桌位管理')
? Utils.getImgPath('zwgl_un')
: Utils.getImgPath('zwgl'),
'桌位管理',
isRowLow: !Utils.getAuthority(
context, '桌位管理')),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '桌位管理')),
),
InkWell(
onTap: () async {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '桌位照片')) {
// Map temp =
... ... @@ -1070,12 +1141,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '桌位照片')
outDay == '0' ||
!Utils.getAuthority(
context, '桌位照片')
? Utils.getImgPath('zwzp_un')
: Utils.getImgPath('zwzp'),
'桌位照片',
isRowLow: !Utils.getAuthority(
context, '桌位照片')))
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '桌位照片')))
],
),
VEmptyView(68),
... ... @@ -1085,6 +1159,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '员工管理')) {
NavigatorUtil.goPersonnelManagePage(
... ... @@ -1092,14 +1169,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '员工管理')
outDay == '0' ||
!Utils.getAuthority(
context, '员工管理')
? Utils.getImgPath('yggl_un')
: Utils.getImgPath('yggl'),
'员工管理',
isRowLow: !Utils.getAuthority(
context, '员工管理'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '员工管理'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '菜单管理')) {
NavigatorUtil.goMenuManagePage(
... ... @@ -1107,14 +1190,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '菜单管理')
outDay == '0' ||
!Utils.getAuthority(
context, '菜单管理')
? Utils.getImgPath('cdgl_un')
: Utils.getImgPath('cdgl'),
'菜单管理',
isRowLow: !Utils.getAuthority(
context, '菜单管理'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '菜单管理'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '包间类型')) {
NavigatorUtil.goRoomTypeManagePage(
... ... @@ -1122,14 +1211,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '包间类型')
outDay == '0' ||
!Utils.getAuthority(
context, '包间类型')
? Utils.getImgPath('bjlx_un')
: Utils.getImgPath('bjlx'),
'包间类型',
isRowLow: !Utils.getAuthority(
context, '包间类型'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '包间类型'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '包间置满')) {
NavigatorUtil
... ... @@ -1138,12 +1233,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '包间置满')
outDay == '0' ||
!Utils.getAuthority(
context, '包间置满')
? Utils.getImgPath('bjzm_un')
: Utils.getImgPath('bjzm'),
'包间置满',
isRowLow: !Utils.getAuthority(
context, '包间置满')))
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '包间置满')))
],
),
VEmptyView(68),
... ... @@ -1153,6 +1251,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '宴会管理')) {
NavigatorUtil.goFeastManageHomePage(
... ... @@ -1160,14 +1261,20 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '宴会管理')
outDay == '0' ||
!Utils.getAuthority(
context, '宴会管理')
? Utils.getImgPath('yhgl_un')
: Utils.getImgPath('yhgl'),
'宴会管理',
isRowLow: !Utils.getAuthority(
context, '宴会管理'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '宴会管理'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '营销中心')) {
NavigatorUtil
... ... @@ -1176,12 +1283,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
}
},
child: _item(
!Utils.getAuthority(context, '营销中心')
outDay == '0' ||
!Utils.getAuthority(
context, '营销中心')
? Utils.getImgPath('bjzm_un')
: Utils.getImgPath('bjzm'),
'营销中心',
isRowLow: !Utils.getAuthority(
context, '营销中心'))),
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '营销中心'))),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
... ...
... ... @@ -22,6 +22,7 @@ import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
import '../app.dart';
import '../models/set_xuan_tai_model.dart';
import '../utils/screen_util.dart';
class UserModel with ChangeNotifier {
String _registrationId; //极光推送registrationId
... ... @@ -255,94 +256,86 @@ class UserModel with ChangeNotifier {
showDialog(
context: pageContext,
builder: (context) {
Widget widget = Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(30)))),
padding: EdgeInsets.only(top: ScreenUtil().setWidth(88)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Center(
child: Text(
"确定要退出登录吗?",
style: TextStyle(
fontSize: ScreenUtil().setSp(36),
color: MyColours.color_353535),
),
),
VEmptyView(66),
MyDivider(double.infinity, ScreenUtil().setWidth(1)),
Container(
// height: ScreenUtil().setWidth(94),
child: Row(
children: <Widget>[
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(94),
alignment: Alignment.center,
child: Text(
"取消",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_777777),
textAlign: TextAlign.center,
)),
),
return Center(
child: Card(
margin: EdgeInsets.symmetric(horizontal: w(30)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
VEmptyView(88),
Center(
child: Text(
"确定要退出登录吗?",
style: TextStyle(
fontSize: ScreenUtil().setSp(36),
color: MyColours.color_353535),
),
MyDivider(
ScreenUtil().setWidth(1), ScreenUtil().setWidth(94)),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop();
loginOut(pageContext, {
"seller_code": user.sellercode,
"account": user.account
});
},
child: Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(94),
alignment: Alignment.center,
child: Text(
"确定",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_2bb5b7),
textAlign: TextAlign.center,
),
VEmptyView(66),
MyDivider(double.infinity, ScreenUtil().setWidth(1)),
Container(
child: Row(
children: <Widget>[
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.all(
Radius.circular(
ScreenUtil().setWidth(30)))),
height: ScreenUtil().setWidth(94),
alignment: Alignment.center,
child: Text(
"取消",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_777777),
textAlign: TextAlign.center,
)),
),
),
),
)
],
),
)
],
),
);
return Center(
child: UnconstrainedBox(
constrainedAxis: Axis.vertical,
child: ConstrainedBox(
constraints:
BoxConstraints(maxWidth: ScreenUtil().setWidth(560)),
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: widget,
)),
),
);
return AlertDialog(
content: widget,
contentPadding: EdgeInsets.zero,
MyDivider(ScreenUtil().setWidth(1),
ScreenUtil().setWidth(94)),
Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pop();
loginOut(pageContext, {
"seller_code": user.sellercode,
"account": user.account
});
},
child: Container(
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.all(
Radius.circular(
ScreenUtil().setWidth(30)))),
height: ScreenUtil().setWidth(94),
alignment: Alignment.center,
child: Text(
"确定",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_2bb5b7),
textAlign: TextAlign.center,
),
),
),
)
],
),
)
],
)),
);
});
}
... ...
... ... @@ -39,6 +39,7 @@ import 'package:path_provider/path_provider.dart';
import 'package:image_cropper/image_cropper.dart';
import 'dart:math';
import '../app.dart';
import '../constant/constant.dart';
import '../models/cookbook_model.dart';
import '../models/coupon_model.dart';
... ... @@ -48,6 +49,18 @@ import '../models/recharge_list_model.dart';
typedef BookTimeSetCallback = void Function(bool needChange);
class Utils {
///店铺是否过期
static isStoreEdate() {
if (App.sp.containsKey('sellerEdate')) {
List<String> data = App.sp.getStringList('sellerEdate');
if (data.contains('-1')) {
//已经弹过过期弹窗
return true;
}
}
return false;
}
///权限获取
static getAuthority(BuildContext context, String key) {
bool hasAuthority = Constant.authorityConfig[key].contains(
... ...