Showing
6 changed files
with
263 additions
and
4 deletions
| @@ -18,19 +18,19 @@ if (flutterRoot == null) { | @@ -18,19 +18,19 @@ if (flutterRoot == null) { | ||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | -def flutterVersionCode = "519" | 21 | +def flutterVersionCode = "520" |
| 22 | if (flutterVersionCode == null) { | 22 | if (flutterVersionCode == null) { |
| 23 | - flutterVersionCode = '519' | 23 | + flutterVersionCode = '520' |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | -def flutterVersionName = "5.1.9" | 30 | +def flutterVersionName = "5.2.0" |
| 31 | 31 | ||
| 32 | if (flutterVersionName == null) { | 32 | if (flutterVersionName == null) { |
| 33 | - flutterVersionName = '5.1.9' | 33 | + flutterVersionName = '5.2.0' |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | } | 36 | } |
| @@ -37,6 +37,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -37,6 +37,7 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 37 | MarketingCenterProvider marketingCenterProvider; | 37 | MarketingCenterProvider marketingCenterProvider; |
| 38 | String themeName = ''; | 38 | String themeName = ''; |
| 39 | String previewUrl = ''; //效果预览的图片链接 | 39 | String previewUrl = ''; //效果预览的图片链接 |
| 40 | + String smsTemplate = ''; //短信模版 | ||
| 40 | 41 | ||
| 41 | @override | 42 | @override |
| 42 | void initState() { | 43 | void initState() { |
| @@ -436,6 +437,51 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | @@ -436,6 +437,51 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { | ||
| 436 | noticeSms = !noticeSms; | 437 | noticeSms = !noticeSms; |
| 437 | }); | 438 | }); |
| 438 | }), | 439 | }), |
| 440 | + InkWell( | ||
| 441 | + onTap: () { | ||
| 442 | + NavigatorUtil.goSmsTemplateSettingPage(context); | ||
| 443 | + }, | ||
| 444 | + child: Padding( | ||
| 445 | + padding: EdgeInsets.only( | ||
| 446 | + left: w(16), | ||
| 447 | + top: w(14), | ||
| 448 | + bottom: w(3), | ||
| 449 | + right: w(12)), | ||
| 450 | + child: Row( | ||
| 451 | + mainAxisAlignment: | ||
| 452 | + MainAxisAlignment.spaceBetween, | ||
| 453 | + children: [ | ||
| 454 | + Text( | ||
| 455 | + '预订通知短信模板选择', | ||
| 456 | + style: TextStyle( | ||
| 457 | + color: MyColours.color_515151, | ||
| 458 | + fontSize: font(14)), | ||
| 459 | + ), | ||
| 460 | + HEmptyView(20), | ||
| 461 | + Expanded( | ||
| 462 | + child: Text( | ||
| 463 | + smsTemplate, | ||
| 464 | + textAlign: TextAlign.right, | ||
| 465 | + style: TextStyle( | ||
| 466 | + color: MyColours.color_515151, | ||
| 467 | + fontSize: font(14)), | ||
| 468 | + )), | ||
| 469 | + Container( | ||
| 470 | + padding: EdgeInsets.symmetric( | ||
| 471 | + horizontal: w(11), | ||
| 472 | + vertical: w(4)), | ||
| 473 | + child: Image.asset( | ||
| 474 | + "assets/arrow_right_new.png", | ||
| 475 | + width: w(9), | ||
| 476 | + height: w(16), | ||
| 477 | + ), | ||
| 478 | + ) | ||
| 479 | + ]))), | ||
| 480 | + | ||
| 481 | + Padding( | ||
| 482 | + padding: EdgeInsets.only(left: w(16)), | ||
| 483 | + child: MyDivider(double.infinity, w(0.5), | ||
| 484 | + color: MyColours.color_E7E7E7)), | ||
| 439 | // _itemSmsWidget(marketingSms, '使用店铺手机发送营销短信', | 485 | // _itemSmsWidget(marketingSms, '使用店铺手机发送营销短信', |
| 440 | // onTap: () { | 486 | // onTap: () { |
| 441 | // setState(() { | 487 | // setState(() { |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 3 | +import 'package:one_key/res/colors.dart'; | ||
| 4 | +import 'package:one_key/utils/dialog_util.dart'; | ||
| 5 | +import 'package:one_key/widgets/h_empty_view.dart'; | ||
| 6 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 7 | +import 'package:one_key/widgets/v_empty_view.dart'; | ||
| 8 | + | ||
| 9 | +import '../../../utils/screen_util.dart'; | ||
| 10 | +import '../../../widgets/round_button.dart'; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 短信模版配置页面 | ||
| 14 | + */ | ||
| 15 | + | ||
| 16 | +class SmsTemplateSettingPage extends StatefulWidget { | ||
| 17 | + SmsTemplateSettingPage({Key key}) : super(key: key); | ||
| 18 | + | ||
| 19 | + @override | ||
| 20 | + _SmsTemplateSettingPageState createState() => _SmsTemplateSettingPageState(); | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +class _SmsTemplateSettingPageState extends State<SmsTemplateSettingPage> { | ||
| 24 | + String content = '尊敬的贵宾,您好!\n诚挚感谢您选择老北京烤鸭用餐!\n'; | ||
| 25 | + | ||
| 26 | + @override | ||
| 27 | + void initState() { | ||
| 28 | + // TODO: implement initState | ||
| 29 | + super.initState(); | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + List<Widget> templateWidgets() { | ||
| 33 | + List<Widget> data = []; | ||
| 34 | + for (var i = 0; i < 25; i++) { | ||
| 35 | + data.add(btnItem('Gld4X4', onTap: () { | ||
| 36 | + setState(() { | ||
| 37 | + content += 'Gld4X4' + '\n'; | ||
| 38 | + }); | ||
| 39 | + })); | ||
| 40 | + } | ||
| 41 | + return data; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + Widget btnItem(String title, {GestureTapCallback onTap}) { | ||
| 45 | + return InkWell( | ||
| 46 | + onTap: onTap, | ||
| 47 | + child: Container( | ||
| 48 | + padding: EdgeInsets.all(w(3)), | ||
| 49 | + decoration: BoxDecoration( | ||
| 50 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 51 | + border: Border.all(width: w(1), color: MyColours.color_438E93)), | ||
| 52 | + child: Text(title, | ||
| 53 | + style: TextStyle( | ||
| 54 | + color: MyColours.color_438E93, | ||
| 55 | + fontSize: font(12), | ||
| 56 | + fontWeight: FontWeight.bold)), | ||
| 57 | + ), | ||
| 58 | + ); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + Widget _templeteWidget( | ||
| 62 | + String title, | ||
| 63 | + ) { | ||
| 64 | + return Container( | ||
| 65 | + margin: EdgeInsets.symmetric(horizontal: w(16), vertical: w(5)), | ||
| 66 | + child: Row( | ||
| 67 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 68 | + children: [ | ||
| 69 | + Text( | ||
| 70 | + title, | ||
| 71 | + style: TextStyle(fontSize: font(16), color: MyColours.color_515151), | ||
| 72 | + ), | ||
| 73 | + HEmptyView(34), | ||
| 74 | + Expanded( | ||
| 75 | + child: Wrap( | ||
| 76 | + spacing: w(5), | ||
| 77 | + runSpacing: w(5), | ||
| 78 | + children: templateWidgets(), | ||
| 79 | + )) | ||
| 80 | + ], | ||
| 81 | + ), | ||
| 82 | + ); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + @override | ||
| 86 | + Widget build(BuildContext context) { | ||
| 87 | + return Scaffold( | ||
| 88 | + backgroundColor: MyColours.color_ffffff, | ||
| 89 | + appBar: SystemAppBar('预订通知短信模板选择'), | ||
| 90 | + body: Column( | ||
| 91 | + children: [ | ||
| 92 | + Expanded( | ||
| 93 | + child: SingleChildScrollView( | ||
| 94 | + child: Column( | ||
| 95 | + children: [ | ||
| 96 | + _templeteWidget('固定模版'), | ||
| 97 | + _templeteWidget('可变模版'), | ||
| 98 | + VEmptyView(10), | ||
| 99 | + Container( | ||
| 100 | + width: double.infinity, | ||
| 101 | + padding: EdgeInsets.all(w(10)), | ||
| 102 | + margin: EdgeInsets.symmetric(horizontal: w(16)), | ||
| 103 | + decoration: BoxDecoration( | ||
| 104 | + border: Border.all( | ||
| 105 | + color: MyColours.color_DBDBDB, width: w(1)), | ||
| 106 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 107 | + child: Text( | ||
| 108 | + content, | ||
| 109 | + style: TextStyle( | ||
| 110 | + height: 1.5, | ||
| 111 | + color: MyColours.color_515151, | ||
| 112 | + fontSize: font(14)), | ||
| 113 | + ), | ||
| 114 | + ), | ||
| 115 | + VEmptyView(10), | ||
| 116 | + Container( | ||
| 117 | + padding: EdgeInsets.symmetric(horizontal: w(21)), | ||
| 118 | + child: Wrap( | ||
| 119 | + spacing: w(10), | ||
| 120 | + runSpacing: w(10), | ||
| 121 | + children: templateWidgets(), | ||
| 122 | + )) | ||
| 123 | + ], | ||
| 124 | + ), | ||
| 125 | + )), | ||
| 126 | + Container( | ||
| 127 | + height: ScreenUtil().setWidth(91 * 2), | ||
| 128 | + width: double.infinity, | ||
| 129 | + padding: EdgeInsets.only( | ||
| 130 | + top: ScreenUtil().setWidth(16 * 2), | ||
| 131 | + bottom: ScreenUtil().setWidth(35 * 2), | ||
| 132 | + left: ScreenUtil().setWidth(23 * 2), | ||
| 133 | + right: ScreenUtil().setWidth(23 * 2), | ||
| 134 | + ), | ||
| 135 | + decoration: BoxDecoration( | ||
| 136 | + color: MyColours.color_ffffff, | ||
| 137 | + boxShadow: [ | ||
| 138 | + BoxShadow( | ||
| 139 | + spreadRadius: ScreenUtil().setWidth(2), | ||
| 140 | + color: Color.fromRGBO(0, 0, 0, 0.1), | ||
| 141 | + offset: Offset(0, ScreenUtil().setWidth(-2)), | ||
| 142 | + blurRadius: ScreenUtil().setWidth(8)) | ||
| 143 | + ], | ||
| 144 | + borderRadius: BorderRadius.all( | ||
| 145 | + Radius.circular(ScreenUtil().setWidth(16)), | ||
| 146 | + ), | ||
| 147 | + ), | ||
| 148 | + child: Row( | ||
| 149 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 150 | + children: [ | ||
| 151 | + RoundButton( | ||
| 152 | + text: '预览效果', | ||
| 153 | + width: w(100), | ||
| 154 | + height: ScreenUtil().setWidth(80), | ||
| 155 | + radius: ScreenUtil().setWidth(14), | ||
| 156 | + gradientStart: MyColours.color_ffffff, | ||
| 157 | + gradientEnd: MyColours.color_ffffff, | ||
| 158 | + borderColor: MyColours.color_438E93, | ||
| 159 | + textColor: MyColours.color_438E93, | ||
| 160 | + isBold: true, | ||
| 161 | + fontSize: 32, | ||
| 162 | + onPressed: () { | ||
| 163 | + DialogUtil.cupertinoAlertDialog(context, | ||
| 164 | + content: content); | ||
| 165 | + }, | ||
| 166 | + ), | ||
| 167 | + HEmptyView(30), | ||
| 168 | + Expanded( | ||
| 169 | + child: RoundButton( | ||
| 170 | + text: '保存', | ||
| 171 | + height: ScreenUtil().setWidth(80), | ||
| 172 | + radius: ScreenUtil().setWidth(14), | ||
| 173 | + isBold: true, | ||
| 174 | + fontSize: 32, | ||
| 175 | + onPressed: () async {}, | ||
| 176 | + ), | ||
| 177 | + ) | ||
| 178 | + ], | ||
| 179 | + )), | ||
| 180 | + ], | ||
| 181 | + ), | ||
| 182 | + ); | ||
| 183 | + } | ||
| 184 | +} |
| @@ -1892,4 +1892,13 @@ class NavigatorUtil { | @@ -1892,4 +1892,13 @@ class NavigatorUtil { | ||
| 1892 | return _navigateTo(context, "${Routes.export_book_data_page}", | 1892 | return _navigateTo(context, "${Routes.export_book_data_page}", |
| 1893 | replace: replace); | 1893 | replace: replace); |
| 1894 | } | 1894 | } |
| 1895 | + | ||
| 1896 | + ///预订通知短信模板选择 | ||
| 1897 | + static Future<dynamic> goSmsTemplateSettingPage( | ||
| 1898 | + BuildContext context, { | ||
| 1899 | + replace = false, | ||
| 1900 | + }) { | ||
| 1901 | + return _navigateTo(context, "${Routes.sms_template_setting_page}", | ||
| 1902 | + replace: replace); | ||
| 1903 | + } | ||
| 1895 | } | 1904 | } |
| @@ -227,6 +227,7 @@ import '../pages/my/marketing_center/recharge/recharge_history_page.dart'; | @@ -227,6 +227,7 @@ import '../pages/my/marketing_center/recharge/recharge_history_page.dart'; | ||
| 227 | import '../pages/my/marketing_center/recharge/recharge_home_page.dart'; | 227 | import '../pages/my/marketing_center/recharge/recharge_home_page.dart'; |
| 228 | import '../pages/my/marketing_center/recharge/recharge_select_store_coupon_page.dart'; | 228 | import '../pages/my/marketing_center/recharge/recharge_select_store_coupon_page.dart'; |
| 229 | import '../pages/my/marketing_center/recharge/recharge_setting_page.dart'; | 229 | import '../pages/my/marketing_center/recharge/recharge_setting_page.dart'; |
| 230 | +import '../pages/my/marketing_center/sms_template_setting_page.dart'; | ||
| 230 | import '../pages/my/marketing_center/theme_model.dart'; | 231 | import '../pages/my/marketing_center/theme_model.dart'; |
| 231 | import '../pages/my/menu_type/menu_add_dishes_page.dart'; | 232 | import '../pages/my/menu_type/menu_add_dishes_page.dart'; |
| 232 | // import '../pages/my/menu_type/menu_add_dishes_page_new.dart'; | 233 | // import '../pages/my/menu_type/menu_add_dishes_page_new.dart'; |
| @@ -3224,3 +3225,14 @@ var exportBookDataPageHandle = new Handler( | @@ -3224,3 +3225,14 @@ var exportBookDataPageHandle = new Handler( | ||
| 3224 | return ChangeNotifierProvider<CustomerProvider>( | 3225 | return ChangeNotifierProvider<CustomerProvider>( |
| 3225 | create: (_) => CustomerProvider(), child: ExportBookDataPage()); | 3226 | create: (_) => CustomerProvider(), child: ExportBookDataPage()); |
| 3226 | }); | 3227 | }); |
| 3228 | + | ||
| 3229 | +//预订通知短信模板选择 | ||
| 3230 | + | ||
| 3231 | +var smsTemplateSettingPageHandle = new Handler( | ||
| 3232 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 3233 | + // String rid = params["rid"].first; | ||
| 3234 | + // String name = params["name"].first; | ||
| 3235 | + return ChangeNotifierProvider<MarketingCenterProvider>( | ||
| 3236 | + create: (_) => MarketingCenterProvider(), | ||
| 3237 | + child: SmsTemplateSettingPage()); | ||
| 3238 | +}); |
| @@ -307,6 +307,10 @@ class Routes { | @@ -307,6 +307,10 @@ class Routes { | ||
| 307 | 307 | ||
| 308 | static String export_book_data_page = "/export_book_data_page"; //预订数据导出页面 | 308 | static String export_book_data_page = "/export_book_data_page"; //预订数据导出页面 |
| 309 | 309 | ||
| 310 | + static String sms_template_setting_page = "/sms_template_setting_page"; //短信模版设置 | ||
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 310 | 314 | ||
| 311 | 315 | ||
| 312 | static void configureRoutes(FluroRouter router) { | 316 | static void configureRoutes(FluroRouter router) { |
| @@ -575,6 +579,10 @@ class Routes { | @@ -575,6 +579,10 @@ class Routes { | ||
| 575 | 579 | ||
| 576 | router.define(export_book_data_page, handler: exportBookDataPageHandle); | 580 | router.define(export_book_data_page, handler: exportBookDataPageHandle); |
| 577 | 581 | ||
| 582 | +router.define(sms_template_setting_page, handler: smsTemplateSettingPageHandle); | ||
| 583 | + | ||
| 584 | + | ||
| 585 | + | ||
| 578 | 586 | ||
| 579 | } | 587 | } |
| 580 | } | 588 | } |
-
Please register or login to post a comment