Commit 9766c76cbff80c23f6c0b03b9ac7e96c1b49199d

Authored by “gaiyaguang”
1 parent f0e3189d

合并

1 -// import 'package:flutter/material.dart';  
2 -// import 'package:one_key/constant/constant.dart';  
3 -// import 'package:one_key/constant/state.dart';  
4 -// import 'package:one_key/models/tableOuter.dart';  
5 -// import 'package:one_key/net/base_resp.dart';  
6 -// import 'package:one_key/net/dio_util.dart';  
7 -// import 'package:one_key/net/http_url.dart';  
8 -// import 'package:one_key/models/table.dart' as t;  
9 -// import 'package:one_key/utils/navigator_util.dart';  
10 -// import 'package:one_key/utils/utils.dart';  
11 -  
12 -// class SelectTableModel {  
13 -// PageState pageState = PageState.Loading;  
14 -  
15 -// //获取桌位数据  
16 -// Future<List<TableOuter>> getTableList(  
17 -// BuildContext context, Map<String, String> params,  
18 -// {isShowLoading = true}) async {  
19 -// if (isShowLoading) {  
20 -// pageState = PageState.Loading;  
21 -// notifyListeners();  
22 -// }  
23 -// BaseResp<List> baseResp = await DioUtil()  
24 -// .request<List>(context, Method.get, HttpUrl.table_list,  
25 -// data: params, showLoading: true)  
26 -// .catchError((error) {  
27 -// print(error.toString());  
28 -// });  
29 -// if (baseResp.code == Constant.status_success) {  
30 -// return (baseResp.data[0] as List).map((value) {  
31 -// TableOuter tableOuter = TableOuter();  
32 -// tableOuter.name = value["name"];  
33 -// tableOuter.list = (value["list"] as List).map((table) {  
34 -// return t.Table.fromJson(table as Map<String, dynamic>);  
35 -// }).toList();  
36 -// return tableOuter;  
37 -// }).toList();  
38 -// }  
39 -// return [];  
40 -// }  
41 -// }