1,修复星锁点分享界面少了发送密码到、分享
2,修复星锁类型选择的文字,少了句号。系统短信多了那字,是软件里。 3,修复接收者少了通讯录的头像。及选择通讯录相关逻辑操作 4,修复建议限制50位。接收者如是汉字或位数不够,英文弹框,通通锁提示操作失败。 5,星星锁电子钥匙、密码模块发送成功后,发送短信、邮箱接入最新API,解决发送不成功问题
This commit is contained in:
parent
98886b7d9f
commit
7f1642b09f
@ -364,7 +364,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
|||||||
'receiver': state.emailOrPhoneController.text,
|
'receiver': state.emailOrPhoneController.text,
|
||||||
'channelType':
|
'channelType':
|
||||||
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
||||||
'keyId': logic.keyId
|
'keyId': logic.keyId,
|
||||||
|
'unlockType': 1,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -501,18 +502,37 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _openModalBottomSheet() {
|
Future _openModalBottomSheet() async {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadiusDirectional.circular(10)),
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
constraints: BoxConstraints(maxHeight: 270.h),
|
constraints: BoxConstraints(maxHeight: 323.h),
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
height: 180.h,
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'分享',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: 160.h,
|
||||||
|
color: Colors.white,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal, //横向滚动
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
children: initBottomSheetList()),
|
children: initBottomSheetList()),
|
||||||
@ -521,18 +541,23 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
|||||||
height: 8.h,
|
height: 8.h,
|
||||||
color: AppColors.greyBackgroundColor,
|
color: AppColors.greyBackgroundColor,
|
||||||
),
|
),
|
||||||
TextButton(
|
Container(
|
||||||
style: ButtonStyle(
|
color: Colors.white,
|
||||||
overlayColor:
|
margin: const EdgeInsets.only(bottom: 0, left: 0, right: 0),
|
||||||
MaterialStateProperty.all<Color>(Colors.white)),
|
width: ScreenUtil().screenWidth,
|
||||||
child: Text(
|
child: TextButton(
|
||||||
'取消'.tr,
|
style: ButtonStyle(
|
||||||
style: TextStyle(
|
overlayColor:
|
||||||
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
|
child: Text(
|
||||||
|
'取消'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -600,7 +625,14 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
|||||||
case 2:
|
case 2:
|
||||||
//邮件
|
//邮件
|
||||||
{
|
{
|
||||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||||
|
arguments: <String, Object?>{
|
||||||
|
'receiver': state.emailOrPhoneController.text,
|
||||||
|
'channelType':
|
||||||
|
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
||||||
|
'keyId': logic.keyId,
|
||||||
|
'unlockType': 1,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@ -424,7 +424,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
arguments: <String, Object?>{
|
arguments: <String, Object?>{
|
||||||
'receiver': logic.emailOrPhone,
|
'receiver': logic.emailOrPhone,
|
||||||
'channelType': logic.state.userNameType.value,
|
'channelType': logic.state.userNameType.value,
|
||||||
'keyId': logic.keyId
|
'keyId': logic.keyId,
|
||||||
|
'unlockType': 1
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -582,18 +583,37 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _openModalBottomSheet() async {
|
Future _openModalBottomSheet() async {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadiusDirectional.circular(10)),
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
constraints: BoxConstraints(maxHeight: 270.h),
|
constraints: BoxConstraints(maxHeight: 323.h),
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
height: 180.h,
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'分享',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: 160.h,
|
||||||
|
color: Colors.white,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal, //横向滚动
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
children: initBottomSheetList()),
|
children: initBottomSheetList()),
|
||||||
@ -602,18 +622,23 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
height: 8.h,
|
height: 8.h,
|
||||||
color: AppColors.greyBackgroundColor,
|
color: AppColors.greyBackgroundColor,
|
||||||
),
|
),
|
||||||
TextButton(
|
Container(
|
||||||
style: ButtonStyle(
|
color: Colors.white,
|
||||||
overlayColor:
|
margin: const EdgeInsets.only(bottom: 0, left: 0, right: 0),
|
||||||
MaterialStateProperty.all<Color>(Colors.white)),
|
width: ScreenUtil().screenWidth,
|
||||||
child: Text(
|
child: TextButton(
|
||||||
'取消'.tr,
|
style: ButtonStyle(
|
||||||
style: TextStyle(
|
overlayColor:
|
||||||
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
|
child: Text(
|
||||||
|
'取消'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -675,7 +700,8 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//邮件
|
//邮件
|
||||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||||
|
arguments: <String, Object?>{'unlockType': 1});
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//更多
|
//更多
|
||||||
|
|||||||
@ -13,12 +13,18 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
|||||||
|
|
||||||
//获取电子钥匙通知模板 渠道:1短信 2邮箱
|
//获取电子钥匙通知模板 渠道:1短信 2邮箱
|
||||||
Future<void> getKeyNoticeTemplate() async {
|
Future<void> getKeyNoticeTemplate() async {
|
||||||
final SendEmailNotificationEntity entity =
|
final SendEmailNotificationEntity entity;
|
||||||
await ApiRepository.to.getKeyNoticeTemplate(
|
if (state.unlockType.value == 1) {
|
||||||
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
entity = await ApiRepository.to.getKeyNoticeTemplate(
|
||||||
keyId: state.getKeyId.value,
|
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
||||||
channelType: state.channelType.value,
|
keyId: state.getKeyId.value,
|
||||||
);
|
channelType: state.channelType.value);
|
||||||
|
} else {
|
||||||
|
entity = await ApiRepository.to.getPwdNoticeTemplate(
|
||||||
|
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
||||||
|
keyboardPwdId: state.getKeyId.value,
|
||||||
|
channelType: state.channelType.value);
|
||||||
|
}
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.emailTemplateList.value =
|
state.emailTemplateList.value =
|
||||||
entity.data?.list ?? <EmailNotificationItem>[];
|
entity.data?.list ?? <EmailNotificationItem>[];
|
||||||
@ -37,17 +43,32 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
|||||||
showToast('请输入接收者');
|
showToast('请输入接收者');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final SendEmailNotificationEntity entity =
|
final SendEmailNotificationEntity entity;
|
||||||
await ApiRepository.to.keyNoticeSubmit(
|
if (state.unlockType.value == 1) {
|
||||||
receiverName: state.getReceiver.value.isEmpty
|
entity = await ApiRepository.to.keyNoticeSubmit(
|
||||||
? state.receiverController.text
|
receiverName: state.getReceiver.value.isEmpty
|
||||||
: state.getReceiver.value,
|
? state.receiverController.text
|
||||||
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
: state.getReceiver.value,
|
||||||
keyId: state.getKeyId.value,
|
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
||||||
channelType: state.channelType.value,
|
keyId: state.getKeyId.value,
|
||||||
openDoorType: 1,
|
channelType: state.channelType.value,
|
||||||
templateType: state.currentNotifyItem.value.type ?? '',
|
openDoorType: state.unlockType.value,
|
||||||
);
|
templateType: state.currentNotifyItem.value.type ?? '',
|
||||||
|
countryCode: state.countryCode.value,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
entity = await ApiRepository.to.pwdNoticeSubmit(
|
||||||
|
receiverName: state.getReceiver.value.isEmpty
|
||||||
|
? state.receiverController.text
|
||||||
|
: state.getReceiver.value,
|
||||||
|
lockId: CommonDataManage().currentKeyInfo.lockId ?? 0,
|
||||||
|
keyboardPwdId: state.getKeyId.value,
|
||||||
|
channelType: state.channelType.value,
|
||||||
|
openDoorType: state.unlockType.value,
|
||||||
|
templateType: state.currentNotifyItem.value.type ?? '',
|
||||||
|
countryCode: state.countryCode.value,
|
||||||
|
);
|
||||||
|
}
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast('发送成功');
|
showToast('发送成功');
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/appRouters.dart';
|
import 'package:star_lock/appRouters.dart';
|
||||||
@ -82,52 +84,77 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
height: 360.h,
|
// height: 360.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
|
left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||||
child: TextField(
|
child: Column(
|
||||||
maxLines: 8,
|
children: [
|
||||||
maxLength: 1000,
|
TextField(
|
||||||
textAlign: TextAlign.start,
|
maxLines: 8,
|
||||||
controller: state.templateContentController,
|
maxLength: 1000,
|
||||||
style: TextStyle(
|
textAlign: TextAlign.start,
|
||||||
color: Colors.black,
|
controller: state.templateContentController,
|
||||||
fontSize: 22.sp,
|
style: TextStyle(
|
||||||
),
|
color: Colors.black,
|
||||||
decoration: InputDecoration(
|
fontSize: 22.sp,
|
||||||
border: OutlineInputBorder(
|
),
|
||||||
///设置边框四个角的弧度
|
decoration: InputDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.h)),
|
border: OutlineInputBorder(
|
||||||
|
///设置边框四个角的弧度
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.h)),
|
||||||
|
|
||||||
///用来配置边框的样式
|
///用来配置边框的样式
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
///设置边框的颜色
|
///设置边框的颜色
|
||||||
color: Color(0xffB2B2B2),
|
color: Color(0xffB2B2B2),
|
||||||
|
|
||||||
///设置边框的粗细
|
///设置边框的粗细
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
///用来配置输入框获取焦点时的颜色
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
///设置边框四个角的弧度
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.h)),
|
||||||
|
|
||||||
|
///用来配置边框的样式
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
///设置边框的颜色
|
||||||
|
color: Color(0xffB2B2B2),
|
||||||
|
|
||||||
|
///设置边框的粗细
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
///用来配置输入框获取焦点时的颜色
|
Row(
|
||||||
focusedBorder: OutlineInputBorder(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
///设置边框四个角的弧度
|
children: [
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.h)),
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
///用来配置边框的样式
|
Clipboard.setData(ClipboardData(
|
||||||
borderSide: const BorderSide(
|
text: state.templateContentController.text));
|
||||||
///设置边框的颜色
|
EasyLoading.showToast('复制成功'.tr);
|
||||||
color: Color(0xffB2B2B2),
|
},
|
||||||
|
child: Container(
|
||||||
///设置边框的粗细
|
margin: EdgeInsets.only(left: 20.w, top: 0),
|
||||||
width: 1,
|
child: const Icon(
|
||||||
),
|
Icons.copy,
|
||||||
),
|
color: Colors.blue,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(height: 40.h),
|
_buildNewTemplateBtn(),
|
||||||
|
SizedBox(height: 40.h),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: '发送'.tr,
|
btnName: '发送'.tr,
|
||||||
fontSize: 28.sp,
|
fontSize: 28.sp,
|
||||||
@ -144,7 +171,42 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
); }
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildNewTemplateBtn() {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
height: 60.h,
|
||||||
|
margin: EdgeInsets.only(left: 0.w, right: 0.w),
|
||||||
|
color: Colors.white,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_btn_add.png',
|
||||||
|
width: 28.w,
|
||||||
|
height: 28.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 6.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'新建模版',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routers.newSMSTemplatePage);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildReceiverItemWidget() {
|
Widget _buildReceiverItemWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
@ -165,7 +227,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => Text(
|
Obx(() => Text(
|
||||||
'+${state.countryCode.value}',
|
'+${state.countryCode.value.toString()}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.darkGrayTextColor,
|
color: AppColors.darkGrayTextColor,
|
||||||
fontSize: 20.sp),
|
fontSize: 20.sp),
|
||||||
@ -183,7 +245,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
await Get.toNamed(Routers.selectCountryRegionPage);
|
await Get.toNamed(Routers.selectCountryRegionPage);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
result as Map<String, dynamic>;
|
result as Map<String, dynamic>;
|
||||||
state.countryCode.value = result['code'];
|
state.countryCode.value = int.parse(result['code']);
|
||||||
state.countryName.value = result['countryName'];
|
state.countryName.value = result['countryName'];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -191,6 +253,32 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
else
|
else
|
||||||
Container(),
|
Container(),
|
||||||
getReceiverTFWidget(),
|
getReceiverTFWidget(),
|
||||||
|
Container(
|
||||||
|
width: 32.w,
|
||||||
|
height: 32.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 logic.state.contactPicker.selectContact();
|
||||||
|
logic.state.contact = currentContact!;
|
||||||
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
|
logic.state.receiverController.text = currentContact
|
||||||
|
.phoneNumbers![0]
|
||||||
|
.replaceAll(RegExp(r'\s+\b|\b\s'), '');
|
||||||
|
}
|
||||||
|
// if (currentContact.fullName!.isNotEmpty) {
|
||||||
|
// logic.state.keyNameController.text = currentContact.fullName!;
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -210,7 +298,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
FilteringTextInputFormatter.deny('\n'),
|
FilteringTextInputFormatter.deny('\n'),
|
||||||
LengthLimitingTextInputFormatter(30),
|
LengthLimitingTextInputFormatter(50),
|
||||||
],
|
],
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_entity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_entity.dart';
|
||||||
|
|
||||||
@ -12,6 +13,10 @@ class SendEmailNotificationState {
|
|||||||
getKeyId.value = Get.arguments['keyId'];
|
getKeyId.value = Get.arguments['keyId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Get.arguments['unlockType'] != null) {
|
||||||
|
unlockType.value = Get.arguments['unlockType'];
|
||||||
|
}
|
||||||
|
|
||||||
if (Get.arguments['channelType'] != null) {
|
if (Get.arguments['channelType'] != null) {
|
||||||
channelType.value = Get.arguments['channelType'];
|
channelType.value = Get.arguments['channelType'];
|
||||||
updateNotifyTypeText();
|
updateNotifyTypeText();
|
||||||
@ -29,8 +34,11 @@ class SendEmailNotificationState {
|
|||||||
<EmailNotificationItem>[].obs;
|
<EmailNotificationItem>[].obs;
|
||||||
Rx<EmailNotificationItem> currentNotifyItem = EmailNotificationItem().obs;
|
Rx<EmailNotificationItem> currentNotifyItem = EmailNotificationItem().obs;
|
||||||
RxInt getKeyId = 0.obs; //获取钥匙成功得到的keyId
|
RxInt getKeyId = 0.obs; //获取钥匙成功得到的keyId
|
||||||
RxString countryCode = '86'.obs;
|
RxInt countryCode = 86.obs;
|
||||||
RxString countryName = '中国'.obs;
|
RxString countryName = '中国'.obs;
|
||||||
|
late Contact contact;
|
||||||
|
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||||
|
RxInt unlockType = 0.obs; //开锁方式 1:电子钥匙 2:密码
|
||||||
|
|
||||||
Future<void> updateNotifyTypeText() async {
|
Future<void> updateNotifyTypeText() async {
|
||||||
if (channelType.value == 1) {
|
if (channelType.value == 1) {
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
height: 30.h,
|
height: 30.h,
|
||||||
width: 30.w,
|
width: 30.w,
|
||||||
),
|
),
|
||||||
onPressed: openModalBottomSheet,
|
onPressed: _openModalBottomSheet,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -393,18 +393,37 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> openModalBottomSheet() async {
|
Future<void> _openModalBottomSheet() async {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadiusDirectional.circular(10)),
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
constraints: BoxConstraints(maxHeight: 270.h),
|
constraints: BoxConstraints(maxHeight: 323.h),
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'分享',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
height: 160.h,
|
height: 160.h,
|
||||||
|
color: Colors.white,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal, //横向滚动
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
children: initBottomSheetList()),
|
children: initBottomSheetList()),
|
||||||
@ -413,18 +432,23 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
height: 8.h,
|
height: 8.h,
|
||||||
color: AppColors.greyBackgroundColor,
|
color: AppColors.greyBackgroundColor,
|
||||||
),
|
),
|
||||||
TextButton(
|
Container(
|
||||||
style: ButtonStyle(
|
color: Colors.white,
|
||||||
overlayColor:
|
margin: const EdgeInsets.only(bottom: 0, left: 0, right: 0),
|
||||||
MaterialStateProperty.all<Color>(Colors.white)),
|
width: ScreenUtil().screenWidth,
|
||||||
child: Text(
|
child: TextButton(
|
||||||
'取消'.tr,
|
style: ButtonStyle(
|
||||||
style: TextStyle(
|
overlayColor:
|
||||||
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
|
child: Text(
|
||||||
|
'取消'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -486,7 +510,8 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
|||||||
arguments: <String, Object?>{
|
arguments: <String, Object?>{
|
||||||
'receiver': '',
|
'receiver': '',
|
||||||
'channelType': itemIndex == 1 ? 1 : 2,
|
'channelType': itemIndex == 1 ? 1 : 2,
|
||||||
'keyId': CommonDataManage().currentKeyInfo.keyId,
|
'keyId': state.itemData.value.keyboardPwdId,
|
||||||
|
'unlockType': 2
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3: //更多
|
case 3: //更多
|
||||||
|
|||||||
@ -146,6 +146,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
state.pwdController.text = '';
|
state.pwdController.text = '';
|
||||||
if (entity.data != null) {
|
if (entity.data != null) {
|
||||||
state.getPwdStr.value = entity.data!.keyboardPwd!;
|
state.getPwdStr.value = entity.data!.keyboardPwd!;
|
||||||
|
state.getPwdID.value = entity.data!.keyboardPwdId!;
|
||||||
}
|
}
|
||||||
eventBus.fire(GetPasswordListRefreshUI());
|
eventBus.fire(GetPasswordListRefreshUI());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -660,13 +661,32 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadiusDirectional.circular(10)),
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
constraints: BoxConstraints(maxHeight: 270.h),
|
constraints: BoxConstraints(maxHeight: 323.h),
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
'分享',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: AppColors.blackColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
height: 1,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
height: 160.h,
|
height: 160.h,
|
||||||
|
color: Colors.white,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
scrollDirection: Axis.horizontal, //横向滚动
|
scrollDirection: Axis.horizontal, //横向滚动
|
||||||
children: initBottomSheetList()),
|
children: initBottomSheetList()),
|
||||||
@ -675,18 +695,23 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
height: 8.h,
|
height: 8.h,
|
||||||
color: AppColors.greyBackgroundColor,
|
color: AppColors.greyBackgroundColor,
|
||||||
),
|
),
|
||||||
TextButton(
|
Container(
|
||||||
style: ButtonStyle(
|
color: Colors.white,
|
||||||
overlayColor:
|
margin: const EdgeInsets.only(bottom: 0, left: 0, right: 0),
|
||||||
MaterialStateProperty.all<Color>(Colors.white)),
|
width: ScreenUtil().screenWidth,
|
||||||
child: Text(
|
child: TextButton(
|
||||||
'取消'.tr,
|
style: ButtonStyle(
|
||||||
style: TextStyle(
|
overlayColor:
|
||||||
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
MaterialStateProperty.all<Color>(Colors.white)),
|
||||||
|
child: Text(
|
||||||
|
'取消'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: ScreenUtil().setSp(24)),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -805,7 +830,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
arguments: <String, Object?>{
|
arguments: <String, Object?>{
|
||||||
'receiver': '',
|
'receiver': '',
|
||||||
'channelType': itemIndex == 1 ? 1 : 2,
|
'channelType': itemIndex == 1 ? 1 : 2,
|
||||||
'keyId': CommonDataManage().currentKeyInfo.keyId,
|
'keyId': state.getPwdID.value,
|
||||||
|
'unlockType': 2
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3: //更多
|
case 3: //更多
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
|||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
class PasswordKeyPerpetualState {
|
class PasswordKeyPerpetualState {
|
||||||
|
|
||||||
PasswordKeyPerpetualState() {
|
PasswordKeyPerpetualState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
if (map['keyInfo'] != null) {
|
if (map['keyInfo'] != null) {
|
||||||
@ -30,7 +29,8 @@ class PasswordKeyPerpetualState {
|
|||||||
RxInt loopEndHours = DateTime.now().hour.obs;
|
RxInt loopEndHours = DateTime.now().hour.obs;
|
||||||
RxString loopModeStr = '周末'.obs; //循环模式
|
RxString loopModeStr = '周末'.obs; //循环模式
|
||||||
|
|
||||||
RxString customBeginTime = DateTool().getNowDateWithType(2).obs; //默认为当前时间 开始时间
|
RxString customBeginTime =
|
||||||
|
DateTool().getNowDateWithType(2).obs; //默认为当前时间 开始时间
|
||||||
RxString customEndTime = DateTool().getNowDateWithType(2).obs; //默认为当前时间 结束时间
|
RxString customEndTime = DateTool().getNowDateWithType(2).obs; //默认为当前时间 结束时间
|
||||||
|
|
||||||
final RxInt widgetType = 0.obs;
|
final RxInt widgetType = 0.obs;
|
||||||
@ -42,4 +42,5 @@ class PasswordKeyPerpetualState {
|
|||||||
|
|
||||||
RxInt pwdNumber = 0.obs; // 密码编号
|
RxInt pwdNumber = 0.obs; // 密码编号
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
|
RxInt getPwdID = 0.obs; // 获取密码ID
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
: state.lockIdList.value.length.toString(),
|
: state.lockIdList.value.length.toString(),
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
final result = await Get.toNamed(Routers.massSendLockGroupListPage,
|
final result = await Get.toNamed(
|
||||||
|
Routers.massSendLockGroupListPage,
|
||||||
arguments: <String, Object>{
|
arguments: <String, Object>{
|
||||||
'keyLimits': '1',
|
'keyLimits': '1',
|
||||||
'lockIdList': state.lockIdList.value
|
'lockIdList': state.lockIdList.value
|
||||||
@ -94,7 +95,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isTipsImg: true,
|
isTipsImg: true,
|
||||||
tipsImgAction: () {
|
tipsImgAction: () {
|
||||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
ShowTipView()
|
||||||
|
.showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
||||||
},
|
},
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w,
|
width: 60.w,
|
||||||
@ -128,7 +130,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
: state.lockIdList.value.length.toString(),
|
: state.lockIdList.value.length.toString(),
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
final result = await Get.toNamed(Routers.massSendLockGroupListPage,
|
final result = await Get.toNamed(
|
||||||
|
Routers.massSendLockGroupListPage,
|
||||||
arguments: <String, Object>{
|
arguments: <String, Object>{
|
||||||
'keyLimits': '1',
|
'keyLimits': '1',
|
||||||
'lockIdList': state.lockIdList.value
|
'lockIdList': state.lockIdList.value
|
||||||
@ -153,7 +156,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isTipsImg: true,
|
isTipsImg: true,
|
||||||
tipsImgAction: () {
|
tipsImgAction: () {
|
||||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
ShowTipView()
|
||||||
|
.showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
||||||
},
|
},
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
width: 60.w,
|
width: 60.w,
|
||||||
@ -217,7 +221,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 接受者信息输入框
|
// 接受者信息输入框
|
||||||
Widget getTFWidget(bool isHaveBtn, String tfStr, TextEditingController editController) {
|
Widget getTFWidget(
|
||||||
|
bool isHaveBtn, String tfStr, TextEditingController editController) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 65.h,
|
height: 65.h,
|
||||||
width: 300.w,
|
width: 300.w,
|
||||||
@ -487,7 +492,8 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
'receiver': state.emailOrPhoneController.text,
|
'receiver': state.emailOrPhoneController.text,
|
||||||
'channelType':
|
'channelType':
|
||||||
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
state.emailOrPhoneController.text.contains('@') ? 2 : 1,
|
||||||
'keyId': state.getKeyId.value
|
'keyId': state.getKeyId.value,
|
||||||
|
'unlockType': 1
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -576,7 +582,13 @@ class _AddAuthorizedAdministratorPageState
|
|||||||
case 2:
|
case 2:
|
||||||
//邮件
|
//邮件
|
||||||
{
|
{
|
||||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
Navigator.pushNamed(context, Routers.sendEmailNotificationPage,
|
||||||
|
arguments: <String, Object?>{
|
||||||
|
'receiver': state.emailOrPhoneController.text,
|
||||||
|
'channelType': 2,
|
||||||
|
'keyId': state.getKeyId.value,
|
||||||
|
'unlockType': 1
|
||||||
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class CustomSMSTemplateListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
final CustomSMSTemplateListEntity entity = await ApiRepository.to
|
final CustomSMSTemplateListEntity entity = await ApiRepository.to
|
||||||
.getSMSTemplateList(
|
.getSMSTemplateList(
|
||||||
type: state.type.value,
|
channelType: state.type.value,
|
||||||
pageNo: pageNo,
|
pageNo: pageNo,
|
||||||
pageSize: int.parse(pageSize));
|
pageSize: int.parse(pageSize));
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
|||||||
@ -255,7 +255,7 @@ abstract class Api {
|
|||||||
|
|
||||||
final String checkIpURL = '/checkIp/ip';
|
final String checkIpURL = '/checkIp/ip';
|
||||||
final String keyNoticeTemplateURL = '/key/getNoticeTemplate'; //获取电子钥匙通知模板
|
final String keyNoticeTemplateURL = '/key/getNoticeTemplate'; //获取电子钥匙通知模板
|
||||||
final String keyNoticeSubmitURL = '/key/noticeSubmit'; //发送短信、邮件通知
|
final String keyNoticeSubmitURL = '/v2/key/noticeSubmit'; //发送短信、邮件通知
|
||||||
final String lockUpdateLockInfo = '/lock/updateLockInfo'; //更新锁固件版本
|
final String lockUpdateLockInfo = '/lock/updateLockInfo'; //更新锁固件版本
|
||||||
final String exportLockRecordsURL = '/lockRecords/export'; //导出锁操作记录
|
final String exportLockRecordsURL = '/lockRecords/export'; //导出锁操作记录
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2199,11 +2199,11 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 获取短信模板列表
|
// 获取短信模板列表
|
||||||
Future<Response<dynamic>> getSMSTemplateList(
|
Future<Response<dynamic>> getSMSTemplateList(
|
||||||
int type, int pageNo, int pageSize) =>
|
int channelType, int pageNo, int pageSize) =>
|
||||||
post(
|
post(
|
||||||
smsTemplateListURL.toUrl,
|
smsTemplateListURL.toUrl,
|
||||||
jsonEncode(<String, dynamic>{
|
jsonEncode(<String, dynamic>{
|
||||||
'type': type,
|
'channelType': channelType,
|
||||||
'pageNo': pageNo,
|
'pageNo': pageNo,
|
||||||
'pageSize': pageSize
|
'pageSize': pageSize
|
||||||
}),
|
}),
|
||||||
@ -2258,13 +2258,31 @@ class ApiProvider extends BaseProvider {
|
|||||||
jsonEncode(<String, dynamic>{
|
jsonEncode(<String, dynamic>{
|
||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
'keyId': keyId,
|
'keyId': keyId,
|
||||||
'channelType': channelType
|
'channelType': channelType,
|
||||||
}),
|
}),
|
||||||
isUnShowLoading: true,
|
isUnShowLoading: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
Future<Response<dynamic>> keyNoticeSubmit(String receiverName, int lockId,
|
Future<Response<dynamic>> getPwdNoticeTemplate(
|
||||||
int keyId, int channelType, int openDoorType, String templateType) =>
|
int lockId, int keyboardPwdId, int channelType) =>
|
||||||
|
post(
|
||||||
|
keyNoticeTemplateURL.toUrl,
|
||||||
|
jsonEncode(<String, dynamic>{
|
||||||
|
'lockId': lockId,
|
||||||
|
'keyboardPwdId': keyboardPwdId,
|
||||||
|
'channelType': channelType,
|
||||||
|
}),
|
||||||
|
isUnShowLoading: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<Response<dynamic>> keyNoticeSubmit(
|
||||||
|
String receiverName,
|
||||||
|
int lockId,
|
||||||
|
int keyId,
|
||||||
|
int channelType,
|
||||||
|
int openDoorType,
|
||||||
|
String templateType,
|
||||||
|
int countryCode) =>
|
||||||
post(
|
post(
|
||||||
keyNoticeSubmitURL.toUrl,
|
keyNoticeSubmitURL.toUrl,
|
||||||
jsonEncode(<String, dynamic>{
|
jsonEncode(<String, dynamic>{
|
||||||
@ -2274,6 +2292,29 @@ class ApiProvider extends BaseProvider {
|
|||||||
'channelType': channelType,
|
'channelType': channelType,
|
||||||
'openDoorType': openDoorType,
|
'openDoorType': openDoorType,
|
||||||
'templateType': templateType,
|
'templateType': templateType,
|
||||||
|
'countryCode': countryCode
|
||||||
|
}),
|
||||||
|
isUnShowLoading: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
Future<Response<dynamic>> pwdNoticeSubmit(
|
||||||
|
String receiverName,
|
||||||
|
int lockId,
|
||||||
|
int keyboardPwdId,
|
||||||
|
int channelType,
|
||||||
|
int openDoorType,
|
||||||
|
String templateType,
|
||||||
|
int countryCode) =>
|
||||||
|
post(
|
||||||
|
keyNoticeSubmitURL.toUrl,
|
||||||
|
jsonEncode(<String, dynamic>{
|
||||||
|
'receiverName': receiverName,
|
||||||
|
'lockId': lockId,
|
||||||
|
'keyboardPwdId': keyboardPwdId,
|
||||||
|
'channelType': channelType,
|
||||||
|
'openDoorType': openDoorType,
|
||||||
|
'templateType': templateType,
|
||||||
|
'countryCode': countryCode
|
||||||
}),
|
}),
|
||||||
isUnShowLoading: true,
|
isUnShowLoading: true,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2224,9 +2224,11 @@ class ApiRepository {
|
|||||||
|
|
||||||
// 获取短信模板列表
|
// 获取短信模板列表
|
||||||
Future<CustomSMSTemplateListEntity> getSMSTemplateList(
|
Future<CustomSMSTemplateListEntity> getSMSTemplateList(
|
||||||
{required int type, required int pageNo, required int pageSize}) async {
|
{required int channelType,
|
||||||
|
required int pageNo,
|
||||||
|
required int pageSize}) async {
|
||||||
final Response<dynamic> res =
|
final Response<dynamic> res =
|
||||||
await apiProvider.getSMSTemplateList(type, pageNo, pageSize);
|
await apiProvider.getSMSTemplateList(channelType, pageNo, pageSize);
|
||||||
return CustomSMSTemplateListEntity.fromJson(res.body);
|
return CustomSMSTemplateListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2277,17 +2279,54 @@ class ApiRepository {
|
|||||||
return SendEmailNotificationEntity.fromJson(res.body);
|
return SendEmailNotificationEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送短信、邮件通知
|
// 获取密码通知模板
|
||||||
Future<SendEmailNotificationEntity> keyNoticeSubmit({
|
Future<SendEmailNotificationEntity> getPwdNoticeTemplate({
|
||||||
required String receiverName,
|
|
||||||
required int lockId,
|
required int lockId,
|
||||||
required int keyId,
|
required int keyboardPwdId,
|
||||||
required int channelType,
|
required int channelType,
|
||||||
required int openDoorType,
|
|
||||||
required String templateType,
|
|
||||||
}) async {
|
}) async {
|
||||||
|
final Response<dynamic> res = await apiProvider.getPwdNoticeTemplate(
|
||||||
|
lockId, keyboardPwdId, channelType);
|
||||||
|
return SendEmailNotificationEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 电子钥匙发送短信、邮件通知
|
||||||
|
Future<SendEmailNotificationEntity> keyNoticeSubmit(
|
||||||
|
{required String receiverName,
|
||||||
|
required int lockId,
|
||||||
|
required int keyId,
|
||||||
|
required int channelType,
|
||||||
|
required int openDoorType,
|
||||||
|
required String templateType,
|
||||||
|
required int countryCode}) async {
|
||||||
final Response<dynamic> res = await apiProvider.keyNoticeSubmit(
|
final Response<dynamic> res = await apiProvider.keyNoticeSubmit(
|
||||||
receiverName, lockId, keyId, channelType, openDoorType, templateType);
|
receiverName,
|
||||||
|
lockId,
|
||||||
|
keyId,
|
||||||
|
channelType,
|
||||||
|
openDoorType,
|
||||||
|
templateType,
|
||||||
|
countryCode);
|
||||||
|
return SendEmailNotificationEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 密码发送短信、邮件通知
|
||||||
|
Future<SendEmailNotificationEntity> pwdNoticeSubmit(
|
||||||
|
{required String receiverName,
|
||||||
|
required int lockId,
|
||||||
|
required int keyboardPwdId,
|
||||||
|
required int channelType,
|
||||||
|
required int openDoorType,
|
||||||
|
required String templateType,
|
||||||
|
required int countryCode}) async {
|
||||||
|
final Response<dynamic> res = await apiProvider.pwdNoticeSubmit(
|
||||||
|
receiverName,
|
||||||
|
lockId,
|
||||||
|
keyboardPwdId,
|
||||||
|
channelType,
|
||||||
|
openDoorType,
|
||||||
|
templateType,
|
||||||
|
countryCode);
|
||||||
return SendEmailNotificationEntity.fromJson(res.body);
|
return SendEmailNotificationEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,8 +68,8 @@ class EmailNotifyTypeSelectAlert extends StatelessWidget {
|
|||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(
|
child: Text(
|
||||||
isEmail
|
isEmail
|
||||||
? '邮件将从软件平台直接发给用户,请根据需要在软件那里购买邮件数量'
|
? '邮件将从软件平台直接发给用户,请根据需要在软件里购买邮件数量。'
|
||||||
: '短信将从软件平台直接发给用户,请根据需要在软件那里购买短信数量',
|
: '短信将从软件平台直接发给用户,请根据需要在软件里购买短信数量。',
|
||||||
style: TextStyle(fontSize: 18.sp),
|
style: TextStyle(fontSize: 18.sp),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user