Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/store/store_view/store_order_list.dart
master
fmk 3 years ago
parent
commit
168f077ad4
  1. 10
      lib/retrofit/min_api.dart
  2. 3
      lib/store/store_order.dart
  3. 48
      lib/store/store_view/store_order_list.dart

10
lib/retrofit/min_api.dart

@ -31,21 +31,17 @@ 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";
}
dio.options = BaseOptions(
connectTimeout: 10000,
receiveTimeout: 10000,
connectTimeout: 60000,
receiveTimeout: 60000,
headers: headers,
responseType: ResponseType.json,
);
@ -117,4 +113,6 @@ abstract class MinApiService {
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(
@Body() Map<String, dynamic> param,Map<String, dynamic> header);
}

3
lib/store/store_order.dart

@ -10,7 +10,6 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/order_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/retrofit_api.dart';
import 'package:huixiang/store/store_view/store_activity.dart';
@ -20,7 +19,6 @@ 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';
@ -67,6 +65,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller,
),
///,
StoreActivity(
widget.arguments,

48
lib/store/store_view/store_order_list.dart

@ -1,15 +1,10 @@
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';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.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';
@ -261,7 +256,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
),
Text(
productListBean.applyPrice,
productListBean.price,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 11.sp,
@ -282,7 +277,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
SizedBox(width: 10),
Text(
productListBean.price,
productListBean.applyPrice,
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 10.sp,
@ -297,7 +292,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
true
? GestureDetector(
onTap: () {
showStoreSelector();
showStoreSelector(productListBean);
},
child: RoundButton(
width: 49.w,
@ -322,7 +317,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Padding(
padding: EdgeInsets.only(left: 8, right: 8),
child: Text(
"1",
productListBean.buyNum.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
@ -354,7 +349,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
}
///
showStoreSelector() {
showStoreSelector(ProductListBean productListBean) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
@ -380,7 +375,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MImage(
"",
productListBean.imgPath,
width: 70,
height: 70,
fit: BoxFit.cover,
@ -392,7 +387,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"手工啵啵奶茶",
productListBean.productName,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
@ -413,7 +408,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Row(
children: [
Text(
"会员价",
S.of(context).huiyuanjia,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 13.sp,
@ -421,7 +416,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
),
Text(
"¥19.00",
productListBean.applyPrice,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 14.sp,
@ -519,7 +514,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Padding(
padding: EdgeInsets.only(left: 8, right: 8),
child: Text(
"1",
productListBean.buyNum.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
@ -540,16 +535,19 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
SizedBox(
height: 24,
),
RoundButton(
width: double.infinity,
height: 54.h,
text: "加入购物车",
textColor: Colors.white,
fontWeight: MyFontWeight.semi_bold,
radius: 27,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
// padding: EdgeInsets.symmetric(vertical: 5.h),
GestureDetector(
onTap: (){},
child: RoundButton(
width: double.infinity,
height: 54.h,
text: "加入购物车",
textColor: Colors.white,
fontWeight: MyFontWeight.semi_bold,
radius: 27,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
// padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),

Loading…
Cancel
Save