|
@@ -16,7 +16,6 @@ import 'package:one_key/utils/utils.dart'; |
|
@@ -16,7 +16,6 @@ import 'package:one_key/utils/utils.dart'; |
|
16
|
import 'package:provider/provider.dart';
|
16
|
import 'package:provider/provider.dart';
|
|
17
|
|
17
|
|
|
18
|
class NotebookDetailChangeModel with ChangeNotifier {
|
18
|
class NotebookDetailChangeModel with ChangeNotifier {
|
|
19
|
-
|
|
|
|
20
|
List dateList = []; //日期选择 月-日 某天
|
19
|
List dateList = []; //日期选择 月-日 某天
|
|
21
|
List sunDateList = []; // 早市、午市、晚市
|
20
|
List sunDateList = []; // 早市、午市、晚市
|
|
22
|
List personNumList = []; // 人数
|
21
|
List personNumList = []; // 人数
|
|
@@ -37,7 +36,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -37,7 +36,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
37
|
bool isRecommend = false; //是否展示推荐
|
36
|
bool isRecommend = false; //是否展示推荐
|
|
38
|
List oldTableList = [];
|
37
|
List oldTableList = [];
|
|
39
|
|
38
|
|
|
40
|
- List<UserHistoryEntity> userHistorys=[];//历史录入
|
39
|
+ List<UserHistoryEntity> userHistorys = []; //历史录入
|
|
41
|
|
40
|
|
|
42
|
clearData() {
|
41
|
clearData() {
|
|
43
|
dateList = []; //日期选择 月-日 某天
|
42
|
dateList = []; //日期选择 月-日 某天
|
|
@@ -250,7 +249,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -250,7 +249,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
250
|
? dailyMap.putIfAbsent('night', () => '')
|
249
|
? dailyMap.putIfAbsent('night', () => '')
|
|
251
|
: dailyMap.putIfAbsent(
|
250
|
: dailyMap.putIfAbsent(
|
|
252
|
'night', () => _getHourAndMinute(userModel.user.night, 3));
|
251
|
'night', () => _getHourAndMinute(userModel.user.night, 3));
|
|
253
|
- _initSunDateList(userModel.user.morning, userModel.user.noon, userModel.user.night);
|
252
|
+ _initSunDateList(
|
|
|
|
253
|
+ userModel.user.morning, userModel.user.noon, userModel.user.night);
|
|
254
|
}
|
254
|
}
|
|
255
|
|
255
|
|
|
256
|
//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组
|
256
|
//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组
|
|
@@ -321,7 +321,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -321,7 +321,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
321
|
initHourAndMinuteSelect() {
|
321
|
initHourAndMinuteSelect() {
|
|
322
|
int timeMillsNow = DateTime.now().millisecondsSinceEpoch;
|
322
|
int timeMillsNow = DateTime.now().millisecondsSinceEpoch;
|
|
323
|
//当前选中 年-月-日
|
323
|
//当前选中 年-月-日
|
|
324
|
- String ymyStr="";
|
324
|
+ String ymyStr = "";
|
|
325
|
//今天 明天 其他天
|
325
|
//今天 明天 其他天
|
|
326
|
for (var item in dateList) {
|
326
|
for (var item in dateList) {
|
|
327
|
if (item['select'] == true) {
|
327
|
if (item['select'] == true) {
|
|
@@ -592,7 +592,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -592,7 +592,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
592
|
}
|
592
|
}
|
|
593
|
}
|
593
|
}
|
|
594
|
//当前选中 年-月-日string
|
594
|
//当前选中 年-月-日string
|
|
595
|
- String ymyStr="";
|
595
|
+ String ymyStr = "";
|
|
596
|
//今天 明天 其他天
|
596
|
//今天 明天 其他天
|
|
597
|
for (var item in dateList) {
|
597
|
for (var item in dateList) {
|
|
598
|
if (item['select'] == true) {
|
598
|
if (item['select'] == true) {
|
|
@@ -657,7 +657,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -657,7 +657,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
657
|
'type': "0", //内部预订
|
657
|
'type': "0", //内部预订
|
|
658
|
"rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
|
658
|
"rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
|
|
659
|
"ddate": '${ddate}'.substring(0, 10), //到店时间
|
659
|
"ddate": '${ddate}'.substring(0, 10), //到店时间
|
|
660
|
- 'is_set_ddate': "1"
|
660
|
+ 'is_set_ddate': "1",
|
|
|
|
661
|
+ "channel": '5'
|
|
661
|
};
|
662
|
};
|
|
662
|
if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
|
663
|
if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
|
|
663
|
params['rid'] = detailEntity.id;
|
664
|
params['rid'] = detailEntity.id;
|
|
@@ -709,7 +710,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -709,7 +710,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
709
|
}
|
710
|
}
|
|
710
|
}
|
711
|
}
|
|
711
|
//当前选中 年-月-日string
|
712
|
//当前选中 年-月-日string
|
|
712
|
- String ymyStr="";
|
713
|
+ String ymyStr = "";
|
|
713
|
//今天 明天 其他天
|
714
|
//今天 明天 其他天
|
|
714
|
for (var item in dateList) {
|
715
|
for (var item in dateList) {
|
|
715
|
if (item['select'] == true) {
|
716
|
if (item['select'] == true) {
|
|
@@ -805,7 +806,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
@@ -805,7 +806,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
805
|
getUserHistorys(BuildContext context, Map<String, String> params) async {
|
806
|
getUserHistorys(BuildContext context, Map<String, String> params) async {
|
|
806
|
BaseResp<List> baseResp = await DioUtil()
|
807
|
BaseResp<List> baseResp = await DioUtil()
|
|
807
|
.request<List>(context, Method.get, HttpUrl.get_reserve_user,
|
808
|
.request<List>(context, Method.get, HttpUrl.get_reserve_user,
|
|
808
|
- data: params, showLoading: false)
|
809
|
+ data: params, showLoading: false)
|
|
809
|
.catchError((error) {
|
810
|
.catchError((error) {
|
|
810
|
print(error.toString());
|
811
|
print(error.toString());
|
|
811
|
});
|
812
|
});
|