diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index fe4aa672..d2d27069 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -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 bbb34b35..fee6413f 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) @@ -384,7 +382,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 +389,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", ), diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 4bab9413..2f367519 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -1,6 +1,5 @@ import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; @@ -10,11 +9,9 @@ import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; import 'package:huixiang/retrofit/data/miNiDetail.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/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; -import 'package:huixiang/utils/min.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -39,7 +36,24 @@ class StoreOrderListPage extends StatefulWidget { } } +class testModel { + String name; + bool isSelected; + + testModel(String name) { + this.name = name; + this.isSelected = false; + } +} + class _StoreOrderListPage extends State { + List temperatureStoreList = [ + testModel("正常冰"), + testModel("少冰"), + testModel("多冰"), + testModel("去冰") + ]; + List sweetnessStoreList = [testModel("正常糖"), testModel("5分糖")]; int isSelected = 0; int isChoice = 0; int tempClickIndex = 0; @@ -81,7 +95,7 @@ class _StoreOrderListPage extends State { Dio(), context: context, token: minToken, - // tenant: tenant, + tenant: tenant, ); appletGoods(); // queryMiNiDetail(widget.arguments["id"]); @@ -119,7 +133,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, @@ -129,7 +144,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); },