Daisy cd44d44fb8 1,电子钥匙发送短信、邮件通知API对接及逻辑处理
2,电子钥匙模块发送系统短信、系统邮件通知对接及自测完成
2024-06-12 13:53:59 +08:00

43 lines
1.4 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_entity.dart';
class SendEmailNotificationState {
SendEmailNotificationState() {
if (Get.arguments['receiver'] != null) {
getReceiver.value = Get.arguments['receiver'];
}
if (Get.arguments['keyId'] != null) {
getKeyId.value = Get.arguments['keyId'];
}
if (Get.arguments['userNameType'] != null) {
channelType.value = Get.arguments['userNameType'];
if (channelType.value == 1) {
if (notifyTypeSelect.value == 1) {
getNotifyTypeText.value = '系统短信';
} else {
getNotifyTypeText.value = '个人短信';
}
} else {
if (notifyTypeSelect.value == 1) {
getNotifyTypeText.value = '系统邮件';
} else {
getNotifyTypeText.value = '个人邮件';
}
}
}
}
RxString getReceiver = ''.obs;
final TextEditingController emailController = TextEditingController();
RxInt notifyTypeSelect = 1.obs; //1 代表系统2 代表个人
RxInt channelType = 0.obs; //1 代表短信2 代表邮件
RxString getNotifyTypeText = ''.obs;
RxList<EmailNotificationItem> emailTemplateList =
<EmailNotificationItem>[].obs;
Rx<EmailNotificationItem> currentNotifyItem = EmailNotificationItem().obs;
RxInt getKeyId = 0.obs; //获取钥匙成功得到的keyId
}