Browse Source

safety

master
fmk 3 years ago
parent
commit
2c40501196
  1. 12
      lib/retrofit/min_api.dart
  2. 1
      lib/store/store_order.dart

12
lib/retrofit/min_api.dart

@ -15,11 +15,11 @@ import 'data/page.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// // const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// // const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://192.168.10.236:8765/app/"; /// const base_url = "http://192.168.10.236:8765/app/"; ///
// const baseUrl = "http://192.168.10.236:8765/app/"; /// const baseUrl = "http://192.168.10.236:8765/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
@ -31,11 +31,15 @@ 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";
} }

1
lib/store/store_order.dart

@ -19,6 +19,7 @@ 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';

Loading…
Cancel
Save