Commit 3cdc721c5ae9199fd35dbec1367a739ac2b71d32

Authored by wdn127929
1 parent ad23f1ac

模版去掉换行符

... ... @@ -122,10 +122,10 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
// String result = temp.substring(1, temp.length);
// print(result);
controller.text =
temp.startsWith('\n') ? temp.substring(1, temp.length) : temp;
// controller.text =
// temp.startsWith('\n') ? temp.substring(1, temp.length) : temp;
// }
// controller.text = temp;
controller.text = temp;
print(controller.text);
setState(() {});
} else {
... ... @@ -158,11 +158,12 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
Map<String, String> params = {
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
'sms_code': smsSelectValue,
'bookinginfo': smsSelectValue == 'tqNH3' || smsSelectValue == 'EZXsN2'
? text.startsWith('\n')
? text
: '\n' + text
: text,
// 'bookinginfo': smsSelectValue == 'tqNH3' || smsSelectValue == 'EZXsN2'
// ? text.startsWith('\n')
// ? text
// : '\n' + text
// : text,
'bookinginfo': text,
// 'bookinginfo': text.startsWith('\n') ? text : '\n' + text,
};
... ... @@ -213,8 +214,9 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
// controller.text = temData[i].content;
// controller.text = temData[i].content;
String temp = temData[i].content;
controller.text =
temp.startsWith('\n') ? temp.substring(1, temp.length) : temp;
controller.text = temp;
// controller.text =
// temp.startsWith('\n') ? temp.substring(1, temp.length) : temp;
marketingCenterProvider.saiYouYunchangedData.forEach((element) {
element.select = false;
});
... ... @@ -244,17 +246,22 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> {
data.add(btnItem(temData[i].temp, temData[i].select, onTap: () {
// if (!canChange) {
//从固定模版变更过来的,清空文本框内容
controller.text = temData[i].now == null
controller.text = temData[i].now == null
? ''
: temData[i].now.content == null
? ''
: temData[i].now.content.startsWith('\n')
? temData[i]
.now
.content
.substring(1, temData[i].now.content.length)
: temData[i].now.content;
: temData[i].now.content;
// controller.text = temData[i].now == null
// ? ''
// : temData[i].now.content == null
// ? ''
// : temData[i].now.content.startsWith('\n')
// ? temData[i]
// .now
// .content
// .substring(1, temData[i].now.content.length)
// : temData[i].now.content;
// }
canChange = true;
marketingCenterProvider.saiYouYunchangedData.forEach((element) {
... ...