fix:调整短信模版只有第二部分内容无法通过审核导致出现不存在的问题

This commit is contained in:
liyi 2025-02-28 14:52:04 +08:00
parent f23fdea62a
commit 30864b5b2f
3 changed files with 34 additions and 21 deletions

View File

@ -11,8 +11,13 @@ import 'package:url_launcher/url_launcher.dart';
class SendEmailNotificationLogic extends BaseGetXController {
final SendEmailNotificationState state = SendEmailNotificationState();
onInit() async {
super.onInit();
getKeyNoticeTemplate();
}
// 1 2
Future<void> getKeyNoticeTemplate() async {
void getKeyNoticeTemplate() async {
final SendEmailNotificationEntity entity;
if (state.unlockType.value == 1) {
entity = await ApiRepository.to.getKeyNoticeTemplate(

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
@ -33,10 +32,10 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
Get.find<SendEmailNotificationLogic>().state;
@override
void initState() {
void initState() {
super.initState();
logic.getKeyNoticeTemplate();
}
@override
@ -340,6 +339,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
Pickers.showSinglePicker(context,
data: nameList,
selectData: state.currentNotifyItem.value.name,
pickerStyle: DefaultPickerStyle(), onConfirm: (p, int position) {
state.currentNotifyItem.value = state.emailTemplateList[position];
state.templateContentController.text =

View File

@ -129,23 +129,30 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
height: 100,
child: _buildContentTF(state.templateOneTf),
),
Obx(() => Container(
width: 1.sw - 50.w,
margin: EdgeInsets.only(left: 25.w, right: 25.w),
padding: EdgeInsets.only(bottom: 20.h),
child: _buildTemplateWithType(isPreview: false),
)),
SizedBox(height: 10.h),
Container(
margin: EdgeInsets.symmetric(horizontal: 25.w, vertical: 25.h),
height: 100,
child: Stack(
alignment: Alignment.bottomRight,
children: <Widget>[
_buildContentTF(state.templateTwoTf),
],
Obx(
() => Container(
width: 1.sw - 50.w,
margin: EdgeInsets.only(left: 25.w, right: 25.w),
padding: EdgeInsets.only(bottom: 20.h),
child: _buildTemplateWithType(isPreview: false),
),
)
),
state.channelType.value == 1
? SizedBox(height: 10.h)
: SizedBox.shrink(),
state.channelType.value == 1
? Container(
margin:
EdgeInsets.symmetric(horizontal: 25.w, vertical: 25.h),
height: 100,
child: Stack(
alignment: Alignment.bottomRight,
children: <Widget>[
_buildContentTF(state.templateTwoTf),
],
),
)
: SizedBox.shrink()
],
),
);
@ -247,7 +254,8 @@ class _NewSMSTemplatePageState extends State<NewSMSTemplatePage> {
height: 65.h,
width: 320.w,
child: TextField(
controller: tfController, //
controller: tfController,
//
maxLines: 3,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.deny('\n'),