Browse Source

点单更改

master
w-R 3 years ago
parent
commit
6e13fd3d7d
  1. 8
      lib/retrofit/min_api.dart
  2. 2
      lib/store/store_order.dart
  3. 2
      lib/store/store_view/store_order_list.dart

8
lib/retrofit/min_api.dart

@ -31,21 +31,17 @@ abstract class MinApiService {
String baseUrl, String baseUrl,
BuildContext context, BuildContext context,
String token, String token,
String tenant,
bool showLoading = true, bool showLoading = true,
bool pay = false, bool pay = false,
}) { }) {
Map<String, dynamic> headers = Map<String, dynamic> headers =
(token == null || token == "") ? {} : {'token': "Bearer $token"}; (token == null || token == "") ? {} : {'token': "Bearer $token"};
if (tenant != null && tenant != "") {
headers["tenant"] = tenant;
}
if (pay) { if (pay) {
headers["Environment"] = "app"; headers["Environment"] = "app";
} }
dio.options = BaseOptions( dio.options = BaseOptions(
connectTimeout: 10000, connectTimeout: 60000,
receiveTimeout: 10000, receiveTimeout: 60000,
headers: headers, headers: headers,
responseType: ResponseType.json, responseType: ResponseType.json,
); );

2
lib/store/store_order.dart

@ -8,7 +8,6 @@ import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/data/user_entity.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/store_activity.dart'; import 'package:huixiang/store/store_view/store_activity.dart';
@ -18,7 +17,6 @@ import 'package:huixiang/union/union_view/union_coupon.dart';
import 'package:huixiang/union/union_view/vip.dart'; import 'package:huixiang/union/union_view/vip.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';

2
lib/store/store_view/store_order_list.dart

@ -90,7 +90,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Dio(), Dio(),
context: context, context: context,
token: minToken, token: minToken,
tenant: tenant, // tenant: tenant,
); );
appletGoods(); appletGoods();
} }

Loading…
Cancel
Save