Browse Source

更改

master
w-R 3 years ago
parent
commit
1bee1eda60
  1. 22
      lib/retrofit/data/miNiDetail.dart
  2. 10
      lib/retrofit/data/shoppingCart.dart
  3. 3
      lib/retrofit/min_api.dart
  4. 41
      lib/store/store_order.dart
  5. 4
      lib/store/store_view/store_order_list.dart

22
lib/retrofit/data/miNiDetail.dart

@ -83,7 +83,7 @@ class MiNiDetail {
dynamic namePinyin; dynamic namePinyin;
dynamic nameInitials; dynamic nameInitials;
static MiNiDetail fromMap(Map<String, dynamic> map) { static MiNiDetail fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
MiNiDetail miNiDetailBean = MiNiDetail(); MiNiDetail miNiDetailBean = MiNiDetail();
miNiDetailBean.id = map['id']; miNiDetailBean.id = map['id'];
@ -118,12 +118,12 @@ class MiNiDetail {
miNiDetailBean.imgs = List()..addAll( miNiDetailBean.imgs = List()..addAll(
(map['imgs'] as List ?? []).map((o) => o.toString()) (map['imgs'] as List ?? []).map((o) => o.toString())
); );
miNiDetailBean.storeDTO = StoreDTOBean.fromMap(map['storeDTO']); miNiDetailBean.storeDTO = StoreDTOBean.fromJon(map['storeDTO']);
miNiDetailBean.attrList = List()..addAll( miNiDetailBean.attrList = List()..addAll(
(map['attrList'] as List ?? []).map((o) => AttrListBean.fromMap(o)) (map['attrList'] as List ?? []).map((o) => AttrListBean.fromJon(o))
); );
miNiDetailBean.productSkuVOList = List()..addAll( miNiDetailBean.productSkuVOList = List()..addAll(
(map['productSkuVOList'] as List ?? []).map((o) => ProductSkuVOListBean.fromMap(o)) (map['productSkuVOList'] as List ?? []).map((o) => ProductSkuVOListBean.fromJon(o))
); );
miNiDetailBean.shipAddress = map['shipAddress']; miNiDetailBean.shipAddress = map['shipAddress'];
miNiDetailBean.buyCount = map['buyCount']; miNiDetailBean.buyCount = map['buyCount'];
@ -232,7 +232,7 @@ class ProductSkuVOListBean {
List<SkuAttrListBean> skuAttrList; List<SkuAttrListBean> skuAttrList;
dynamic setMealDTOList; dynamic setMealDTOList;
static ProductSkuVOListBean fromMap(Map<String, dynamic> map) { static ProductSkuVOListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
ProductSkuVOListBean productSkuVOListBean = ProductSkuVOListBean(); ProductSkuVOListBean productSkuVOListBean = ProductSkuVOListBean();
productSkuVOListBean.id = map['id']; productSkuVOListBean.id = map['id'];
@ -258,7 +258,7 @@ class ProductSkuVOListBean {
productSkuVOListBean.version = map['version']; productSkuVOListBean.version = map['version'];
productSkuVOListBean.skuAttrCodeDTOList = map['skuAttrCodeDTOList']; productSkuVOListBean.skuAttrCodeDTOList = map['skuAttrCodeDTOList'];
productSkuVOListBean.skuAttrList = List()..addAll( productSkuVOListBean.skuAttrList = List()..addAll(
(map['skuAttrList'] as List ?? []).map((o) => SkuAttrListBean.fromMap(o)) (map['skuAttrList'] as List ?? []).map((o) => SkuAttrListBean.fromJon(o))
); );
productSkuVOListBean.setMealDTOList = map['setMealDTOList']; productSkuVOListBean.setMealDTOList = map['setMealDTOList'];
return productSkuVOListBean; return productSkuVOListBean;
@ -315,7 +315,7 @@ class SkuAttrListBean {
dynamic sortOrder; dynamic sortOrder;
int isDelete; int isDelete;
static SkuAttrListBean fromMap(Map<String, dynamic> map) { static SkuAttrListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
SkuAttrListBean skuAttrListBean = SkuAttrListBean(); SkuAttrListBean skuAttrListBean = SkuAttrListBean();
skuAttrListBean.id = map['id']; skuAttrListBean.id = map['id'];
@ -364,7 +364,7 @@ class AttrListBean {
String id; String id;
List<AttrValueListBean> attrValueList; List<AttrValueListBean> attrValueList;
static AttrListBean fromMap(Map<String, dynamic> map) { static AttrListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
AttrListBean attrListBean = AttrListBean(); AttrListBean attrListBean = AttrListBean();
attrListBean.productId = map['productId']; attrListBean.productId = map['productId'];
@ -375,7 +375,7 @@ class AttrListBean {
attrListBean.attrCode = map['attrCode']; attrListBean.attrCode = map['attrCode'];
attrListBean.id = map['id']; attrListBean.id = map['id'];
attrListBean.attrValueList = List()..addAll( attrListBean.attrValueList = List()..addAll(
(map['attrValueList'] as List ?? []).map((o) => AttrValueListBean.fromMap(o)) (map['attrValueList'] as List ?? []).map((o) => AttrValueListBean.fromJon(o))
); );
return attrListBean; return attrListBean;
} }
@ -410,7 +410,7 @@ class AttrValueListBean {
dynamic attrValueCode; dynamic attrValueCode;
bool isSelected; bool isSelected;
static AttrValueListBean fromMap(Map<String, dynamic> map) { static AttrValueListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
AttrValueListBean attrValueListBean = AttrValueListBean(); AttrValueListBean attrValueListBean = AttrValueListBean();
attrValueListBean.id = map['id']; attrValueListBean.id = map['id'];
@ -449,7 +449,7 @@ class StoreDTOBean {
int productCount; int productCount;
int soldNum; int soldNum;
static StoreDTOBean fromMap(Map<String, dynamic> map) { static StoreDTOBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
StoreDTOBean storeDTOBean = StoreDTOBean(); StoreDTOBean storeDTOBean = StoreDTOBean();
storeDTOBean.id = map['id']; storeDTOBean.id = map['id'];

10
lib/retrofit/data/shoppingCart.dart

@ -15,14 +15,14 @@ class ShoppingCart {
String storeName; String storeName;
int tableId; int tableId;
static ShoppingCart fromMap(Map<String, dynamic> map) { static ShoppingCart fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
ShoppingCart shoppingCartBean = ShoppingCart(); ShoppingCart shoppingCartBean = ShoppingCart();
shoppingCartBean.cartSum = map['cartSum']; shoppingCartBean.cartSum = map['cartSum'];
shoppingCartBean.numberOfPeople = map['numberOfPeople']; shoppingCartBean.numberOfPeople = map['numberOfPeople'];
shoppingCartBean.selected = map['selected']; shoppingCartBean.selected = map['selected'];
shoppingCartBean.shoppingCartSkuItemList = List()..addAll( shoppingCartBean.shoppingCartSkuItemList = List()..addAll(
(map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromMap(o)) (map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromJon(o))
); );
shoppingCartBean.storeId = map['storeId']; shoppingCartBean.storeId = map['storeId'];
shoppingCartBean.storeName = map['storeName']; shoppingCartBean.storeName = map['storeName'];
@ -72,7 +72,7 @@ class ShoppingCartSkuItemListBean {
int storeId; int storeId;
int tableId; int tableId;
static ShoppingCartSkuItemListBean fromMap(Map<String, dynamic> map) { static ShoppingCartSkuItemListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean(); ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean();
shoppingCartSkuItemListBean.buyNum = map['buyNum']; shoppingCartSkuItemListBean.buyNum = map['buyNum'];
@ -80,7 +80,7 @@ class ShoppingCartSkuItemListBean {
shoppingCartSkuItemListBean.groupId = map['groupId']; shoppingCartSkuItemListBean.groupId = map['groupId'];
shoppingCartSkuItemListBean.id = map['id']; shoppingCartSkuItemListBean.id = map['id'];
shoppingCartSkuItemListBean.platterList = List()..addAll( shoppingCartSkuItemListBean.platterList = List()..addAll(
(map['platterList'] as List ?? []).map((o) => PlatterListBean.fromMap(o)) (map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJon(o))
); );
shoppingCartSkuItemListBean.productId = map['productId']; shoppingCartSkuItemListBean.productId = map['productId'];
shoppingCartSkuItemListBean.productName = map['productName']; shoppingCartSkuItemListBean.productName = map['productName'];
@ -125,7 +125,7 @@ class PlatterListBean {
bool required; bool required;
int skuId; int skuId;
static PlatterListBean fromMap(Map<String, dynamic> map) { static PlatterListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
PlatterListBean platterListBean = PlatterListBean(); PlatterListBean platterListBean = PlatterListBean();
platterListBean.deleted = map['deleted']; platterListBean.deleted = map['deleted'];

3
lib/retrofit/min_api.dart

@ -13,6 +13,7 @@ import 'package:retrofit/retrofit.dart';
import 'data/findMiNiGroupList.dart'; import 'data/findMiNiGroupList.dart';
import 'data/miNiDetail.dart'; import 'data/miNiDetail.dart';
import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// // const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
@ -124,7 +125,7 @@ abstract class MinApiService {
/// ///
@POST("shoppingcart") @POST("shoppingcart")
Future<BaseData<FindMiNiGroupList>> shoppingCart( Future<BaseData<ShoppingCart>> shoppingCart(
@Body() Map<String, dynamic> param,Map<String, dynamic> header); @Body() Map<String, dynamic> param,Map<String, dynamic> header);

41
lib/store/store_order.dart

@ -7,7 +7,6 @@ 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/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/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
@ -508,7 +507,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
), ),
), ),
Text( Text(
"19.00", "" + allPrice.toString(),
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 20.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -516,17 +515,25 @@ class _StoreOrderPage extends State<StoreOrderPage>
), ),
), ),
Spacer(), Spacer(),
RoundButton( GestureDetector(
width: 103.w, onTap: () {
height: 54.h, Navigator.of(context).pushNamed(
text: S.current.jiesuan, '/router/settlement',
textColor: Colors.white, arguments: {},
fontWeight: MyFontWeight.regular, );
backgroup: Color(0xFF32A060), },
radius: 0, child: RoundButton(
fontSize: 16.sp, width: 103.w,
padding: EdgeInsets.symmetric(vertical: 5.h), height: 54.h,
) text: S.current.jiesuan,
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
radius: 0,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
], ],
), ),
), ),
@ -548,7 +555,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
child: RoundButton( child: RoundButton(
width: 17, width: 17,
height: 17, height: 17,
text: "1", text:allCount.toString(),
textColor: Colors.white, textColor: Colors.white,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060), backgroup: Color(0xFF32A060),
@ -577,11 +584,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
padding: EdgeInsets.only(bottom: 10), padding: EdgeInsets.only(bottom: 10),
child: Row( child: Row(
children: [ children: [
Image.asset( MImage(
"assets/image/default_1.png", "",
width: 60, width: 60,
height: 60, height: 60,
fit: BoxFit.cover, fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
), ),
SizedBox(width: 10), SizedBox(width: 10),
Expanded( Expanded(

4
lib/store/store_view/store_order_list.dart

@ -261,7 +261,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
), ),
), ),
Text( Text(
productListBeans[position].price, productListBeans[position].applyPrice,
style: TextStyle( style: TextStyle(
color: Color(0xFFFF7A1A), color: Color(0xFFFF7A1A),
fontSize: 11.sp, fontSize: 11.sp,
@ -282,7 +282,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
), ),
SizedBox(width: 10), SizedBox(width: 10),
Text( Text(
productListBeans[position].applyPrice, productListBeans[position].price,
style: TextStyle( style: TextStyle(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
fontSize: 10.sp, fontSize: 10.sp,

Loading…
Cancel
Save