|
...
|
...
|
@@ -16,7 +16,6 @@ import 'package:one_key/utils/utils.dart'; |
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
class NotebookDetailChangeModel with ChangeNotifier {
|
|
|
|
|
|
|
|
List dateList = []; //日期选择 月-日 某天
|
|
|
|
List sunDateList = []; // 早市、午市、晚市
|
|
|
|
List personNumList = []; // 人数
|
|
...
|
...
|
@@ -37,7 +36,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
bool isRecommend = false; //是否展示推荐
|
|
|
|
List oldTableList = [];
|
|
|
|
|
|
|
|
List<UserHistoryEntity> userHistorys=[];//历史录入
|
|
|
|
List<UserHistoryEntity> userHistorys = []; //历史录入
|
|
|
|
|
|
|
|
clearData() {
|
|
|
|
dateList = []; //日期选择 月-日 某天
|
|
...
|
...
|
@@ -250,7 +249,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
? dailyMap.putIfAbsent('night', () => '')
|
|
|
|
: dailyMap.putIfAbsent(
|
|
|
|
'night', () => _getHourAndMinute(userModel.user.night, 3));
|
|
|
|
_initSunDateList(userModel.user.morning, userModel.user.noon, userModel.user.night);
|
|
|
|
_initSunDateList(
|
|
|
|
userModel.user.morning, userModel.user.noon, userModel.user.night);
|
|
|
|
}
|
|
|
|
|
|
|
|
//根据获取时间 11:00-12:30 获取30分钟间隔组装的数组
|
|
...
|
...
|
@@ -321,7 +321,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
initHourAndMinuteSelect() {
|
|
|
|
int timeMillsNow = DateTime.now().millisecondsSinceEpoch;
|
|
|
|
//当前选中 年-月-日
|
|
|
|
String ymyStr="";
|
|
|
|
String ymyStr = "";
|
|
|
|
//今天 明天 其他天
|
|
|
|
for (var item in dateList) {
|
|
|
|
if (item['select'] == true) {
|
|
...
|
...
|
@@ -592,7 +592,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
}
|
|
|
|
}
|
|
|
|
//当前选中 年-月-日string
|
|
|
|
String ymyStr="";
|
|
|
|
String ymyStr = "";
|
|
|
|
//今天 明天 其他天
|
|
|
|
for (var item in dateList) {
|
|
|
|
if (item['select'] == true) {
|
|
...
|
...
|
@@ -657,7 +657,8 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
'type': "0", //内部预订
|
|
|
|
"rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
|
|
|
|
"ddate": '${ddate}'.substring(0, 10), //到店时间
|
|
|
|
'is_set_ddate': "1"
|
|
|
|
'is_set_ddate': "1",
|
|
|
|
"channel": '5'
|
|
|
|
};
|
|
|
|
if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
|
|
|
|
params['rid'] = detailEntity.id;
|
|
...
|
...
|
@@ -709,7 +710,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
}
|
|
|
|
}
|
|
|
|
//当前选中 年-月-日string
|
|
|
|
String ymyStr="";
|
|
|
|
String ymyStr = "";
|
|
|
|
//今天 明天 其他天
|
|
|
|
for (var item in dateList) {
|
|
|
|
if (item['select'] == true) {
|
|
...
|
...
|
@@ -805,7 +806,7 @@ class NotebookDetailChangeModel with ChangeNotifier { |
|
|
|
getUserHistorys(BuildContext context, Map<String, String> params) async {
|
|
|
|
BaseResp<List> baseResp = await DioUtil()
|
|
|
|
.request<List>(context, Method.get, HttpUrl.get_reserve_user,
|
|
|
|
data: params, showLoading: false)
|
|
|
|
data: params, showLoading: false)
|
|
|
|
.catchError((error) {
|
|
|
|
print(error.toString());
|
|
|
|
});
|
...
|
...
|
|