feat:修改批量添加管理员完成按钮列表
This commit is contained in:
parent
624a43fde2
commit
25598cd270
@ -10,8 +10,8 @@ import 'package:star_lock/tools/dateTool.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_protocol/io_transferPermissions.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_state.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||
@ -31,8 +32,8 @@ class AuthorizedAdminPage extends StatefulWidget {
|
||||
|
||||
class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
final logic = Get.put(AuthorizedAdminLogic());
|
||||
final state = Get.find<AuthorizedAdminLogic>().state;
|
||||
final AuthorizedAdminLogic logic = Get.put(AuthorizedAdminLogic());
|
||||
final AuthorizedAdminState state = Get.find<AuthorizedAdminLogic>().state;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -60,7 +61,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -78,7 +79,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 限时
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(),
|
||||
keyTimeWidget(),
|
||||
keyOnlyManageWidget(),
|
||||
@ -92,7 +93,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 永久
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(),
|
||||
keyOnlyManageWidget(),
|
||||
keyBottomWidget(
|
||||
@ -107,17 +108,17 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 顶部钥匙信息widget
|
||||
Widget keyInfoWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(true,
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, 1)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
isHaveDirection: true,
|
||||
@ -128,7 +129,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
action: () async {
|
||||
var result = await Navigator.pushNamed(
|
||||
final Object? result = await Navigator.pushNamed(
|
||||
context, Routers.selectCountryRegionPage);
|
||||
if (result != null) {
|
||||
result as Map<String, dynamic>;
|
||||
@ -140,7 +141,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)),
|
||||
@ -152,17 +153,18 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: state.beginDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.beginDate.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.beginDate.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
@ -173,10 +175,11 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
rightTitle: state.endDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.endDate.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.endDate.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
@ -190,14 +193,14 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 实名认证
|
||||
Widget keyOnlyManageWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: "仅管理自己创建的用户",
|
||||
rightTitle: "",
|
||||
leftTitel: '仅管理自己创建的用户',
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
isTipsImg: true,
|
||||
tipsImgAction: () {
|
||||
ShowTipView().showSureAlertDialog("授权管理员只能查看和管理自己下发的钥匙、密码等权限");
|
||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限');
|
||||
},
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
@ -212,11 +215,11 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
|
||||
Widget keyBottomWidget(String tipStr) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
tipStr,
|
||||
@ -233,26 +236,27 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.send!.tr,
|
||||
onClick: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
//发送钥匙请求
|
||||
logic.sendElectronicKeyRequest();
|
||||
} else {
|
||||
logic.showToast("演示模式");
|
||||
logic.showToast('演示模式');
|
||||
}
|
||||
}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode =
|
||||
await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
Get.toNamed(Routers.volumeAuthorizationLockManagePage);
|
||||
} else {
|
||||
logic.showToast("演示模式");
|
||||
logic.showToast('演示模式');
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
@ -270,16 +274,15 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 实名认证
|
||||
Widget keyRealNameWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isTipsImg: true,
|
||||
isHaveLine:
|
||||
logic.state.isRequireAuth.value == true ? true : false,
|
||||
isHaveLine: logic.state.isRequireAuth.value == true,
|
||||
tipsImgAction: () {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
"人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。".tr);
|
||||
'人脸实名认证指的是用户在使用手机APP开锁时,需要先进行本人人脸验证,验证通过才能开锁。'.tr);
|
||||
},
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
@ -289,7 +292,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
visible: logic.state.isRequireAuth.value,
|
||||
child: CommonItem(
|
||||
leftTitel: '真实姓名'.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
isHaveLine: true,
|
||||
rightWidget: getTFWidget(false, '请输入真实姓名'.tr, 3)))),
|
||||
@ -297,7 +300,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
visible: logic.state.isRequireAuth.value,
|
||||
child: CommonItem(
|
||||
leftTitel: '身份证号'.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(false, '请输入身份证号'.tr, 4)))),
|
||||
],
|
||||
@ -307,13 +310,13 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
// 发送电子钥匙成功
|
||||
Widget sendElectronicKeySucceed() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 250.h,
|
||||
width: 1.sw,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
@ -327,9 +330,9 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"发送成功",
|
||||
'发送成功',
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: Colors.black,
|
||||
@ -354,9 +357,9 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName:
|
||||
state.emailOrPhoneController.text.contains("@") ? '邮件通知' : "短信通知",
|
||||
state.emailOrPhoneController.text.contains('@') ? '邮件通知' : '短信通知',
|
||||
onClick: () {
|
||||
if (state.emailOrPhoneController.text.contains("@")) {
|
||||
if (state.emailOrPhoneController.text.contains('@')) {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||
} else {
|
||||
NativeInteractionTool()
|
||||
@ -387,7 +390,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
height: 65.h,
|
||||
width: 300.w,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
@ -425,38 +428,37 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
isHaveBtn
|
||||
? Container(
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_addressBook.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? currentContact =
|
||||
await state.contactPicker.selectContact();
|
||||
setState(() {
|
||||
state.contact = currentContact!;
|
||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||
state.emailOrPhoneController.text = currentContact
|
||||
.phoneNumbers![0]
|
||||
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
||||
}
|
||||
|
||||
if (currentContact.fullName!.isNotEmpty) {
|
||||
state.keyNameController.text =
|
||||
currentContact.fullName!;
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container()
|
||||
if (isHaveBtn)
|
||||
Container(
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_addressBook.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
final Contact? currentContact =
|
||||
await state.contactPicker.selectContact();
|
||||
setState(() {
|
||||
state.contact = currentContact!;
|
||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||
state.emailOrPhoneController.text = currentContact
|
||||
.phoneNumbers![0]
|
||||
.replaceAll(RegExp(r'\s+\b|\b\s'), '');
|
||||
}
|
||||
if (currentContact.fullName!.isNotEmpty) {
|
||||
state.keyNameController.text = currentContact.fullName!;
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
else
|
||||
Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -469,7 +471,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.isAuthentication.value,
|
||||
onChanged: (value) {
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
if (logic.state.isAuthentication.value == false) {
|
||||
logic.keyCheckFace();
|
||||
@ -489,7 +491,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.onlyManageYouCreatesUser.value,
|
||||
onChanged: (value) {
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
state.onlyManageYouCreatesUser.value =
|
||||
!state.onlyManageYouCreatesUser.value;
|
||||
@ -498,7 +500,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
);
|
||||
}
|
||||
|
||||
Future _openModalBottomSheet() async {
|
||||
void _openModalBottomSheet() {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(
|
||||
@ -506,7 +508,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
constraints: BoxConstraints(maxHeight: 270.h),
|
||||
builder: (BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: ScreenUtil().screenWidth,
|
||||
height: 180.h,
|
||||
@ -537,7 +539,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
}
|
||||
|
||||
List<Widget> initBottomSheetList() {
|
||||
List<Widget> widgetList = [];
|
||||
final List<Widget> widgetList = <Widget>[];
|
||||
|
||||
widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友', 0));
|
||||
widgetList.add(buildCenter3('images/icon_message.png', '短信', 1));
|
||||
@ -557,7 +559,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
imageName,
|
||||
width: 50.w,
|
||||
@ -579,7 +581,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
}
|
||||
|
||||
//\n生效时间:${itemData.startDate}\n类型:永久\n锁名:${itemData.keyboardPwdName}
|
||||
_jumpSmartDeviceRoute(int itemIndex) {
|
||||
dynamic _jumpSmartDeviceRoute(int itemIndex) {
|
||||
Get.back();
|
||||
switch (itemIndex) {
|
||||
case 0:
|
||||
@ -613,8 +615,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: state.tabController,
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
onTap: (index) {
|
||||
tabs: _itemTabs.map(_tab).toList(),
|
||||
onTap: (int index) {
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
isScrollable: true,
|
||||
@ -655,14 +657,14 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
child: TabBarView(
|
||||
controller: state.tabController,
|
||||
children: _itemTabs
|
||||
.map((ItemView item) => Obx(() => indexChangeWidget()))
|
||||
.map((ItemView item) => Obx(indexChangeWidget))
|
||||
.toList()),
|
||||
);
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,4 @@
|
||||
class NoticeTemplateEntity {
|
||||
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
Data? data;
|
||||
|
||||
NoticeTemplateEntity(
|
||||
{this.errorCode, this.description, this.errorMsg, this.data});
|
||||
|
||||
@ -17,6 +11,11 @@ class NoticeTemplateEntity {
|
||||
}
|
||||
}
|
||||
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
Data? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['errorCode'] = errorCode;
|
||||
@ -28,23 +27,45 @@ class NoticeTemplateEntity {
|
||||
}
|
||||
|
||||
class Data {
|
||||
List<int>? userNos = [];
|
||||
|
||||
Data({
|
||||
this.userNos,
|
||||
});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
if (json['userNos'] is List) {
|
||||
json['userNos'].forEach((element) {
|
||||
userNos?.add(element);
|
||||
if (json['list'] is List) {
|
||||
json['list'].forEach((dynamic element) {
|
||||
list?.add(Item.fromJson(element));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
List<Item>? list = [];
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['userNos'] = userNos;
|
||||
data['list'] = list;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Item {
|
||||
Item.fromJson(Map<String, dynamic> json) {
|
||||
type = json['type'];
|
||||
name = json['name'];
|
||||
template = json['template'];
|
||||
isUse = json['isUse'];
|
||||
fee = json['fee'];
|
||||
}
|
||||
|
||||
String? type;
|
||||
String? name;
|
||||
String? template;
|
||||
int? isUse;
|
||||
int? fee;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['type'] = type;
|
||||
data['name'] = name;
|
||||
data['template'] = template;
|
||||
data['isUse'] = isUse;
|
||||
data['fee'] = fee;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import 'dart:ffi';
|
||||
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/notice_template_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/basicInformation/basicInformation/KeyDetailEntity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
@ -52,13 +53,4 @@ class VolumeAuthorizationLockLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
//发送消息
|
||||
Future<void> sendMsg({required bool isPhone}) async {
|
||||
if (isPhone) {
|
||||
} else {}
|
||||
var entity = await ApiRepository.to.getNoticeTemplate(
|
||||
lockId: CommonDataManage().currentKeyInfo.lockId!,
|
||||
keyId: CommonDataManage().currentKeyInfo.keyId!,
|
||||
channelType: 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +190,8 @@ class _VolumeAuthorizationLockPageState
|
||||
arguments: <String, String>{'keyLimits': '1'})
|
||||
.then((Object? value) {
|
||||
//得到选中的锁ID列表
|
||||
if (value is Map<String, dynamic> && value['selectLockIdList'] is List) {
|
||||
if (value is Map<String, dynamic> &&
|
||||
value['selectLockIdList'] is List) {
|
||||
state.lockIdList.clear();
|
||||
value['selectLockIdList'].forEach((element) {
|
||||
state.lockIdList.add(element);
|
||||
@ -353,22 +354,6 @@ class _VolumeAuthorizationLockPageState
|
||||
state.isSendSuccess.value = false;
|
||||
Navigator.pop(context, true);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName: '邮件通知',
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName: '微信通知',
|
||||
onClick: () {},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/entity/lock_user_no_list_entity.dart';
|
||||
import 'package:star_lock/login/selectCountryRegion/common/countryRegionEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/notice_template_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_entity.dart';
|
||||
@ -2113,14 +2114,14 @@ class ApiRepository {
|
||||
return LockUserNoListEntity.fromJson(res.body);
|
||||
}
|
||||
|
||||
// 检测certifyId是否完成认证
|
||||
Future<LockUserNoListEntity> getNoticeTemplate({
|
||||
// 电子钥匙获取短信模板
|
||||
Future<NoticeTemplateEntity> getNoticeTemplate({
|
||||
required int lockId,
|
||||
required int keyId,
|
||||
required int channelType,
|
||||
}) async {
|
||||
final Response<dynamic> res =
|
||||
await apiProvider.getNoticeTemplate(lockId, keyId, channelType);
|
||||
return LockUserNoListEntity.fromJson(res.body);
|
||||
return NoticeTemplateEntity.fromJson(res.body);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user