Commit 0ab9838afe7e7a1b11f46882fc30e231f65ee1b2

Authored by wdn127929
1 parent 8669a65e

多时段修复

@@ -238,7 +238,7 @@ class NoteBookOnlySunModel { @@ -238,7 +238,7 @@ class NoteBookOnlySunModel {
238 ddateSolt = json["ddate_solt"]; 238 ddateSolt = json["ddate_solt"];
239 } 239 }
240 if (json["mname"] is String) { 240 if (json["mname"] is String) {
241 - ddateSolt = json["mname"]; 241 + mname = json["mname"];
242 } 242 }
243 if (json["status"] is String) { 243 if (json["status"] is String) {
244 status = json["status"]; 244 status = json["status"];
@@ -501,23 +501,40 @@ class NotebookDetailChangeModelOnly with ChangeNotifier { @@ -501,23 +501,40 @@ class NotebookDetailChangeModelOnly with ChangeNotifier {
501 String? ddateSolt = detailEntity!.ddate_solt; //订座详情页面的餐段(1,2,3 早餐、午餐、晚餐) 501 String? ddateSolt = detailEntity!.ddate_solt; //订座详情页面的餐段(1,2,3 早餐、午餐、晚餐)
502 String tempTime = ddateHm; //默认上个页面到店时间半小时值 502 String tempTime = ddateHm; //默认上个页面到店时间半小时值
503 if (ddateSolt != currTimeIndex.toString()) { 503 if (ddateSolt != currTimeIndex.toString()) {
504 - if (currTimeIndex == 1) {  
505 - tempTime = '08:00';  
506 - if (userModel.user!.morning != '' && userModel.user!.morning != null) {  
507 - List tempDate = userModel.user!.morning!.split("-");  
508 - tempTime = tempDate[0];  
509 - }  
510 - } else if (currTimeIndex == 2) {  
511 - tempTime = '12:00';  
512 - if (userModel.user!.noon != '' && userModel.user!.noon != null) {  
513 - List tempDate = userModel.user!.noon!.split("-");  
514 - tempTime = tempDate[0];  
515 - }  
516 - } else if (currTimeIndex == 3) {  
517 - tempTime = '18:00';  
518 - if (userModel.user!.night != '' && userModel.user!.night != null) {  
519 - List tempDate = userModel.user!.night!.split("-");  
520 - tempTime = tempDate[0]; 504 + List tempDate = times!.split("-");
  505 + tempTime = tempDate[0];
  506 + if (tempTime == null) {
  507 + if (currTimeIndex == 1) {
  508 + tempTime = '08:00';
  509 + // if (userModel.user!.morning != '' &&
  510 + // userModel.user!.morning != null) {
  511 + // List tempDate = userModel.user!.morning!.split("-");
  512 + // tempTime = tempDate[0];
  513 + // }
  514 + } else if (currTimeIndex == 2) {
  515 + tempTime = '12:00';
  516 + // if (userModel.user!.noon != '' && userModel.user!.noon != null) {
  517 + // List tempDate = userModel.user!.noon!.split("-");
  518 + // tempTime = tempDate[0];
  519 + // }
  520 + } else if (currTimeIndex == 3) {
  521 + tempTime = '18:00';
  522 + // if (userModel.user!.night != '' && userModel.user!.night != null) {
  523 + // List tempDate = userModel.user!.night!.split("-");
  524 + // tempTime = tempDate[0];
  525 + // }
  526 + } else if (currTimeIndex == 4) {
  527 + tempTime = '20:00';
  528 + // if (userModel.user!.night != '' && userModel.user!.night != null) {
  529 + // List tempDate = userModel.user!.night!.split("-");
  530 + // tempTime = tempDate[0];
  531 + // }
  532 + } else if (currTimeIndex == 5) {
  533 + tempTime = '21:00';
  534 + // if (userModel.user!.night != '' && userModel.user!.night != null) {
  535 + // List tempDate = userModel.user!.night!.split("-");
  536 + // tempTime = tempDate[0];
  537 + // }
521 } 538 }
522 } 539 }
523 } 540 }
@@ -672,24 +689,31 @@ class NotebookDetailChangeModelOnly with ChangeNotifier { @@ -672,24 +689,31 @@ class NotebookDetailChangeModelOnly with ChangeNotifier {
672 if (currTimeIndex == 1) { 689 if (currTimeIndex == 1) {
673 tempTime = '08:00'; 690 tempTime = '08:00';
674 ddateSolt = '1'; 691 ddateSolt = '1';
675 - if (userModel.user!.morning != '' && userModel.user!.morning != null) {  
676 - List tempDate = userModel.user!.morning!.split("-");  
677 - tempTime = tempDate[0];  
678 - } 692 +
  693 + List tempDate = times!.split("-");
  694 + tempTime = tempDate[0];
  695 + // if (userModel.user!.morning != '' && userModel.user!.morning != null) {
  696 + // List tempDate = userModel.user!.morning!.split("-");
  697 + // tempTime = tempDate[0];
  698 + // }
679 } else if (currTimeIndex == 2) { 699 } else if (currTimeIndex == 2) {
680 tempTime = '12:00'; 700 tempTime = '12:00';
681 ddateSolt = '2'; 701 ddateSolt = '2';
682 - if (userModel.user!.noon != '' && userModel.user!.noon != null) {  
683 - List tempDate = userModel.user!.noon!.split("-");  
684 - tempTime = tempDate[0];  
685 - } 702 + List tempDate = times!.split("-");
  703 + tempTime = tempDate[0];
  704 + // if (userModel.user!.noon != '' && userModel.user!.noon != null) {
  705 + // List tempDate = userModel.user!.noon!.split("-");
  706 + // tempTime = tempDate[0];
  707 + // }
686 } else if (currTimeIndex == 3) { 708 } else if (currTimeIndex == 3) {
687 tempTime = '18:00'; 709 tempTime = '18:00';
688 ddateSolt = '3'; 710 ddateSolt = '3';
689 - if (userModel.user!.night != '' && userModel.user!.night != null) {  
690 - List tempDate = userModel.user!.night!.split("-");  
691 - tempTime = tempDate[0];  
692 - } 711 + List tempDate = times!.split("-");
  712 + tempTime = tempDate[0];
  713 + // if (userModel.user!.night != '' && userModel.user!.night != null) {
  714 + // List tempDate = userModel.user!.night!.split("-");
  715 + // tempTime = tempDate[0];
  716 + // }
693 } 717 }
694 } 718 }
695 719
@@ -717,9 +741,9 @@ class NotebookDetailChangeModelOnly with ChangeNotifier { @@ -717,9 +741,9 @@ class NotebookDetailChangeModelOnly with ChangeNotifier {
717 late String timeStrStart; 741 late String timeStrStart;
718 late String timeStrEnd; 742 late String timeStrEnd;
719 743
720 - List timem =times!.split('-');  
721 - timeStrStart = ymd + ' ' + timem[0] + ':00';  
722 - timeStrEnd = ymd + ' ' + timem[1] + ':00'; 744 + List timem = times!.split('-');
  745 + timeStrStart = ymd + ' ' + timem[0] + ':00';
  746 + timeStrEnd = ymd + ' ' + timem[1] + ':00';
723 747
724 // if (currTimeIndex == 1) { 748 // if (currTimeIndex == 1) {
725 // //早市 749 // //早市