Browse Source

视频修改;

商城修改;
商城增加右滑删除;
单規格也弹窗;
zyh
w-R 3 years ago
parent
commit
4bb182bf4c
  1. 1
      android/gradle.properties
  2. 5
      lib/community/community_view/class_details_video.dart
  3. 56
      lib/store/shopping/shopping_cart/shopping_cart_page.dart
  4. 12
      lib/store/shopping/shopping_goods_details.dart
  5. 34
      lib/store/store_view/product_sku.dart
  6. 4
      lib/store/store_view/store_order_list.dart
  7. 2
      lib/union/union_list.dart
  8. 9
      pubspec.lock
  9. 4
      pubspec.yaml

1
android/gradle.properties

@ -3,3 +3,4 @@ org.gradle.jvmargs=-Xmx4096m
android.useAndroidX=true
android.enableJetifier=true
MobSDK.mobEnv=x
MobSDK.spEdition=FP

5
lib/community/community_view/class_details_video.dart

@ -74,6 +74,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController,
aspectRatio: videoPlayerController.value.aspectRatio,
// aspectRatio: 1.44,
//
autoPlay: false,
//
@ -81,7 +82,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
//
allowFullScreen: true,
//
allowedScreenSleep: true,
allowedScreenSleep: false,
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,
@ -104,7 +105,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
color: Colors.black,
key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ? videoWidget(
MediaQuery.of(context).size.height,
(MediaQuery.of(context).size.height/videoPlayerController.value.aspectRatio)-43,
(MediaQuery.of(context).size.height/1.44)-43,
widget.coverImg,
):Container());
}

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

@ -1,6 +1,7 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -387,7 +388,8 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
)
: Container(
margin: EdgeInsets.only(bottom: 50.h),
child: ListView.builder(
child: SlidableAutoCloseBehavior(
child:ListView.builder(
itemCount: ((shopCarGoods?.length ?? 0) > 0)
? (shopCarGoods[0]?.shoppingCartSkuItemList?.length ?? 0)
: 0,
@ -402,18 +404,52 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
onTap: () {
bIndex = position;
},
child: cartGoodsItem(position),
child:Padding(
padding: EdgeInsets.all(8),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(4)),
child: Slidable(
endActionPane: ActionPane(
extentRatio: 0.22,
motion: ScrollMotion(),
children: [
SlidableAction(
onPressed: (bc) {
shopCarGoods[0].shoppingCartSkuItemList[position].selected =
(shopCarGoods[0].shoppingCartSkuItemList[position].selected ==
0)
? 1
: 0;
shopCartAdd(shopCarGoods[0].shoppingCartSkuItemList[position], 0,
shopCarGoods[0].shoppingCartSkuItemList[position].selected);
if(isAllItemUnSelected())
return;
clearShopCar();
},
backgroundColor: Color(0xFFFB312B),
foregroundColor: Colors.white,
label: '删除',
),
],
),
child:cartGoodsItem(position),
),
),
)
);
}),
}) ,
),
);
}
Widget cartGoodsItem(index) {
return Container(
margin: EdgeInsets.all(16),
// margin: EdgeInsets.all(16),
padding: EdgeInsets.all(16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
bottomLeft: Radius.circular(4),),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
@ -476,7 +512,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
@ -486,7 +522,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
shopCarGoods[0].shoppingCartSkuItemList[index]?.skuName ??
"",
style: TextStyle(
fontSize: 10.sp,
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF727272),
),
@ -503,7 +539,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
TextSpan(
text: "",
style: TextStyle(
fontSize: 10.sp,
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
@ -514,7 +550,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
?.skuPrice ??
"",
style: TextStyle(
fontSize: 14.sp,
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
@ -559,7 +595,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
0,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),

12
lib/store/shopping/shopping_goods_details.dart

@ -252,11 +252,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
///
showStoreSelector(MiNiDetail miNiDetail, String id, int count) async {
if (miNiDetail.attrList != null &&
miNiDetail.attrList.length == 1 &&
miNiDetail.attrList[0].attrValueList.length == 1) {
_addShopCar(miNiDetail, [], count);
} else {
// if (miNiDetail.attrList != null &&
// miNiDetail.attrList.length == 1 &&
// miNiDetail.attrList[0].attrValueList.length == 1) {
// _addShopCar(miNiDetail, [], count);
// } else {
EasyLoading.dismiss();
dialogShowing = true;
SmartDialog.show(
@ -274,7 +274,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
},
alignmentTemp: Alignment.bottomCenter,
);
}
// }
}
///

34
lib/store/store_view/product_sku.dart

@ -114,8 +114,8 @@ class _ProductSku extends State<ProductSku> {
children: [
MImage(
widget.miNiDetail.imgs[0],
width: 76,
height: 76,
width: 76.h,
height: 76.h,
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp",
@ -125,6 +125,7 @@ class _ProductSku extends State<ProductSku> {
width: 10,
),
Expanded(child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
@ -135,20 +136,21 @@ class _ProductSku extends State<ProductSku> {
fontWeight: MyFontWeight.medium,
),
),
Padding(
padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text(
"已选: " +
(selectSkus.map((e) => "$e").toList().toString()),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
if(widget.miNiDetail.attrList[0].attrName!="")
Padding(
padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text(
"已选: " +
(selectSkus.map((e) => "$e").toList().toString()),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
),
),
),
),
Row(
children: [
Text(
@ -188,7 +190,7 @@ class _ProductSku extends State<ProductSku> {
SizedBox(
height:10,
),
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0 && widget.miNiDetail.attrList[0].attrName!="")
Expanded(
child: ListView.builder(
itemCount: widget.miNiDetail.attrList.length,
@ -209,6 +211,8 @@ class _ProductSku extends State<ProductSku> {
},
),
),
if (widget.miNiDetail.attrList[0].attrName=="")
Expanded(child: Container()),
SizedBox(
height: 24,
),

4
lib/store/store_view/store_order_list.dart

@ -200,9 +200,6 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
// productListBeans.clear();
// productListBeans.addAll(appletProducts[index].productList);
controller.jumpTo(appletProducts[index].goodsIndex);
// controller.animateTo(appletProducts[index].goodsIndex,
// duration: Duration(milliseconds: 300),
// curve: Curves.ease);
});
},
child: Stack(
@ -212,6 +209,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
color: currentIndex != index ? Color(0xFFFAFAFA) : Colors.white,
alignment: Alignment.center,
padding: EdgeInsets.all(15),
margin: EdgeInsets.only(bottom: (index==appletProducts.length - 1)?35.h:0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,

2
lib/union/union_list.dart

@ -59,7 +59,7 @@ class _UnionList extends State<UnionList> {
showDeleteDialog();
}
// else if (widget.storeList[position].posType.code ==
// "RETAILSTORE" &&
// "DIRECT" &&
// widget.storeList[position].storeName == "一心回乡商城") {
// Navigator.of(context).pushNamed(
// '/router/shopping_mall_home',

9
pubspec.lock

@ -256,6 +256,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.0.0+1"
flutter_slidable:
dependency: "direct main"
description:
name: flutter_slidable
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.2"
flutter_smart_dialog:
dependency: "direct main"
description:
@ -650,7 +657,7 @@ packages:
name: sharesdk_plugin
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.2"
version: "1.3.4"
simple_gesture_detector:
dependency: transitive
description:

4
pubspec.yaml

@ -79,7 +79,7 @@ dependencies:
package_info: ^2.0.2
sharesdk_plugin: ^1.3.0
sharesdk_plugin: ^1.3.4
flutter_spinkit: ^5.0.0
flutter_easyloading: ^3.0.0
@ -94,6 +94,8 @@ dependencies:
table_calendar: ^2.3.3
flutter_slidable: ^1.3.0

Loading…
Cancel
Save