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, 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";
} }
dio.options = BaseOptions( dio.options = BaseOptions(
connectTimeout: 10000, connectTimeout: 60000,
receiveTimeout: 10000, receiveTimeout: 60000,
headers: headers, headers: headers,
responseType: ResponseType.json, responseType: ResponseType.json,
); );
@ -117,4 +113,6 @@ abstract class MinApiService {
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList( Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(
@Body() Map<String, dynamic> param,Map<String, dynamic> header); @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/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/store_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/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/store_activity.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/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';
@ -67,6 +65,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller, controller,
), ),
///, ///,
StoreActivity( StoreActivity(
widget.arguments, widget.arguments,

48
lib/store/store_view/store_order_list.dart

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

Loading…
Cancel
Save