Commit 142d8307f3759f1fbde7a3d818c08583e3fd2251

Authored by wdn127929
1 parent 50197839

微调整样式画图细节展示UI

@@ -90,6 +90,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -90,6 +90,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
90 if (success) { 90 if (success) {
91 marketingCenterProvider.pageStateSettingMini = PageState.Success; 91 marketingCenterProvider.pageStateSettingMini = PageState.Success;
92 miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-3'; 92 miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-3';
  93 + if (miniType == '1' || miniType == '2' || miniType == '3') {
  94 + miniType = '2-3';
  95 + }
93 tilteContentC.text = marketingCenterProvider 96 tilteContentC.text = marketingCenterProvider
94 .dzSellerConfModel!.liteStyleTitle ?? 97 .dzSellerConfModel!.liteStyleTitle ??
95 "您预订的${Provider.of<UserModel>(context, listen: false).user!.sellername},已经安排,点击查看详情"; 98 "您预订的${Provider.of<UserModel>(context, listen: false).user!.sellername},已经安排,点击查看详情";
@@ -380,7 +383,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -380,7 +383,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
380 ? '中午' 383 ? '中午'
381 : ''; 384 : '';
382 385
383 - if (hour != '') { 386 + if (hour != '' && section != '') {
384 section = section + ' '; 387 section = section + ' ';
385 } 388 }
386 389
@@ -445,6 +448,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -445,6 +448,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
445 Container( 448 Container(
446 width: w(10), 449 width: w(10),
447 height: w(34), 450 height: w(34),
  451 + alignment: Alignment.center,
448 child: Text( 452 child: Text(
449 week, 453 week,
450 textAlign: 454 textAlign:
@@ -453,6 +457,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -453,6 +457,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
453 overflow: 457 overflow:
454 TextOverflow.ellipsis, 458 TextOverflow.ellipsis,
455 style: TextStyle( 459 style: TextStyle(
  460 + height: 1,
456 // writingMode: TextWritingMode.verticalLr, 461 // writingMode: TextWritingMode.verticalLr,
457 color: MyColours 462 color: MyColours
458 .color_FFEFC5, 463 .color_FFEFC5,
@@ -464,32 +469,27 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -464,32 +469,27 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
464 )), 469 )),
465 VEmptyView(14), 470 VEmptyView(14),
466 Container( 471 Container(
467 - child: Container(  
468 -  
469 - // constraints: BoxConstraints(  
470 - // maxWidth: w(300)),  
471 - decoration: BoxDecoration(  
472 - color: MyColours  
473 - .color_66FFEFC5,  
474 - borderRadius:  
475 - BorderRadius.circular(  
476 - r(3))),  
477 - padding: EdgeInsets.symmetric(  
478 - horizontal: w(4),  
479 - vertical: w(3)),  
480 - // height: h(26),  
481 - child: Text(  
482 - time,  
483 - maxLines: 1,  
484 - overflow:  
485 - TextOverflow.ellipsis,  
486 - style: TextStyle(  
487 - color: MyColours  
488 - .color_FFEFC5,  
489 - fontWeight:  
490 - FontWeight.bold,  
491 - fontSize: font(10)),  
492 - ))), 472 +
  473 + // constraints: BoxConstraints(
  474 + // maxWidth: w(300)),
  475 + decoration: BoxDecoration(
  476 + color: MyColours.color_66FFEFC5,
  477 + borderRadius:
  478 + BorderRadius.circular(
  479 + r(3))),
  480 + padding: EdgeInsets.symmetric(
  481 + horizontal: w(4),
  482 + vertical: w(3)),
  483 + // height: h(26),
  484 + child: Text(
  485 + time,
  486 + maxLines: 1,
  487 + overflow: TextOverflow.ellipsis,
  488 + style: TextStyle(
  489 + color: MyColours.color_FFEFC5,
  490 + fontWeight: FontWeight.bold,
  491 + fontSize: font(10)),
  492 + )),
493 ], 493 ],
494 ), 494 ),
495 ], 495 ],
@@ -603,8 +603,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -603,8 +603,8 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
603 VEmptyView(8), 603 VEmptyView(8),
604 Container( 604 Container(
605 alignment: Alignment.center, 605 alignment: Alignment.center,
606 - width: w(60),  
607 - height: w(13), 606 + width: w(56),
  607 + // height: w(13),
608 // constraints: BoxConstraints( 608 // constraints: BoxConstraints(
609 // maxWidth: w(300)), 609 // maxWidth: w(300)),
610 decoration: BoxDecoration( 610 decoration: BoxDecoration(
@@ -614,10 +614,10 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { @@ -614,10 +614,10 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
614 BorderRadius 614 BorderRadius
615 .circular( 615 .circular(
616 r(3))), 616 r(3))),
617 - // padding:  
618 - // EdgeInsets.symmetric(  
619 - // horizontal: w(4),  
620 - // vertical: w(3)), 617 + padding:
  618 + EdgeInsets.symmetric(
  619 + // horizontal: w(1),
  620 + vertical: w(3)),
621 // height: h(26), 621 // height: h(26),
622 child: Text( 622 child: Text(
623 time, 623 time,
@@ -8,6 +8,10 @@ double h(num height) { @@ -8,6 +8,10 @@ double h(num height) {
8 return ScreenUtil().setWidth(height * 2); 8 return ScreenUtil().setWidth(height * 2);
9 } 9 }
10 10
  11 +double h2(num height) {
  12 + return ScreenUtil().setHeight(height * 2);
  13 +}
  14 +
11 double r(num radius) { 15 double r(num radius) {
12 return ScreenUtil().radius(radius * 2); 16 return ScreenUtil().radius(radius * 2);
13 } 17 }
@@ -2507,6 +2507,7 @@ class Utils { @@ -2507,6 +2507,7 @@ class Utils {
2507 textAlign: TextAlign.center, 2507 textAlign: TextAlign.center,
2508 fontWeight: FontWeight.bold, 2508 fontWeight: FontWeight.bold,
2509 fontStyle: FontStyle.normal, 2509 fontStyle: FontStyle.normal,
  2510 + height: 1,
2510 maxLines: 1, 2511 maxLines: 1,
2511 ellipsis: '3', 2512 ellipsis: '3',
2512 fontSize: 24)); 2513 fontSize: 24));
@@ -2517,7 +2518,7 @@ class Utils { @@ -2517,7 +2518,7 @@ class Utils {
2517 // 设置文本的宽度约束 2518 // 设置文本的宽度约束
2518 ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500); 2519 ParagraphConstraints pc2 = ui.ParagraphConstraints(width: 500);
2519 ui.Paragraph paragraph2 = pb2.build()..layout(pc2); 2520 ui.Paragraph paragraph2 = pb2.build()..layout(pc2);
2520 - canvas.drawParagraph(paragraph2, Offset(0, 12)); 2521 + canvas.drawParagraph(paragraph2, Offset(0, 14));
2521 2522
2522 canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint); 2523 canvas.drawRect(Rect.fromLTWH(0, 348, 500, 52), paint);
2523 2524
@@ -2526,6 +2527,7 @@ class Utils { @@ -2526,6 +2527,7 @@ class Utils {
2526 textAlign: TextAlign.center, 2527 textAlign: TextAlign.center,
2527 fontWeight: FontWeight.bold, 2528 fontWeight: FontWeight.bold,
2528 fontStyle: FontStyle.normal, 2529 fontStyle: FontStyle.normal,
  2530 + height: 1,
2529 fontSize: 24)); 2531 fontSize: 24));
2530 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24)); 2532 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
2531 pb.addText(time); 2533 pb.addText(time);
@@ -2533,7 +2535,7 @@ class Utils { @@ -2533,7 +2535,7 @@ class Utils {
2533 // 设置文本的宽度约束 2535 // 设置文本的宽度约束
2534 ParagraphConstraints pc = ui.ParagraphConstraints(width: 500); 2536 ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
2535 ui.Paragraph paragraph = pb.build()..layout(pc); 2537 ui.Paragraph paragraph = pb.build()..layout(pc);
2536 - canvas.drawParagraph(paragraph, Offset(0, 360)); 2538 + canvas.drawParagraph(paragraph, Offset(0, 362));
2537 2539
2538 // 绘制文字 2540 // 绘制文字
2539 // ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle( 2541 // ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
@@ -2607,6 +2609,7 @@ class Utils { @@ -2607,6 +2609,7 @@ class Utils {
2607 textAlign: TextAlign.center, 2609 textAlign: TextAlign.center,
2608 fontWeight: FontWeight.bold, 2610 fontWeight: FontWeight.bold,
2609 maxLines: 2, 2611 maxLines: 2,
  2612 + height: 1,
2610 fontStyle: FontStyle.normal, 2613 fontStyle: FontStyle.normal,
2611 fontSize: 24)); 2614 fontSize: 24));
2612 pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24)); 2615 pb2.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
@@ -2622,6 +2625,7 @@ class Utils { @@ -2622,6 +2625,7 @@ class Utils {
2622 ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle( 2625 ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
2623 textAlign: TextAlign.center, 2626 textAlign: TextAlign.center,
2624 fontWeight: FontWeight.bold, 2627 fontWeight: FontWeight.bold,
  2628 + height: 1,
2625 fontStyle: FontStyle.normal, 2629 fontStyle: FontStyle.normal,
2626 fontSize: 48)); 2630 fontSize: 48));
2627 pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48)); 2631 pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
@@ -2637,6 +2641,7 @@ class Utils { @@ -2637,6 +2641,7 @@ class Utils {
2637 textAlign: TextAlign.center, 2641 textAlign: TextAlign.center,
2638 fontWeight: FontWeight.bold, 2642 fontWeight: FontWeight.bold,
2639 fontStyle: FontStyle.normal, 2643 fontStyle: FontStyle.normal,
  2644 + height: 1,
2640 fontSize: 24)); 2645 fontSize: 24));
2641 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24)); 2646 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
2642 pb.addText(time); 2647 pb.addText(time);
@@ -2644,7 +2649,7 @@ class Utils { @@ -2644,7 +2649,7 @@ class Utils {
2644 // 设置文本的宽度约束 2649 // 设置文本的宽度约束
2645 ParagraphConstraints pc = ui.ParagraphConstraints(width: 500); 2650 ParagraphConstraints pc = ui.ParagraphConstraints(width: 500);
2646 ui.Paragraph paragraph = pb.build()..layout(pc); 2651 ui.Paragraph paragraph = pb.build()..layout(pc);
2647 - canvas.drawParagraph(paragraph, Offset(0, 270)); 2652 + canvas.drawParagraph(paragraph, Offset(0, 265));
2648 2653
2649 //下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计 2654 //下面的代码是生成图片的关键代码,以上绘制文字和圆圈的代码可以忽略不计
2650 var picture = 2655 var picture =
@@ -2681,7 +2686,7 @@ class Utils { @@ -2681,7 +2686,7 @@ class Utils {
2681 ? _getDsoltStrShow(dsolt, isCan: false) 2686 ? _getDsoltStrShow(dsolt, isCan: false)
2682 : ''; 2687 : '';
2683 2688
2684 - if (hour != '') { 2689 + if (hour != '' && section != '') {
2685 section = section + ' '; 2690 section = section + ' ';
2686 } 2691 }
2687 2692
@@ -2724,6 +2729,7 @@ class Utils { @@ -2724,6 +2729,7 @@ class Utils {
2724 textAlign: TextAlign.center, 2729 textAlign: TextAlign.center,
2725 fontWeight: FontWeight.bold, 2730 fontWeight: FontWeight.bold,
2726 fontStyle: FontStyle.normal, 2731 fontStyle: FontStyle.normal,
  2732 + height: 1,
2727 fontSize: 48)); 2733 fontSize: 48));
2728 pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48)); 2734 pb3.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 48));
2729 pb3.addText(month); 2735 pb3.addText(month);
@@ -2746,11 +2752,11 @@ class Utils { @@ -2746,11 +2752,11 @@ class Utils {
2746 // 设置文本的宽度约束 2752 // 设置文本的宽度约束
2747 ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30); 2753 ParagraphConstraints pc4 = ui.ParagraphConstraints(width: 30);
2748 ui.Paragraph paragraph4 = pb4.build()..layout(pc4); 2754 ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
2749 - canvas.drawParagraph(paragraph4, Offset(430, 264)); 2755 + canvas.drawParagraph(paragraph4, Offset(430, 250));
2750 2756
2751 Rect rect = subType1 == '1' 2757 Rect rect = subType1 == '1'
2752 - ? Rect.fromLTWH(315, 317, 140, 38)  
2753 - : Rect.fromLTWH(387, 317, 67, 36); 2758 + ? Rect.fromLTWH(315, 310, 140, 38)
  2759 + : Rect.fromLTWH(386, 310, 67, 37);
2754 paint.color = MyColours.color_66FFEFC5; 2760 paint.color = MyColours.color_66FFEFC5;
2755 RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6)); 2761 RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
2756 canvas.drawRRect(rRect, paint); 2762 canvas.drawRRect(rRect, paint);
@@ -2760,14 +2766,15 @@ class Utils { @@ -2760,14 +2766,15 @@ class Utils {
2760 ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle( 2766 ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
2761 textAlign: TextAlign.center, 2767 textAlign: TextAlign.center,
2762 fontWeight: FontWeight.bold, 2768 fontWeight: FontWeight.bold,
  2769 + height: 1,
2763 fontStyle: FontStyle.normal, 2770 fontStyle: FontStyle.normal,
2764 fontSize: 24)); 2771 fontSize: 24));
2765 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24)); 2772 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 24));
2766 pb.addText(time); 2773 pb.addText(time);
2767 2774
2768 // 设置文本的宽度约束 2775 // 设置文本的宽度约束
2769 - double width = subType1 == '1' ? 200 : 100;  
2770 - Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(370, 320); 2776 + double width = subType1 == '1' ? 200 : 114;
  2777 + Offset offset = subType1 == '1' ? Offset(285, 320) : Offset(360, 318);
2771 ParagraphConstraints pc = ui.ParagraphConstraints(width: width); 2778 ParagraphConstraints pc = ui.ParagraphConstraints(width: width);
2772 ui.Paragraph paragraph = pb.build()..layout(pc); 2779 ui.Paragraph paragraph = pb.build()..layout(pc);
2773 canvas.drawParagraph(paragraph, offset); 2780 canvas.drawParagraph(paragraph, offset);
@@ -2849,6 +2856,7 @@ class Utils { @@ -2849,6 +2856,7 @@ class Utils {
2849 // 绘制文字 2856 // 绘制文字
2850 ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle( 2857 ui.ParagraphBuilder pb3 = ui.ParagraphBuilder(ui.ParagraphStyle(
2851 textAlign: TextAlign.center, 2858 textAlign: TextAlign.center,
  2859 + height: 1,
2852 fontWeight: FontWeight.bold, 2860 fontWeight: FontWeight.bold,
2853 fontStyle: FontStyle.normal, 2861 fontStyle: FontStyle.normal,
2854 fontSize: 20)); 2862 fontSize: 20));
@@ -2863,7 +2871,7 @@ class Utils { @@ -2863,7 +2871,7 @@ class Utils {
2863 // 绘制文字 2871 // 绘制文字
2864 ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle( 2872 ui.ParagraphBuilder pb4 = ui.ParagraphBuilder(ui.ParagraphStyle(
2865 textAlign: TextAlign.center, 2873 textAlign: TextAlign.center,
2866 - // height: 1, 2874 + height: 1,
2867 fontWeight: FontWeight.bold, 2875 fontWeight: FontWeight.bold,
2868 fontStyle: FontStyle.normal, 2876 fontStyle: FontStyle.normal,
2869 fontSize: 20)); 2877 fontSize: 20));
@@ -2875,16 +2883,18 @@ class Utils { @@ -2875,16 +2883,18 @@ class Utils {
2875 ui.Paragraph paragraph4 = pb4.build()..layout(pc4); 2883 ui.Paragraph paragraph4 = pb4.build()..layout(pc4);
2876 canvas.drawParagraph(paragraph4, Offset(420, 320)); 2884 canvas.drawParagraph(paragraph4, Offset(420, 320));
2877 2885
2878 - Rect rect = Rect.fromLTWH(350, 351, 118, 30); 2886 + Rect rect = Rect.fromLTWH(350, 348, 118, 30);
2879 paint.color = MyColours.color_66FFEFC5; 2887 paint.color = MyColours.color_66FFEFC5;
2880 RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6)); 2888 RRect rRect = RRect.fromRectAndRadius(rect, Radius.circular(6));
2881 canvas.drawRRect(rRect, paint); 2889 canvas.drawRRect(rRect, paint);
  2890 +
2882 paint.color = MyColours.color_99000000; 2891 paint.color = MyColours.color_99000000;
2883 2892
2884 // 绘制文字 2893 // 绘制文字
2885 ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle( 2894 ui.ParagraphBuilder pb = ui.ParagraphBuilder(ui.ParagraphStyle(
2886 textAlign: TextAlign.center, 2895 textAlign: TextAlign.center,
2887 fontWeight: FontWeight.bold, 2896 fontWeight: FontWeight.bold,
  2897 + height: 1,
2888 fontStyle: FontStyle.normal, 2898 fontStyle: FontStyle.normal,
2889 fontSize: 20)); 2899 fontSize: 20));
2890 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20)); 2900 pb.pushStyle(ui.TextStyle(color: MyColours.color_FFEFC5, fontSize: 20));
@@ -3198,6 +3208,9 @@ class Utils { @@ -3198,6 +3208,9 @@ class Utils {
3198 if (liteStyle != '0') { 3208 if (liteStyle != '0') {
3199 //画图 3209 //画图
3200 // 4种情况的图分别画出来 3210 // 4种情况的图分别画出来
  3211 + if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') {
  3212 + liteStyle = '2-3';
  3213 + }
3201 List<String> subType = liteStyle!.split('-'); 3214 List<String> subType = liteStyle!.split('-');
3202 String subType0 = subType[0]; //几号模版 3215 String subType0 = subType[0]; //几号模版
3203 if (subType0 == '1') { 3216 if (subType0 == '1') {