Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
This commit is contained in:
commit
dd16c0dcb0
@ -364,7 +364,7 @@
|
||||
"emailTemplate":"邮件模板",
|
||||
"cardIssuingtool":"发卡工具",
|
||||
"titleForBuyingAdvancedFeatures":"购买高级功能须知",
|
||||
"tipsForBuyingAdvancedFeatures":"更多的高级功能正在开发中,如果您需要这些功能,欢迎根据锁的数量开通服务。高级功能仅能用于您自己的锁。如果您是授权管理员,请联系锁的最高管理员开通服务",
|
||||
"tipsForBuyingAdvancedFeatures":"更多的高级功能正在开发中,如果您需要这些功能,欢迎根据锁的数量开通服务。高级功能仅能用于您自己的锁。如果您是授权管理员,请联系锁的最高管理员开通服务。",
|
||||
"freeTrial":"免费体验",
|
||||
"openNow":"立即开通",
|
||||
|
||||
|
||||
@ -145,45 +145,6 @@ class AddFamilyLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
//高级功能弹窗
|
||||
void advancedFeatureAlert() {
|
||||
showCupertinoDialog(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: Container(
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
child: Image.asset(
|
||||
'images/icon_gift.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
),
|
||||
content: Text('该功能是高级功能,请开通后再使用'.tr),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(
|
||||
'取消'.tr,
|
||||
style: TextStyle(color: AppColors.mainColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(
|
||||
'去开通'.tr,
|
||||
style: TextStyle(color: AppColors.mainColor),
|
||||
),
|
||||
onPressed: () async {
|
||||
Get.toNamed(Routers.advancedFeaturesWebPage);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
//根据列表返回值得到邮箱、手机列表
|
||||
Map<String, List<MsgNoticeModeData>> getAccountsMap() {
|
||||
List<MsgNoticeModeData> mailAccounts = [];
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/addFamily/addFamily_logic.dart';
|
||||
import 'package:star_lock/tools/advancedFunctionAlert.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/showTFView.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
@ -124,7 +125,7 @@ class _AddFamilyPageState extends State<AddFamilyPage> {
|
||||
logic.addLockNoticeSetting();
|
||||
}
|
||||
} else {
|
||||
logic.advancedFeatureAlert();
|
||||
AdvancedFunctionHandle().advancedFeatureAlert();
|
||||
}
|
||||
},
|
||||
)),
|
||||
|
||||
@ -3,7 +3,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart';
|
||||
import 'package:star_lock/tools/advancedFunctionAlert.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
|
||||
import '../../../../../../app_settings/app_colors.dart';
|
||||
@ -107,11 +109,16 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
? true
|
||||
: logic.checkBtnDisable(),
|
||||
isDelete: state.isDetail.value,
|
||||
onClick: () {
|
||||
if (state.isDetail.value) {
|
||||
logic.deleteLockNoticeSetting();
|
||||
onClick: () async {
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == true) {
|
||||
if (state.isDetail.value) {
|
||||
logic.deleteLockNoticeSetting();
|
||||
} else {
|
||||
logic.addLockNoticeSetting();
|
||||
}
|
||||
} else {
|
||||
logic.addLockNoticeSetting();
|
||||
AdvancedFunctionHandle().advancedFeatureAlert();
|
||||
}
|
||||
},
|
||||
)),
|
||||
|
||||
@ -3,7 +3,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/tools/advancedFunctionAlert.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
@ -113,8 +115,13 @@ class _LowBatteryReminderPageState extends State<LowBatteryReminderPage> {
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: '保存'.tr,
|
||||
onClick: () {
|
||||
logic.lockNoticeSettingAccountList();
|
||||
onClick: () async {
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == false) {
|
||||
AdvancedFunctionHandle().advancedFeatureAlert();
|
||||
} else {
|
||||
logic.lockNoticeSettingAccountList();
|
||||
}
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -4,9 +4,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_entity.dart';
|
||||
import 'package:star_lock/tools/advancedFunctionAlert.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||
import 'package:star_lock/tools/pickers/style/default_style.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
@ -64,8 +66,13 @@ class _NDaysUnopenedPageState extends State<NDaysUnopenedPage> {
|
||||
)),
|
||||
SubmitBtn(
|
||||
btnName: '保存'.tr,
|
||||
onClick: () {
|
||||
logic.lockNoticeSettingAccountList();
|
||||
onClick: () async {
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == false) {
|
||||
AdvancedFunctionHandle().advancedFeatureAlert();
|
||||
} else {
|
||||
logic.lockNoticeSettingAccountList();
|
||||
}
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
46
star_lock/lib/tools/advancedFunctionAlert.dart
Normal file
46
star_lock/lib/tools/advancedFunctionAlert.dart
Normal file
@ -0,0 +1,46 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
|
||||
class AdvancedFunctionHandle {
|
||||
//高级功能弹窗
|
||||
void advancedFeatureAlert() {
|
||||
showCupertinoDialog(
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: Container(
|
||||
margin: EdgeInsets.only(bottom: 20.h),
|
||||
child: Image.asset(
|
||||
'images/icon_gift.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
),
|
||||
content: Text('该功能是高级功能,请开通后再使用'.tr),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(
|
||||
'取消'.tr,
|
||||
style: TextStyle(color: AppColors.mainColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(
|
||||
'去开通'.tr,
|
||||
style: TextStyle(color: AppColors.mainColor),
|
||||
),
|
||||
onPressed: () async {
|
||||
Get.toNamed(Routers.advancedFeaturesWebPage);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user