Browse Source

Merge branch 'master' into dev

# Conflicts:
#	lib/store/store_view/store_order_list.dart
master
w-R 3 years ago
parent
commit
eb6df8f986
  1. 4
      lib/retrofit/min_api.dart
  2. 9
      lib/store/store_order.dart
  3. 27
      lib/store/store_view/store_order_list.dart

4
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<String, dynamic> headers =
(token == null || token == "") ? {} : {'token': "Bearer $token"};
if (tenant != null && tenant != "") {
headers["tenant"] = tenant;
}
if (pay) {
headers["Environment"] = "app";
}

9
lib/store/store_order.dart

@ -116,8 +116,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
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<StoreOrderPage>
(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<StoreOrderPage>
),
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<StoreOrderPage>
? 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",
),

27
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<StoreOrderListPage> {
List<testModel> temperatureStoreList = [
testModel("正常冰"),
testModel("少冰"),
testModel("多冰"),
testModel("去冰")
];
List<testModel> sweetnessStoreList = [testModel("正常糖"), testModel("5分糖")];
int isSelected = 0;
int isChoice = 0;
int tempClickIndex = 0;
@ -81,7 +95,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Dio(),
context: context,
token: minToken,
// tenant: tenant,
tenant: tenant,
);
appletGoods();
// queryMiNiDetail(widget.arguments["id"]);
@ -119,7 +133,8 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
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<StoreOrderListPage> {
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);
},

Loading…
Cancel
Save