Browse Source

选择规格样式更改

ff_new
w-R 3 years ago
parent
commit
cde9127a6a
  1. 1
      lib/integral/integral_detailed_page.dart
  2. 1
      lib/order/order_view/order_status.dart
  3. 4
      lib/settlement/settlement.dart
  4. 11
      lib/store/store_order.dart
  5. 2
      lib/store/store_view/shop_car.dart
  6. 12
      lib/store/store_view/shop_goods.dart
  7. 8
      lib/store/store_view/store_order_list.dart

1
lib/integral/integral_detailed_page.dart

@ -199,6 +199,7 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
]; ];
}, },
body: Container( body: Container(
color: Colors.white,
child: SmartRefresher( child: SmartRefresher(
controller: refreshController, controller: refreshController,
enablePullDown: true, enablePullDown: true,

1
lib/order/order_view/order_status.dart

@ -90,6 +90,7 @@ class _OrderStatus extends State<OrderStatus> {
fontSize: 15.sp, fontSize: 15.sp,
), ),
), ),
if(widget.payStatus != 0)
Image.asset( Image.asset(
statusPicture(widget.title), statusPicture(widget.title),
height: 66.h, height: 66.h,

4
lib/settlement/settlement.dart

@ -318,7 +318,9 @@ class _Settlement extends State<Settlement> {
} else { } else {
SmartDialog.show( SmartDialog.show(
widget: Tips( widget: Tips(
() {}, () {
toOrderDetails(placeOrderFirst.id);
},
text: "${baseData.msg}", text: "${baseData.msg}",
)); ));
} }

11
lib/store/store_order.dart

@ -637,18 +637,19 @@ class _StoreOrderPage extends State<StoreOrderPage>
} }
/// ///
_queryMiNiDetail(String id) async { _queryMiNiDetail(String id,int count) async {
EasyLoading.show(status: S.current.zhengzaijiazai); EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<MiNiDetail> baseData = await minService.miNiDetail(id); BaseData<MiNiDetail> baseData = await minService.miNiDetail(id);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
showStoreSelector(baseData.data, id); showStoreSelector(baseData.data, id,count);
} }
} }
/// ///
showStoreSelector(MiNiDetail miNiDetail, String id) async { showStoreSelector(MiNiDetail miNiDetail, String id,int count) async {
if (miNiDetail.attrList != null && miNiDetail.attrList.length == 1) { if (miNiDetail.attrList != null && miNiDetail.attrList.length == 1
_addShopCar(miNiDetail, [], 1); && miNiDetail.attrList[0].attrValueList.length == 1) {
_addShopCar(miNiDetail, [], count);
} else { } else {
EasyLoading.dismiss(); EasyLoading.dismiss();
dialogShowing = true; dialogShowing = true;

2
lib/store/store_view/shop_car.dart

@ -8,7 +8,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class ShopCar extends StatefulWidget { class ShopCar extends StatefulWidget {
final Function(String id) queryMiNiDetail; final Function(String id,int count) queryMiNiDetail;
final Function() clearShopCar; final Function() clearShopCar;
final Function() toDownOrder; final Function() toDownOrder;
final Function(ShoppingCartSkuItemListBean cart) shopCartAdd; final Function(ShoppingCartSkuItemListBean cart) shopCartAdd;

12
lib/store/store_view/shop_goods.dart

@ -8,7 +8,7 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
class ShopGoods extends StatefulWidget { class ShopGoods extends StatefulWidget {
final Function(String id) queryMiNiDetail; final Function(String id,int count) queryMiNiDetail;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add; final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) add;
final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) final Function(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean)
reduce; reduce;
@ -131,7 +131,7 @@ class _ShopGoods extends State<ShopGoods> {
], ],
), ),
Spacer(), Spacer(),
if (!widget.isShopCart) if (!widget.isShopCart && (widget.productListBean?.attrStyle??0) == 1)
Stack( Stack(
children: [ children: [
Container( Container(
@ -150,7 +150,7 @@ class _ShopGoods extends State<ShopGoods> {
widget.productListBean != null widget.productListBean != null
? widget.productListBean.id ? widget.productListBean.id
: widget.shoppingCartSkuItemListBean : widget.shoppingCartSkuItemListBean
.productId, .productId,0
); );
}, },
), ),
@ -173,7 +173,7 @@ class _ShopGoods extends State<ShopGoods> {
), ),
], ],
), ),
if (widget.isShopCart) if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.reduce(widget.shoppingCartSkuItemListBean); widget.reduce(widget.shoppingCartSkuItemListBean);
@ -184,7 +184,7 @@ class _ShopGoods extends State<ShopGoods> {
height: 22, height: 22,
), ),
), ),
if (widget.isShopCart) if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0)
Container( Container(
width: 30, width: 30,
alignment: Alignment.center, alignment: Alignment.center,
@ -197,7 +197,7 @@ class _ShopGoods extends State<ShopGoods> {
), ),
), ),
), ),
if (widget.isShopCart) if (widget.isShopCart || (widget.productListBean?.attrStyle??0) == 0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.add(widget.shoppingCartSkuItemListBean); widget.add(widget.shoppingCartSkuItemListBean);

8
lib/store/store_view/store_order_list.dart

@ -21,7 +21,7 @@ class StoreOrderListPage extends StatefulWidget {
final ScrollController controller; final ScrollController controller;
final String minToken; final String minToken;
final String tenant; final String tenant;
final Function(String id) queryMiNiDetail; final Function(String id,int count) queryMiNiDetail;
ShoppingCart shopCarGoods; ShoppingCart shopCarGoods;
@ -232,14 +232,14 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
} }
return InkWell( return InkWell(
onTap: () { onTap: () {
widget.queryMiNiDetail(productListBeans[position].id); widget.queryMiNiDetail(productListBeans[position].id,1);
}, },
child: ShopGoods( child: ShopGoods(
(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) {
// widget.add(productListBeans[position].id); widget.queryMiNiDetail(productListBeans[position].id,1);
}, },
(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) {
// widget.reduce(productListBeans[position].id); widget.queryMiNiDetail(productListBeans[position].id,-1);
}, },
productListBean: productListBeans[position], productListBean: productListBeans[position],
count: count, count: count,

Loading…
Cancel
Save