Merge branch 'release' of https://gitee.com/starlock-cn/app-starlock into release
This commit is contained in:
commit
6bfa8cdb08
@ -359,11 +359,13 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
btnName:
|
||||
state.emailOrPhoneController.text.contains('@') ? '邮件通知' : '短信通知',
|
||||
onClick: () {
|
||||
if (state.emailOrPhoneController.text.contains('@')) {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||
} else {
|
||||
logic.sendMsg(isPhone: true);
|
||||
}
|
||||
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||
arguments: <String, Object?>{
|
||||
'receiver': state.emailOrPhoneController.text,
|
||||
'channelType':
|
||||
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
||||
'keyId': logic.keyId
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -19,11 +19,14 @@ class MassSendLockGroupListLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getVipStatus() async {
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
state.isVip.refresh();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,9 +27,10 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
||||
Get.find<MassSendLockGroupListLogic>().state;
|
||||
|
||||
@override
|
||||
initState() {
|
||||
void initState() {
|
||||
super.initState();
|
||||
logic.mockNetworkDataRequest();
|
||||
logic.getVipStatus();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -138,8 +139,7 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
||||
currentIndex: index,
|
||||
lockListByGroup: lockItemList,
|
||||
isVip: state.isVip.value,
|
||||
isShowBtn: true,
|
||||
selectLockAction: (selectIndex, selectLockId) {
|
||||
isShowBtn: true, selectLockAction: (selectIndex, selectLockId) {
|
||||
LockListItem lockItem = lockItemList[selectIndex];
|
||||
lockItem.isChecked = !lockItem.isChecked;
|
||||
if (lockItem.isChecked) {
|
||||
|
||||
@ -18,15 +18,17 @@ class MassSendReceiverLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getVipStatus() async {
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
state.isVip.refresh();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
|
||||
final LockUserItemData data = LockUserItemData();
|
||||
state.lockUserList.add(data);
|
||||
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
state.isVip.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiverCell.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_logic.dart';
|
||||
@ -27,6 +26,13 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
||||
final MassSendReceiverLogic logic = Get.put(MassSendReceiverLogic());
|
||||
final MassSendReceiverState state = Get.find<MassSendReceiverLogic>().state;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
logic.getVipStatus();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
||||
@ -416,12 +416,6 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
// OutLineBtn(
|
||||
// btnName: '分享'.tr,
|
||||
// onClick: () {
|
||||
// _openModalBottomSheet();
|
||||
// },
|
||||
// ),
|
||||
if (logic.emailOrPhone != null)
|
||||
OutLineBtn(
|
||||
btnName: logic.state.userNameType.value == 1 ? '短信通知' : '邮件通知',
|
||||
|
||||
@ -54,15 +54,32 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
//发送邮件、短信
|
||||
Future<void> sendPersonalSMSOrEmail() async {
|
||||
if (state.receiverController.text.isEmpty &&
|
||||
state.getReceiver.value.isEmpty) {
|
||||
showToast('请输入接收者');
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.channelType.value == 1) {
|
||||
Uri smsUri;
|
||||
//短信
|
||||
final String phoneNumber = state.getReceiver.value.isEmpty
|
||||
? state.receiverController.text
|
||||
: state.getReceiver.value;
|
||||
final String message = state.templateContentController.text;
|
||||
final Uri smsUri =
|
||||
Uri.parse('sms:$phoneNumber&body=${Uri.encodeComponent(message)}');
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
smsUri = Uri(
|
||||
scheme: 'sms',
|
||||
path: phoneNumber,
|
||||
query: 'body=${Uri.encodeComponent(message)}',
|
||||
);
|
||||
} else {
|
||||
smsUri =
|
||||
Uri.parse('sms:$phoneNumber&body=${Uri.encodeComponent(message)}');
|
||||
}
|
||||
|
||||
if (await canLaunchUrl(smsUri)) {
|
||||
await launchUrl(smsUri);
|
||||
|
||||
@ -72,6 +72,8 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.isSendSuccess.value = true;
|
||||
state.isCreateUser.value = false;
|
||||
state.getKeyId.value = entity.data!.keyId ?? 0;
|
||||
|
||||
// Toast.show(msg: "添加成功");
|
||||
|
||||
eventBus.fire(AuthorizedAdministratorListPageRefreshUI());
|
||||
|
||||
@ -478,14 +478,13 @@ class _AddAuthorizedAdministratorPageState
|
||||
btnName:
|
||||
state.emailOrPhoneController.text.contains('@') ? '邮件通知' : '短信通知',
|
||||
onClick: () {
|
||||
if (state.emailOrPhoneController.text.contains('@')) {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||
} else {
|
||||
// _openModalBottomSheet();
|
||||
NativeInteractionTool()
|
||||
.loadNativeShare(shareText: state.pwdShareStr);
|
||||
}
|
||||
// Get.toNamed(state.emailOrPhoneController.text.contains("@")? Routers.sendEmailNotificationPage:Routers.sendEmailNotificationPage);
|
||||
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||
arguments: <String, Object?>{
|
||||
'receiver': state.emailOrPhoneController.text,
|
||||
'channelType':
|
||||
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
||||
'keyId': state.getKeyId.value
|
||||
});
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -34,4 +34,5 @@ class AddAuthorizedAdministratorState {
|
||||
final Rx<LockListInfoItemEntity> keyInfo = LockListInfoItemEntity().obs;
|
||||
|
||||
String pwdShareStr = '您好,您的授权管理员生成成功';
|
||||
RxInt getKeyId = 0.obs;
|
||||
}
|
||||
|
||||
@ -42,11 +42,14 @@ class GroupEditLockLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getVipStatus() async {
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
state.isVip.refresh();
|
||||
}
|
||||
|
||||
@override
|
||||
onReady() async {
|
||||
super.onReady();
|
||||
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,13 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
||||
final GroupEditLockLogic logic = Get.put(GroupEditLockLogic());
|
||||
final GroupEditLockState state = Get.find<GroupEditLockLogic>().state;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
logic.getVipStatus();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -125,15 +132,13 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
||||
),
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
width: 1.sw - 80.w - 75.w,
|
||||
child: Text(
|
||||
width: 1.sw - 80.w - 75.w,
|
||||
child: Text(
|
||||
itemData.lockAlias ?? '',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)
|
||||
)
|
||||
),
|
||||
))),
|
||||
// Text(
|
||||
// itemData.lockAlias ?? '',
|
||||
// style: TextStyle(fontSize: 24.sp),
|
||||
|
||||
@ -5,6 +5,7 @@ import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
@ -20,7 +21,8 @@ class MineSetLogic extends BaseGetXController {
|
||||
final MineSetState state = MineSetState();
|
||||
//用户信息
|
||||
Future<void> userSettingsInfoRequest() async {
|
||||
var entity = await ApiRepository.to.userSettingsInfo();
|
||||
final UserSettingInfoEntity entity =
|
||||
await ApiRepository.to.userSettingsInfo();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.userInfoData.value = entity.data!;
|
||||
state.userSetting.value = entity.data!.userSettings!;
|
||||
@ -51,21 +53,22 @@ class MineSetLogic extends BaseGetXController {
|
||||
|
||||
//更新提示音
|
||||
Future<void> updatePrompToneRequest() async {
|
||||
ExpireLockListEntity entity = await ApiRepository.to
|
||||
final ExpireLockListEntity entity = await ApiRepository.to
|
||||
.setAlertMode('1', state.isPrompTone.value == true ? '1' : '2');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("设置成功".tr);
|
||||
showToast('设置成功'.tr);
|
||||
userSettingsInfoRequest();
|
||||
}
|
||||
}
|
||||
|
||||
//设置微信公众号推送
|
||||
Future<void> setMpWechatPushSwitchRequest(BuildContext widgetContext) async {
|
||||
VersionUndateEntity entity = await ApiRepository.to.setMpWechatPushSwitch(
|
||||
mpWechatPushSwitch:
|
||||
state.isWechatPublicAccountPush.value == true ? 1 : 2);
|
||||
final VersionUndateEntity entity = await ApiRepository.to
|
||||
.setMpWechatPushSwitch(
|
||||
mpWechatPushSwitch:
|
||||
state.isWechatPublicAccountPush.value == true ? 1 : 2);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("设置成功".tr);
|
||||
showToast('设置成功'.tr);
|
||||
userSettingsInfoRequest();
|
||||
} else if (entity.errorCode! == 421) {
|
||||
if (state.isWechatPublicAccountPush.value == true) {
|
||||
@ -77,15 +80,18 @@ class MineSetLogic extends BaseGetXController {
|
||||
|
||||
//获取微信公众号二维码
|
||||
Future<void> getMpWechatQrCodeRequest(BuildContext widgetContext) async {
|
||||
GetWechatQrCodeEntity entity = await ApiRepository.to.getMpWechatQrCode();
|
||||
final GetWechatQrCodeEntity entity =
|
||||
await ApiRepository.to.getMpWechatQrCode();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.qrCodeUrl.value = entity.data!.qrCodeUrl!;
|
||||
state.qrCodeText.value = entity.data!.mpName ?? '';
|
||||
showQRImageAlert(state.qrCodeUrl.value, widgetContext);
|
||||
}
|
||||
}
|
||||
|
||||
void showQRImageAlert(String qrCodeUrl, BuildContext widgetContext) {
|
||||
ShowCupertinoAlertView().showQRImageAlert(widgetContext, qrCodeUrl);
|
||||
ShowCupertinoAlertView()
|
||||
.showQRImageAlert(widgetContext, qrCodeUrl, state.qrCodeText.value);
|
||||
}
|
||||
|
||||
//退出登录请求
|
||||
@ -117,7 +123,7 @@ class MineSetLogic extends BaseGetXController {
|
||||
ExpireLockListEntity entity = await ApiRepository.to
|
||||
.setTouchUnlockFlag(state.isTouchUnlock.value == true ? '1' : '2');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("设置成功".tr);
|
||||
showToast('设置成功'.tr);
|
||||
userSettingsInfoRequest();
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,18 +191,18 @@ class _MineSetPageState extends State<MineSetPage>
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(_isPushNotificationSwitch))),
|
||||
if (F.appFlavor == Flavor.sky)
|
||||
CommonItem(
|
||||
leftTitel: '微信公众号推送'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(_isWechatPublicAccountPushSwitch)))
|
||||
else
|
||||
Container(),
|
||||
// if (F.appFlavor == Flavor.sky)
|
||||
CommonItem(
|
||||
leftTitel: '微信公众号推送'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
height: 50.h,
|
||||
child: Obx(_isWechatPublicAccountPushSwitch))),
|
||||
// else
|
||||
// Container(),
|
||||
SizedBox(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lockUserManagement!.tr,
|
||||
|
||||
@ -11,6 +11,7 @@ class MineSetState {
|
||||
var isPushNotification = false.obs; //消息推送
|
||||
var isWechatPublicAccountPush = false.obs; //微信公众号推送
|
||||
var qrCodeUrl = ''.obs; //二维码地址
|
||||
var qrCodeText = ''.obs; //二维码提示语
|
||||
|
||||
var lockScreen = 2.obs; //锁屏
|
||||
var hideExpiredAccessFlag = 2.obs; //隐藏无效开锁
|
||||
|
||||
@ -28,16 +28,19 @@ class GetWechatQrCodeEntity {
|
||||
|
||||
class Data {
|
||||
String? qrCodeUrl;
|
||||
String? mpName;
|
||||
|
||||
Data({this.qrCodeUrl});
|
||||
Data({this.qrCodeUrl, this.mpName});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
qrCodeUrl = json['qrCodeUrl'];
|
||||
mpName = json['mpName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['qrCodeUrl'] = qrCodeUrl;
|
||||
data['mpName'] = mpName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,18 +68,15 @@ class _ValueAddedServicesPageListState
|
||||
TranslationLoader.lanKeys!.advancedFunction!.tr, () async {
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == null || !isVip) {
|
||||
// if (CommonDataManage().currentKeyInfo.isLockOwner != 1) {
|
||||
// logic.showToast('请先添加锁');
|
||||
// } else {
|
||||
//刷新购买状态
|
||||
final result = await Get.toNamed(Routers.advancedFeaturesWebPage,
|
||||
arguments: <String, int>{
|
||||
'webBuyType': XSConstantMacro.webBuyTypeVip,
|
||||
});
|
||||
if (result != null && result.isNotEmpty) {
|
||||
logic.getUserInfoRequest();
|
||||
if (CommonDataManage().currentKeyInfo.isLockOwner != 1) {
|
||||
logic.showToast('请先添加锁');
|
||||
} else {
|
||||
//刷新购买状态
|
||||
Get.toNamed(Routers.advancedFeaturesWebPage,
|
||||
arguments: <String, int>{
|
||||
'webBuyType': XSConstantMacro.webBuyTypeVip,
|
||||
})?.then((value) => logic.getUserInfoRequest());
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
Get.toNamed(Routers.valueAddedServicesHighFunctionPage);
|
||||
}
|
||||
|
||||
@ -107,10 +107,14 @@ class CustomSMSTemplateListLogic extends BaseGetXController {
|
||||
textSpans.add(TextSpan(text: text, style: style));
|
||||
}
|
||||
|
||||
Future<void> getVipStatus() async {
|
||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
state.isVip.refresh();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReady() async {
|
||||
super.onReady();
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
state.isVip.value = isVip ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ class _CustomSMSTemplateListPageState extends State<CustomSMSTemplateListPage> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
logic.getSMSTemplateListRequest(isRefresh: true);
|
||||
logic.getVipStatus();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -13,19 +13,20 @@ class ShowCupertinoAlertView {
|
||||
bool isSystemEmailSelected = true; // 默认选中系统邮件
|
||||
|
||||
//微信公众号二维码弹窗
|
||||
void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) {
|
||||
void showQRImageAlert(
|
||||
BuildContext widgetContext, String qrCodeUrl, String qrCodeText) {
|
||||
showCupertinoModalPopup(
|
||||
context: widgetContext,
|
||||
builder: (context) {
|
||||
builder: (BuildContext context) {
|
||||
return CupertinoActionSheet(
|
||||
actions: [
|
||||
actions: <Widget>[
|
||||
Container(
|
||||
color: Colors.white, // 设置底色为白色
|
||||
child: CupertinoActionSheetAction(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(0),
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
),
|
||||
@ -40,7 +41,7 @@ class ShowCupertinoAlertView {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||
child: Text(
|
||||
'开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr,
|
||||
'开启微信接收报警消息需要先关注$qrCodeText微信公众号,请保存二维码并使用微信扫一扫设置',
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, color: Colors.black),
|
||||
)),
|
||||
|
||||
@ -71,8 +71,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# 1.0.60+2024061102:xhj 线上环境,对外发布,提交测试
|
||||
# 1.0.61+2024061103:xhj 线上环境,对外发布,提交测试:处理华为拒审
|
||||
# 1.0.62+2024061301:xhj 线上环境,对外发布,提交测试:处理华为拒审
|
||||
# 1.0.63+2024061302:xhj 线上环境,提交测试:回归 bug
|
||||
|
||||
version: 1.0.62+2024061301
|
||||
version: 1.0.63+2024061302
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user