Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

zyh
fmk 3 years ago
parent
commit
ca5f694d3c
  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. 10
      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.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
MobSDK.mobEnv=x 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( chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController, videoPlayerController: videoPlayerController,
aspectRatio: videoPlayerController.value.aspectRatio, aspectRatio: videoPlayerController.value.aspectRatio,
// aspectRatio: 1.44,
// //
autoPlay: false, autoPlay: false,
// //
@ -81,7 +82,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
// //
allowFullScreen: true, allowFullScreen: true,
// //
allowedScreenSleep: true, allowedScreenSleep: false,
// //
materialProgressColors: chewie.ChewieProgressColors( materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white, playedColor: Colors.white,
@ -104,7 +105,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
color: Colors.black, color: Colors.black,
key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ? videoWidget( key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ? videoWidget(
MediaQuery.of(context).size.height, MediaQuery.of(context).size.height,
(MediaQuery.of(context).size.height/videoPlayerController.value.aspectRatio)-43, (MediaQuery.of(context).size.height/1.44)-43,
widget.coverImg, widget.coverImg,
):Container()); ):Container());
} }

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

@ -1,6 +1,7 @@
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
@ -387,7 +388,8 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
) )
: Container( : Container(
margin: EdgeInsets.only(bottom: 50.h), margin: EdgeInsets.only(bottom: 50.h),
child: ListView.builder( child: SlidableAutoCloseBehavior(
child:ListView.builder(
itemCount: ((shopCarGoods?.length ?? 0) > 0) itemCount: ((shopCarGoods?.length ?? 0) > 0)
? (shopCarGoods[0]?.shoppingCartSkuItemList?.length ?? 0) ? (shopCarGoods[0]?.shoppingCartSkuItemList?.length ?? 0)
: 0, : 0,
@ -402,18 +404,52 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
onTap: () { onTap: () {
bIndex = position; 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) { Widget cartGoodsItem(index) {
return Container( return Container(
margin: EdgeInsets.all(16), // margin: EdgeInsets.all(16),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
bottomLeft: Radius.circular(4),),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -476,7 +512,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
@ -486,7 +522,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
shopCarGoods[0].shoppingCartSkuItemList[index]?.skuName ?? shopCarGoods[0].shoppingCartSkuItemList[index]?.skuName ??
"", "",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Color(0xFF727272), color: Color(0xFF727272),
), ),
@ -503,7 +539,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
TextSpan( TextSpan(
text: "", text: "",
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
@ -514,7 +550,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
?.skuPrice ?? ?.skuPrice ??
"", "",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060), color: Color(0xFF32A060),
), ),
@ -559,7 +595,7 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
0, 0,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 14.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, 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 { showStoreSelector(MiNiDetail miNiDetail, String id, int count) async {
if (miNiDetail.attrList != null && // if (miNiDetail.attrList != null &&
miNiDetail.attrList.length == 1 && // miNiDetail.attrList.length == 1 &&
miNiDetail.attrList[0].attrValueList.length == 1) { // miNiDetail.attrList[0].attrValueList.length == 1) {
_addShopCar(miNiDetail, [], count); // _addShopCar(miNiDetail, [], count);
} else { // } else {
EasyLoading.dismiss(); EasyLoading.dismiss();
dialogShowing = true; dialogShowing = true;
SmartDialog.show( SmartDialog.show(
@ -274,7 +274,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}, },
alignmentTemp: Alignment.bottomCenter, alignmentTemp: Alignment.bottomCenter,
); );
} // }
} }
/// ///

10
lib/store/store_view/product_sku.dart

@ -114,8 +114,8 @@ class _ProductSku extends State<ProductSku> {
children: [ children: [
MImage( MImage(
widget.miNiDetail.imgs[0], widget.miNiDetail.imgs[0],
width: 76, width: 76.h,
height: 76, height: 76.h,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(4), radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
@ -125,6 +125,7 @@ class _ProductSku extends State<ProductSku> {
width: 10, width: 10,
), ),
Expanded(child:Column( Expanded(child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
@ -135,6 +136,7 @@ class _ProductSku extends State<ProductSku> {
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
), ),
), ),
if(widget.miNiDetail.attrList[0].attrName!="")
Padding( Padding(
padding: EdgeInsets.only(top: 4, bottom: 7), padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text( child: Text(
@ -188,7 +190,7 @@ class _ProductSku extends State<ProductSku> {
SizedBox( SizedBox(
height:10, 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( Expanded(
child: ListView.builder( child: ListView.builder(
itemCount: widget.miNiDetail.attrList.length, itemCount: widget.miNiDetail.attrList.length,
@ -209,6 +211,8 @@ class _ProductSku extends State<ProductSku> {
}, },
), ),
), ),
if (widget.miNiDetail.attrList[0].attrName=="")
Expanded(child: Container()),
SizedBox( SizedBox(
height: 24, height: 24,
), ),

4
lib/store/store_view/store_order_list.dart

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

2
lib/union/union_list.dart

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

9
pubspec.lock

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

4
pubspec.yaml

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

Loading…
Cancel
Save