Commit e89e87ed4f44978bef80e9e2441f0bbe5645f458

Authored by wdn127929
1 parent 7d57d9f7

我的UI+嗲怒头像

@@ -12,14 +12,14 @@ if (flutterRoot == null) { @@ -12,14 +12,14 @@ if (flutterRoot == null) {
12 } 12 }
13 13
14 14
15 -def flutterVersionCode = "380" 15 +def flutterVersionCode = "381"
16 if (flutterVersionCode == null) { 16 if (flutterVersionCode == null) {
17 - flutterVersionCode = '380' 17 + flutterVersionCode = '381'
18 } 18 }
19 19
20 -def flutterVersionName = "3.8.0" 20 +def flutterVersionName = "3.8.1"
21 if (flutterVersionName == null) { 21 if (flutterVersionName == null) {
22 - flutterVersionName = '3.8.0' 22 + flutterVersionName = '3.8.1'
23 } 23 }
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
25 apply plugin: 'kotlin-android' 25 apply plugin: 'kotlin-android'
@@ -142,6 +142,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -142,6 +142,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
142 "role_name": seller['role_name'], 142 "role_name": seller['role_name'],
143 "sellerid": seller['id'], 143 "sellerid": seller['id'],
144 "sellercode": seller['seller_code'], 144 "sellercode": seller['seller_code'],
  145 + "sellerimage": seller['seller_image'],
145 "sellername": seller['sellername'], 146 "sellername": seller['sellername'],
146 "sellerphone": seller['seller_tel'], 147 "sellerphone": seller['seller_tel'],
147 "sellerAddr": '', 148 "sellerAddr": '',
@@ -152,6 +153,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -152,6 +153,7 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
152 "noon": "", 153 "noon": "",
153 "night": "", 154 "night": "",
154 }; 155 };
  156 +
155 userModel.saveUserInfo(User.fromJson(userMap)); 157 userModel.saveUserInfo(User.fromJson(userMap));
156 userModel.getSellerInfo( 158 userModel.getSellerInfo(
157 context, 159 context,
1 import 'dart:convert'; 1 import 'dart:convert';
2 2
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
  4 +import 'package:flutter_ex_widget/ex_text.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
5 import 'package:fluwx/fluwx.dart'; 6 import 'package:fluwx/fluwx.dart';
6 import 'package:one_key/constant/state.dart'; 7 import 'package:one_key/constant/state.dart';
@@ -142,6 +143,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -142,6 +143,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
142 }, showToast: false); 143 }, showToast: false);
143 } 144 }
144 145
  146 + Widget _item(String name, String title) {
  147 + return Column(
  148 + children: [
  149 + Image.asset(
  150 + name,
  151 + width: ScreenUtil().setWidth(32 * 2),
  152 + ),
  153 + VEmptyView(20),
  154 + Text(
  155 + title,
  156 + style: TextStyle(
  157 + fontWeight: FontWeight.bold,
  158 + color: MyColours.color_999999,
  159 + fontSize: ScreenUtil().setWidth(20)),
  160 + )
  161 + ],
  162 + );
  163 + }
  164 +
145 @override 165 @override
146 Widget build(BuildContext context) { 166 Widget build(BuildContext context) {
147 myModel = Provider.of<MyModel>(context, listen: true); 167 myModel = Provider.of<MyModel>(context, listen: true);
@@ -250,28 +270,33 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -250,28 +270,33 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
250 maxLines: 1, 270 maxLines: 1,
251 overflow: TextOverflow.ellipsis, 271 overflow: TextOverflow.ellipsis,
252 style: TextStyle( 272 style: TextStyle(
  273 + fontWeight: FontWeight.w600,
253 color: MyColours.color_ffffff, 274 color: MyColours.color_ffffff,
254 fontSize: ScreenUtil().setSp(28)), 275 fontSize: ScreenUtil().setSp(28)),
255 ), 276 ),
256 ), 277 ),
257 VEmptyView(14), 278 VEmptyView(14),
258 Container( 279 Container(
259 - padding: EdgeInsets.symmetric(  
260 - horizontal:  
261 - ScreenUtil().setWidth(8),  
262 - vertical: ScreenUtil().setWidth(4)), 280 + height: ScreenUtil().setWidth(30),
  281 + padding: EdgeInsets.only(
  282 + left: ScreenUtil().setWidth(8),
  283 + right: ScreenUtil().setWidth(8),
  284 + ),
  285 + alignment: Alignment.center,
263 decoration: BoxDecoration( 286 decoration: BoxDecoration(
264 color: MyColours.color_ffffff, 287 color: MyColours.color_ffffff,
265 borderRadius: BorderRadius.circular( 288 borderRadius: BorderRadius.circular(
266 ScreenUtil().setWidth(6))), 289 ScreenUtil().setWidth(6))),
267 - child: Text( 290 + child: Center(
  291 + child: ExText(
268 model.user.account + 292 model.user.account +
269 " " + 293 " " +
270 model.user.role_name, 294 model.user.role_name,
271 - style: TextStyle( 295 + TextStyle(
  296 + fontWeight: FontWeight.bold,
272 color: MyColours.color_515151, 297 color: MyColours.color_515151,
273 fontSize: ScreenUtil().setSp(16)), 298 fontSize: ScreenUtil().setSp(16)),
274 - )), 299 + ))),
275 // VEmptyView(20), 300 // VEmptyView(20),
276 // InkWell( 301 // InkWell(
277 // onTap: () { 302 // onTap: () {
@@ -313,7 +338,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -313,7 +338,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
313 width: ScreenUtil().setWidth(68 * 2), 338 width: ScreenUtil().setWidth(68 * 2),
314 height: ScreenUtil().setWidth(25 * 2), 339 height: ScreenUtil().setWidth(25 * 2),
315 fontSize: 24, 340 fontSize: 24,
316 - isBold: false, 341 + isBold: true,
317 textColor: 342 textColor:
318 App.sp.getBool("accountLogin") ?? false 343 App.sp.getBool("accountLogin") ?? false
319 ? MyColours.color_999999 344 ? MyColours.color_999999
@@ -371,12 +396,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -371,12 +396,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
371 Text( 396 Text(
372 myModel.reserveTotal, 397 myModel.reserveTotal,
373 style: TextStyle( 398 style: TextStyle(
  399 + fontWeight: FontWeight.bold,
374 color: MyColours.color_515151, 400 color: MyColours.color_515151,
375 fontSize: ScreenUtil().setSp(40)), 401 fontSize: ScreenUtil().setSp(40)),
376 ), 402 ),
377 Text( 403 Text(
378 '个', 404 '个',
379 style: TextStyle( 405 style: TextStyle(
  406 + fontWeight: FontWeight.bold,
380 color: MyColours.color_515151, 407 color: MyColours.color_515151,
381 fontSize: ScreenUtil().setSp(22)), 408 fontSize: ScreenUtil().setSp(22)),
382 ) 409 )
@@ -386,6 +413,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -386,6 +413,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
386 Text( 413 Text(
387 '月订单量', 414 '月订单量',
388 style: TextStyle( 415 style: TextStyle(
  416 + fontWeight: FontWeight.bold,
389 color: MyColours.color_BFC4D4, 417 color: MyColours.color_BFC4D4,
390 fontSize: ScreenUtil().setSp(20)), 418 fontSize: ScreenUtil().setSp(20)),
391 ), 419 ),
@@ -406,12 +434,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -406,12 +434,14 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
406 ? '${myModel.smsInfo}' 434 ? '${myModel.smsInfo}'
407 : '0', 435 : '0',
408 style: TextStyle( 436 style: TextStyle(
  437 + fontWeight: FontWeight.bold,
409 color: MyColours.color_515151, 438 color: MyColours.color_515151,
410 fontSize: ScreenUtil().setSp(40)), 439 fontSize: ScreenUtil().setSp(40)),
411 ), 440 ),
412 Text( 441 Text(
413 '条', 442 '条',
414 style: TextStyle( 443 style: TextStyle(
  444 + fontWeight: FontWeight.bold,
415 color: MyColours.color_515151, 445 color: MyColours.color_515151,
416 fontSize: ScreenUtil().setSp(22)), 446 fontSize: ScreenUtil().setSp(22)),
417 ) 447 )
@@ -426,7 +456,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -426,7 +456,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
426 width: ScreenUtil().setWidth(48 * 2), 456 width: ScreenUtil().setWidth(48 * 2),
427 height: ScreenUtil().setWidth(18 * 2), 457 height: ScreenUtil().setWidth(18 * 2),
428 fontSize: 20, 458 fontSize: 20,
429 - isBold: false, 459 + isBold: true,
430 textColor: MyColours.color_ffffff, 460 textColor: MyColours.color_ffffff,
431 radius: ScreenUtil().setWidth(8), 461 radius: ScreenUtil().setWidth(8),
432 onPressed: () { 462 onPressed: () {
@@ -453,6 +483,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -453,6 +483,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
453 Text( 483 Text(
454 '${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}', 484 '${myModel.integralSunModel != null && myModel.integralSunModel.myIntegral != null ? myModel.integralSunModel?.myIntegral : '0'}',
455 style: TextStyle( 485 style: TextStyle(
  486 + fontWeight: FontWeight.bold,
456 color: MyColours.color_515151, 487 color: MyColours.color_515151,
457 fontSize: 488 fontSize:
458 ScreenUtil().setSp(40)), 489 ScreenUtil().setSp(40)),
@@ -460,6 +491,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -460,6 +491,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
460 Text( 491 Text(
461 '个', 492 '个',
462 style: TextStyle( 493 style: TextStyle(
  494 + fontWeight: FontWeight.bold,
463 color: MyColours.color_515151, 495 color: MyColours.color_515151,
464 fontSize: 496 fontSize:
465 ScreenUtil().setSp(22)), 497 ScreenUtil().setSp(22)),
@@ -475,7 +507,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -475,7 +507,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
475 width: ScreenUtil().setWidth(48 * 2), 507 width: ScreenUtil().setWidth(48 * 2),
476 height: ScreenUtil().setWidth(18 * 2), 508 height: ScreenUtil().setWidth(18 * 2),
477 fontSize: 20, 509 fontSize: 20,
478 - isBold: false, 510 + isBold: true,
479 textColor: MyColours.color_ffffff, 511 textColor: MyColours.color_ffffff,
480 radius: ScreenUtil().setWidth(8), 512 radius: ScreenUtil().setWidth(8),
481 onPressed: () {}) 513 onPressed: () {})
@@ -545,6 +577,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -545,6 +577,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
545 child: Text( 577 child: Text(
546 '我的内容', 578 '我的内容',
547 style: TextStyle( 579 style: TextStyle(
  580 + fontWeight: FontWeight.bold,
548 fontSize: ScreenUtil().setSp(32), 581 fontSize: ScreenUtil().setSp(32),
549 color: MyColours.color_515151), 582 color: MyColours.color_515151),
550 )), 583 )),
@@ -567,82 +600,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -567,82 +600,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
567 NavigatorUtil.goBaseInfoPage( 600 NavigatorUtil.goBaseInfoPage(
568 context, FromPage.FromPageMyPage); 601 context, FromPage.FromPageMyPage);
569 }, 602 },
570 - child: Column(  
571 - children: [  
572 - Image.asset(  
573 - Utils.getImgPath('grxx'),  
574 - width: ScreenUtil().setWidth(32 * 2),  
575 - ),  
576 - VEmptyView(8),  
577 - Text(  
578 - '个人信息',  
579 - style: TextStyle(  
580 - color: MyColours.color_999999,  
581 - fontSize:  
582 - ScreenUtil().setWidth(20)),  
583 - )  
584 - ],  
585 - )), 603 + child:
  604 + _item(Utils.getImgPath('grxx'), '个人信息')),
586 InkWell( 605 InkWell(
587 onTap: () { 606 onTap: () {
588 NavigatorUtil.goMyCustomerPage(context); 607 NavigatorUtil.goMyCustomerPage(context);
589 }, 608 },
590 - child: Column(  
591 - children: [  
592 - Image.asset(  
593 - Utils.getImgPath('wdkq'),  
594 - width: ScreenUtil().setWidth(32 * 2),  
595 - ),  
596 - VEmptyView(8),  
597 - Text(  
598 - '我的客情',  
599 - style: TextStyle(  
600 - color: MyColours.color_999999,  
601 - fontSize:  
602 - ScreenUtil().setWidth(20)),  
603 - )  
604 - ],  
605 - )), 609 + child:
  610 + _item(Utils.getImgPath('wdkq'), '我的客情')),
606 InkWell( 611 InkWell(
607 onTap: () { 612 onTap: () {
608 NavigatorUtil.goCouponPage(context); 613 NavigatorUtil.goCouponPage(context);
609 }, 614 },
610 - child: Column(  
611 - children: [  
612 - Image.asset(  
613 - Utils.getImgPath('yhq'),  
614 - width: ScreenUtil().setWidth(32 * 2),  
615 - ),  
616 - VEmptyView(8),  
617 - Text(  
618 - '优惠券',  
619 - style: TextStyle(  
620 - color: MyColours.color_999999,  
621 - fontSize:  
622 - ScreenUtil().setWidth(20)),  
623 - )  
624 - ],  
625 - )), 615 + child: _item(Utils.getImgPath('yhq'), '优惠券')),
626 InkWell( 616 InkWell(
627 onTap: () { 617 onTap: () {
628 NavigatorUtil.goRemarkManagerPage(context); 618 NavigatorUtil.goRemarkManagerPage(context);
629 }, 619 },
630 - child: Column(  
631 - children: [  
632 - Image.asset(  
633 - Utils.getImgPath('cybz'),  
634 - width: ScreenUtil().setWidth(32 * 2),  
635 - ),  
636 - VEmptyView(8),  
637 - Text(  
638 - '常用备注',  
639 - style: TextStyle(  
640 - color: MyColours.color_999999,  
641 - fontSize:  
642 - ScreenUtil().setWidth(20)),  
643 - )  
644 - ],  
645 - )) 620 + child:
  621 + _item(Utils.getImgPath('cybz'), '常用备注'))
646 ], 622 ],
647 ), 623 ),
648 )), 624 )),
@@ -654,6 +630,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -654,6 +630,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
654 child: Text( 630 child: Text(
655 '店铺相关', 631 '店铺相关',
656 style: TextStyle( 632 style: TextStyle(
  633 + fontWeight: FontWeight.bold,
657 fontSize: ScreenUtil().setSp(32), 634 fontSize: ScreenUtil().setSp(32),
658 color: MyColours.color_515151), 635 color: MyColours.color_515151),
659 )), 636 )),
@@ -696,32 +673,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -696,32 +673,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
696 setState(() {}); 673 setState(() {});
697 } 674 }
698 }, 675 },
699 - child: Column(  
700 - children: [  
701 - Image.asset(  
702 - userModel.user.role_name ==  
703 - '收银员' ||  
704 - userModel  
705 - .user.role_name ==  
706 - '服务员' ||  
707 - userModel  
708 - .user.role_name ==  
709 - '客户经理'  
710 - ? Utils.getImgPath('dpxx_un')  
711 - : Utils.getImgPath('dpxx'),  
712 - width:  
713 - ScreenUtil().setWidth(32 * 2),  
714 - ),  
715 - VEmptyView(8),  
716 - Text(  
717 - '店铺信息',  
718 - style: TextStyle(  
719 - color: MyColours.color_999999,  
720 - fontSize: ScreenUtil()  
721 - .setWidth(20)),  
722 - )  
723 - ],  
724 - )), 676 + child: _item(
  677 + userModel.user.role_name == '收银员' ||
  678 + userModel.user.role_name ==
  679 + '服务员' ||
  680 + userModel.user.role_name ==
  681 + '客户经理'
  682 + ? Utils.getImgPath('dpxx_un')
  683 + : Utils.getImgPath('dpxx'),
  684 + '店铺信息')),
725 InkWell( 685 InkWell(
726 onTap: () { 686 onTap: () {
727 if (userModel.user.role_name == '收银员' || 687 if (userModel.user.role_name == '收银员' ||
@@ -734,32 +694,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -734,32 +694,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
734 context); 694 context);
735 } 695 }
736 }, 696 },
737 - child: Column(  
738 - children: [  
739 - Image.asset(  
740 - userModel.user.role_name ==  
741 - '收银员' ||  
742 - userModel  
743 - .user.role_name ==  
744 - '服务员' ||  
745 - userModel  
746 - .user.role_name ==  
747 - '客户经理'  
748 - ? Utils.getImgPath('qdkq_un')  
749 - : Utils.getImgPath('qdkq'),  
750 - width:  
751 - ScreenUtil().setWidth(32 * 2),  
752 - ),  
753 - VEmptyView(8),  
754 - Text(  
755 - '全店客情',  
756 - style: TextStyle(  
757 - color: MyColours.color_999999,  
758 - fontSize: ScreenUtil()  
759 - .setWidth(20)),  
760 - )  
761 - ],  
762 - )), 697 + child: _item(
  698 + userModel.user.role_name == '收银员' ||
  699 + userModel.user.role_name ==
  700 + '服务员' ||
  701 + userModel.user.role_name ==
  702 + '客户经理'
  703 + ? Utils.getImgPath('qdkq_un')
  704 + : Utils.getImgPath('qdkq'),
  705 + '全店客情')),
763 InkWell( 706 InkWell(
764 onTap: () { 707 onTap: () {
765 if (userModel.user.role_name == 708 if (userModel.user.role_name ==
@@ -772,29 +715,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -772,29 +715,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
772 context); 715 context);
773 } 716 }
774 }, 717 },
775 - child: Column(  
776 - children: [  
777 - Image.asset(  
778 - userModel.user.role_name ==  
779 - '收银员' ||  
780 - userModel  
781 - .user.role_name ==  
782 - '服务员'  
783 - ? Utils.getImgPath('zwgl_un')  
784 - : Utils.getImgPath('zwgl'),  
785 - width:  
786 - ScreenUtil().setWidth(32 * 2),  
787 - ),  
788 - VEmptyView(8),  
789 - Text(  
790 - '桌位管理',  
791 - style: TextStyle(  
792 - color: MyColours.color_999999,  
793 - fontSize: ScreenUtil()  
794 - .setWidth(20)),  
795 - )  
796 - ],  
797 - )), 718 + child: _item(
  719 + userModel.user.role_name == '收银员' ||
  720 + userModel.user.role_name ==
  721 + '服务员'
  722 + ? Utils.getImgPath('zwgl_un')
  723 + : Utils.getImgPath('zwgl'),
  724 + '桌位管理')),
798 InkWell( 725 InkWell(
799 onTap: () async { 726 onTap: () async {
800 if (userModel.user.role_name == 727 if (userModel.user.role_name ==
@@ -822,32 +749,16 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -822,32 +749,16 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
822 // // _getTablePhoto(context, temp['tid'], showLoading: true) 749 // // _getTablePhoto(context, temp['tid'], showLoading: true)
823 } 750 }
824 }, 751 },
825 - child: Column(  
826 - children: [  
827 - Image.asset(  
828 - userModel.user.role_name ==  
829 - '收银员' ||  
830 - userModel  
831 - .user.role_name ==  
832 - '服务员'  
833 - ? Utils.getImgPath('zwzp_un')  
834 - : Utils.getImgPath('zwzp'),  
835 - width:  
836 - ScreenUtil().setWidth(32 * 2),  
837 - ),  
838 - VEmptyView(8),  
839 - Text(  
840 - '桌位照片',  
841 - style: TextStyle(  
842 - color: MyColours.color_999999,  
843 - fontSize: ScreenUtil()  
844 - .setWidth(20)),  
845 - )  
846 - ],  
847 - )) 752 + child: _item(
  753 + userModel.user.role_name == '收银员' ||
  754 + userModel.user.role_name ==
  755 + '服务员'
  756 + ? Utils.getImgPath('zwzp_un')
  757 + : Utils.getImgPath('zwzp'),
  758 + '桌位照片'))
848 ], 759 ],
849 ), 760 ),
850 - VEmptyView(60), 761 + VEmptyView(68),
851 Row( 762 Row(
852 mainAxisAlignment: 763 mainAxisAlignment:
853 MainAxisAlignment.spaceEvenly, 764 MainAxisAlignment.spaceEvenly,
@@ -863,29 +774,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -863,29 +774,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
863 context); 774 context);
864 } 775 }
865 }, 776 },
866 - child: Column(  
867 - children: [  
868 - Image.asset(  
869 - userModel.user.role_name ==  
870 - '收银员' ||  
871 - userModel  
872 - .user.role_name ==  
873 - '服务员'  
874 - ? Utils.getImgPath('yggl_un')  
875 - : Utils.getImgPath('yggl'),  
876 - width:  
877 - ScreenUtil().setWidth(32 * 2),  
878 - ),  
879 - VEmptyView(8),  
880 - Text(  
881 - '员工管理',  
882 - style: TextStyle(  
883 - color: MyColours.color_999999,  
884 - fontSize: ScreenUtil()  
885 - .setWidth(20)),  
886 - )  
887 - ],  
888 - )), 777 + child: _item(
  778 + userModel.user.role_name == '收银员' ||
  779 + userModel.user.role_name ==
  780 + '服务员'
  781 + ? Utils.getImgPath('yggl_un')
  782 + : Utils.getImgPath('yggl'),
  783 + '员工管理')),
889 InkWell( 784 InkWell(
890 onTap: () { 785 onTap: () {
891 if (userModel.user.role_name == 786 if (userModel.user.role_name ==
@@ -897,29 +792,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -897,29 +792,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
897 context); 792 context);
898 } 793 }
899 }, 794 },
900 - child: Column(  
901 - children: [  
902 - Image.asset(  
903 - userModel.user.role_name ==  
904 - '收银员' ||  
905 - userModel  
906 - .user.role_name ==  
907 - '服务员'  
908 - ? Utils.getImgPath('cdgl_un')  
909 - : Utils.getImgPath('cdgl'),  
910 - width:  
911 - ScreenUtil().setWidth(32 * 2),  
912 - ),  
913 - VEmptyView(8),  
914 - Text(  
915 - '菜单管理',  
916 - style: TextStyle(  
917 - color: MyColours.color_999999,  
918 - fontSize: ScreenUtil()  
919 - .setWidth(20)),  
920 - )  
921 - ],  
922 - )), 795 + child: _item(
  796 + userModel.user.role_name == '收银员' ||
  797 + userModel.user.role_name ==
  798 + '服务员'
  799 + ? Utils.getImgPath('cdgl_un')
  800 + : Utils.getImgPath('cdgl'),
  801 + '菜单管理')),
923 InkWell( 802 InkWell(
924 onTap: () { 803 onTap: () {
925 if (userModel.user.role_name == 804 if (userModel.user.role_name ==
@@ -931,29 +810,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -931,29 +810,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
931 context); 810 context);
932 } 811 }
933 }, 812 },
934 - child: Column(  
935 - children: [  
936 - Image.asset(  
937 - userModel.user.role_name ==  
938 - '收银员' ||  
939 - userModel  
940 - .user.role_name ==  
941 - '服务员'  
942 - ? Utils.getImgPath('bjlx_un')  
943 - : Utils.getImgPath('bjlx'),  
944 - width:  
945 - ScreenUtil().setWidth(32 * 2),  
946 - ),  
947 - VEmptyView(8),  
948 - Text(  
949 - '包间类型',  
950 - style: TextStyle(  
951 - color: MyColours.color_999999,  
952 - fontSize: ScreenUtil()  
953 - .setWidth(20)),  
954 - )  
955 - ],  
956 - )), 813 + child: _item(
  814 + userModel.user.role_name == '收银员' ||
  815 + userModel.user.role_name ==
  816 + '服务员'
  817 + ? Utils.getImgPath('bjlx_un')
  818 + : Utils.getImgPath('bjlx'),
  819 + '包间类型')),
957 InkWell( 820 InkWell(
958 onTap: () { 821 onTap: () {
959 if (userModel.user.role_name == 822 if (userModel.user.role_name ==
@@ -966,29 +829,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -966,29 +829,13 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
966 context); 829 context);
967 } 830 }
968 }, 831 },
969 - child: Column(  
970 - children: [  
971 - Image.asset(  
972 - userModel.user.role_name ==  
973 - '收银员' ||  
974 - userModel  
975 - .user.role_name ==  
976 - '服务员'  
977 - ? Utils.getImgPath('bjzm_un')  
978 - : Utils.getImgPath('bjzm'),  
979 - width:  
980 - ScreenUtil().setWidth(32 * 2),  
981 - ),  
982 - VEmptyView(8),  
983 - Text(  
984 - '包间置满',  
985 - style: TextStyle(  
986 - color: MyColours.color_999999,  
987 - fontSize: ScreenUtil()  
988 - .setWidth(20)),  
989 - )  
990 - ],  
991 - )) 832 + child: _item(
  833 + userModel.user.role_name == '收银员' ||
  834 + userModel.user.role_name ==
  835 + '服务员'
  836 + ? Utils.getImgPath('bjzm_un')
  837 + : Utils.getImgPath('bjzm'),
  838 + '包间置满'))
992 ], 839 ],
993 ) 840 )
994 ], 841 ],
@@ -1002,6 +849,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1002,6 +849,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1002 child: Text( 849 child: Text(
1003 '其他设置', 850 '其他设置',
1004 style: TextStyle( 851 style: TextStyle(
  852 + fontWeight: FontWeight.bold,
1005 fontSize: ScreenUtil().setSp(32), 853 fontSize: ScreenUtil().setSp(32),
1006 color: MyColours.color_515151), 854 color: MyColours.color_515151),
1007 )), 855 )),
@@ -1032,6 +880,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1032,6 +880,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1032 Text( 880 Text(
1033 '联系客服', 881 '联系客服',
1034 style: TextStyle( 882 style: TextStyle(
  883 + fontWeight: FontWeight.bold,
1035 color: MyColours.color_515151, 884 color: MyColours.color_515151,
1036 fontSize: 885 fontSize:
1037 ScreenUtil().setWidth(28)), 886 ScreenUtil().setWidth(28)),
@@ -1069,6 +918,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1069,6 +918,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1069 Text( 918 Text(
1070 '隐私政策', 919 '隐私政策',
1071 style: TextStyle( 920 style: TextStyle(
  921 + fontWeight: FontWeight.bold,
1072 color: MyColours.color_515151, 922 color: MyColours.color_515151,
1073 fontSize: 923 fontSize:
1074 ScreenUtil().setWidth(28)), 924 ScreenUtil().setWidth(28)),
@@ -1103,6 +953,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -1103,6 +953,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
1103 Text( 953 Text(
1104 '版本升级', 954 '版本升级',
1105 style: TextStyle( 955 style: TextStyle(
  956 + fontWeight: FontWeight.bold,
1106 color: MyColours.color_515151, 957 color: MyColours.color_515151,
1107 fontSize: 958 fontSize:
1108 ScreenUtil().setWidth(28)), 959 ScreenUtil().setWidth(28)),
This diff could not be displayed because it is too large.
1 -// import 'dart:io'; 1 +import 'dart:io';
2 2
3 -// import 'package:cached_network_image/cached_network_image.dart';  
4 -// import 'package:dio/dio.dart';  
5 -// import 'package:flutter/material.dart';  
6 -// import 'package:flutter/services.dart';  
7 -// import 'package:flutter_screenutil/screenutil.dart';  
8 -// import 'package:one_key/models/get_seller_info_model.dart';  
9 -// import 'package:one_key/models/set_seller_info_model.dart';  
10 -// import 'package:one_key/models/upload_img_model.dart';  
11 -// import 'package:one_key/models/user.dart';  
12 -// import 'package:one_key/pages/online_check/photo_view_wiget.dart';  
13 -// import 'package:one_key/pages/online_check/progress.dart';  
14 -// import 'package:one_key/provider/base_info_provider.dart';  
15 -// import 'package:one_key/provider/store_base_info_provider.dart';  
16 -// import 'package:one_key/provider/upload_img_provider.dart';  
17 -// import 'package:one_key/provider/user_model.dart';  
18 -// import 'package:one_key/res/colors.dart';  
19 -// import 'package:one_key/route/navigator_util.dart';  
20 -// import 'package:one_key/utils/event_bus.dart';  
21 -// import 'package:one_key/utils/upload_image_util.dart';  
22 -// import 'package:one_key/utils/utils.dart';  
23 -// import 'package:one_key/widgets/h_empty_view.dart';  
24 -// import 'package:one_key/widgets/round_button.dart';  
25 -// import 'package:one_key/widgets/system_app_bar.dart';  
26 -// import 'package:one_key/widgets/v_empty_view.dart';  
27 -// import 'package:image_picker/image_picker.dart';  
28 -// import 'package:permission_handler/permission_handler.dart';  
29 -// import 'package:provider/provider.dart'; 3 +import 'package:cached_network_image/cached_network_image.dart';
  4 +import 'package:dio/dio.dart';
  5 +import 'package:flutter/material.dart';
  6 +import 'package:flutter/services.dart';
  7 +import 'package:flutter_screenutil/screenutil.dart';
  8 +import 'package:one_key/models/get_seller_info_model.dart';
  9 +import 'package:one_key/models/set_seller_info_model.dart';
  10 +import 'package:one_key/models/upload_img_model.dart';
  11 +import 'package:one_key/models/user.dart';
  12 +import 'package:one_key/pages/online_check/photo_view_wiget.dart';
  13 +import 'package:one_key/pages/online_check/progress.dart';
  14 +import 'package:one_key/provider/base_info_provider.dart';
  15 +import 'package:one_key/provider/store_base_info_provider.dart';
  16 +import 'package:one_key/provider/upload_img_provider.dart';
  17 +import 'package:one_key/provider/user_model.dart';
  18 +import 'package:one_key/res/colors.dart';
  19 +import 'package:one_key/route/navigator_util.dart';
  20 +import 'package:one_key/utils/event_bus.dart';
  21 +import 'package:one_key/utils/upload_image_util.dart';
  22 +import 'package:one_key/utils/utils.dart';
  23 +import 'package:one_key/widgets/h_empty_view.dart';
  24 +import 'package:one_key/widgets/round_button.dart';
  25 +import 'package:one_key/widgets/system_app_bar.dart';
  26 +import 'package:one_key/widgets/v_empty_view.dart';
  27 +import 'package:image_picker/image_picker.dart';
  28 +import 'package:permission_handler/permission_handler.dart';
  29 +import 'package:provider/provider.dart';
30 30
31 -// class StoreBaseInfoPage extends StatefulWidget {  
32 -// StoreBaseInfoPage({Key key}) : super(key: key); 31 +class StoreBaseInfoPage extends StatefulWidget {
  32 + StoreBaseInfoPage({Key key}) : super(key: key);
33 33
34 -// @override  
35 -// _StoreBaseInfoPageState createState() => _StoreBaseInfoPageState();  
36 -// } 34 + @override
  35 + _StoreBaseInfoPageState createState() => _StoreBaseInfoPageState();
  36 +}
37 37
38 -// class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {  
39 -// ScrollController _scrollController;  
40 -// TextEditingController _nameController = TextEditingController();  
41 -// TextEditingController _phoneController = TextEditingController();  
42 -// TextEditingController _timeController = TextEditingController();  
43 -// TextEditingController _addressController = TextEditingController();  
44 -// TextEditingController _introductionController = TextEditingController();  
45 -// FocusNode _nameFocusNode = FocusNode();  
46 -// FocusNode _phoneFocusNode = FocusNode();  
47 -// FocusNode _timeFocusNode = FocusNode();  
48 -// FocusNode _addressFocusNode = FocusNode();  
49 -// FocusNode _introductionFocusNode = FocusNode(); 38 +class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
  39 + ScrollController _scrollController;
  40 + TextEditingController _nameController = TextEditingController();
  41 + TextEditingController _phoneController = TextEditingController();
  42 + TextEditingController _timeController = TextEditingController();
  43 + TextEditingController _addressController = TextEditingController();
  44 + TextEditingController _introductionController = TextEditingController();
  45 + FocusNode _nameFocusNode = FocusNode();
  46 + FocusNode _phoneFocusNode = FocusNode();
  47 + FocusNode _timeFocusNode = FocusNode();
  48 + FocusNode _addressFocusNode = FocusNode();
  49 + FocusNode _introductionFocusNode = FocusNode();
50 50
51 -// Map<String, dynamic> mapAddress; 51 + Map<String, dynamic> mapAddress;
52 52
53 -// final picker = ImagePicker();  
54 -// UploadImageProvider _uploadImageProvider;  
55 -// StoreBaseIndoProvider _baseIndoProvider; 53 + final picker = ImagePicker();
  54 + UploadImageProvider _uploadImageProvider;
  55 + StoreBaseIndoProvider _baseIndoProvider;
56 56
57 -// @override  
58 -// void initState() {  
59 -// super.initState();  
60 -// mapAddress = {  
61 -// "address": '点击选择',  
62 -// 'lat': '',  
63 -// 'lng': '',  
64 -// };  
65 -// _scrollController = ScrollController();  
66 -// WidgetsBinding.instance.addPostFrameCallback((_) {  
67 -// _uploadImageProvider.mentou.process = 0.01;  
68 -// _uploadImageProvider.mentou.qiniuUrl = '';  
69 -// _uploadImageProvider.imgSizeMenTou = 64;  
70 -// // _uploadImageProvider.mentou.file = null;  
71 -// _getQiniuInfo();  
72 -// _getStoreBaseinfo();  
73 -// });  
74 -// } 57 + @override
  58 + void initState() {
  59 + super.initState();
  60 + mapAddress = {
  61 + "address": '点击选择',
  62 + 'lat': '',
  63 + 'lng': '',
  64 + };
  65 + _scrollController = ScrollController();
  66 + WidgetsBinding.instance.addPostFrameCallback((_) {
  67 + _uploadImageProvider.mentou.process = 0.01;
  68 + _uploadImageProvider.mentou.qiniuUrl = '';
  69 + _uploadImageProvider.imgSizeMenTou = 64;
  70 + // _uploadImageProvider.mentou.file = null;
  71 + _getQiniuInfo();
  72 + _getStoreBaseinfo();
  73 + });
  74 + }
75 75
76 -// ///获取店铺信息  
77 -// _getStoreBaseinfo() async {  
78 -// GetSellerInfoSunModel itemModel =  
79 -// await _baseIndoProvider.getSellerById(context);  
80 -// if (itemModel != null) {  
81 -// _nameController.text = itemModel.data.sellername;  
82 -// _phoneController.text = itemModel.data.sellerTel;  
83 -// _timeController.text = itemModel.data.dailyTime;  
84 -// _addressController.text = itemModel.data.realAddress;  
85 -// _introductionController.text = itemModel.data.sellerdesc;  
86 -// _uploadImageProvider.mentou.qiniuUrl = itemModel.data.sellerImage;  
87 -// // _uploadImageProvider.notifyListeners();  
88 -// mapAddress = {  
89 -// "address": itemModel.data.mapAddress,  
90 -// 'lat': itemModel.data.lat,  
91 -// 'lng': itemModel.data.long,  
92 -// };  
93 -// setState(() {});  
94 -// }  
95 -// } 76 + ///获取店铺信息
  77 + _getStoreBaseinfo() async {
  78 + GetSellerInfoSunModel itemModel =
  79 + await _baseIndoProvider.getSellerById(context);
  80 + if (itemModel != null) {
  81 + _nameController.text = itemModel.data.sellername;
  82 + _phoneController.text = itemModel.data.sellerTel;
  83 + _timeController.text = itemModel.data.dailyTime;
  84 + _addressController.text = itemModel.data.realAddress;
  85 + _introductionController.text = itemModel.data.sellerdesc;
  86 + _uploadImageProvider.mentou.qiniuUrl = itemModel.data.sellerImage;
  87 + // _uploadImageProvider.notifyListeners();
  88 + mapAddress = {
  89 + "address": itemModel.data.mapAddress,
  90 + 'lat': itemModel.data.lat,
  91 + 'lng': itemModel.data.long,
  92 + };
  93 + setState(() {});
  94 + }
  95 + }
96 96
97 -// ///获取七牛云token  
98 -// ///  
99 -// _getQiniuInfo() async {  
100 -// await _uploadImageProvider.getQiniuInfo(context, {});  
101 -// } 97 + ///获取七牛云token
  98 + ///
  99 + _getQiniuInfo() async {
  100 + await _uploadImageProvider.getQiniuInfo(context, {});
  101 + }
102 102
103 -// /// 修改店铺基本信息  
104 -// _setSellerInfoById() async {  
105 -// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 103 + /// 修改店铺基本信息
  104 + _setSellerInfoById() async {
  105 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
106 106
107 -// User user = Provider.of<UserModel>(context, listen: false).user;  
108 -// Map<String, dynamic> params = {  
109 -// 'id': user.sellerid,  
110 -// }; 107 + User user = Provider.of<UserModel>(context, listen: false).user;
  108 + Map<String, dynamic> params = {
  109 + 'id': user.sellerid,
  110 + };
111 111
112 -// params['name'] = _nameController.text; 112 + params['name'] = _nameController.text;
113 113
114 -// if (_uploadImageProvider.mentou.path != null &&  
115 -// _uploadImageProvider.mentou.path != '') {  
116 -// params['image'] =  
117 -// await MultipartFile.fromFile(_uploadImageProvider.mentou.path);  
118 -// } 114 + if (_uploadImageProvider.mentou.path != null &&
  115 + _uploadImageProvider.mentou.path != '') {
  116 + params['image'] =
  117 + await MultipartFile.fromFile(_uploadImageProvider.mentou.path);
  118 + }
119 119
120 -// params['phone'] = _phoneController.text; 120 + params['phone'] = _phoneController.text;
121 121
122 -// if (mapAddress != null && mapAddress['address'] != '') {  
123 -// params['map_address'] = mapAddress['address'];  
124 -// }  
125 -// if (mapAddress != null && mapAddress['lng'] != '') {  
126 -// params['long'] = mapAddress['lng'];  
127 -// }  
128 -// if (mapAddress != null && mapAddress['lat'] != '') {  
129 -// params['lat'] = mapAddress['lat'];  
130 -// } 122 + if (mapAddress != null && mapAddress['address'] != '') {
  123 + params['map_address'] = mapAddress['address'];
  124 + }
  125 + if (mapAddress != null && mapAddress['lng'] != '') {
  126 + params['long'] = mapAddress['lng'];
  127 + }
  128 + if (mapAddress != null && mapAddress['lat'] != '') {
  129 + params['lat'] = mapAddress['lat'];
  130 + }
131 131
132 -// params['real_address'] = _addressController.text; 132 + params['real_address'] = _addressController.text;
133 133
134 -// params['sellerdesc'] = _introductionController.text; 134 + params['sellerdesc'] = _introductionController.text;
135 135
136 -// params['daily_time'] = _timeController.text; 136 + params['daily_time'] = _timeController.text;
137 137
138 -// FormData formData = FormData.fromMap(params); 138 + FormData formData = FormData.fromMap(params);
139 139
140 -// SetSellerInfoSunModel sunModel =  
141 -// await _baseIndoProvider.setSellerInfoById(context, formData);  
142 -// if (sunModel != null) {  
143 -// //修改成功  
144 -// Utils.showToast('保存成功');  
145 -// EventBus().emit('changeStatusColor');  
146 -// Navigator.pop(  
147 -// context,  
148 -// _uploadImageProvider.mentou.qiniuUrl != null &&  
149 -// _uploadImageProvider.mentou.qiniuUrl != ''  
150 -// ? {'image': _uploadImageProvider.mentou.qiniuUrl}  
151 -// : {'image': ''});  
152 -// } else {  
153 -// // Utils.showToast('保存失败');  
154 -// }  
155 -// } 140 + SetSellerInfoSunModel sunModel =
  141 + await _baseIndoProvider.setSellerInfoById(context, formData);
  142 + if (sunModel != null) {
  143 + //修改成功
  144 + Utils.showToast('保存成功');
  145 + EventBus().emit('changeStatusColor');
  146 + Navigator.pop(
  147 + context,
  148 + _uploadImageProvider.mentou.qiniuUrl != null &&
  149 + _uploadImageProvider.mentou.qiniuUrl != ''
  150 + ? {'image': _uploadImageProvider.mentou.qiniuUrl}
  151 + : {'image': ''});
  152 + } else {
  153 + // Utils.showToast('保存失败');
  154 + }
  155 + }
156 156
157 -// ///输入框  
158 -// Widget _textfield(String title, String hintText,  
159 -// TextEditingController editingController, FocusNode focusNode) {  
160 -// return Container(  
161 -// child: Row(  
162 -// mainAxisAlignment: MainAxisAlignment.spaceBetween,  
163 -// children: [  
164 -// Container(  
165 -// child: Text(  
166 -// title,  
167 -// style: TextStyle(  
168 -// color: MyColours.color_333333,  
169 -// fontWeight: FontWeight.bold,  
170 -// fontSize: ScreenUtil().setSp(34)),  
171 -// ),  
172 -// ),  
173 -// HEmptyView(20),  
174 -// Spacer(),  
175 -// Container(  
176 -// width: ScreenUtil().setWidth(231 * 2),  
177 -// child: TextField(  
178 -// controller: editingController,  
179 -// textAlign: TextAlign.right,  
180 -// textAlignVertical: TextAlignVertical.bottom,  
181 -// maxLines: 1,  
182 -// inputFormatters: title == '详细地址'  
183 -// ? [  
184 -// LengthLimitingTextInputFormatter(20),  
185 -// // WhitelistingTextInputFormatter.digitsOnly  
186 -// ]  
187 -// : [], 157 + ///输入框
  158 + Widget _textfield(String title, String hintText,
  159 + TextEditingController editingController, FocusNode focusNode) {
  160 + return Container(
  161 + child: Row(
  162 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  163 + children: [
  164 + Container(
  165 + child: Text(
  166 + title,
  167 + style: TextStyle(
  168 + color: MyColours.color_333333,
  169 + fontWeight: FontWeight.bold,
  170 + fontSize: ScreenUtil().setSp(34)),
  171 + ),
  172 + ),
  173 + HEmptyView(20),
  174 + Spacer(),
  175 + Container(
  176 + width: ScreenUtil().setWidth(231 * 2),
  177 + child: TextField(
  178 + controller: editingController,
  179 + textAlign: TextAlign.right,
  180 + textAlignVertical: TextAlignVertical.bottom,
  181 + maxLines: 1,
  182 + inputFormatters: title == '详细地址'
  183 + ? [
  184 + LengthLimitingTextInputFormatter(20),
  185 + // WhitelistingTextInputFormatter.digitsOnly
  186 + ]
  187 + : [],
188 188
189 -// // //光标颜色  
190 -// // cursorColor:  
191 -// // widget.isSelect ? Colors.white : MyColours.color_199095,  
192 -// //输入文本的样式  
193 -// style: TextStyle(  
194 -// fontSize: ScreenUtil().setSp(32),  
195 -// ),  
196 -// focusNode: focusNode,  
197 -// decoration: InputDecoration(  
198 -// border: OutlineInputBorder(borderSide: BorderSide.none),  
199 -// hintText: hintText,  
200 -// hintStyle: TextStyle(  
201 -// color: MyColours.color_999999,  
202 -// fontSize: ScreenUtil().setSp(32),  
203 -// ),  
204 -// enabledBorder: new UnderlineInputBorder(  
205 -// borderSide: BorderSide.none,  
206 -// ),  
207 -// focusedBorder: new UnderlineInputBorder(  
208 -// borderSide: BorderSide.none,  
209 -// ),  
210 -// ),  
211 -// onChanged: (value) {  
212 -// // if (editingController == _nameController) {  
213 -// // _nameController.text = value;  
214 -// // }  
215 -// },  
216 -// onEditingComplete: () {  
217 -// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘  
218 -// },  
219 -// keyboardType: TextInputType.text,  
220 -// ),  
221 -// )  
222 -// ],  
223 -// ),  
224 -// );  
225 -// } 189 + // //光标颜色
  190 + // cursorColor:
  191 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  192 + //输入文本的样式
  193 + style: TextStyle(
  194 + fontSize: ScreenUtil().setSp(32),
  195 + ),
  196 + focusNode: focusNode,
  197 + decoration: InputDecoration(
  198 + border: OutlineInputBorder(borderSide: BorderSide.none),
  199 + hintText: hintText,
  200 + hintStyle: TextStyle(
  201 + color: MyColours.color_999999,
  202 + fontSize: ScreenUtil().setSp(32),
  203 + ),
  204 + enabledBorder: new UnderlineInputBorder(
  205 + borderSide: BorderSide.none,
  206 + ),
  207 + focusedBorder: new UnderlineInputBorder(
  208 + borderSide: BorderSide.none,
  209 + ),
  210 + ),
  211 + onChanged: (value) {
  212 + // if (editingController == _nameController) {
  213 + // _nameController.text = value;
  214 + // }
  215 + },
  216 + onEditingComplete: () {
  217 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  218 + },
  219 + keyboardType: TextInputType.text,
  220 + ),
  221 + )
  222 + ],
  223 + ),
  224 + );
  225 + }
226 226
227 -// //查看大图  
228 -// _showPhotoView(BuildContext context, int index, List imgs,  
229 -// {isShow = false, List dashName}) async {  
230 -// // if (imgs.length == 1 &&  
231 -// // imgs[0] ==  
232 -// // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {  
233 -// // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';  
234 -// // }  
235 -// Utils.setBarStatus(false, color: Colors.black);  
236 -// dynamic result = await showGeneralDialog(  
237 -// context: context,  
238 -// barrierDismissible: false,  
239 -// // barrierColor: Colors.red,  
240 -// barrierLabel:  
241 -// MaterialLocalizations.of(context).modalBarrierDismissLabel,  
242 -// transitionDuration: const Duration(milliseconds: 150),  
243 -// pageBuilder: (BuildContext context, Animation animation,  
244 -// Animation secondaryAnimation) {  
245 -// Widget child = Stack(  
246 -// children: <Widget>[  
247 -// PhotoPreview(  
248 -// initialIndex: index,  
249 -// photoList: imgs,  
250 -// isShow: isShow,  
251 -// dashName: dashName,  
252 -// needMask: false,  
253 -// )  
254 -// ],  
255 -// );  
256 -// return child;  
257 -// });  
258 -// Utils.setBarStatus(true, color: Colors.white);  
259 -// } 227 + //查看大图
  228 + _showPhotoView(BuildContext context, int index, List imgs,
  229 + {isShow = false, List dashName}) async {
  230 + // if (imgs.length == 1 &&
  231 + // imgs[0] ==
  232 + // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
  233 + // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
  234 + // }
  235 + Utils.setBarStatus(false, color: Colors.black);
  236 + dynamic result = await showGeneralDialog(
  237 + context: context,
  238 + barrierDismissible: false,
  239 + // barrierColor: Colors.red,
  240 + barrierLabel:
  241 + MaterialLocalizations.of(context).modalBarrierDismissLabel,
  242 + transitionDuration: const Duration(milliseconds: 150),
  243 + pageBuilder: (BuildContext context, Animation animation,
  244 + Animation secondaryAnimation) {
  245 + Widget child = Stack(
  246 + children: <Widget>[
  247 + PhotoPreview(
  248 + initialIndex: index,
  249 + photoList: imgs,
  250 + isShow: isShow,
  251 + dashName: dashName,
  252 + needMask: false,
  253 + )
  254 + ],
  255 + );
  256 + return child;
  257 + });
  258 + Utils.setBarStatus(true, color: Colors.white);
  259 + }
260 260
261 -// ///#相机拍照,单图选择  
262 -// Future _getFromPictureOrCamera(  
263 -// String title, UploadImgModel imgModel, imageSource) async {  
264 -// final pickedFile = await picker.getImage(source: imageSource);  
265 -// setState(() {  
266 -// if (pickedFile != null) {  
267 -// imgModel.file = File(pickedFile.path);  
268 -// imgModel.process = 0.01;  
269 -// } else {  
270 -// print('No image selected.');  
271 -// }  
272 -// });  
273 -// if (pickedFile != null) {  
274 -// _uploadImageProvider.imgSizeMenTou = 64;  
275 -// _uploadImageProvider.mentou.qiniuUrl = null;  
276 -// _uploadImageProvider.mentou.file = File(pickedFile.path);  
277 -// _uploadImageProvider.mentou.path = pickedFile.path;  
278 -// UploadImageUtil().startUploadOnly(  
279 -// context, File(pickedFile.path), 2, true, _uploadImageProvider);  
280 -// }  
281 -// } 261 + ///#相机拍照,单图选择
  262 + Future _getFromPictureOrCamera(
  263 + String title, UploadImgModel imgModel, imageSource) async {
  264 + final pickedFile = await picker.getImage(source: imageSource);
  265 + setState(() {
  266 + if (pickedFile != null) {
  267 + imgModel.file = File(pickedFile.path);
  268 + imgModel.process = 0.01;
  269 + } else {
  270 + print('No image selected.');
  271 + }
  272 + });
  273 + if (pickedFile != null) {
  274 + _uploadImageProvider.imgSizeMenTou = 64;
  275 + _uploadImageProvider.mentou.qiniuUrl = null;
  276 + _uploadImageProvider.mentou.file = File(pickedFile.path);
  277 + _uploadImageProvider.mentou.path = pickedFile.path;
  278 + UploadImageUtil().startUploadOnly(
  279 + context, File(pickedFile.path), 2, true, _uploadImageProvider);
  280 + }
  281 + }
282 282
283 -// ///图片 头像和二维码  
284 -// Widget _imageWidget(  
285 -// String title, UploadImgModel model, double imgSize, double radius) {  
286 -// return InkWell(  
287 -// onTap: () {  
288 -// Utils.getPickPermission(context, () {  
289 -// _getFromPictureOrCamera(title, model, ImageSource.gallery);  
290 -// }, Platform.isAndroid ? Permission.storage : Permission.photos);  
291 -// },  
292 -// child: Container(  
293 -// margin: EdgeInsets.only(  
294 -// top: ScreenUtil().setWidth(40),  
295 -// left: ScreenUtil().setWidth(40),  
296 -// right: ScreenUtil().setWidth(40)),  
297 -// height: ScreenUtil().setWidth(imgSize * 2),  
298 -// child: Row(  
299 -// mainAxisAlignment: MainAxisAlignment.spaceBetween,  
300 -// children: [  
301 -// Text(  
302 -// title,  
303 -// textAlign: TextAlign.left,  
304 -// style: TextStyle(  
305 -// color: MyColours.color_333333,  
306 -// fontWeight: FontWeight.bold,  
307 -// fontSize: ScreenUtil().setSp(34)),  
308 -// ),  
309 -// Spacer(),  
310 -// Stack(  
311 -// children: [  
312 -// InkWell(  
313 -// onTap: () {  
314 -// double process;  
315 -// String qiniuUrl;  
316 -// List<String> tempList = []; 283 + ///图片 头像和二维码
  284 + Widget _imageWidget(
  285 + String title, UploadImgModel model, double imgSize, double radius) {
  286 + return InkWell(
  287 + onTap: () {
  288 + Utils.getPickPermission(context, () {
  289 + _getFromPictureOrCamera(title, model, ImageSource.gallery);
  290 + }, Platform.isAndroid ? Permission.storage : Permission.photos);
  291 + },
  292 + child: Container(
  293 + margin: EdgeInsets.only(
  294 + top: ScreenUtil().setWidth(40),
  295 + left: ScreenUtil().setWidth(40),
  296 + right: ScreenUtil().setWidth(40)),
  297 + height: ScreenUtil().setWidth(imgSize * 2),
  298 + child: Row(
  299 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  300 + children: [
  301 + Text(
  302 + title,
  303 + textAlign: TextAlign.left,
  304 + style: TextStyle(
  305 + color: MyColours.color_333333,
  306 + fontWeight: FontWeight.bold,
  307 + fontSize: ScreenUtil().setSp(34)),
  308 + ),
  309 + Spacer(),
  310 + Stack(
  311 + children: [
  312 + InkWell(
  313 + onTap: () {
  314 + double process;
  315 + String qiniuUrl;
  316 + List<String> tempList = [];
317 317
318 -// process = _uploadImageProvider.mentou.process;  
319 -// qiniuUrl = _uploadImageProvider.mentou.qiniuUrl; 318 + process = _uploadImageProvider.mentou.process;
  319 + qiniuUrl = _uploadImageProvider.mentou.qiniuUrl;
320 320
321 -// if (qiniuUrl != null && qiniuUrl != '') {  
322 -// tempList.add(qiniuUrl); 321 + if (qiniuUrl != null && qiniuUrl != '') {
  322 + tempList.add(qiniuUrl);
323 323
324 -// ///没有上传完成的不可以点击  
325 -// _showPhotoView(context, 0, tempList);  
326 -// } else {  
327 -// Utils.getPickPermission(context, () {  
328 -// _getFromPictureOrCamera(  
329 -// title, model, ImageSource.gallery);  
330 -// },  
331 -// Platform.isAndroid  
332 -// ? Permission.storage  
333 -// : Permission.photos);  
334 -// }  
335 -// },  
336 -// child: ClipRRect(  
337 -// borderRadius:  
338 -// BorderRadius.circular(ScreenUtil().setWidth(radius)),  
339 -// child: model.file == null  
340 -// ? model.qiniuUrl != null && model.qiniuUrl != ''  
341 -// ? Image.network(  
342 -// model.qiniuUrl,  
343 -// fit: BoxFit.cover,  
344 -// width: ScreenUtil().setWidth(imgSize * 2),  
345 -// height: ScreenUtil().setWidth(imgSize * 2),  
346 -// )  
347 -// : Image.asset(  
348 -// Utils.getImgPath('no_image'),  
349 -// fit: BoxFit.cover,  
350 -// width: ScreenUtil().setWidth(imgSize * 2),  
351 -// height: ScreenUtil().setWidth(imgSize * 2),  
352 -// )  
353 -// : Image.file(  
354 -// model.file,  
355 -// fit: BoxFit.cover,  
356 -// width: ScreenUtil().setWidth(imgSize * 2),  
357 -// height: ScreenUtil().setWidth(imgSize * 2),  
358 -// ),  
359 -// ),  
360 -// ),  
361 -// (model.file != null) &&  
362 -// model.process != 1 &&  
363 -// model.process != 0.01  
364 -// ? Container(  
365 -// width: ScreenUtil().setWidth(imgSize * 2),  
366 -// height: ScreenUtil().setWidth(imgSize * 2),  
367 -// decoration: BoxDecoration(  
368 -// borderRadius: BorderRadius.circular(radius),  
369 -// color: Color.fromRGBO(0, 0, 0, 0.6)),  
370 -// child: Center(  
371 -// child: Text('上传中',  
372 -// style:  
373 -// TextStyle(color: MyColours.color_999999)),  
374 -// ),  
375 -// )  
376 -// : Container(),  
377 -// ],  
378 -// ),  
379 -// HEmptyView(30),  
380 -// Image.asset(  
381 -// "assets/arr_right_gray.png",  
382 -// width: ScreenUtil().setWidth(14),  
383 -// height: ScreenUtil().setWidth(22),  
384 -// )  
385 -// ],  
386 -// ),  
387 -// ));  
388 -// } 324 + ///没有上传完成的不可以点击
  325 + _showPhotoView(context, 0, tempList);
  326 + } else {
  327 + Utils.getPickPermission(context, () {
  328 + _getFromPictureOrCamera(
  329 + title, model, ImageSource.gallery);
  330 + },
  331 + Platform.isAndroid
  332 + ? Permission.storage
  333 + : Permission.photos);
  334 + }
  335 + },
  336 + child: ClipRRect(
  337 + borderRadius:
  338 + BorderRadius.circular(ScreenUtil().setWidth(radius)),
  339 + child: model.file == null
  340 + ? model.qiniuUrl != null && model.qiniuUrl != ''
  341 + ? Image.network(
  342 + model.qiniuUrl,
  343 + fit: BoxFit.cover,
  344 + width: ScreenUtil().setWidth(imgSize * 2),
  345 + height: ScreenUtil().setWidth(imgSize * 2),
  346 + )
  347 + : Image.asset(
  348 + Utils.getImgPath('no_image'),
  349 + fit: BoxFit.cover,
  350 + width: ScreenUtil().setWidth(imgSize * 2),
  351 + height: ScreenUtil().setWidth(imgSize * 2),
  352 + )
  353 + : Image.file(
  354 + model.file,
  355 + fit: BoxFit.cover,
  356 + width: ScreenUtil().setWidth(imgSize * 2),
  357 + height: ScreenUtil().setWidth(imgSize * 2),
  358 + ),
  359 + ),
  360 + ),
  361 + (model.file != null) &&
  362 + model.process != 1 &&
  363 + model.process != 0.01
  364 + ? Container(
  365 + width: ScreenUtil().setWidth(imgSize * 2),
  366 + height: ScreenUtil().setWidth(imgSize * 2),
  367 + decoration: BoxDecoration(
  368 + borderRadius: BorderRadius.circular(radius),
  369 + color: Color.fromRGBO(0, 0, 0, 0.6)),
  370 + child: Center(
  371 + child: Text('上传中',
  372 + style:
  373 + TextStyle(color: MyColours.color_999999)),
  374 + ),
  375 + )
  376 + : Container(),
  377 + ],
  378 + ),
  379 + HEmptyView(30),
  380 + Image.asset(
  381 + "assets/arr_right_gray.png",
  382 + width: ScreenUtil().setWidth(14),
  383 + height: ScreenUtil().setWidth(22),
  384 + )
  385 + ],
  386 + ),
  387 + ));
  388 + }
389 389
390 -// ///地图地址选择  
391 -// Widget _select(String title, String hintText) {  
392 -// return InkWell(  
393 -// onTap: () {  
394 -// Utils.getPickPermission(context, () async {  
395 -// mapAddress = await NavigatorUtil.goMapChoicePointPage(context);  
396 -// if (mapAddress != null) {  
397 -// setState(() {  
398 -// // storeMapAddress = address['address'];  
399 -// // // createStoreModel.storeInfo?.address = storeAddress;  
400 -// // // createStoreModel.storeInfo?.lat = address['lat'];  
401 -// // // createStoreModel.storeInfo?.lng = address['lng'];  
402 -// });  
403 -// }  
404 -// }, Permission.location);  
405 -// },  
406 -// child: Container(  
407 -// child: Row(  
408 -// crossAxisAlignment: CrossAxisAlignment.center,  
409 -// mainAxisAlignment: MainAxisAlignment.center,  
410 -// children: [  
411 -// Container(  
412 -// child: Text(  
413 -// title,  
414 -// style: TextStyle(  
415 -// color: MyColours.color_333333,  
416 -// fontWeight: FontWeight.bold,  
417 -// fontSize: ScreenUtil().setSp(34)),  
418 -// ),  
419 -// ),  
420 -// HEmptyView(40),  
421 -// Expanded(  
422 -// child: Text(hintText,  
423 -// textAlign: TextAlign.right,  
424 -// style: TextStyle(  
425 -// color: hintText == '点击选择'  
426 -// ? MyColours.color_999999  
427 -// : MyColours.color_333333,  
428 -// fontSize: ScreenUtil().setSp(32),  
429 -// ))),  
430 -// HEmptyView(20),  
431 -// Image.asset(  
432 -// Utils.getImgPath('arr_right_gray'),  
433 -// width: ScreenUtil().setWidth(12),  
434 -// height: ScreenUtil().setWidth(22),  
435 -// )  
436 -// ],  
437 -// ),  
438 -// ),  
439 -// );  
440 -// } 390 + ///地图地址选择
  391 + Widget _select(String title, String hintText) {
  392 + return InkWell(
  393 + onTap: () {
  394 + Utils.getPickPermission(context, () async {
  395 + mapAddress = await NavigatorUtil.goMapChoicePointPage(context);
  396 + if (mapAddress != null) {
  397 + setState(() {
  398 + // storeMapAddress = address['address'];
  399 + // // createStoreModel.storeInfo?.address = storeAddress;
  400 + // // createStoreModel.storeInfo?.lat = address['lat'];
  401 + // // createStoreModel.storeInfo?.lng = address['lng'];
  402 + });
  403 + }
  404 + }, Permission.location);
  405 + },
  406 + child: Container(
  407 + child: Row(
  408 + crossAxisAlignment: CrossAxisAlignment.center,
  409 + mainAxisAlignment: MainAxisAlignment.center,
  410 + children: [
  411 + Container(
  412 + child: Text(
  413 + title,
  414 + style: TextStyle(
  415 + color: MyColours.color_333333,
  416 + fontWeight: FontWeight.bold,
  417 + fontSize: ScreenUtil().setSp(34)),
  418 + ),
  419 + ),
  420 + HEmptyView(40),
  421 + Expanded(
  422 + child: Text(hintText,
  423 + textAlign: TextAlign.right,
  424 + style: TextStyle(
  425 + color: hintText == '点击选择'
  426 + ? MyColours.color_999999
  427 + : MyColours.color_333333,
  428 + fontSize: ScreenUtil().setSp(32),
  429 + ))),
  430 + HEmptyView(20),
  431 + Image.asset(
  432 + Utils.getImgPath('arr_right_gray'),
  433 + width: ScreenUtil().setWidth(12),
  434 + height: ScreenUtil().setWidth(22),
  435 + )
  436 + ],
  437 + ),
  438 + ),
  439 + );
  440 + }
441 441
442 -// @override  
443 -// Widget build(BuildContext context) {  
444 -// _uploadImageProvider =  
445 -// Provider.of<UploadImageProvider>(context, listen: true);  
446 -// _baseIndoProvider =  
447 -// Provider.of<StoreBaseIndoProvider>(context, listen: true);  
448 -// return Scaffold(  
449 -// backgroundColor: MyColours.color_fefefe,  
450 -// appBar: SystemAppBar(  
451 -// '店铺信息',  
452 -// onTap: () {  
453 -// EventBus().emit('changeStatusColor');  
454 -// Navigator.of(context).pop();  
455 -// },  
456 -// ),  
457 -// body: WillPopScope(  
458 -// onWillPop: () {  
459 -// EventBus().emit('changeStatusColor');  
460 -// Navigator.of(context).pop();  
461 -// },  
462 -// child: InkWell(  
463 -// onTap: () {  
464 -// FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘  
465 -// },  
466 -// child: Column(children: [  
467 -// Expanded(  
468 -// child: SingleChildScrollView(  
469 -// controller: _scrollController,  
470 -// physics: BouncingScrollPhysics(),  
471 -// child: Column(  
472 -// children: [  
473 -// Padding(  
474 -// padding: EdgeInsets.symmetric(  
475 -// horizontal: ScreenUtil().setWidth(40),  
476 -// ),  
477 -// child: _textfield('店铺名称', '请填写店铺名称',  
478 -// _nameController, _nameFocusNode)),  
479 -// VEmptyView(10),  
480 -// _imageWidget('门头照片', _uploadImageProvider.mentou,  
481 -// _uploadImageProvider.imgSizeMenTou, 64),  
482 -// VEmptyView(30),  
483 -// Container(  
484 -// height: ScreenUtil().setWidth(2),  
485 -// color: MyColours.color_efefef,  
486 -// margin: EdgeInsets.only(  
487 -// left: ScreenUtil().setWidth(108 * 2),  
488 -// right: ScreenUtil().setWidth(40)),  
489 -// ),  
490 -// VEmptyView(10),  
491 -// Padding(  
492 -// padding: EdgeInsets.symmetric(  
493 -// horizontal: ScreenUtil().setWidth(40),  
494 -// ),  
495 -// child: _textfield('店铺电话', '请填写店铺电话',  
496 -// _phoneController, _phoneFocusNode)),  
497 -// VEmptyView(10),  
498 -// Container(  
499 -// height: ScreenUtil().setWidth(2),  
500 -// color: MyColours.color_efefef,  
501 -// margin: EdgeInsets.only(  
502 -// left: ScreenUtil().setWidth(108 * 2),  
503 -// right: ScreenUtil().setWidth(40)),  
504 -// ),  
505 -// VEmptyView(10),  
506 -// Padding(  
507 -// padding: EdgeInsets.symmetric(  
508 -// horizontal: ScreenUtil().setWidth(40),  
509 -// ),  
510 -// child: _textfield(  
511 -// '营业时间',  
512 -// '请填写营业时间,如09:00-23:00',  
513 -// _timeController,  
514 -// _timeFocusNode)),  
515 -// VEmptyView(10),  
516 -// Container(  
517 -// height: ScreenUtil().setWidth(2),  
518 -// color: MyColours.color_efefef,  
519 -// margin: EdgeInsets.only(  
520 -// left: ScreenUtil().setWidth(108 * 2),  
521 -// right: ScreenUtil().setWidth(40)),  
522 -// ),  
523 -// VEmptyView(10),  
524 -// Padding(  
525 -// padding: EdgeInsets.symmetric(  
526 -// horizontal: ScreenUtil().setWidth(40),  
527 -// vertical: ScreenUtil().setWidth(40),  
528 -// ),  
529 -// child: _select('地图地址', mapAddress['address'])),  
530 -// VEmptyView(10),  
531 -// Container(  
532 -// height: ScreenUtil().setWidth(2),  
533 -// color: MyColours.color_efefef,  
534 -// margin: EdgeInsets.only(  
535 -// left: ScreenUtil().setWidth(108 * 2),  
536 -// right: ScreenUtil().setWidth(40)),  
537 -// ),  
538 -// VEmptyView(10),  
539 -// Padding(  
540 -// padding: EdgeInsets.symmetric(  
541 -// horizontal: ScreenUtil().setWidth(40),  
542 -// ),  
543 -// child: _textfield('详细地址', '请填写店铺详细地址',  
544 -// _addressController, _addressFocusNode)),  
545 -// VEmptyView(10),  
546 -// Container(  
547 -// height: ScreenUtil().setWidth(2),  
548 -// color: MyColours.color_efefef,  
549 -// margin: EdgeInsets.only(  
550 -// left: ScreenUtil().setWidth(108 * 2),  
551 -// right: ScreenUtil().setWidth(40)),  
552 -// ),  
553 -// VEmptyView(10),  
554 -// Padding(  
555 -// padding: EdgeInsets.symmetric(  
556 -// horizontal: ScreenUtil().setWidth(40),  
557 -// ),  
558 -// child: _textfield(  
559 -// '店铺简介',  
560 -// '请填写店铺简介',  
561 -// _introductionController,  
562 -// _introductionFocusNode)),  
563 -// VEmptyView(10),  
564 -// ],  
565 -// )),  
566 -// ),  
567 -// VEmptyView(20),  
568 -// Padding(  
569 -// padding: EdgeInsets.fromLTRB(ScreenUtil().setWidth(40), 0,  
570 -// ScreenUtil().setWidth(40), ScreenUtil().setWidth(40)),  
571 -// child: RoundButton(  
572 -// onPressed: () {  
573 -// //接口  
574 -// _setSellerInfoById();  
575 -// },  
576 -// text: '保存',  
577 -// fontSize: 34,  
578 -// isBold: false,  
579 -// height: ScreenUtil().setWidth(80),  
580 -// width: double.infinity,  
581 -// radius: ScreenUtil().setWidth(10),  
582 -// ))  
583 -// ]))));  
584 -// }  
585 -// } 442 + @override
  443 + Widget build(BuildContext context) {
  444 + _uploadImageProvider =
  445 + Provider.of<UploadImageProvider>(context, listen: true);
  446 + _baseIndoProvider =
  447 + Provider.of<StoreBaseIndoProvider>(context, listen: true);
  448 + return Scaffold(
  449 + backgroundColor: MyColours.color_fefefe,
  450 + appBar: SystemAppBar(
  451 + '店铺信息',
  452 + onTap: () {
  453 + EventBus().emit('changeStatusColor');
  454 + Navigator.of(context).pop();
  455 + },
  456 + ),
  457 + body: WillPopScope(
  458 + onWillPop: () {
  459 + EventBus().emit('changeStatusColor');
  460 + Navigator.of(context).pop();
  461 + },
  462 + child: InkWell(
  463 + onTap: () {
  464 + FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  465 + },
  466 + child: Column(children: [
  467 + Expanded(
  468 + child: SingleChildScrollView(
  469 + controller: _scrollController,
  470 + physics: BouncingScrollPhysics(),
  471 + child: Column(
  472 + children: [
  473 + Padding(
  474 + padding: EdgeInsets.symmetric(
  475 + horizontal: ScreenUtil().setWidth(40),
  476 + ),
  477 + child: _textfield('店铺名称', '请填写店铺名称',
  478 + _nameController, _nameFocusNode)),
  479 + VEmptyView(10),
  480 + _imageWidget('门头照片', _uploadImageProvider.mentou,
  481 + _uploadImageProvider.imgSizeMenTou, 64),
  482 + VEmptyView(30),
  483 + Container(
  484 + height: ScreenUtil().setWidth(2),
  485 + color: MyColours.color_efefef,
  486 + margin: EdgeInsets.only(
  487 + left: ScreenUtil().setWidth(108 * 2),
  488 + right: ScreenUtil().setWidth(40)),
  489 + ),
  490 + VEmptyView(10),
  491 + Padding(
  492 + padding: EdgeInsets.symmetric(
  493 + horizontal: ScreenUtil().setWidth(40),
  494 + ),
  495 + child: _textfield('店铺电话', '请填写店铺电话',
  496 + _phoneController, _phoneFocusNode)),
  497 + VEmptyView(10),
  498 + Container(
  499 + height: ScreenUtil().setWidth(2),
  500 + color: MyColours.color_efefef,
  501 + margin: EdgeInsets.only(
  502 + left: ScreenUtil().setWidth(108 * 2),
  503 + right: ScreenUtil().setWidth(40)),
  504 + ),
  505 + VEmptyView(10),
  506 + Padding(
  507 + padding: EdgeInsets.symmetric(
  508 + horizontal: ScreenUtil().setWidth(40),
  509 + ),
  510 + child: _textfield(
  511 + '营业时间',
  512 + '请填写营业时间,如09:00-23:00',
  513 + _timeController,
  514 + _timeFocusNode)),
  515 + VEmptyView(10),
  516 + Container(
  517 + height: ScreenUtil().setWidth(2),
  518 + color: MyColours.color_efefef,
  519 + margin: EdgeInsets.only(
  520 + left: ScreenUtil().setWidth(108 * 2),
  521 + right: ScreenUtil().setWidth(40)),
  522 + ),
  523 + VEmptyView(10),
  524 + Padding(
  525 + padding: EdgeInsets.symmetric(
  526 + horizontal: ScreenUtil().setWidth(40),
  527 + vertical: ScreenUtil().setWidth(40),
  528 + ),
  529 + child: _select('地图地址', mapAddress['address'])),
  530 + VEmptyView(10),
  531 + Container(
  532 + height: ScreenUtil().setWidth(2),
  533 + color: MyColours.color_efefef,
  534 + margin: EdgeInsets.only(
  535 + left: ScreenUtil().setWidth(108 * 2),
  536 + right: ScreenUtil().setWidth(40)),
  537 + ),
  538 + VEmptyView(10),
  539 + Padding(
  540 + padding: EdgeInsets.symmetric(
  541 + horizontal: ScreenUtil().setWidth(40),
  542 + ),
  543 + child: _textfield('详细地址', '请填写店铺详细地址',
  544 + _addressController, _addressFocusNode)),
  545 + VEmptyView(10),
  546 + Container(
  547 + height: ScreenUtil().setWidth(2),
  548 + color: MyColours.color_efefef,
  549 + margin: EdgeInsets.only(
  550 + left: ScreenUtil().setWidth(108 * 2),
  551 + right: ScreenUtil().setWidth(40)),
  552 + ),
  553 + VEmptyView(10),
  554 + Padding(
  555 + padding: EdgeInsets.symmetric(
  556 + horizontal: ScreenUtil().setWidth(40),
  557 + ),
  558 + child: _textfield(
  559 + '店铺简介',
  560 + '请填写店铺简介',
  561 + _introductionController,
  562 + _introductionFocusNode)),
  563 + VEmptyView(10),
  564 + ],
  565 + )),
  566 + ),
  567 + VEmptyView(20),
  568 + Padding(
  569 + padding: EdgeInsets.fromLTRB(ScreenUtil().setWidth(40), 0,
  570 + ScreenUtil().setWidth(40), ScreenUtil().setWidth(40)),
  571 + child: RoundButton(
  572 + onPressed: () {
  573 + //接口
  574 + _setSellerInfoById();
  575 + },
  576 + text: '保存',
  577 + fontSize: 34,
  578 + isBold: false,
  579 + height: ScreenUtil().setWidth(80),
  580 + width: double.infinity,
  581 + radius: ScreenUtil().setWidth(10),
  582 + ))
  583 + ]))));
  584 + }
  585 +}
@@ -94,6 +94,7 @@ import 'package:one_key/pages/my/room_type/room_type_select_table_page.dart'; @@ -94,6 +94,7 @@ import 'package:one_key/pages/my/room_type/room_type_select_table_page.dart';
94 import 'package:one_key/pages/my/sms_manager.dart'; 94 import 'package:one_key/pages/my/sms_manager.dart';
95 import 'package:one_key/pages/my/sms_recharge_page.dart'; 95 import 'package:one_key/pages/my/sms_recharge_page.dart';
96 import 'package:one_key/pages/my/store_base_info_page.dart'; 96 import 'package:one_key/pages/my/store_base_info_page.dart';
  97 +import 'package:one_key/pages/my/store_base_info_page_old.dart';
97 import 'package:one_key/pages/my/store_type_fill_manage_page.dart'; 98 import 'package:one_key/pages/my/store_type_fill_manage_page.dart';
98 import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart'; 99 import 'package:one_key/pages/my/table_manage/my_areas_manage_page.dart';
99 import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart'; 100 import 'package:one_key/pages/my/table_manage/my_table_manage_home_page.dart';
1 import 'package:common_utils/common_utils.dart'; 1 import 'package:common_utils/common_utils.dart';
2 import 'package:flutter/material.dart' hide Router; 2 import 'package:flutter/material.dart' hide Router;
  3 +import 'package:flutter_ex_widget/ex_rich_text2.dart';
  4 +import 'package:flutter_ex_widget/ex_text.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 import 'package:one_key/res/colors.dart'; 6 import 'package:one_key/res/colors.dart';
  7 +import 'package:flutter_ex_widget/flutter_ex_widget.dart';
5 8
6 class RoundButton extends StatelessWidget { 9 class RoundButton extends StatelessWidget {
7 const RoundButton( 10 const RoundButton(
8 {Key key, 11 {Key key,
9 this.width, 12 this.width,
10 this.height = 50, 13 this.height = 50,
11 - this.margin, 14 + this.margin = EdgeInsets.zero,
12 this.radius, 15 this.radius,
13 this.bgColor, 16 this.bgColor,
14 this.highlightColor, 17 this.highlightColor,
@@ -85,6 +88,7 @@ class RoundButton extends StatelessWidget { @@ -85,6 +88,7 @@ class RoundButton extends StatelessWidget {
85 new Center( 88 new Center(
86 child: Row( 89 child: Row(
87 mainAxisAlignment: MainAxisAlignment.center, 90 mainAxisAlignment: MainAxisAlignment.center,
  91 + crossAxisAlignment: CrossAxisAlignment.center,
88 children: <Widget>[ 92 children: <Widget>[
89 !ObjectUtil.isEmptyString(image) 93 !ObjectUtil.isEmptyString(image)
90 ? Padding( 94 ? Padding(
@@ -97,17 +101,18 @@ class RoundButton extends StatelessWidget { @@ -97,17 +101,18 @@ class RoundButton extends StatelessWidget {
97 ) 101 )
98 : Text(''), 102 : Text(''),
99 Expanded( 103 Expanded(
100 - child: Text( 104 + child: Container(
  105 + padding: EdgeInsets.only(top: ScreenUtil().setWidth(2)),
  106 + child: ExText(
101 text, 107 text,
102 - textAlign: TextAlign.center,  
103 - overflow: TextOverflow.ellipsis,  
104 - style: style ?? 108 + style ??
105 new TextStyle( 109 new TextStyle(
106 color: textColor, 110 color: textColor,
107 fontSize: ScreenUtil().setSp(fontSize), 111 fontSize: ScreenUtil().setSp(fontSize),
108 fontWeight: 112 fontWeight:
109 isBold ? FontWeight.bold : FontWeight.normal), 113 isBold ? FontWeight.bold : FontWeight.normal),
110 - )) 114 + overflow: TextOverflow.ellipsis,
  115 + )))
111 ], 116 ],
112 ), 117 ),
113 ), 118 ),
@@ -398,6 +398,13 @@ packages: @@ -398,6 +398,13 @@ packages:
398 url: "https://pub.flutter-io.cn" 398 url: "https://pub.flutter-io.cn"
399 source: hosted 399 source: hosted
400 version: "2.2.1" 400 version: "2.2.1"
  401 + flutter_ex_widget:
  402 + dependency: "direct main"
  403 + description:
  404 + name: flutter_ex_widget
  405 + url: "https://pub.flutter-io.cn"
  406 + source: hosted
  407 + version: "0.0.7"
401 flutter_inappwebview: 408 flutter_inappwebview:
402 dependency: "direct main" 409 dependency: "direct main"
403 description: 410 description:
@@ -158,6 +158,8 @@ dependencies: @@ -158,6 +158,8 @@ dependencies:
158 azlistview: ^1.1.1 158 azlistview: ^1.1.1
159 # sendsms: ^1.0.3 159 # sendsms: ^1.0.3
160 160
  161 + flutter_ex_widget: ^0.0.7
  162 +
161 163
162 164
163 165