Showing
1 changed file
with
25 additions
and
18 deletions
| @@ -122,10 +122,10 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | @@ -122,10 +122,10 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | ||
| 122 | // String result = temp.substring(1, temp.length); | 122 | // String result = temp.substring(1, temp.length); |
| 123 | // print(result); | 123 | // print(result); |
| 124 | 124 | ||
| 125 | - controller.text = | ||
| 126 | - temp.startsWith('\n') ? temp.substring(1, temp.length) : temp; | 125 | + // controller.text = |
| 126 | + // temp.startsWith('\n') ? temp.substring(1, temp.length) : temp; | ||
| 127 | // } | 127 | // } |
| 128 | - // controller.text = temp; | 128 | + controller.text = temp; |
| 129 | print(controller.text); | 129 | print(controller.text); |
| 130 | setState(() {}); | 130 | setState(() {}); |
| 131 | } else { | 131 | } else { |
| @@ -158,11 +158,12 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | @@ -158,11 +158,12 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | ||
| 158 | Map<String, String> params = { | 158 | Map<String, String> params = { |
| 159 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 159 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| 160 | 'sms_code': smsSelectValue, | 160 | 'sms_code': smsSelectValue, |
| 161 | - 'bookinginfo': smsSelectValue == 'tqNH3' || smsSelectValue == 'EZXsN2' | ||
| 162 | - ? text.startsWith('\n') | ||
| 163 | - ? text | ||
| 164 | - : '\n' + text | ||
| 165 | - : text, | 161 | + // 'bookinginfo': smsSelectValue == 'tqNH3' || smsSelectValue == 'EZXsN2' |
| 162 | + // ? text.startsWith('\n') | ||
| 163 | + // ? text | ||
| 164 | + // : '\n' + text | ||
| 165 | + // : text, | ||
| 166 | + 'bookinginfo': text, | ||
| 166 | // 'bookinginfo': text.startsWith('\n') ? text : '\n' + text, | 167 | // 'bookinginfo': text.startsWith('\n') ? text : '\n' + text, |
| 167 | }; | 168 | }; |
| 168 | 169 | ||
| @@ -213,8 +214,9 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | @@ -213,8 +214,9 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | ||
| 213 | // controller.text = temData[i].content; | 214 | // controller.text = temData[i].content; |
| 214 | // controller.text = temData[i].content; | 215 | // controller.text = temData[i].content; |
| 215 | String temp = temData[i].content; | 216 | String temp = temData[i].content; |
| 216 | - controller.text = | ||
| 217 | - temp.startsWith('\n') ? temp.substring(1, temp.length) : temp; | 217 | + controller.text = temp; |
| 218 | + // controller.text = | ||
| 219 | + // temp.startsWith('\n') ? temp.substring(1, temp.length) : temp; | ||
| 218 | marketingCenterProvider.saiYouYunchangedData.forEach((element) { | 220 | marketingCenterProvider.saiYouYunchangedData.forEach((element) { |
| 219 | element.select = false; | 221 | element.select = false; |
| 220 | }); | 222 | }); |
| @@ -244,17 +246,22 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | @@ -244,17 +246,22 @@ class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | ||
| 244 | data.add(btnItem(temData[i].temp, temData[i].select, onTap: () { | 246 | data.add(btnItem(temData[i].temp, temData[i].select, onTap: () { |
| 245 | // if (!canChange) { | 247 | // if (!canChange) { |
| 246 | //从固定模版变更过来的,清空文本框内容 | 248 | //从固定模版变更过来的,清空文本框内容 |
| 247 | - | ||
| 248 | - controller.text = temData[i].now == null | 249 | + controller.text = temData[i].now == null |
| 249 | ? '' | 250 | ? '' |
| 250 | : temData[i].now.content == null | 251 | : temData[i].now.content == null |
| 251 | ? '' | 252 | ? '' |
| 252 | - : temData[i].now.content.startsWith('\n') | ||
| 253 | - ? temData[i] | ||
| 254 | - .now | ||
| 255 | - .content | ||
| 256 | - .substring(1, temData[i].now.content.length) | ||
| 257 | - : temData[i].now.content; | 253 | + : temData[i].now.content; |
| 254 | + | ||
| 255 | + // controller.text = temData[i].now == null | ||
| 256 | + // ? '' | ||
| 257 | + // : temData[i].now.content == null | ||
| 258 | + // ? '' | ||
| 259 | + // : temData[i].now.content.startsWith('\n') | ||
| 260 | + // ? temData[i] | ||
| 261 | + // .now | ||
| 262 | + // .content | ||
| 263 | + // .substring(1, temData[i].now.content.length) | ||
| 264 | + // : temData[i].now.content; | ||
| 258 | // } | 265 | // } |
| 259 | canChange = true; | 266 | canChange = true; |
| 260 | marketingCenterProvider.saiYouYunchangedData.forEach((element) { | 267 | marketingCenterProvider.saiYouYunchangedData.forEach((element) { |
-
Please register or login to post a comment