fix:修复版本号,并且修复发送钥匙的 bug
This commit is contained in:
parent
bd2f9fa4ac
commit
5d689749d1
@ -20,13 +20,16 @@ import 'package:star_lock/tools/storage.dart';
|
||||
|
||||
class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
SendElectronicKeyViewLogic(this.type);
|
||||
|
||||
String type;
|
||||
final SendElectronicKeyViewState state = SendElectronicKeyViewState();
|
||||
int? keyId;
|
||||
|
||||
String? emailOrPhone;
|
||||
|
||||
List<dynamic> get weekDayStr {
|
||||
return state.weekdaysList.map((e) => TimeUtils.translateWeekday(e)).toList();
|
||||
return state.weekdaysList
|
||||
.map((e) => TimeUtils.translateWeekday(e))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -178,6 +181,7 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
? state.idCardController.text
|
||||
: '');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
emailOrPhone = state.emailOrPhoneController.text;
|
||||
state.createUser.value = 0;
|
||||
state.isSendSuccess = true;
|
||||
keyId = entity.data!.keyId;
|
||||
@ -185,6 +189,7 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
update();
|
||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||
} else {
|
||||
emailOrPhone = null;
|
||||
if (entity.errorCode == 425) {
|
||||
//用户未注册
|
||||
update();
|
||||
@ -249,12 +254,12 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
}
|
||||
final NoticeTemplateEntity entity = await ApiRepository.to
|
||||
.getNoticeTemplate(
|
||||
lockId: CommonDataManage().currentKeyInfo.lockId!,
|
||||
keyId: keyId!,
|
||||
channelType: isPhone ? 1 : 2);
|
||||
lockId: CommonDataManage().currentKeyInfo.lockId!,
|
||||
keyId: keyId!,
|
||||
channelType: isPhone ? 1 : 2);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
final List<Item?> list =
|
||||
entity.data!.list!.where((Item item) => item.isUse == 0).toList();
|
||||
entity.data!.list!.where((Item item) => item.isUse == 0).toList();
|
||||
if (list.isNotEmpty) {
|
||||
final Item item = list.first!;
|
||||
final String template = item.template ?? '';
|
||||
|
||||
@ -422,27 +422,27 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// _openModalBottomSheet();
|
||||
// },
|
||||
// ),
|
||||
OutLineBtn(
|
||||
btnName:
|
||||
logic.state.emailOrPhoneController.text.contains('@') ? '邮件通知' : '短信通知',
|
||||
onClick: () {
|
||||
if (logic.state.emailOrPhoneController.text.contains('@')) {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||
} else {
|
||||
logic.sendMsg(isPhone: true);
|
||||
}
|
||||
},
|
||||
),
|
||||
if (logic.emailOrPhone != null)
|
||||
OutLineBtn(
|
||||
btnName: logic.emailOrPhone!.contains('@') ? '邮件通知' : '短信通知',
|
||||
onClick: () {
|
||||
if (logic.emailOrPhone!.contains('@')) {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage);
|
||||
} else {
|
||||
logic.sendMsg(isPhone: true);
|
||||
}
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName: '微信通知',
|
||||
onClick: () {
|
||||
logic.sendMsg(
|
||||
isPhone: logic.state.emailOrPhoneController.text.contains('@'));
|
||||
},
|
||||
),
|
||||
if (logic.emailOrPhone != null)
|
||||
OutLineBtn(
|
||||
btnName: '微信通知',
|
||||
onClick: () {
|
||||
logic.sendMsg(isPhone: logic.emailOrPhone!.contains('@'));
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# 1.0.53+2024052803:xhj 线上环境,提审 sky 线上环境提审
|
||||
# 1.0.53+2024052804:xhj 线上环境,提审 修改鑫锁名字为星星锁
|
||||
# 1.0.54+2024053001:xhj 线上环境,对外发布,提交测试
|
||||
# 1.0.56+202406401:xhj 线上环境,对外发布,提交测试
|
||||
# 1.0.56+2024060401:xhj 线上环境,对外发布,提交测试
|
||||
|
||||
version: 1.0.56+202406401
|
||||
version: 1.0.56+2024060401
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user