Browse Source

更改規格,ui

zyh
w-R 3 years ago
parent
commit
1b75135125
  1. BIN
      assets/image/2x/icon_mine_order_dfk.webp
  2. BIN
      assets/image/2x/icon_mine_order_qb.webp
  3. BIN
      assets/image/2x/icon_mine_order_wwc.webp
  4. BIN
      assets/image/2x/icon_mine_order_ywc.webp
  5. BIN
      assets/image/2x/mine_bg.webp
  6. BIN
      assets/image/2x/settlement_bg.webp
  7. BIN
      assets/image/3x/icon_mine_order_dfk.webp
  8. BIN
      assets/image/3x/icon_mine_order_qb.webp
  9. BIN
      assets/image/3x/icon_mine_order_wwc.webp
  10. BIN
      assets/image/3x/icon_mine_order_ywc.webp
  11. BIN
      assets/image/3x/mine_bg.webp
  12. BIN
      assets/image/3x/settlement_bg.webp
  13. BIN
      assets/image/icon_mine_order_dfk.webp
  14. BIN
      assets/image/icon_mine_order_qb.webp
  15. BIN
      assets/image/icon_mine_order_wwc.webp
  16. BIN
      assets/image/icon_mine_order_ywc.webp
  17. BIN
      assets/image/mine_bg.webp
  18. BIN
      assets/image/settlement_bg.webp
  19. 4
      lib/home/home_view/shortcut_operation.dart
  20. 374
      lib/home/welfare_page.dart
  21. 32
      lib/integral/integral_page.dart
  22. 52
      lib/integral/intergra_view/in_for_points.dart
  23. 2
      lib/login/new_login_page.dart
  24. 32
      lib/mine/mine_page.dart
  25. 4
      lib/mine/mine_view/mine_calendar.dart
  26. 10
      lib/mine/mine_view/mine_item.dart
  27. 8
      lib/mine/mine_view/mine_order.dart
  28. 2
      lib/mine/mine_view/mine_view.dart
  29. 181
      lib/order/order_detail_page.dart
  30. 4
      lib/order/order_view/order_address.dart
  31. 6
      lib/order/order_view/order_commodity.dart
  32. 4
      lib/order/order_view/order_info.dart
  33. 6
      lib/order/order_view/order_status.dart
  34. 2
      lib/retrofit/min_api.dart
  35. 4
      lib/retrofit/min_api.g.dart
  36. 2
      lib/retrofit/retrofit_api.dart
  37. 2
      lib/retrofit/retrofit_api.g.dart
  38. 398
      lib/settlement/settlement.dart
  39. 132
      lib/settlement/settlement_view/settlement_order_commodity.dart
  40. 8
      lib/store/shop__details_page.dart
  41. 168
      lib/store/shopping/shopping_home/search_page.dart
  42. 137
      lib/store/store_view/product_sku.dart
  43. 3
      lib/store/store_view/shop_car.dart
  44. 2
      lib/store/store_view/shop_goods.dart
  45. 1
      lib/store/store_view/store_order_list.dart
  46. 2
      lib/view_widget/mine_vip_view.dart

BIN
assets/image/2x/icon_mine_order_dfk.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 854 B

BIN
assets/image/2x/icon_mine_order_qb.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/icon_mine_order_wwc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/icon_mine_order_ywc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/mine_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
assets/image/2x/settlement_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

BIN
assets/image/3x/icon_mine_order_dfk.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/3x/icon_mine_order_qb.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/3x/icon_mine_order_wwc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/icon_mine_order_ywc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/3x/mine_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
assets/image/3x/settlement_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
assets/image/icon_mine_order_dfk.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 732 B

BIN
assets/image/icon_mine_order_qb.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 884 B

BIN
assets/image/icon_mine_order_wwc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 844 B

BIN
assets/image/icon_mine_order_ywc.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 858 B

BIN
assets/image/mine_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/image/settlement_bg.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

4
lib/home/home_view/shortcut_operation.dart

@ -151,8 +151,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
), ), ), ),
Expanded(child: GestureDetector( Expanded(child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page'); // Navigator.of(context).pushNamed('/router/roll_center_page');
// Navigator.of(context).pushNamed('/router/welfare_page'); Navigator.of(context).pushNamed('/router/welfare_page');
}, },
child:Container( child:Container(
width: double.infinity, width: double.infinity,

374
lib/home/welfare_page.dart

@ -34,172 +34,72 @@ class _WelfarePage extends State<WelfarePage> {
} }
@override @override
// Widget build(BuildContext context) {
// return Stack(
// children: [
// Positioned(
// child: Container(
// height: 155.h + kToolbarHeight + MediaQuery.of(context).padding.top,
// decoration: BoxDecoration(
// image: DecorationImage(
// fit: BoxFit.fill,
// image: AssetImage("assets/image/welfare_zx.webp"),
// ),
// ),
// ),
// top: 0,
// left: 0,
// right: 0,
// ),
// Scaffold(
// backgroundColor: Colors.transparent,
// appBar: MyAppBar(
// exit: (){},
// background: Colors.transparent,
// leadingColor: Colors.white,
// title: "福利中心",
// titleColor: Colors.white,
// titleSize: 17.sp,
// brightness: Brightness.dark,
// ),
// body:SmartRefresher(
// controller: refreshController,
// enablePullDown: true,
// enablePullUp: false,
// header: MyHeader(),
// footer: CustomFooter(
// builder: (context, mode) {
// return MyFooter(mode);
// },
// ),
// onRefresh:(){
// setState(() {
// });
// },
// physics: BouncingScrollPhysics(),
// scrollController: scrollController,
// child: Container(
// child: SingleChildScrollView(
// physics: BouncingScrollPhysics(),
// child: FutureBuilder(
// // future: querySignInfo(),
// builder: (context, snap) {
// return Column(
// children: [
// weekCoupons(),
//
// inviteFriends(),
//
// activityTask(),
// ],
// );
// },
// ),
// ),
// ),
// ),
// ),
// ],
// );
// }
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Stack(
color: Colors.white, children: [
child: Scaffold( Container(
body: SmartRefresher( decoration: BoxDecoration(
controller: refreshController, image: DecorationImage(
enablePullDown: true, fit: BoxFit.fill,
enablePullUp: false, image: AssetImage("assets/image/welfare_zx.webp"),
header: MyHeader(), ),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
), ),
onRefresh: () {}, width: double.infinity,
physics: BouncingScrollPhysics(), height: 385.h,
scrollController: scrollController, ),
child: Container( Scaffold(
child: SingleChildScrollView( backgroundColor: Colors.transparent,
physics: BouncingScrollPhysics(), appBar: MyAppBar(
child: Column( background: Colors.transparent,
mainAxisAlignment: MainAxisAlignment.start, leadingColor: Colors.white,
crossAxisAlignment: CrossAxisAlignment.start, title: "福利中心",
children: [ titleColor: Colors.white,
Stack( titleSize: 18.sp,
children: [ brightness: Brightness.dark,
Container( ),
decoration: BoxDecoration( body:SmartRefresher(
image: DecorationImage( controller: refreshController,
fit: BoxFit.fill, enablePullDown: true,
image: AssetImage("assets/image/welfare_zx.webp"), enablePullUp: false,
), header: MyHeader(),
), footer: CustomFooter(
width: double.infinity, builder: (context, mode) {
height: 385.h, return MyFooter(mode);
), },
Container( ),
width: double.infinity, onRefresh:(){
margin: EdgeInsets.only( setState(() {
top: 23.h + MediaQuery.of(context).padding.top, });
left: 14.w,right: 14.w), },
child: Column( physics: BouncingScrollPhysics(),
mainAxisAlignment: MainAxisAlignment.start, scrollController: scrollController,
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: [ margin: EdgeInsets.only(top: 125.h,left: 14,right: 14),
Row( decoration: BoxDecoration(
mainAxisAlignment: MainAxisAlignment.start, borderRadius: BorderRadius.circular(6),
crossAxisAlignment: CrossAxisAlignment.start, color: Color(0xFFF9FAF7),
children: [ ),
Expanded( child: SingleChildScrollView(
child: GestureDetector( physics: BouncingScrollPhysics(),
behavior: HitTestBehavior.opaque, child: FutureBuilder(
onTap: () { // future: querySignInfo(),
Navigator.of(context).pop(); builder: (context, snap) {
}, return Column(
child: Container( children: [
// color: Colors.white, weekCoupons(),
alignment: Alignment.centerLeft,
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 22,
),
),
),
),
Expanded(
child: Container(
alignment: Alignment.center,
child: Text(
"福利中心",
style: TextStyle(
color: Colors.white,
fontSize: 18.sp,
fontWeight: MyFontWeight.regular,
),
)),
),
Spacer(),
],
),
weekCoupons(),
inviteFriends(), inviteFriends(),
activityTask(), activityTask(),
], ],
), );
), },
], ),
)
],
), ),
), ),
), ),
), ),
), ],
); );
} }
@ -210,8 +110,16 @@ class _WelfarePage extends State<WelfarePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: Colors.white, color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
),
],
), ),
margin: EdgeInsets.only(top: 126.h), // margin: EdgeInsets.only(top: 139.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -292,18 +200,50 @@ class _WelfarePage extends State<WelfarePage> {
Widget weekItem() { Widget weekItem() {
return Container( return Container(
width:double.infinity, width:double.infinity,
height:95.h, height:100.h,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: AssetImage("assets/image/week_coupons.png"), image: AssetImage("assets/image/week_coupons.png"),
), ),
), ),
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 12.h), padding: EdgeInsets.symmetric(horizontal: 10.w,vertical: 10.h),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(child:
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Text(
"百年川椒(哈乐城店)",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
)),
Text(
"新人满减30元",
style: TextStyle(
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
SizedBox(height:4.h,),
Text(
"有效期至2022-09-10 12:00:00",
style: TextStyle(
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
],
)),
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -322,7 +262,7 @@ class _WelfarePage extends State<WelfarePage> {
TextSpan( TextSpan(
text: "30", text: "30",
style: TextStyle( style: TextStyle(
fontSize: 26.sp, fontSize: 24.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFF4500), color: Color(0xFFFF4500),
), ),
@ -330,75 +270,41 @@ class _WelfarePage extends State<WelfarePage> {
], ],
), ),
), ),
Text( Expanded(child: Text(
"满30.1可用", "满30.1可用",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFFFF4500), color: Color(0xFFFF4500),
), ),
), )),
], Container(
), width: 55.w,
SizedBox(width: 30,), height: 19.h,
Column( decoration: BoxDecoration(
mainAxisAlignment: MainAxisAlignment.center, gradient: new LinearGradient(
crossAxisAlignment: CrossAxisAlignment.start, begin: Alignment.bottomCenter,
children: [ end: Alignment.topCenter,
Text( colors: [
"百年川椒(哈乐城店)", Color(0xFFFF4F00),
style: TextStyle( Color(0xFFFF2700),
fontSize: 14.sp, ]),
fontWeight: MyFontWeight.bold, // border: Border.all(color: Colors.white,width: 0.5),
color: Color(0xFF0D0D0D), shape: BoxShape.rectangle,
), borderRadius: BorderRadius.circular(3),
),
SizedBox(height: 10,),
Text(
"新人满减30元",
style: TextStyle(
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
), ),
), alignment: Alignment.center,
SizedBox(height:4.h,), child:Text(
Text( "领取",
"有效期至2022-09-10 12:00:00", style: TextStyle(
style: TextStyle( fontSize: 12.sp,
fontSize: 11.sp, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, color: Color(0xFFFFFFFF),
color: Color(0xFF4D4D4D), ),
), ),
), )
], ],
), ),
Expanded(child:
Container(
width: 55.w,
height: 19.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFFFF4F00),
Color(0xFFFF2700),
]),
// border: Border.all(color: Colors.white,width: 0.5),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12),
),
alignment: Alignment.center,
child:Text(
"领取",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
),
))
], ],
), ),
); );
@ -407,7 +313,7 @@ class _WelfarePage extends State<WelfarePage> {
/// ///
Widget inviteFriends() { Widget inviteFriends() {
return Container( return Container(
margin: EdgeInsets.only(right:14.w,top:34.h,bottom:20.h), margin: EdgeInsets.only(right:14.w,top:24.h,bottom:20.h),
child:Column( child:Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -470,7 +376,7 @@ class _WelfarePage extends State<WelfarePage> {
), ),
], ],
), ),
SizedBox(height: 12,), SizedBox(height: 12.h,),
ListView.builder( ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount:6, itemCount:6,
@ -497,6 +403,14 @@ class _WelfarePage extends State<WelfarePage> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: Colors.white, color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
),
],
), ),
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 12.h), padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 12.h),
margin: EdgeInsets.only(bottom: 10.h), margin: EdgeInsets.only(bottom: 10.h),
@ -535,18 +449,18 @@ class _WelfarePage extends State<WelfarePage> {
),), ),),
Container( Container(
width: 55.w, width: 55.w,
height: 19.h, height: 21.h,
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( gradient: new LinearGradient(
begin: Alignment.bottomCenter, begin: Alignment.centerLeft,
end: Alignment.topCenter, end: Alignment.centerRight,
colors: [ colors: [
Color(0xFFFF4F00),
Color(0xFFFF2700), Color(0xFFFF2700),
]), Color(0xFFFF4F00),
],),
// border: Border.all(color: Colors.white,width: 0.5), // border: Border.all(color: Colors.white,width: 0.5),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(3),
), ),
alignment: Alignment.center, alignment: Alignment.center,
child:Text( child:Text(

32
lib/integral/integral_page.dart

@ -83,19 +83,29 @@ class _IntegralPage extends State<IntegralPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Stack(
children: [ children: [
Positioned( // Positioned(
child: Container( // child: Container(
height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top, // height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top,
decoration: BoxDecoration( // decoration: BoxDecoration(
image: DecorationImage( // image: DecorationImage(
fit: BoxFit.fill, // fit: BoxFit.fill,
image: AssetImage("assets/image/jifen.webp"), // image: AssetImage("assets/image/jifen.webp"),
), // ),
// ),
// ),
// top: 0,
// left: 0,
// right: 0,
// ),
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/jifen.webp"),
), ),
), ),
top: 0, width: double.infinity,
left: 0, height: 409.h,
right: 0,
), ),
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,

52
lib/integral/intergra_view/in_for_points.dart

@ -28,8 +28,8 @@ class _InForPoints extends State<InForPoints> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), margin: EdgeInsets.symmetric(horizontal: 14.w, vertical: 6.h),
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h), padding: EdgeInsets.symmetric(horizontal:12.w, vertical: 16.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -46,27 +46,33 @@ class _InForPoints extends State<InForPoints> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Row(
S.of(context).qiandaolingjifen, mainAxisAlignment: MainAxisAlignment.start,
style: TextStyle( crossAxisAlignment: CrossAxisAlignment.end,
fontWeight: MyFontWeight.medium, children: [
fontSize: 16.sp, Text(
color: Color(0xFF353535), S.of(context).qiandaolingjifen,
), style: TextStyle(
), fontWeight: MyFontWeight.bold,
SizedBox( fontSize: 16.sp,
height: 10.h, color: Color(0xFF4C4C4C),
), ),
Text( ),
S.of(context).lianxuqiandaolingqushuangbeijifen, SizedBox(
style: TextStyle( width:3.w,
fontWeight: MyFontWeight.medium, ),
fontSize: 11.sp, Text(
color: Color(0xFF727272), S.of(context).lianxuqiandaolingqushuangbeijifen,
), style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 11.sp,
color: Color(0xFFB3B3B3),
),
),
],
), ),
SizedBox( SizedBox(
height: 32.h, height: 12.h,
), ),
StaggeredGridView.countBuilder( StaggeredGridView.countBuilder(
crossAxisCount: 4, crossAxisCount: 4,
@ -94,13 +100,13 @@ class _InForPoints extends State<InForPoints> {
? S.of(context).yiqiandao ? S.of(context).yiqiandao
: "签到", : "签到",
textColor: (widget.signInfo != null && widget.signInfo.todayHasSignin) textColor: (widget.signInfo != null && widget.signInfo.todayHasSignin)
? Color(0xFF808080) ? Color(0xFFB3B3B3)
: Colors.white, : Colors.white,
backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin) backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin)
? Color(0xFFF5F6FA) ? Color(0xFFF5F6FA)
: Color(0xFF00BF00), : Color(0xFF00BF00),
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.bold,
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h), padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h),
radius: 20.w, radius: 20.w,
), ),

2
lib/login/new_login_page.dart

@ -235,7 +235,7 @@ class _NewLoginPage extends State<NewLoginPage> {
EasyLoading.dismiss(); EasyLoading.dismiss();
} else { } else {
SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center); SmartDialog.showToast(value?.msg, alignment: Alignment.center);
} }
} }

32
lib/mine/mine_page.dart

@ -201,17 +201,24 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
return Column( return Column(
children: [ children: [
Container( Container(
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.bottomLeft,
// end: Alignment.topRight,
// colors: [
// Color(0xFFE5F7FF),
// Color(0xFFE8F5E9),
// ],
// stops: [0.1, 0.8],
// ),
// ),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( image: DecorationImage(
begin: Alignment.bottomLeft, fit: BoxFit.fill,
end: Alignment.topRight, image: AssetImage("assets/image/mine_bg.webp"),
colors: [
Color(0xFFE5F7FF),
Color(0xFFE8F5E9),
],
stops: [0.1, 0.8],
), ),
), ),
height: 375,
child: Column( child: Column(
children: [ children: [
/// ///
@ -244,7 +251,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
createTime: userInfo?.createTime ?? "", createTime: userInfo?.createTime ?? "",
), ),
], ],
), ),
), ),
@ -294,7 +300,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
); );
}, },
child:Container( child:Container(
margin: EdgeInsets.only(left:14,right:14,bottom:20), margin: EdgeInsets.only(left:14,right:14,bottom:10),
padding: EdgeInsets.only(left:12, top:12, right:10,bottom: 12), padding: EdgeInsets.only(left:12, top:12, right:10,bottom: 12),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -303,8 +309,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
offset: Offset(0, 3), offset: Offset(0, 2),
blurRadius: 14, blurRadius: 3,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],
@ -391,7 +397,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
///广 ///广
Widget spreadImage() { Widget spreadImage() {
return Container( return Container(
margin: EdgeInsets.only(right:14.w,bottom:20.h,left: 14.w), margin: EdgeInsets.only(right:14.w,bottom:10.h,left: 14.w),
child: GestureDetector( child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page'); Navigator.of(context).pushNamed('/router/welfare_page');

4
lib/mine/mine_view/mine_calendar.dart

@ -26,8 +26,8 @@ class _MineCalendar extends State<MineCalendar> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
offset: Offset(0, 3), offset: Offset(0, 2),
blurRadius: 14, blurRadius: 4,
spreadRadius: 0, spreadRadius: 0,
) )
], ],

10
lib/mine/mine_view/mine_item.dart

@ -18,18 +18,18 @@ class _MineItem extends State<MineItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 28.h), margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 27.h),
// padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), // padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 3), offset: Offset(0, 2),
blurRadius: 14, blurRadius: 4,
spreadRadius: 0, spreadRadius: 0,
) ),
], ],
), ),
child: Column( child: Column(

8
lib/mine/mine_view/mine_order.dart

@ -16,16 +16,16 @@ class _MineOrderView extends State<MineOrderView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w, top:10.h), margin: EdgeInsets.only(left:16.w, bottom:20.h, right:16.w, top:20.h),
padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 3), offset: Offset(0, 2),
blurRadius: 14, blurRadius: 4,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],

2
lib/mine/mine_view/mine_view.dart

@ -65,7 +65,7 @@ class _MineView extends State<MineView> {
return Column( return Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 28.w), margin: EdgeInsets.only(top: 20.w),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,

181
lib/order/order_detail_page.dart

@ -47,14 +47,13 @@ class _OrderDetailPage extends State<OrderDetailPage> {
); );
queryDetails(); queryDetails();
}); });
} }
/// ///
minLogin() async { minLogin() async {
apiService.minLogin(orderInfo.storeId) apiService.minLogin(orderInfo.storeId).catchError((onError) {
.catchError((onError) {debugPrint(onError);}) debugPrint(onError);
.then((baseData) { }).then((baseData) {
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
Map<String, dynamic> minStoreInfo = baseData.data; Map<String, dynamic> minStoreInfo = baseData.data;
String minToken = minStoreInfo["token"]; String minToken = minStoreInfo["token"];
@ -69,7 +68,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
); );
minService = MinApiService( minService = MinApiService(
Dio(), Dio(),
showLoading:true, showLoading: true,
context: context, context: context,
token: minToken, token: minToken,
tenant: tenant, tenant: tenant,
@ -118,81 +117,78 @@ class _OrderDetailPage extends State<OrderDetailPage> {
color: Colors.white, color: Colors.white,
child: Stack( child: Stack(
children: [ children: [
Positioned( Container(
top: 0, // height: (orderStatus >= 4 ? 118.h : 118.h) +
left: 0, // MediaQuery.of(context).padding.top +
right: 0, // kToolbarHeight +
child: Container( // 48.h,
height: (orderStatus >= 4 ? 118.h : 118.h) + // color: Color(0xFF3A405A),
MediaQuery.of(context).padding.top + // width: MediaQuery.of(context).size.width,
kToolbarHeight + decoration: BoxDecoration(
48.h, image: DecorationImage(
color: Color(0xFF3A405A), fit: BoxFit.fill,
width: MediaQuery.of(context).size.width, image: AssetImage("assets/image/settlement_bg.webp"),
),
), ),
width: double.infinity,
height: 375.h,
), ),
Positioned( Scaffold(
child: Scaffold( backgroundColor: Colors.transparent,
backgroundColor: Colors.transparent, appBar: MyAppBar(
appBar: MyAppBar( title: "订单详情",
title: "订单详情", titleColor: Colors.white,
titleColor: Colors.white, background: Colors.transparent,
background: Colors.transparent, leadingColor: Colors.white,
leadingColor: Colors.white, brightness: Brightness.dark,
brightness: Brightness.dark, ),
), body: Container(
body: Container( child: SingleChildScrollView(
child: SingleChildScrollView( physics: BouncingScrollPhysics(),
physics: BouncingScrollPhysics(), child: Container(
child: Container( child: Column(
child: Column( children: [
children: [ ///
/// OrderStatus(
OrderStatus( orderStatus,
orderStatus, isTakeOut,
isTakeOut, sendStatus,
sendStatus, payStatus,
payStatus, refundStatus,
refundStatus, title,
title, center,
center, orderInfo,
orderInfo, ),
),
/// ///
OrderAddress( OrderAddress(
orderStatus, orderStatus,
isTakeOut, isTakeOut,
sendStatus, sendStatus,
payStatus, payStatus,
refundStatus, refundStatus,
title, title,
center, center,
paySelected, paySelected,
_orderCancel, _orderCancel,
orderInfo, orderInfo,
), ),
/// ///
OrderCommodity(orderInfo), OrderCommodity(orderInfo),
/// ///
OrderInfoView(orderInfo,isTakeOut), OrderInfoView(orderInfo, isTakeOut),
Container( Container(
height: 42.h, height: 42.h,
), ),
], ],
),
), ),
), ),
), ),
), ),
left: 0, )
right: 0,
top: 0,
bottom: 0,
),
], ],
), ),
); );
@ -352,7 +348,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
), ),
), ),
Text( Text(
S.of(context).yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"), S
.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 20.sp,
color: Color(0xFF32A060), color: Color(0xFF32A060),
@ -497,7 +495,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
_orderCancel() async { _orderCancel() async {
BaseData baseData = await apiService.orderCancel(widget.arguments["id"]).catchError((onError) {}); BaseData baseData = await apiService
.orderCancel(widget.arguments["id"])
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功"); SmartDialog.showToast("订单取消成功");
Future.delayed(Duration(milliseconds: 300), () { Future.delayed(Duration(milliseconds: 300), () {
@ -506,7 +506,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
} }
/// ///
assessShowBottomSheet() { assessShowBottomSheet() {
showModalBottomSheet( showModalBottomSheet(
@ -527,15 +526,16 @@ class _OrderDetailPage extends State<OrderDetailPage> {
topRight: const Radius.circular(25.0))), topRight: const Radius.circular(25.0))),
child: Container( child: Container(
width: 299, width: 299,
height:299, height: 299,
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child: Expanded(
Align(alignment: Alignment.center, child: Align(
alignment: Alignment.center,
child: Text( child: Text(
"订单评价", "订单评价",
style: TextStyle( style: TextStyle(
@ -543,9 +543,10 @@ class _OrderDetailPage extends State<OrderDetailPage> {
fontSize: 15.sp, fontSize: 15.sp,
color: Color(0xFF000000), color: Color(0xFF000000),
), ),
),)), ),
)),
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
setState(() { setState(() {
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
@ -559,7 +560,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
SizedBox(width: 14), SizedBox(width: 14),
], ],
), ),
SizedBox(height: 12.h,), SizedBox(
height: 12.h,
),
Container( Container(
width: double.infinity, width: double.infinity,
height: 1.h, height: 1.h,
@ -586,10 +589,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
children: [ children: [
Image.asset( Image.asset(
"assets/image/report_un.webp", "assets/image/report_un.webp",
width:45, width: 45,
height:45, height: 45,
),
SizedBox(
height: 4,
), ),
SizedBox(height: 4,),
Text( Text(
"不满意", "不满意",
style: TextStyle( style: TextStyle(
@ -617,10 +622,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
children: [ children: [
Image.asset( Image.asset(
"assets/image/report_h.webp", "assets/image/report_h.webp",
width:45, width: 45,
height:45, height: 45,
),
SizedBox(
height: 4,
), ),
SizedBox(height: 4,),
Text( Text(
"很满意", "很满意",
style: TextStyle( style: TextStyle(
@ -635,10 +642,10 @@ class _OrderDetailPage extends State<OrderDetailPage> {
], ],
), ),
Container( Container(
width:double.infinity, width: double.infinity,
height: 36.h, height: 36.h,
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 50.h), margin: EdgeInsets.only(left: 14.w, right: 14.w, top: 50.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: Color(0xFF32A060), color: Color(0xFF32A060),

4
lib/order/order_view/order_address.dart

@ -52,8 +52,8 @@ class _OrderAddress extends State<OrderAddress> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
offset: Offset(0, 3), offset: Offset(0, 2),
blurRadius: 14, blurRadius: 3,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],

6
lib/order/order_view/order_commodity.dart

@ -43,9 +43,9 @@ class _OrderCommodity extends State<OrderCommodity> {
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 1), offset: Offset(0, 2),
blurRadius: 12, blurRadius: 3,
spreadRadius: 0, spreadRadius: 0,
), ),
], ],

4
lib/order/order_view/order_info.dart

@ -32,8 +32,8 @@ class _OrderInfoView extends State<OrderInfoView> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
offset: Offset(0, 1), offset: Offset(0, 2),
blurRadius: 12, blurRadius: 3,
spreadRadius: 0, spreadRadius: 0,
) )
], ],

6
lib/order/order_view/order_status.dart

@ -71,11 +71,11 @@ class _OrderStatus extends State<OrderStatus> {
: "物流", : "物流",
width: 42.w * AppUtils.textScale(context), width: 42.w * AppUtils.textScale(context),
height: 20.h * AppUtils.textScale(context), height: 20.h * AppUtils.textScale(context),
textColor: Colors.white, textColor: Color(0xFF32A060),
fontSize: 12.sp, fontSize: 14.sp,
padding: padding:
EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h), EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h),
backgroup: Color(0xFF32A060), backgroup: Color(0xFFFFFFFF),
radius: 15.w, radius: 15.w,
), ),
Row( Row(

2
lib/retrofit/min_api.dart

@ -39,7 +39,7 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8765/app/"; // const base_url = "http://192.168.10.37:8765/app/";
const localBaseUrl = "http://192.168.10.78:8765/app/";/// const localBaseUrl = "http://192.168.10.236:8765/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

4
lib/retrofit/min_api.g.dart

@ -100,7 +100,7 @@ class _MinApiService implements MinApiService {
data: _data); data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson( final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => json==null?null:(json as List<dynamic>)
.map<ShoppingCart>( .map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) (i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList()); .toList());
@ -241,7 +241,7 @@ class _MinApiService implements MinApiService {
data: _data); data: _data);
final value = BaseData<MinOrderInfo>.fromJson( final value = BaseData<MinOrderInfo>.fromJson(
_result.data, _result.data,
(json) => MinOrderInfo.fromJson(json), (json) => json==null?null:MinOrderInfo.fromJson(json),
); );
return value; return value;
} }

2
lib/retrofit/retrofit_api.dart

@ -69,7 +69,7 @@ part 'retrofit_api.g.dart';
// const base_url = "http://192.168.10.132:8766/app/";/// // const base_url = "http://192.168.10.132:8766/app/";///
const localBaseUrl = "http://192.168.10.78:8766/app/";/// const localBaseUrl = "http://192.168.10.236:8766/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)

2
lib/retrofit/retrofit_api.g.dart

@ -93,7 +93,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData.fromJson( final value = BaseData.fromJson(
_result.data, _result.data,
(json) => json, (json) => json==null?null:json,
); );
return value; return value;
} }

398
lib/settlement/settlement.dart

@ -32,6 +32,7 @@ import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/tips_dialog.dart'; import 'package:huixiang/view_widget/tips_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -123,6 +124,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1, count1,
payChannel
); );
} else if (coupons != null && coupons != "" || tableId <= 0) { } else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo( queryOrderInfo(
@ -135,6 +137,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1, count1,
payChannel
); );
} else } else
queryOrderInfo( queryOrderInfo(
@ -142,11 +145,12 @@ class _Settlement extends State<Settlement> {
selectedBtn, selectedBtn,
null, null,
0, 0,
productId ?? "", productId ?? null,
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1, count1,
payChannel
); );
}); });
@ -167,6 +171,7 @@ class _Settlement extends State<Settlement> {
actProductId, actProductId,
actProductSkuId, actProductSkuId,
buyNum, buyNum,
payChannel
) async { ) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId, "addressId": addressId,
@ -178,7 +183,7 @@ class _Settlement extends State<Settlement> {
"actProductId": actProductId, "actProductId": actProductId,
"actProductSkuId": actProductSkuId, "actProductSkuId": actProductSkuId,
"buyNum":buyNum, "buyNum":buyNum,
"payChannel": payChannel
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
@ -222,7 +227,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1 count1,
payChannel
); );
return; return;
} }
@ -276,7 +282,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1 count1,
payChannel
); );
} }
} }
@ -302,7 +309,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1 count1,
payChannel
); );
} }
} }
@ -398,11 +406,13 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.promotionInfoDTO.promotionId = placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) (promotion != null && tableId <= 0)
? promotion.id ? promotion.id
: widget.arguments["pid"] ?? ""; : "";
// : widget.arguments["pid"] ?? "";
placeOrderFirst.promotionInfoDTO.couponId = placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0) (couponListBean != null && tableId <= 0)
? couponListBean.id ? couponListBean.id
: widget.arguments["cid"] ?? ""; : "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.recMobile = placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; (mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -429,23 +439,18 @@ class _Settlement extends State<Settlement> {
} else { } else {
/// ///
BaseData<dynamic> baseData; BaseData<dynamic> baseData;
if (parentId == "") { if (placeOrder) {
// //
if (placeOrder) { querySettlement();
// }
querySettlement(); else{
} else { if (parentId == "") {
// //
baseData = await minService baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson()) .placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) { .catchError((error) {
print("error: $error"); print("error: $error");
}); });
}
} else {
if (placeOrder) {
//
querySettlement();
} else { } else {
// //
baseData = await minService baseData = await minService
@ -607,184 +612,203 @@ class _Settlement extends State<Settlement> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Stack(
color: Colors.white, children: [
child: Stack( Container(
children: [ // height: 175.h,
Positioned( // color: Color(0xFF3A405A),
top: 0, // width: MediaQuery.of(context).size.width,
left: 0, decoration: BoxDecoration(
right: 0, image: DecorationImage(
child: Container( fit: BoxFit.fill,
height: 175.h, image: AssetImage("assets/image/settlement_bg.webp"),
color: Color(0xFF3A405A),
width: MediaQuery.of(context).size.width,
), ),
), ),
Positioned( width: double.infinity,
child: Scaffold( height: 375.h,
backgroundColor: Colors.transparent, ),
appBar: MyAppBar( Scaffold(
background: Color(0xFF3A405A), backgroundColor: Colors.transparent,
leadingColor: Colors.white, appBar: MyAppBar(
title: S.of(context).dingdanjiesuan, background: Colors.transparent,
titleColor: Colors.white, leadingColor: Colors.white,
brightness: Brightness.dark, title: S.of(context).dingdanjiesuan,
titleSize: 18.sp, titleColor: Colors.white,
), brightness: Brightness.dark,
body: Container( titleSize: 18.sp,
child: Column( ),
children: [ body: Container(
Expanded( child: Column(
children: [
Expanded(
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container( child: Container(
child: SingleChildScrollView( child: Column(
physics: BouncingScrollPhysics(), children: [
child: Container( DistributionMode((addressId, isTake,
child: Column( memberCouponId, orderId, promotionId) {
children: [ setState(() {
DistributionMode((addressId, isTake, this.selectedBtn = 0;
memberCouponId, orderId, promotionId) { });
setState(() { queryOrderInfo(
this.selectedBtn = 0; addressId,
}); isTake,
queryOrderInfo( memberCouponId,
addressId, orderId,
isTake, promotionId ?? (productId?? ""),
memberCouponId, productSkuId ?? "",
orderId, actProductId ?? "",
promotionId ?? (productId?? ""), actProductSkuId ?? "",
productSkuId ?? "", count1,
actProductId ?? "", payChannel
actProductSkuId ?? "", );
count1 }, queryAddress, storeInfo, address,
); selectedAddress, pageType),
}, queryAddress, storeInfo, address,
selectedAddress, pageType), SizedBox(
height: 16,
SizedBox( ),
height: 16,
), ///
// EditPhoneWidget(
/// // storeInfo,
// EditPhoneWidget( // mobileChange,
// storeInfo, // ),
// mobileChange,
// ), ///
SettlementOrderCommodity(
/// selectedBtn,
SettlementOrderCommodity( settleOrderInfo,
selectedBtn, minOrderInfo,
settleOrderInfo, tableId,
minOrderInfo, pageType,
tableId, ),
pageType,
), /////
ActivityCouponRemarks(
///// couponCart,
ActivityCouponRemarks( activityCart,
couponCart, settleOrderInfo,
activityCart, payChannel == 4 ? null : coupons,
settleOrderInfo, payChannel == 4 ? null : promotions,
coupons, couponCount(),
promotions, placeOrder,
couponCount(), remakers,
placeOrder,
remakers,
() { () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/edit_remarks_page', '/router/edit_remarks_page',
arguments: {}, arguments: {},
).then((value) => { ).then((value) => {
setState(() { setState(() {
if (value != null) remakers = value; if (value != null) remakers = value;
}) })
}); });
}, },
tableId, tableId,
),
if (placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
],
), ),
),
if (placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
],
), ),
), ),
flex: 1,
), ),
Container( ),
height: 54.h, flex: 1,
color: Colors.white, ),
child: Row( Container(
crossAxisAlignment: CrossAxisAlignment.center, height: 54.h,
children: [ decoration: BoxDecoration(
Spacer(), color: Colors.white,
Text( boxShadow: [
S.of(context).heji, BoxShadow(
style: TextStyle( color: Color(0x08213303).withAlpha(12),
fontSize: 12.sp, offset: Offset(0, -1),
fontWeight: MyFontWeight.regular, blurRadius: 8,
color: Colors.black, spreadRadius: 0,
),
),
Text(
(minOrderInfo != null
? "${minOrderInfo.orderSumPrice}"
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
SizedBox(
width: 28,
),
RoundButton(
width: 103.w,
height: 54.h,
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? S.current.jiesuan : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
),
callback: () {
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
],
), ),
), ],
], ),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Spacer(),
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
Text(
(minOrderInfo != null
? "${minOrderInfo.orderSumPrice}"
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
SizedBox(
width: 28,
),
RoundButton(
width: 88.w,
height: 32.h,
radius: 16,
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? "提交订单" : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
),
callback: () {
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
SizedBox(width: 17,)
],
),
), ),
), ],
), ),
left: 0,
right: 0,
top: 0,
bottom: 0,
), ),
], )
), ],
); );
} }
payChannelCheck(int payChannel) { payChannelCheck(int payChannel) {
this.payChannel = payChannel; this.payChannel = payChannel;
queryOrderInfo(
address?.id,
selectedBtn,
payChannel == 4 ? null : couponListBean?.id,
0,
payChannel == 4 ? null : promotion?.id,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
} }
mobileChange(String mobile) { mobileChange(String mobile) {
@ -817,10 +841,11 @@ class _Settlement extends State<Settlement> {
couponBean: couponListBean); couponBean: couponListBean);
}, },
); );
// if (couponBean != null) { if (couponBean != null) {
this.couponListBean = couponBean; this.couponListBean = couponBean;
coupons = couponListBean?.promotionName??""; coupons = couponListBean?.promotionName??"";
promotions = ""; promotions = "";
this.promotion = null;
queryOrderInfo( queryOrderInfo(
address?.id, address?.id,
selectedBtn, selectedBtn,
@ -830,9 +855,10 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1 count1,
payChannel
); );
// } }
} }
/// ///
@ -847,10 +873,11 @@ class _Settlement extends State<Settlement> {
); );
if (pro != null) { if (pro != null) {
this.promotion = pro; this.promotion = pro;
promotions = promotion.name; promotions = promotion?.name ?? "";
coupons = ""; coupons = "";
this.couponListBean = null;
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address?.id,
selectedBtn, selectedBtn,
null, null,
0, 0,
@ -858,7 +885,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
count1 count1,
payChannel
); );
} }
} }

132
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -113,7 +113,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
color: Colors.grey, color: Colors.grey,
), ),
)); ));
// widgets.add(buildTotalPrice()); widgets.add(buildTotalPrice());
return widgets; return widgets;
} }
@ -317,71 +317,71 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
); );
} }
// Widget buildTotalPrice() { Widget buildTotalPrice() {
// return Container( return Container(
// margin: EdgeInsets.only(top: 7.h, bottom: 11.h), margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
// child: Row( child: Row(
// mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
// crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
// textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
// children: [ children: [
// Expanded( Expanded(
// child: Text( child: Text(
// S.of(context).gongjijianshangpin((widget.minOrderInfo != null) S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
// ? ((widget.minOrderInfo != null) ? ((widget.minOrderInfo != null)
// ? widget.minOrderInfo.orderProductVOList.length ? widget.minOrderInfo.orderProductVOList.length
// : "0") : "0")
// : (widget.settleOrderInfo != null) : (widget.settleOrderInfo != null)
// ? widget.settleOrderInfo.orderProductList.length ? widget.settleOrderInfo.orderProductList.length
// : "0"), : "0"),
// style: TextStyle( style: TextStyle(
// fontSize: 10.sp, fontSize: 10.sp,
// color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
// fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
// ), ),
// ), ),
// flex: 1, flex: 1,
// ), ),
// Container( Container(
// child: Text( child: Text(
// "已优惠:¥${discountPrice()}", "已优惠:¥${discountPrice()}",
// style: TextStyle( style: TextStyle(
// fontSize: 12.sp, fontSize: 12.sp,
// color: Color(0xFF7B7B7B), color: Color(0xFF7B7B7B),
// fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// ), ),
// ), ),
// ), ),
// SizedBox( SizedBox(
// width: 15.w, width: 15.w,
// ), ),
//
// Container( Container(
// child: Text( child: Text(
// S.of(context).jiesuanjine, S.of(context).jiesuanjine,
// style: TextStyle( style: TextStyle(
// fontSize: 12.sp, fontSize: 12.sp,
// color: Color(0xFF353535), color: Color(0xFF353535),
// fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
// ), ),
// ), ),
// ), ),
// SizedBox( SizedBox(
// width: 5.w, width: 5.w,
// ), ),
// Text( Text(
// totalPrice(), totalPrice(),
// textAlign: TextAlign.end, textAlign: TextAlign.end,
// style: TextStyle( style: TextStyle(
// fontSize: 14.sp, fontSize: 14.sp,
// color: Color(0xFF32A060), color: Color(0xFF32A060),
// fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
// ), ),
// ), ),
// ], ],
// ), ),
// ); );
// } }
String discountPrice(){ String discountPrice(){
if(widget.minOrderInfo != null){ if(widget.minOrderInfo != null){

8
lib/store/shop__details_page.dart

@ -445,10 +445,10 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
buildProduct(), buildProduct(),
SizedBox(height: 16.h,),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16.h),
top: 16.h, left: 14.w, right: 14.w, bottom: 16.h),
color: Colors.white, color: Colors.white,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -508,13 +508,13 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
spreadRadius: 0, spreadRadius: 0,
) )
], ],
color: Colors.white), color: Color(0xFFFFFFFF)),
child: Column( child: Column(
children: [ children: [
swiper(), swiper(),
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 16.h, left: 14.w, right: 14.w, bottom: 16.h), top: 16.h, left: 14.w, right: 14.w,bottom: 16.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

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

@ -347,6 +347,8 @@ class _SearchPage extends State<SearchPage>
child: FutureBuilder( child: FutureBuilder(
builder: (context, snapshot) { builder: (context, snapshot) {
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (hasFocus) hotSearchWords(), if (hasFocus) hotSearchWords(),
if (hasFocus) historySearchWords(), if (hasFocus) historySearchWords(),
@ -383,35 +385,23 @@ class _SearchPage extends State<SearchPage>
), ),
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
GridView.builder( Wrap(
itemCount: hotSearch?.length ?? 0, runSpacing: 10.0,
shrinkWrap: true, spacing: 10.0,
padding: EdgeInsets.zero, children: hotSearch.take(hotSearch?.length).map<Widget>((String hotSearch) {
physics: NeverScrollableScrollPhysics(), return GestureDetector(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( onTap: () {
//Widget数量 setState(() {
crossAxisCount: 4, if (hotSearch.length != null) {
//Widget之间间距 editingController.text = hotSearch;
crossAxisSpacing: 6.w, appletGoods(hotSearch);
//Widget之间间距 }
mainAxisSpacing: 12.w, });
//Widget之间间距 },
childAspectRatio: 3 / 1, child:hotSearchItem(
), hotSearch
itemBuilder: (context, index) { ));
return GestureDetector( }).toList())
onTap: () {
setState(() {
if (hotSearch[index] != null) {
editingController.text = hotSearch[index];
appletGoods(hotSearch[index]);
}
});
},
child: hotSearchItem(hotSearch[index]),
);
},
),
], ],
), ),
); );
@ -419,30 +409,28 @@ class _SearchPage extends State<SearchPage>
Widget hotSearchItem(String hotSearch) { Widget hotSearchItem(String hotSearch) {
return Container( return Container(
width: double.infinity, padding: const EdgeInsets.symmetric(vertical:6.0,horizontal: 22.0),
child: Row( decoration: BoxDecoration(
mainAxisAlignment: MainAxisAlignment.spaceAround, color: Color(0xFFF5F5F5),
crossAxisAlignment: CrossAxisAlignment.start, borderRadius: const BorderRadius.all(
children: [ Radius.circular(4.0),
RoundButton( ),
padding: EdgeInsets.only(left: 4, right: 4), ),
height: 29.h, child: Text(
text: hotSearch, hotSearch,
textColor: Color(0xFF181818), overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF181818),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
radius: 4,
backgroup: Color(0xFFF5F5F5),
fontSize: 12.sp,
), ),
], ));
),
);
} }
/// ///
Widget historySearchWords() { Widget historySearchWords() {
return Container( return Container(
// width: double.infinity, margin: EdgeInsets.only(top: 24.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -481,35 +469,23 @@ class _SearchPage extends State<SearchPage>
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
GridView.builder( Wrap(
itemCount: historySearch?.length ?? 0, runSpacing: 10.0,
shrinkWrap: true, spacing: 10.0,
padding: EdgeInsets.zero, children: historySearch.take(historySearch?.length).map<Widget>((String historySearch) {
physics: NeverScrollableScrollPhysics(), return GestureDetector(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( onTap: () {
//Widget数量 setState(() {
crossAxisCount: 4, if (historySearch.length != null) {
//Widget之间间距 editingController.text = historySearch;
crossAxisSpacing: 6.w, appletGoods(historySearch);
//Widget之间间距 }
mainAxisSpacing: 12.w, });
//Widget之间间距 },
childAspectRatio: 3 / 1, child:historySearchItem(
), historySearch
itemBuilder: (context, index) { ));
return GestureDetector( }).toList())
onTap: () {
setState(() {
if (historySearch[index] != null) {
editingController.text = historySearch[index];
appletGoods(historySearch[index]);
}
});
},
child: historySearchItem(historySearch[index]),
);
},
),
], ],
), ),
); );
@ -517,32 +493,22 @@ class _SearchPage extends State<SearchPage>
Widget historySearchItem(String historySearch) { Widget historySearchItem(String historySearch) {
return Container( return Container(
child: Row( padding: const EdgeInsets.symmetric(vertical:6.0,horizontal: 22.0),
mainAxisAlignment: MainAxisAlignment.spaceAround, decoration: BoxDecoration(
crossAxisAlignment: CrossAxisAlignment.start, color: Color(0xFFF5F5F5),
children: [ borderRadius: const BorderRadius.all(
Expanded( Radius.circular(4.0),
child: Container( ),
padding: EdgeInsets.only(left: 4, right: 4), ),
alignment: Alignment.center, child: Text(
decoration: BoxDecoration( historySearch,
borderRadius: BorderRadius.circular(4), overflow: TextOverflow.ellipsis,
color: Color(0xFFF5F5F5)), style: TextStyle(
child: Text( color: Color(0xFF181818),
historySearch, fontSize: 14.sp,
overflow: TextOverflow.ellipsis, fontWeight: MyFontWeight.regular,
maxLines: 1, ),
style: TextStyle( ));
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF181818),
),
),
),
)
],
),
);
} }
/// ///

137
lib/store/store_view/product_sku.dart

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart';
@ -93,11 +94,7 @@ class _ProductSku extends State<ProductSku> {
child: StatefulBuilder(builder: (context1, state) { child: StatefulBuilder(builder: (context1, state) {
return Container( return Container(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
padding: EdgeInsets.only( padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16),
top: 16,
left: 16,
right: 16,
),
height: MediaQuery.of(context).size.height / 3 * 2, height: MediaQuery.of(context).size.height / 3 * 2,
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -121,6 +118,7 @@ class _ProductSku extends State<ProductSku> {
width: 75, width: 75,
height: 75, height: 75,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
), ),
@ -189,7 +187,7 @@ class _ProductSku extends State<ProductSku> {
), ),
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0) if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
SizedBox( SizedBox(
height: 23, height:10,
), ),
if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0) if (widget.miNiDetail.attrList != null && widget.miNiDetail.attrList.length > 0)
Expanded( Expanded(
@ -200,10 +198,9 @@ class _ProductSku extends State<ProductSku> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (context, position) { itemBuilder: (context, position) {
return attrItem( return attrItem(
(index) { (attrValue) {
state(() { state(() {
selectSkus[position] = widget.miNiDetail selectSkus[position] = attrValue;
.attrList[position].attrValueList[index].attrValue;
buildCount(); buildCount();
}); });
}, },
@ -673,7 +670,7 @@ class _ProductSku extends State<ProductSku> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(top: 24, bottom: 16), padding: EdgeInsets.only(top: 16, bottom: 16),
child: Text( child: Text(
attrListBean.attrName, attrListBean.attrName,
style: TextStyle( style: TextStyle(
@ -683,7 +680,8 @@ class _ProductSku extends State<ProductSku> {
), ),
), ),
), ),
sweetnessStore(fc, attrListBean.attrValueList, position), sweetnessStore(fc,attrListBean.attrValueList, position),
// sweetnessStore(fc, attrListBean.attrValueList, position),
], ],
); );
else { else {
@ -691,62 +689,75 @@ class _ProductSku extends State<ProductSku> {
} }
} }
Widget sweetnessStore(Function fc, List<AttrValueListBean> arrays, position) { // Widget sweetnessStore(Function fc, List<AttrValueListBean> arrays, position) {
return GridView.builder( // return GridView.builder(
itemCount: arrays.length, // itemCount: arrays.length,
shrinkWrap: true, // shrinkWrap: true,
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
physics: NeverScrollableScrollPhysics(), // physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget数量 // //Widget数量
crossAxisCount: 4, // crossAxisCount: 4,
//Widget之间间距 // //Widget之间间距
crossAxisSpacing: 6.w, // crossAxisSpacing: 6.w,
//Widget之间间距 // //Widget之间间距
mainAxisSpacing: 12.w, // mainAxisSpacing: 12.w,
//Widget之间间距 // //Widget之间间距
childAspectRatio: 3 / 1, // childAspectRatio: 3 / 1,
), // ),
itemBuilder: (context, index) { // itemBuilder: (context, index) {
return GestureDetector( // return GestureDetector(
onTap: () { // onTap: () {
fc(index); // fc(index);
}, // },
child: sweetnessItem( // child: sweetnessItem(
arrays[index].attrValue, // arrays[index].attrValue,
(arrays[index].attrValue == selectSkus[position]) ?? false, // (arrays[index].attrValue == selectSkus[position]) ?? false,
), // ),
); // );
}, // },
); // );
// }
Widget sweetnessStore(Function fc,List<AttrValueListBean> arrays, position){
return Wrap(
runSpacing: 10.0,
spacing: 10.0,
children: arrays.take(arrays.length).map<Widget>((AttrValueListBean tag) {
return GestureDetector(
onTap: () {
fc(tag.attrValue);
},
child:sweetnessItem(
tag.attrValue,
(tag.attrValue == selectSkus[position]) ?? false,
));
}).toList());
} }
Widget sweetnessItem(String name, bool isCheck) { Widget sweetnessItem(String name, bool isCheck) {
return Container( return Container(
child: Row( padding: const EdgeInsets.symmetric(vertical:5.0,horizontal: 12.0),
mainAxisAlignment: MainAxisAlignment.start, decoration: BoxDecoration(
crossAxisAlignment: CrossAxisAlignment.start, color: !isCheck ? Color(0xFFF2F2F2) : Color(0xFFF0FAF4),
children: [ border: Border.all(
Container( width: !isCheck ? 0:1,
width: 70.w, color: !isCheck ? Color(0xFFF2F2F2):Color(0xFF32A060),
height:30.h, style: BorderStyle.solid,
alignment: Alignment.center, ),
decoration: BoxDecoration( borderRadius: const BorderRadius.all(
color: !isCheck ? Color(0xFFE5E5E5) : Color(0xFF32A060), Radius.circular(4.0),
borderRadius: BorderRadius.all(Radius.circular(4)), ),
),
child:Text(
name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:!isCheck ? Color(0xFF727272) : Colors.white,
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
),
],
), ),
); child: Text(
name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:!isCheck ? Color(0xFF4D4D4D) : Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
));
} }
} }

3
lib/store/store_view/shop_car.dart

@ -63,7 +63,7 @@ class _ShopCar extends State<ShopCar> {
top: 16, top: 16,
left: 16, left: 16,
right: 16, right: 16,
bottom: 8, bottom: 0,
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -102,7 +102,6 @@ class _ShopCar extends State<ShopCar> {
bottom: 54, bottom: 54,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 8,
left: 16, left: 16,
right: 16, right: 16,
), ),

2
lib/store/store_view/shop_goods.dart

@ -169,7 +169,7 @@ class _ShopGoods extends State<ShopGoods> {
text: S.of(context).xuanguige, text: S.of(context).xuanguige,
textColor: Colors.white, textColor: Colors.white,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
radius: 11, radius: 3,
backgroup: Color(0xFF32A060), backgroup: Color(0xFF32A060),
fontSize: 11.sp, fontSize: 11.sp,
padding: EdgeInsets.symmetric(vertical: 5.h), padding: EdgeInsets.symmetric(vertical: 5.h),

1
lib/store/store_view/store_order_list.dart

@ -68,6 +68,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
token: widget.minToken, token: widget.minToken,
tenant: widget.tenant, tenant: widget.tenant,
storeId: widget.arguments["id"], storeId: widget.arguments["id"],
showLoading: true
); );
BaseData<List<FindMiNiGroupList>> baseData = BaseData<List<FindMiNiGroupList>> baseData =

2
lib/view_widget/mine_vip_view.dart

@ -125,7 +125,7 @@ class MineVipView extends StatelessWidget {
: EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 0), : EdgeInsets.fromLTRB(padding.w, 16.h, padding.w, 0),
width: MediaQuery.of(context).size.width - 32.w, width: MediaQuery.of(context).size.width - 32.w,
height: ((MediaQuery.of(context).size.width - 32.w) / height: ((MediaQuery.of(context).size.width - 32.w) /
(isUserVip ? 1.88 : 1.90) * (isUserVip ? 1.99 : 2.11) *
AppUtils.textScale(context)), AppUtils.textScale(context)),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(

Loading…
Cancel
Save