Browse Source

商城更改

zyh
w-R 3 years ago
parent
commit
236c3ab021
  1. 2
      lib/settlement/settlement.dart
  2. 43
      lib/store/shopping/shopping_cart/shopping_cart_page.dart
  3. 63
      lib/store/shopping/shopping_goods_details.dart
  4. 1
      lib/store/shopping/shopping_home/bargain_details.dart
  5. 38
      lib/store/shopping/shopping_home/search_page.dart
  6. 4
      pubspec.lock

2
lib/settlement/settlement.dart

@ -50,8 +50,6 @@ class _Settlement extends State<Settlement> {
MinApiService minService;
Function(int type) callback;
StoreInfo storeInfo;
// ShoppingCart shopCarGoods;
SettleOrderInfo settleOrderInfo;
MinOrderInfo minOrderInfo;
int selectedBtn = 0;

43
lib/store/shopping/shopping_cart/shopping_cart_page.dart

@ -64,25 +64,15 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
///
toDownOrder() async {
// int num = count();
// if (num == 0) {
// SmartDialog.showToast("请先选择您要购买的商品!~");
// return;
// }
await Navigator.of(context).pushNamed(
'/router/settlement',
arguments: {
"storeInfo": widget.storeInfo,
"tableId": tableId,
// "parentCode": parentCode,
// "parentId": parentId,
"pName":pName,
"pid":pid,
"cName":cName,
"cid":cid,
"shoppingCart": shopCarGoods,
// "numberOfPeople": numberOfPeople,
},
);
queryShopCar();
@ -116,39 +106,6 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
}
}
///
// Future<ShoppingCart> queryShopCar() async {
// pName="";//
// pid="";//
// cName="";//
// cid="";//
// BaseData<List<ShoppingCart>> baseDate =
// await minService.getShoppingCart(tableId);
// if (baseDate != null &&
// baseDate.isSuccess &&
// baseDate.data != null &&
// baseDate.data.length > 0) {
// if( baseDate.data[0].selectDiscount ==1){
// baseDate.data[0].couponList.forEach((element) {
// if(element.isMaxCoupon){
// cName = element.promotionName;
// cid = element.id;
// }
// });
// }else if(baseDate.data[0].selectDiscount==2){
// baseDate.data[0].promotionInfoList.forEach((element) {
// if(element.isMaxPromotion){
// pName=element.name;
// pid=element.id;
// }
// });
// }
// return baseDate.data[0];
// } else {
// return null;
// }
// }
///
shopCartAdd(
ShoppingCartSkuItemListBean cartSkuItem,int count,int selected) async {

63
lib/store/shopping/shopping_goods_details.dart

@ -80,7 +80,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
int tempHour = 0;
int tempM = 0;
int tempS = 0;
LaunchJoinAct launchJoinAct;
BargainType bargainType = BargainType.BargainZBug;
String indexP;
JoinActivity joinA = JoinActivity.GoJoin;
@ -251,51 +250,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}
}
// ///
// queryLaunchAct() async {
// if (minService == null)
// minService = MinApiService(
// Dio(),
// context: context,
// token: minToken,
// tenant: tenant,
// storeId: storeId,
// showLoading: false,
// );
// BaseData baseData = await minService.launchAct({
// "actProductId": pageType == null
// ? miNiDetail.productSkuVOList[0].id
// : activityDetails.actProduct.id,
// "actRecordId": 0,
// "actTemplateId": activityDetails.actProduct.templateId,
// "actTimeId": activityDetails.actProduct.timeId,
// "addressId": "",
// "isDirectBuy": (bargainType == BargainType.BargainBug ||
// bargainType == BargainType.CollageBug)
// ? false
// : true,
// "getType": 3,
// "productId":
// pageType == null ? productId : activityDetails.actProduct.productId,
// "skuId": skuId1,
// "skuPrice": skuPrice1,
// "templateType": pageType
// }).catchError((error) {
// refreshController.refreshFailed();
// });
// if (baseData != null && baseData.isSuccess) {
// setState(() {
// launchJoinAct = baseData.data;
// toBargain();
// refreshController.refreshCompleted();
// });
// } else {
// if ((activityDetails?.actProduct?.productStock ?? 0) == 0)
// SmartDialog.showToast("活动商品售罄", alignment: Alignment.center);
// refreshController.refreshFailed();
// }
// }
///
showStoreSelector(MiNiDetail miNiDetail, String id, int count) async {
if (miNiDetail.attrList != null &&
@ -538,16 +492,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
});
}
// ///
// toBargain() async {
// await Navigator.of(context)
// .pushNamed('/router/bargain_details', arguments: {
// "actRecordId": launchJoinAct.actRecordId,
// "limitNumber": limitNumber,
// "storeInfo": storeInfo,
// });
// }
@override
Widget build(BuildContext context) {
return Stack(
@ -1229,13 +1173,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
alignment: Alignment.center,
height: 50.h,
padding: EdgeInsets.only(left: 16.w),
// decoration: BoxDecoration(
// // image: DecorationImage(
// // fit: BoxFit.fill,
// // image: NetworkImage(bannerImg),
// // ),
// color: Colors.green,
// ),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,

1
lib/store/shopping/shopping_home/bargain_details.dart

@ -44,7 +44,6 @@ class _BargainDetails extends State<BargainDetails> {
final RefreshController refreshController = RefreshController();
int limitNumber = 0;
double bargainNum = 0;
LaunchJoinAct launchJoinAct;
StoreInfo storeInfo;
@override

38
lib/store/shopping/shopping_home/search_page.dart

@ -641,25 +641,25 @@ class _SearchPage extends State<SearchPage> with AutomaticKeepAliveClientMixin,
],
),
),
GestureDetector(
onTap: () {
setState(() {
optionIndex = 3;
});
},
child: Text(
"专区",
style: TextStyle(
fontSize: optionIndex == 3 ? 15.sp : 14.sp,
fontWeight: optionIndex == 3
? MyFontWeight.semi_bold
: MyFontWeight.regular,
color: optionIndex == 3
? Color(0xFF181818)
: Color(0xFF4D4D4D),
),
),
),
// GestureDetector(
// onTap: () {
// setState(() {
// optionIndex = 3;
// });
// },
// child: Text(
// "专区",
// style: TextStyle(
// fontSize: optionIndex == 3 ? 15.sp : 14.sp,
// fontWeight: optionIndex == 3
// ? MyFontWeight.semi_bold
// : MyFontWeight.regular,
// color: optionIndex == 3
// ? Color(0xFF181818)
// : Color(0xFF4D4D4D),
// ),
// ),
// ),
],
),
SizedBox(height: 16.h),

4
pubspec.lock

@ -307,7 +307,7 @@ packages:
name: fluwx
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.8.1"
version: "3.8.1+1"
font_awesome_flutter:
dependency: "direct main"
description:
@ -377,7 +377,7 @@ packages:
name: keframe
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
version: "2.0.4"
like_button:
dependency: "direct main"
description:

Loading…
Cancel
Save