Commit 456ee5e9d41825875027e5bdce3e4dc0cb3d7f1d

Authored by wdn127929
1 parent e4185d48

保存店铺信息时更新缓存(店铺名称、店铺地址、店铺电话)+预订安排定制输入可换行(店铺介绍+厨师介绍)

@@ -14,16 +14,16 @@ if (flutterRoot == null) { @@ -14,16 +14,16 @@ if (flutterRoot == null) {
14 14
15 15
16 16
17 -def flutterVersionCode = "461" 17 +def flutterVersionCode = "462"
18 if (flutterVersionCode == null) { 18 if (flutterVersionCode == null) {
19 - flutterVersionCode = '461' 19 + flutterVersionCode = '462'
20 } 20 }
21 21
22 22
23 23
24 -def flutterVersionName = "4.6.1" 24 +def flutterVersionName = "4.6.2"
25 if (flutterVersionName == null) { 25 if (flutterVersionName == null) {
26 - flutterVersionName = '4.6.1' 26 + flutterVersionName = '4.6.2'
27 } 27 }
28 28
29 29
@@ -2,6 +2,7 @@ import 'dart:convert'; @@ -2,6 +2,7 @@ import 'dart:convert';
2 import 'dart:io'; 2 import 'dart:io';
3 3
4 import 'package:flutter/material.dart'; 4 import 'package:flutter/material.dart';
  5 +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
5 import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 import 'package:flutter_screenutil/flutter_screenutil.dart';
6 import 'package:image_picker/image_picker.dart'; 7 import 'package:image_picker/image_picker.dart';
7 import 'package:one_key/widgets/v_empty_view.dart'; 8 import 'package:one_key/widgets/v_empty_view.dart';
@@ -411,7 +412,8 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> { @@ -411,7 +412,8 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
411 contentPadding: EdgeInsets.zero, 412 contentPadding: EdgeInsets.zero,
412 border: OutlineInputBorder(borderSide: BorderSide.none), 413 border: OutlineInputBorder(borderSide: BorderSide.none),
413 ), 414 ),
414 - keyboardType: TextInputType.text, 415 + keyboardType: TextInputType.multiline,
  416 + textInputAction: TextInputAction.newline,
415 onChanged: (value) { 417 onChanged: (value) {
416 setState(() { 418 setState(() {
417 // currentRemark = value ?? ""; 419 // currentRemark = value ?? "";
@@ -648,127 +650,130 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> { @@ -648,127 +650,130 @@ class _ChefIntroducePageState extends State<ChefIntroducePage> {
648 650
649 _marketingCenterProvider = 651 _marketingCenterProvider =
650 Provider.of<MarketingCenterProvider>(context, listen: true); 652 Provider.of<MarketingCenterProvider>(context, listen: true);
651 - return Scaffold(  
652 - backgroundColor: MyColours.color_ffffff,  
653 - appBar: SystemAppBar(  
654 - '主厨介绍',  
655 - onTap: () {  
656 - Navigator.pop(context);  
657 - },  
658 - ),  
659 - body: Column(  
660 - children: [  
661 - Expanded(  
662 - child: SingleChildScrollView(  
663 - child: Column(  
664 - children: [  
665 - _selectBtnWidget(),  
666 - VEmptyView(24),  
667 - Container(  
668 - alignment: Alignment.centerLeft,  
669 - padding: EdgeInsets.only(left: w(16)),  
670 - height: w(48),  
671 - child: Text(  
672 - '效果预览',  
673 - style: TextStyle(  
674 - fontSize: font(16), color: MyColours.color_515151),  
675 - ), 653 + return KeyboardDismissOnTap(
  654 + child: Scaffold(
  655 + backgroundColor: MyColours.color_ffffff,
  656 + appBar: SystemAppBar(
  657 + '主厨介绍',
  658 + onTap: () {
  659 + Navigator.pop(context);
  660 + },
  661 + ),
  662 + body: Column(
  663 + children: [
  664 + Expanded(
  665 + child: SingleChildScrollView(
  666 + child: Column(
  667 + children: [
  668 + _selectBtnWidget(),
  669 + VEmptyView(24),
  670 + Container(
  671 + alignment: Alignment.centerLeft,
  672 + padding: EdgeInsets.only(left: w(16)),
  673 + height: w(48),
  674 + child: Text(
  675 + '效果预览',
  676 + style: TextStyle(
  677 + fontSize: font(16),
  678 + color: MyColours.color_515151),
  679 + ),
  680 + ),
  681 + VEmptyView(24),
  682 + currIndex == 0
  683 + ? _noTextWidget()
  684 + : currIndex == 1
  685 + ? _mergingWidget()
  686 + : _separateWidget(),
  687 + VEmptyView(18),
  688 + ],
676 ), 689 ),
677 - VEmptyView(24),  
678 - currIndex == 0  
679 - ? _noTextWidget()  
680 - : currIndex == 1  
681 - ? _mergingWidget()  
682 - : _separateWidget(),  
683 - VEmptyView(18),  
684 - ],  
685 - ),  
686 - )),  
687 - Container(  
688 - color: MyColours.color_ffffff,  
689 - padding: EdgeInsets.only(  
690 - left: w(45), right: w(45), top: w(12), bottom: w(25)),  
691 - child: RoundButton(  
692 - text: '保存',  
693 - gradientStart: MyColours.color_199095,  
694 - gradientEnd: MyColours.color_199095,  
695 - // borderColor: MyColours.color_999999,  
696 - radius: r(5),  
697 - fontSize: 34,  
698 - height: w(40),  
699 - isBold: true,  
700 - onPressed: () async {  
701 - FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘  
702 -  
703 - if ((currIndex == 1 || currIndex == 2)) {  
704 - if (chefNameC.text.trim().length == 0) {  
705 - Utils.showToast('请输入主厨姓名!');  
706 - return false;  
707 - }  
708 - if (chefIntroduceC.text.trim().length == 0) {  
709 - Utils.showToast('请输入主厨介绍文字!');  
710 - return false;  
711 - }  
712 - if (_uploadImageProvider.firstImage.qiniuUrl == null) {  
713 - Utils.showToast('请上传图片!');  
714 - return false;  
715 - }  
716 -  
717 - if (_uploadImageProvider.firstImage.process < 1) {  
718 - Utils.showToast('正在上传图片,请稍等');  
719 - return false;  
720 - }  
721 - }  
722 -  
723 - // List<String> images = [];  
724 - // if (_uploadImageProvider.storeImage1.qiniuUrl != null &&  
725 - // _uploadImageProvider.storeImage1.qiniuUrl != '') {  
726 - // images.add(_uploadImageProvider.storeImage1.qiniuUrl);  
727 - // }  
728 - // if (_uploadImageProvider.storeImage2.qiniuUrl != null &&  
729 - // _uploadImageProvider.storeImage2.qiniuUrl != '') {  
730 - // images.add(_uploadImageProvider.storeImage2.qiniuUrl);  
731 - // }  
732 - // if (_uploadImageProvider.storeImage3.qiniuUrl != null &&  
733 - // _uploadImageProvider.storeImage3.qiniuUrl != '') {  
734 - // images.add(_uploadImageProvider.storeImage3.qiniuUrl);  
735 - // }  
736 - // if (_uploadImageProvider.storeImage3.qiniuUrl != null &&  
737 - // _uploadImageProvider.storeImage3.qiniuUrl != '') {  
738 - // images.add(_uploadImageProvider.storeImage3.qiniuUrl);  
739 - // }  
740 - // if (images.length == 0) {  
741 - // Utils.showToast('请至少上传一张图片!');  
742 - // return false;  
743 - // }  
744 -  
745 - //接口  
746 - Map chefData = {  
747 - 'style': currIndex.toString(),  
748 - 'seller_name': sellername,  
749 - 'chef_name': chefNameC.text,  
750 - 'introduce': chefIntroduceC.text,  
751 - 'image': _uploadImageProvider.firstImage.qiniuUrl  
752 - };  
753 -  
754 - Map<String, String> params = {  
755 - 'sid': Provider.of<UserModel>(context, listen: false)  
756 - .user  
757 - .sellerid,  
758 - 'chef': json.encode(chefData)  
759 - };  
760 -  
761 - bool success = await _marketingCenterProvider  
762 - .setSellerTemplateConf(context, params,  
763 - showLoading: true);  
764 - if (success) {  
765 - Utils.showToast('保存成功');  
766 - Navigator.pop(context);  
767 - }  
768 - },  
769 - ),  
770 - )  
771 - ],  
772 - )); 690 + )),
  691 + Container(
  692 + color: MyColours.color_ffffff,
  693 + padding: EdgeInsets.only(
  694 + left: w(45), right: w(45), top: w(12), bottom: w(25)),
  695 + child: RoundButton(
  696 + text: '保存',
  697 + gradientStart: MyColours.color_199095,
  698 + gradientEnd: MyColours.color_199095,
  699 + // borderColor: MyColours.color_999999,
  700 + radius: r(5),
  701 + fontSize: 34,
  702 + height: w(40),
  703 + isBold: true,
  704 + onPressed: () async {
  705 + FocusScope.of(context)
  706 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  707 +
  708 + if ((currIndex == 1 || currIndex == 2)) {
  709 + if (chefNameC.text.trim().length == 0) {
  710 + Utils.showToast('请输入主厨姓名!');
  711 + return false;
  712 + }
  713 + if (chefIntroduceC.text.trim().length == 0) {
  714 + Utils.showToast('请输入主厨介绍文字!');
  715 + return false;
  716 + }
  717 + if (_uploadImageProvider.firstImage.qiniuUrl == null) {
  718 + Utils.showToast('请上传图片!');
  719 + return false;
  720 + }
  721 +
  722 + if (_uploadImageProvider.firstImage.process < 1) {
  723 + Utils.showToast('正在上传图片,请稍等');
  724 + return false;
  725 + }
  726 + }
  727 +
  728 + // List<String> images = [];
  729 + // if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
  730 + // _uploadImageProvider.storeImage1.qiniuUrl != '') {
  731 + // images.add(_uploadImageProvider.storeImage1.qiniuUrl);
  732 + // }
  733 + // if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
  734 + // _uploadImageProvider.storeImage2.qiniuUrl != '') {
  735 + // images.add(_uploadImageProvider.storeImage2.qiniuUrl);
  736 + // }
  737 + // if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
  738 + // _uploadImageProvider.storeImage3.qiniuUrl != '') {
  739 + // images.add(_uploadImageProvider.storeImage3.qiniuUrl);
  740 + // }
  741 + // if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
  742 + // _uploadImageProvider.storeImage3.qiniuUrl != '') {
  743 + // images.add(_uploadImageProvider.storeImage3.qiniuUrl);
  744 + // }
  745 + // if (images.length == 0) {
  746 + // Utils.showToast('请至少上传一张图片!');
  747 + // return false;
  748 + // }
  749 +
  750 + //接口
  751 + Map chefData = {
  752 + 'style': currIndex.toString(),
  753 + 'seller_name': sellername,
  754 + 'chef_name': chefNameC.text,
  755 + 'introduce': chefIntroduceC.text,
  756 + 'image': _uploadImageProvider.firstImage.qiniuUrl
  757 + };
  758 +
  759 + Map<String, String> params = {
  760 + 'sid': Provider.of<UserModel>(context, listen: false)
  761 + .user
  762 + .sellerid,
  763 + 'chef': json.encode(chefData)
  764 + };
  765 +
  766 + bool success = await _marketingCenterProvider
  767 + .setSellerTemplateConf(context, params,
  768 + showLoading: true);
  769 + if (success) {
  770 + Utils.showToast('保存成功');
  771 + Navigator.pop(context);
  772 + }
  773 + },
  774 + ),
  775 + )
  776 + ],
  777 + )));
773 } 778 }
774 } 779 }
@@ -507,57 +507,120 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { @@ -507,57 +507,120 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
507 Color textColor = MyColours.color_515151, 507 Color textColor = MyColours.color_515151,
508 Color hintColor = MyColours.color_999999, 508 Color hintColor = MyColours.color_999999,
509 BoxDecoration boxDecoration}) { 509 BoxDecoration boxDecoration}) {
510 - return Container(  
511 - width: width,  
512 - alignment: Alignment.centerLeft,  
513 - padding: edgeInsets,  
514 - decoration: boxDecoration,  
515 - child: Column(  
516 - crossAxisAlignment: CrossAxisAlignment.start,  
517 - children: [  
518 - Text(  
519 - 'Introduce',  
520 - style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),  
521 - ),  
522 - Text(  
523 - '品牌介绍',  
524 - style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),  
525 - ),  
526 - VEmptyView(16),  
527 - Text(  
528 - '${_marketingCenterProvider.markDataModel.store.sellerName}',  
529 - style: TextStyle(color: textColor, fontSize: font(14)),  
530 - ),  
531 - VEmptyView(32),  
532 - Container(  
533 - width: double.infinity,  
534 - // margin: EdgeInsets.symmetric(horizontal: w(10)),  
535 - // padding: EdgeInsets.symmetric(horizontal: w(6)),  
536 - decoration: BoxDecoration(  
537 - border: Border(  
538 - left: BorderSide(  
539 - width: w(2), color: MyColours.color_EEAE74))),  
540 - child: Container( 510 + Widget container;
  511 + if (edgeInsets.top == w(23)) {
  512 + //图文合并
  513 + container = Container(
  514 + width: width,
  515 + height:
  516 + ScreenUtil().setWidth(_uploadImageProvider.imgSizefirstImage * 2),
  517 + alignment: Alignment.centerLeft,
  518 + padding: edgeInsets,
  519 + decoration: boxDecoration,
  520 + child: Column(
  521 + crossAxisAlignment: CrossAxisAlignment.start,
  522 + children: [
  523 + Text(
  524 + 'Introduce',
  525 + style:
  526 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  527 + ),
  528 + Text(
  529 + '品牌介绍',
  530 + style:
  531 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  532 + ),
  533 + VEmptyView(16),
  534 + Text(
  535 + '${_marketingCenterProvider.markDataModel.store.sellerName}',
  536 + style: TextStyle(color: textColor, fontSize: font(14)),
  537 + ),
  538 + VEmptyView(32),
  539 + Container(
541 width: double.infinity, 540 width: double.infinity,
542 - padding: EdgeInsets.symmetric(  
543 - horizontal: ScreenUtil().setWidth(12),  
544 - ),  
545 - alignment: Alignment.topLeft,  
546 - child: Text(  
547 - _marketingCenterProvider.markDataModel.store.introduce,  
548 - style: TextStyle(  
549 - height: 2,  
550 - color: textColor,  
551 - fontSize: ScreenUtil().setSp(20),  
552 - textBaseline: TextBaseline.alphabetic),  
553 - textAlign: TextAlign.center,  
554 - overflow: TextOverflow.ellipsis,  
555 - maxLines: 7,  
556 - ),  
557 - )),  
558 - ],  
559 - ),  
560 - ); 541 + // margin: EdgeInsets.symmetric(horizontal: w(10)),
  542 + // padding: EdgeInsets.symmetric(horizontal: w(6)),
  543 + decoration: BoxDecoration(
  544 + border: Border(
  545 + left: BorderSide(
  546 + width: w(2), color: MyColours.color_EEAE74))),
  547 + child: Container(
  548 + width: double.infinity,
  549 + padding: EdgeInsets.symmetric(
  550 + horizontal: ScreenUtil().setWidth(12),
  551 + ),
  552 + alignment: Alignment.topLeft,
  553 + child: Text(
  554 + _marketingCenterProvider.markDataModel.store.introduce,
  555 + style: TextStyle(
  556 + height: 2,
  557 + color: textColor,
  558 + fontSize: ScreenUtil().setSp(20),
  559 + textBaseline: TextBaseline.alphabetic),
  560 + textAlign: TextAlign.center,
  561 + overflow: TextOverflow.ellipsis,
  562 + maxLines: 7,
  563 + ),
  564 + )),
  565 + ],
  566 + ),
  567 + );
  568 + } else {
  569 + container = Container(
  570 + width: width,
  571 + alignment: Alignment.centerLeft,
  572 + padding: edgeInsets,
  573 + decoration: boxDecoration,
  574 + child: Column(
  575 + crossAxisAlignment: CrossAxisAlignment.start,
  576 + children: [
  577 + Text(
  578 + 'Introduce',
  579 + style:
  580 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  581 + ),
  582 + Text(
  583 + '品牌介绍',
  584 + style:
  585 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  586 + ),
  587 + VEmptyView(16),
  588 + Text(
  589 + '${_marketingCenterProvider.markDataModel.store.sellerName}',
  590 + style: TextStyle(color: textColor, fontSize: font(14)),
  591 + ),
  592 + VEmptyView(32),
  593 + Container(
  594 + width: double.infinity,
  595 + // margin: EdgeInsets.symmetric(horizontal: w(10)),
  596 + // padding: EdgeInsets.symmetric(horizontal: w(6)),
  597 + decoration: BoxDecoration(
  598 + border: Border(
  599 + left: BorderSide(
  600 + width: w(2), color: MyColours.color_EEAE74))),
  601 + child: Container(
  602 + width: double.infinity,
  603 + padding: EdgeInsets.symmetric(
  604 + horizontal: ScreenUtil().setWidth(12),
  605 + ),
  606 + alignment: Alignment.topLeft,
  607 + child: Text(
  608 + _marketingCenterProvider.markDataModel.store.introduce,
  609 + style: TextStyle(
  610 + height: 2,
  611 + color: textColor,
  612 + fontSize: ScreenUtil().setSp(20),
  613 + textBaseline: TextBaseline.alphabetic),
  614 + textAlign: TextAlign.center,
  615 + overflow: TextOverflow.ellipsis,
  616 + ),
  617 + )),
  618 + ],
  619 + ),
  620 + );
  621 + }
  622 +
  623 + return container;
561 } 624 }
562 625
563 ///无文字 626 ///无文字
@@ -765,71 +828,148 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { @@ -765,71 +828,148 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
765 Color textColor = MyColours.color_515151, 828 Color textColor = MyColours.color_515151,
766 Color hintColor = MyColours.color_999999, 829 Color hintColor = MyColours.color_999999,
767 BoxDecoration boxDecoration}) { 830 BoxDecoration boxDecoration}) {
768 - return Container(  
769 - width: width,  
770 - // height: _uploadImageProvider.imgSizefirstImage,  
771 - alignment: Alignment.centerRight,  
772 - padding: edgeInsets,  
773 - decoration: boxDecoration,  
774 - child: Column(  
775 - crossAxisAlignment: CrossAxisAlignment.end,  
776 - children: [  
777 - Text(  
778 - 'Chief Cook',  
779 - style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),  
780 - ),  
781 - Text(  
782 - '知名主厨',  
783 - style: TextStyle(color: MyColours.color_B39437, fontSize: font(14)),  
784 - ),  
785 - VEmptyView(16),  
786 - // Text(  
787 - // '${sellername}',  
788 - // style: TextStyle(color: textColor, fontSize: font(14)),  
789 - // ),  
790 - Container(  
791 - width: double.infinity,  
792 - alignment: Alignment.topRight,  
793 - child: Text(  
794 - _marketingCenterProvider.markDataModel.chef.chefName,  
795 - textAlign: TextAlign.right,  
796 - style: TextStyle(  
797 - color: textColor,  
798 - fontSize: ScreenUtil().setSp(28),  
799 - textBaseline: TextBaseline.alphabetic),  
800 - maxLines: 1, 831 + Widget container;
  832 + if (edgeInsets.top == w(23)) {
  833 + //图文合并
  834 + container = Container(
  835 + width: width,
  836 + // height: _uploadImageProvider.imgSizefirstImage,
  837 + height:
  838 + ScreenUtil().setWidth(_uploadImageProvider.imgSizefirstImage * 2),
  839 + alignment: Alignment.centerRight,
  840 + padding: edgeInsets,
  841 + decoration: boxDecoration,
  842 + child: Column(
  843 + crossAxisAlignment: CrossAxisAlignment.end,
  844 + children: [
  845 + Text(
  846 + 'Chief Cook',
  847 + style:
  848 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
801 ), 849 ),
802 - ),  
803 - VEmptyView(32),  
804 - Container(  
805 - width: double.infinity,  
806 - // margin: EdgeInsets.symmetric(horizontal: w(10)),  
807 - // padding: EdgeInsets.symmetric(horizontal: w(6)),  
808 - decoration: BoxDecoration(  
809 - border: Border(  
810 - right: BorderSide(  
811 - width: w(2), color: MyColours.color_EEAE74))),  
812 - child: Container(  
813 - width: double.infinity,  
814 - padding: EdgeInsets.symmetric(  
815 - horizontal: ScreenUtil().setWidth(12),  
816 - ),  
817 - alignment: Alignment.topRight,  
818 - child: Text(  
819 - _marketingCenterProvider.markDataModel.chef.introduce,  
820 - textAlign: TextAlign.right,  
821 - style: TextStyle(  
822 - height: 2,  
823 - color: textColor,  
824 - fontSize: ScreenUtil().setSp(20),  
825 - textBaseline: TextBaseline.alphabetic),  
826 - maxLines: 7,  
827 - overflow: TextOverflow.ellipsis,  
828 - )),  
829 - ),  
830 - ],  
831 - ),  
832 - ); 850 + Text(
  851 + '知名主厨',
  852 + style:
  853 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  854 + ),
  855 + VEmptyView(16),
  856 + // Text(
  857 + // '${sellername}',
  858 + // style: TextStyle(color: textColor, fontSize: font(14)),
  859 + // ),
  860 + Container(
  861 + width: double.infinity,
  862 + alignment: Alignment.topRight,
  863 + child: Text(
  864 + _marketingCenterProvider.markDataModel.chef.chefName,
  865 + textAlign: TextAlign.right,
  866 + style: TextStyle(
  867 + color: textColor,
  868 + fontSize: ScreenUtil().setSp(28),
  869 + textBaseline: TextBaseline.alphabetic),
  870 + maxLines: 1,
  871 + ),
  872 + ),
  873 + VEmptyView(32),
  874 + Container(
  875 + width: double.infinity,
  876 + // margin: EdgeInsets.symmetric(horizontal: w(10)),
  877 + // padding: EdgeInsets.symmetric(horizontal: w(6)),
  878 + decoration: BoxDecoration(
  879 + border: Border(
  880 + right: BorderSide(
  881 + width: w(2), color: MyColours.color_EEAE74))),
  882 + child: Container(
  883 + width: double.infinity,
  884 + padding: EdgeInsets.symmetric(
  885 + horizontal: ScreenUtil().setWidth(12),
  886 + ),
  887 + alignment: Alignment.topRight,
  888 + child: Text(
  889 + _marketingCenterProvider.markDataModel.chef.introduce,
  890 + textAlign: TextAlign.right,
  891 + style: TextStyle(
  892 + height: 2,
  893 + color: textColor,
  894 + fontSize: ScreenUtil().setSp(20),
  895 + textBaseline: TextBaseline.alphabetic),
  896 + maxLines: 7,
  897 + overflow: TextOverflow.ellipsis,
  898 + )),
  899 + ),
  900 + ],
  901 + ),
  902 + );
  903 + } else {
  904 + container = Container(
  905 + width: width,
  906 + // height: _uploadImageProvider.imgSizefirstImage,
  907 + alignment: Alignment.centerRight,
  908 + padding: edgeInsets,
  909 + decoration: boxDecoration,
  910 + child: Column(
  911 + crossAxisAlignment: CrossAxisAlignment.end,
  912 + children: [
  913 + Text(
  914 + 'Chief Cook',
  915 + style:
  916 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  917 + ),
  918 + Text(
  919 + '知名主厨',
  920 + style:
  921 + TextStyle(color: MyColours.color_B39437, fontSize: font(14)),
  922 + ),
  923 + VEmptyView(16),
  924 + // Text(
  925 + // '${sellername}',
  926 + // style: TextStyle(color: textColor, fontSize: font(14)),
  927 + // ),
  928 + Container(
  929 + width: double.infinity,
  930 + alignment: Alignment.topRight,
  931 + child: Text(
  932 + _marketingCenterProvider.markDataModel.chef.chefName,
  933 + textAlign: TextAlign.right,
  934 + style: TextStyle(
  935 + color: textColor,
  936 + fontSize: ScreenUtil().setSp(28),
  937 + textBaseline: TextBaseline.alphabetic),
  938 + maxLines: 1,
  939 + ),
  940 + ),
  941 + VEmptyView(32),
  942 + Container(
  943 + width: double.infinity,
  944 + // margin: EdgeInsets.symmetric(horizontal: w(10)),
  945 + // padding: EdgeInsets.symmetric(horizontal: w(6)),
  946 + decoration: BoxDecoration(
  947 + border: Border(
  948 + right: BorderSide(
  949 + width: w(2), color: MyColours.color_EEAE74))),
  950 + child: Container(
  951 + width: double.infinity,
  952 + padding: EdgeInsets.symmetric(
  953 + horizontal: ScreenUtil().setWidth(12),
  954 + ),
  955 + alignment: Alignment.topRight,
  956 + child: Text(
  957 + _marketingCenterProvider.markDataModel.chef.introduce,
  958 + textAlign: TextAlign.right,
  959 + style: TextStyle(
  960 + height: 2,
  961 + color: textColor,
  962 + fontSize: ScreenUtil().setSp(20),
  963 + textBaseline: TextBaseline.alphabetic),
  964 + // maxLines: 7,
  965 + overflow: TextOverflow.ellipsis,
  966 + )),
  967 + ),
  968 + ],
  969 + ),
  970 + );
  971 + }
  972 + return container;
833 } 973 }
834 974
835 ///招牌菜展示 975 ///招牌菜展示
@@ -1129,70 +1269,75 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { @@ -1129,70 +1269,75 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
1129 padding: EdgeInsets.only( 1269 padding: EdgeInsets.only(
1130 left: w(20), right: w(20), top: w(12), bottom: w(25)), 1270 left: w(20), right: w(20), top: w(12), bottom: w(25)),
1131 child: Row( 1271 child: Row(
1132 - mainAxisAlignment: MainAxisAlignment.spaceBetween, 1272 + mainAxisAlignment: MainAxisAlignment.spaceEvenly,
1133 children: [ 1273 children: [
1134 - _marketingCenterProvider.markDataModel.marketing != null &&  
1135 - _marketingCenterProvider  
1136 - .markDataModel.marketing.isOnlineBook ==  
1137 - '1'  
1138 - ? RoundButton(  
1139 - text: '再次预订',  
1140 - width: w(100),  
1141 - gradientStart: MyColours.color_ffffff,  
1142 - gradientEnd: MyColours.color_ffffff,  
1143 - borderColor: MyColours.color_0143A3,  
1144 - textColor: MyColours.color_0143A3,  
1145 - radius: r(21),  
1146 - fontSize: 32,  
1147 - height: w(42),  
1148 - isBold: true,  
1149 - onPressed: () async {},  
1150 - )  
1151 - : SizedBox(),  
1152 - _marketingCenterProvider.markDataModel.marketing != null &&  
1153 - _marketingCenterProvider  
1154 - .markDataModel.marketing.isArrival ==  
1155 - '1'  
1156 - ? RoundButton(  
1157 - text: '确认赴约',  
1158 - width: w(100),  
1159 - gradientStart: MyColours.color_ffffff,  
1160 - gradientEnd: MyColours.color_ffffff,  
1161 - borderColor: MyColours.color_0143A3,  
1162 - textColor: MyColours.color_0143A3,  
1163 - radius: r(21),  
1164 - fontSize: 32,  
1165 - height: w(42),  
1166 - isBold: true,  
1167 - onPressed: () async {},  
1168 - )  
1169 - : SizedBox(),  
1170 - Container( 1274 + if (_marketingCenterProvider.markDataModel.marketing !=
  1275 + null &&
  1276 + _marketingCenterProvider
  1277 + .markDataModel.marketing.isOnlineBook ==
  1278 + '1')
  1279 + RoundButton(
  1280 + text: '再次预订',
1171 width: w(100), 1281 width: w(100),
  1282 + gradientStart: MyColours.color_ffffff,
  1283 + gradientEnd: MyColours.color_ffffff,
  1284 + borderColor: MyColours.color_0143A3,
  1285 + textColor: MyColours.color_0143A3,
  1286 + radius: r(21),
  1287 + fontSize: 32,
1172 height: w(42), 1288 height: w(42),
1173 - alignment: Alignment.center,  
1174 - decoration: BoxDecoration(  
1175 - borderRadius: BorderRadius.circular(r(21)),  
1176 - gradient: LinearGradient(  
1177 - stops: [  
1178 - -0.57,  
1179 - 0.55,  
1180 - 1.48  
1181 - ],  
1182 - colors: [  
1183 - MyColours.color_4C8DAD,  
1184 - MyColours.color_0143A3,  
1185 - MyColours.color_42A5FF  
1186 - ],  
1187 - begin: Alignment.topLeft,  
1188 - end: Alignment.bottomRight)),  
1189 - child: Text(  
1190 - '转发给客人',  
1191 - style: TextStyle(  
1192 - fontSize: font(16),  
1193 - color: MyColours.color_F8F9FD,  
1194 - fontWeight: FontWeight.bold),  
1195 - )), 1289 + isBold: true,
  1290 + onPressed: () async {},
  1291 + ),
  1292 + if (_marketingCenterProvider.markDataModel.marketing !=
  1293 + null &&
  1294 + _marketingCenterProvider
  1295 + .markDataModel.marketing.isArrival ==
  1296 + '1')
  1297 + RoundButton(
  1298 + text: '确认赴约',
  1299 + width: w(100),
  1300 + gradientStart: MyColours.color_ffffff,
  1301 + gradientEnd: MyColours.color_ffffff,
  1302 + borderColor: MyColours.color_0143A3,
  1303 + textColor: MyColours.color_0143A3,
  1304 + radius: r(21),
  1305 + fontSize: 32,
  1306 + height: w(42),
  1307 + isBold: true,
  1308 + onPressed: () async {},
  1309 + ),
  1310 + if (_marketingCenterProvider.markDataModel.marketing !=
  1311 + null &&
  1312 + _marketingCenterProvider
  1313 + .markDataModel.marketing.isTranspond ==
  1314 + '1')
  1315 + Container(
  1316 + width: w(100),
  1317 + height: w(42),
  1318 + alignment: Alignment.center,
  1319 + decoration: BoxDecoration(
  1320 + borderRadius: BorderRadius.circular(r(21)),
  1321 + gradient: LinearGradient(
  1322 + stops: [
  1323 + -0.57,
  1324 + 0.55,
  1325 + 1.48
  1326 + ],
  1327 + colors: [
  1328 + MyColours.color_4C8DAD,
  1329 + MyColours.color_0143A3,
  1330 + MyColours.color_42A5FF
  1331 + ],
  1332 + begin: Alignment.topLeft,
  1333 + end: Alignment.bottomRight)),
  1334 + child: Text(
  1335 + '转发给客人',
  1336 + style: TextStyle(
  1337 + fontSize: font(16),
  1338 + color: MyColours.color_F8F9FD,
  1339 + fontWeight: FontWeight.bold),
  1340 + )),
1196 ], 1341 ],
1197 ), 1342 ),
1198 ) 1343 )
@@ -2,6 +2,7 @@ import 'dart:convert'; @@ -2,6 +2,7 @@ import 'dart:convert';
2 import 'dart:io'; 2 import 'dart:io';
3 3
4 import 'package:flutter/material.dart'; 4 import 'package:flutter/material.dart';
  5 +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
5 import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 import 'package:flutter_screenutil/flutter_screenutil.dart';
6 import 'package:one_key/widgets/v_empty_view.dart'; 7 import 'package:one_key/widgets/v_empty_view.dart';
7 import 'package:provider/provider.dart'; 8 import 'package:provider/provider.dart';
@@ -271,7 +272,8 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> { @@ -271,7 +272,8 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> {
271 contentPadding: EdgeInsets.zero, 272 contentPadding: EdgeInsets.zero,
272 border: OutlineInputBorder(borderSide: BorderSide.none), 273 border: OutlineInputBorder(borderSide: BorderSide.none),
273 ), 274 ),
274 - keyboardType: TextInputType.text, 275 + keyboardType: TextInputType.multiline,
  276 + textInputAction: TextInputAction.newline,
275 onChanged: (value) { 277 onChanged: (value) {
276 setState(() { 278 setState(() {
277 // currentRemark = value ?? ""; 279 // currentRemark = value ?? "";
@@ -435,113 +437,116 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> { @@ -435,113 +437,116 @@ class _StoreIntroducePageState extends State<StoreIntroducePage> {
435 Provider.of<UploadImageProvider>(context, listen: true); 437 Provider.of<UploadImageProvider>(context, listen: true);
436 marketingCenterProvider = 438 marketingCenterProvider =
437 Provider.of<MarketingCenterProvider>(context, listen: true); 439 Provider.of<MarketingCenterProvider>(context, listen: true);
438 - return Scaffold(  
439 - backgroundColor: MyColours.color_ffffff,  
440 - appBar: SystemAppBar(  
441 - '店铺介绍',  
442 - onTap: () {  
443 - Navigator.pop(context);  
444 - },  
445 - ),  
446 - body: Column(  
447 - children: [  
448 - Expanded(  
449 - child: SingleChildScrollView(  
450 - controller: controller,  
451 - child: Column(  
452 - children: [  
453 - _selectBtnWidget(),  
454 - VEmptyView(24),  
455 - Container(  
456 - alignment: Alignment.centerLeft,  
457 - padding: EdgeInsets.only(left: w(16)),  
458 - height: w(48),  
459 - child: Text(  
460 - '效果预览',  
461 - style: TextStyle(  
462 - fontSize: font(16), color: MyColours.color_515151),  
463 - ), 440 + return KeyboardDismissOnTap(
  441 + child: Scaffold(
  442 + backgroundColor: MyColours.color_ffffff,
  443 + appBar: SystemAppBar(
  444 + '店铺介绍',
  445 + onTap: () {
  446 + Navigator.pop(context);
  447 + },
  448 + ),
  449 + body: Column(
  450 + children: [
  451 + Expanded(
  452 + child: SingleChildScrollView(
  453 + controller: controller,
  454 + child: Column(
  455 + children: [
  456 + _selectBtnWidget(),
  457 + VEmptyView(24),
  458 + Container(
  459 + alignment: Alignment.centerLeft,
  460 + padding: EdgeInsets.only(left: w(16)),
  461 + height: w(48),
  462 + child: Text(
  463 + '效果预览',
  464 + style: TextStyle(
  465 + fontSize: font(16),
  466 + color: MyColours.color_515151),
  467 + ),
  468 + ),
  469 + VEmptyView(24),
  470 + currIndex == 0
  471 + ? _noTextWidget()
  472 + : currIndex == 1
  473 + ? _mergingWidget()
  474 + : _separateWidget(),
  475 + VEmptyView(18),
  476 + ],
464 ), 477 ),
465 - VEmptyView(24),  
466 - currIndex == 0  
467 - ? _noTextWidget()  
468 - : currIndex == 1  
469 - ? _mergingWidget()  
470 - : _separateWidget(),  
471 - VEmptyView(18),  
472 - ],  
473 - ),  
474 - )),  
475 - Container(  
476 - color: MyColours.color_ffffff,  
477 - padding: EdgeInsets.only(  
478 - left: w(45), right: w(45), top: w(12), bottom: w(25)),  
479 - child: RoundButton(  
480 - text: '保存',  
481 - gradientStart: MyColours.color_199095,  
482 - gradientEnd: MyColours.color_199095,  
483 - // borderColor: MyColours.color_999999,  
484 - radius: r(5),  
485 - fontSize: 34,  
486 - height: w(40),  
487 - isBold: true,  
488 - onPressed: () async {  
489 - FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 478 + )),
  479 + Container(
  480 + color: MyColours.color_ffffff,
  481 + padding: EdgeInsets.only(
  482 + left: w(45), right: w(45), top: w(12), bottom: w(25)),
  483 + child: RoundButton(
  484 + text: '保存',
  485 + gradientStart: MyColours.color_199095,
  486 + gradientEnd: MyColours.color_199095,
  487 + // borderColor: MyColours.color_999999,
  488 + radius: r(5),
  489 + fontSize: 34,
  490 + height: w(40),
  491 + isBold: true,
  492 + onPressed: () async {
  493 + FocusScope.of(context)
  494 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
490 495
491 - if ((currIndex == 1 || currIndex == 2) &&  
492 - storeIntroduceC.text.trim().length == 0) {  
493 - Utils.showToast('请输入餐厅介绍文字!');  
494 - return false;  
495 - } 496 + if ((currIndex == 1 || currIndex == 2) &&
  497 + storeIntroduceC.text.trim().length == 0) {
  498 + Utils.showToast('请输入餐厅介绍文字!');
  499 + return false;
  500 + }
496 501
497 - List<String> images = [];  
498 - if (_uploadImageProvider.storeImage1.qiniuUrl != null &&  
499 - _uploadImageProvider.storeImage1.qiniuUrl != '') {  
500 - images.add(_uploadImageProvider.storeImage1.qiniuUrl);  
501 - }  
502 - if (_uploadImageProvider.storeImage2.qiniuUrl != null &&  
503 - _uploadImageProvider.storeImage2.qiniuUrl != '') {  
504 - images.add(_uploadImageProvider.storeImage2.qiniuUrl);  
505 - }  
506 - if (_uploadImageProvider.storeImage3.qiniuUrl != null &&  
507 - _uploadImageProvider.storeImage3.qiniuUrl != '') {  
508 - images.add(_uploadImageProvider.storeImage3.qiniuUrl);  
509 - }  
510 - if (_uploadImageProvider.storeImage3.qiniuUrl != null &&  
511 - _uploadImageProvider.storeImage3.qiniuUrl != '') {  
512 - images.add(_uploadImageProvider.storeImage3.qiniuUrl);  
513 - }  
514 - if (images.length == 0) {  
515 - Utils.showToast('请至少上传一张图片!');  
516 - return false;  
517 - } 502 + List<String> images = [];
  503 + if (_uploadImageProvider.storeImage1.qiniuUrl != null &&
  504 + _uploadImageProvider.storeImage1.qiniuUrl != '') {
  505 + images.add(_uploadImageProvider.storeImage1.qiniuUrl);
  506 + }
  507 + if (_uploadImageProvider.storeImage2.qiniuUrl != null &&
  508 + _uploadImageProvider.storeImage2.qiniuUrl != '') {
  509 + images.add(_uploadImageProvider.storeImage2.qiniuUrl);
  510 + }
  511 + if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
  512 + _uploadImageProvider.storeImage3.qiniuUrl != '') {
  513 + images.add(_uploadImageProvider.storeImage3.qiniuUrl);
  514 + }
  515 + if (_uploadImageProvider.storeImage3.qiniuUrl != null &&
  516 + _uploadImageProvider.storeImage3.qiniuUrl != '') {
  517 + images.add(_uploadImageProvider.storeImage3.qiniuUrl);
  518 + }
  519 + if (images.length == 0) {
  520 + Utils.showToast('请至少上传一张图片!');
  521 + return false;
  522 + }
518 523
519 - //接口  
520 - Map storeData = {  
521 - 'style': currIndex.toString(),  
522 - 'seller_name': sellername,  
523 - 'introduce': storeIntroduceC.text,  
524 - 'images': json.encode(images)  
525 - }; 524 + //接口
  525 + Map storeData = {
  526 + 'style': currIndex.toString(),
  527 + 'seller_name': sellername,
  528 + 'introduce': storeIntroduceC.text,
  529 + 'images': json.encode(images)
  530 + };
526 531
527 - Map<String, String> params = {  
528 - 'sid': Provider.of<UserModel>(context, listen: false)  
529 - .user  
530 - .sellerid,  
531 - 'store': json.encode(storeData)  
532 - }; 532 + Map<String, String> params = {
  533 + 'sid': Provider.of<UserModel>(context, listen: false)
  534 + .user
  535 + .sellerid,
  536 + 'store': json.encode(storeData)
  537 + };
533 538
534 - bool success = await marketingCenterProvider  
535 - .setSellerTemplateConf(context, params,  
536 - showLoading: true);  
537 - if (success) {  
538 - Utils.showToast('保存成功');  
539 - Navigator.pop(context);  
540 - }  
541 - },  
542 - ),  
543 - )  
544 - ],  
545 - )); 539 + bool success = await marketingCenterProvider
  540 + .setSellerTemplateConf(context, params,
  541 + showLoading: true);
  542 + if (success) {
  543 + Utils.showToast('保存成功');
  544 + Navigator.pop(context);
  545 + }
  546 + },
  547 + ),
  548 + )
  549 + ],
  550 + )));
546 } 551 }
547 } 552 }
@@ -446,7 +446,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> { @@ -446,7 +446,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
446 : MyColours 446 : MyColours
447 .color_BFC4D4, 447 .color_BFC4D4,
448 width: ScreenUtil() 448 width: ScreenUtil()
449 - .setWidth(62 * 2), 449 + .setWidth(72 * 2),
450 height: ScreenUtil() 450 height: ScreenUtil()
451 .setWidth(18 * 2), 451 .setWidth(18 * 2),
452 fontSize: 20, 452 fontSize: 20,
@@ -469,7 +469,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> { @@ -469,7 +469,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
469 .color_438E93, 469 .color_438E93,
470 width: ScreenUtil() 470 width: ScreenUtil()
471 .setWidth( 471 .setWidth(
472 - 58 * 2), 472 + 68 * 2),
473 height: ScreenUtil() 473 height: ScreenUtil()
474 .setWidth( 474 .setWidth(
475 18 * 2), 475 18 * 2),
@@ -429,6 +429,11 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { @@ -429,6 +429,11 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
429 userModel.user.morning = morningStr; 429 userModel.user.morning = morningStr;
430 userModel.user.noon = noonStr; 430 userModel.user.noon = noonStr;
431 userModel.user.night = nightStr; 431 userModel.user.night = nightStr;
  432 + userModel.user.sellername = _nameController.text;
  433 + userModel.user.sellerphone =
  434 + _phoneController.text + ',' + _phoneController2.text;
  435 + userModel.user.sellerAddr = _addressController.text;
  436 +
432 print(userModel.user); 437 print(userModel.user);
433 // morning = 438 // morning =
434 // userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning; 439 // userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;