From 30ee4790b69a192be3d19add864eadb75daf7107 Mon Sep 17 00:00:00 2001 From: fmk Date: Mon, 11 Oct 2021 16:51:42 +0800 Subject: [PATCH 1/3] safety --- lib/store/store_order.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 464cad3d..89ebccd2 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -384,7 +384,6 @@ class _StoreOrderPage extends State ), itemBuilder: (context, position) { return Container( - margin: EdgeInsets.only(left: 10.w, right: 10.w), child: MImage( (storeInfo != null && storeInfo.bannerList != null && @@ -392,7 +391,7 @@ class _StoreOrderPage extends State ? storeInfo.bannerList[position].imgUrl : "", fit: BoxFit.cover, - radius: BorderRadius.circular(4), + radius: BorderRadius.zero, errorSrc: "assets/image/default_2_1.png", fadeSrc: "assets/image/default_2_1.png", ), From 857b4cc3a76e5d993c6e0cddb4188f98052851e9 Mon Sep 17 00:00:00 2001 From: fmk Date: Tue, 12 Oct 2021 09:47:33 +0800 Subject: [PATCH 2/3] safety --- lib/retrofit/min_api.dart | 8 ++++---- lib/store/store_order.dart | 6 ++---- lib/store/store_view/store_order_list.dart | 15 ++++++++++----- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 1f0279cf..1189a8a5 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -15,11 +15,11 @@ import 'data/page.dart'; part 'min_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "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 base_url = "http://192.168.10.236:8765/app/"; ///费韬 -const baseUrl = "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 base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 89ebccd2..5cee2dbd 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -116,8 +116,7 @@ class _StoreOrderPage extends State child: DefaultTabController( length: 2, child: SmartRefresher( - controller: refreshController = - RefreshController(initialRefresh: false), + controller: refreshController = RefreshController(initialRefresh: false), enablePullDown: true, enablePullUp: false, header: MyHeader(), @@ -132,8 +131,7 @@ class _StoreOrderPage extends State (BuildContext context, bool innerBoxIsScrolled) { return [ SliverOverlapAbsorber( - handle: NestedScrollView.sliverOverlapAbsorberHandleFor( - context), + handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context), sliver: SliverAppBar( expandedHeight: (storeInfo != null && storeInfo.couponVOList != null) diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 8ccca1f5..22518100 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -105,9 +105,13 @@ class _StoreOrderListPage extends State { ///小程序查询分组及商品列表 appletGoods() async { - BaseData> baseData = await minService - .findMiNiGroupList({"id": widget.arguments["id"]}, - {"store_id": widget.arguments["id"], "tenant": "1175"}); + BaseData> baseData = + await minService.findMiNiGroupList({ + "id": widget.arguments["id"] + }, { + "store_id": widget.arguments["id"], + "tenant": widget.arguments["tenant"], + }); if (baseData != null && baseData.isSuccess) { setState(() { appletProducts = baseData.data; @@ -123,7 +127,8 @@ class _StoreOrderListPage extends State { width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height - (kToolbarHeight + 38 + 54.h), margin: EdgeInsets.only( - top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight)), + top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight), + ), child: Row( mainAxisAlignment: MainAxisAlignment.start, mainAxisSize: MainAxisSize.max, @@ -133,7 +138,7 @@ class _StoreOrderListPage extends State { child: ListView.builder( itemCount: appletProducts == null ? 0 : appletProducts.length, controller: controller1, - padding: EdgeInsets.zero, + padding: EdgeInsets.only(top: 0, bottom: 25), itemBuilder: (context, position) { return orderItem(appletProducts[position], position); }, From 2c405011967e9625a03d675d2e61e4d7e430552b Mon Sep 17 00:00:00 2001 From: fmk Date: Tue, 12 Oct 2021 10:04:08 +0800 Subject: [PATCH 3/3] safety --- lib/retrofit/min_api.dart | 12 ++++++++---- lib/store/store_order.dart | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 3fbdbbd7..0b9296e4 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -15,11 +15,11 @@ import 'data/page.dart'; part 'min_api.g.dart'; -const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -const baseUrl = "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 base_url = "http://192.168.10.236:8765/app/"; ///费韬 -// const baseUrl = "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 base_url = "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, BuildContext context, String token, + String tenant, bool showLoading = true, bool pay = false, }) { Map headers = (token == null || token == "") ? {} : {'token': "Bearer $token"}; + if (tenant != null && tenant != "") { + headers["tenant"] = tenant; + } if (pay) { headers["Environment"] = "app"; } diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 55f35346..6480e611 100644 --- a/lib/store/store_order.dart +++ b/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/utils/font_weight.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/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';