From 25290f6ad9374fafe96914ae6e3609a2df982496 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Tue, 27 Apr 2021 16:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E6=97=A0=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/barcode/qr_scaner_result_page.dart | 2 +- lib/pages/home/search_page.dart | 16 ++------------- .../bottom_sheet/bottom_share_dialog.dart | 20 +++++++++++++------ lib/widgets/goods_item.dart | 2 +- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/pages/home/barcode/qr_scaner_result_page.dart b/lib/pages/home/barcode/qr_scaner_result_page.dart index 3383c55..0a101c9 100644 --- a/lib/pages/home/barcode/qr_scaner_result_page.dart +++ b/lib/pages/home/barcode/qr_scaner_result_page.dart @@ -278,6 +278,6 @@ class _QRScarerResultPageState extends State { UserManager.instance.refreshShoppingCart.value = true; UserManager.instance.refreshShoppingCartNumber.value = true; UserManager.instance.refreshShoppingCartNumberWithPage.value = true; - ReToast.success(text: model.msg); + ReToast.success(text: '加入成功'); } } diff --git a/lib/pages/home/search_page.dart b/lib/pages/home/search_page.dart index 126cc53..f49fc09 100644 --- a/lib/pages/home/search_page.dart +++ b/lib/pages/home/search_page.dart @@ -314,18 +314,6 @@ class _SearchPageState extends BaseStoreState model.brandId, model.brandName)); }, model: model, - shareClick: () { - String goodsTitle = - "${model.priceDesc} | ${model.goodsName} | ${model.description}"; - ShareTool().goodsShare(context, - goodsPrice: model.price.toStringAsFixed(2), - goodsName: model.goodsName, - goodsDescription: model.description, - miniTitle: goodsTitle, - miniPicurl: model.picture.url, - amount: model.commission.toString(), - goodsId: model.goodsId.toString()); - }, buyClick: () { AppRouter.push(context, RouteName.COMMODITY_PAGE, arguments: @@ -498,7 +486,7 @@ class _SearchPageState extends BaseStoreState child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( + Container( height: rSize(2), color: Color(0xFFB8B8B8), width: rSize(40), @@ -542,7 +530,7 @@ class _SearchPageState extends BaseStoreState model.brandId, model.brandName)); }, model: model, - + buyClick: () { AppRouter.push(context, RouteName.COMMODITY_PAGE, arguments: CommodityDetailPage.setArguments( diff --git a/lib/widgets/bottom_sheet/bottom_share_dialog.dart b/lib/widgets/bottom_sheet/bottom_share_dialog.dart index f665341..890fac4 100644 --- a/lib/widgets/bottom_sheet/bottom_share_dialog.dart +++ b/lib/widgets/bottom_sheet/bottom_share_dialog.dart @@ -8,6 +8,7 @@ */ import 'package:flutter/material.dart'; +import 'package:get/get.dart'; import 'package:recook/constants/header.dart'; import 'package:recook/widgets/bottom_sheet/custom_bottom_sheet.dart'; @@ -125,15 +126,22 @@ class ShareDialog { {List items, @required ShareAction action, Widget customTitle}) { - showCustomModalBottomSheet( - context: context, - builder: (context) { - return BottomShareWidget( + // showCustomModalBottomSheet( + // context: context, + // builder: (context) { + // return BottomShareWidget( + // customTitle: customTitle, + // action: action, + // items: items, + // ); + // }); + Get.bottomSheet( + BottomShareWidget( customTitle: customTitle, action: action, items: items, - ); - }); + ), + ); } static dismiss(BuildContext context) { diff --git a/lib/widgets/goods_item.dart b/lib/widgets/goods_item.dart index 87cc6ee..f4db54f 100644 --- a/lib/widgets/goods_item.dart +++ b/lib/widgets/goods_item.dart @@ -746,7 +746,7 @@ class GoodsItemWidget extends StatelessWidget { if (imagesModel.data.mainPhotos.length>1) { imgUrl = imagesModel.data.mainPhotos[1].url; } else { - imgUrl = imagesModel.data?.mainPhotos?.first ?? ''; + imgUrl = imagesModel.data?.mainPhotos?.first?.url ?? ''; } String goodsTitle = "¥${this.discountPrice} | ${this.goodsName} | ${this.description}";