2024-06-04 14:44:04 +08:00
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_entity.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class NewSMSTemplateState {
|
2024-06-04 18:09:38 +08:00
|
|
|
|
NewSMSTemplateState() {
|
|
|
|
|
|
if (Get.arguments != null) {
|
|
|
|
|
|
final Map map = Get.arguments;
|
|
|
|
|
|
currentTemplate.value = map['currentTemplate'];
|
|
|
|
|
|
currentTemplate.refresh();
|
|
|
|
|
|
templateNameTf.text = currentTemplate.value.name ?? '';
|
|
|
|
|
|
templateOneTf.text = currentTemplate.value.regards ?? '';
|
|
|
|
|
|
templateTwoTf.text = currentTemplate.value.tips ?? '';
|
2024-07-09 16:04:56 +08:00
|
|
|
|
channelType.value = currentTemplate.value.channelType ?? 0;
|
2024-07-02 17:42:26 +08:00
|
|
|
|
isUpdate.value = map['isUpdate'];
|
2024-06-04 18:09:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-04 14:44:04 +08:00
|
|
|
|
//高亮样式
|
|
|
|
|
|
final TextStyle highStyle =
|
|
|
|
|
|
TextStyle(color: const Color(0xFFEEDFA8), fontSize: 20.sp);
|
|
|
|
|
|
|
2024-06-05 18:24:59 +08:00
|
|
|
|
//默认样式
|
2024-06-04 14:44:04 +08:00
|
|
|
|
final TextStyle defaultStyle =
|
|
|
|
|
|
TextStyle(color: Colors.black, fontSize: 20.sp);
|
|
|
|
|
|
|
|
|
|
|
|
final TextEditingController templateOneTf = TextEditingController();
|
|
|
|
|
|
final TextEditingController templateTwoTf = TextEditingController();
|
|
|
|
|
|
final TextEditingController templateNameTf = TextEditingController();
|
|
|
|
|
|
|
|
|
|
|
|
RxBool isVip = false.obs;
|
2024-07-09 16:04:56 +08:00
|
|
|
|
RxList<TemplateData> templateList = <TemplateData>[].obs;
|
|
|
|
|
|
Rx<TemplateData> currentTemplate = TemplateData().obs; //当前模板信息
|
|
|
|
|
|
RxList<LangData> langTemplateList = <LangData>[].obs; //语言模板列表
|
|
|
|
|
|
RxInt selectedLangIndex = 0.obs; //选中的语言模板
|
|
|
|
|
|
RxInt selectedTemplateIndex = 0.obs; //选中的模板
|
2024-06-06 13:58:21 +08:00
|
|
|
|
RxBool isShowDate = false.obs; //是否显示日期
|
2024-07-09 16:04:56 +08:00
|
|
|
|
RxInt channelType = 0.obs; //1:短信 2:邮件
|
2024-07-02 17:42:26 +08:00
|
|
|
|
RxString preContent = ''.obs; //预览内容
|
|
|
|
|
|
RxBool isUpdate = false.obs; //是否是修改模板
|
2024-06-04 14:44:04 +08:00
|
|
|
|
}
|