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. 296
      lib/home/welfare_page.dart
  21. 24
      lib/integral/integral_page.dart
  22. 26
      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. 71
      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. 124
      lib/settlement/settlement.dart
  39. 132
      lib/settlement/settlement_view/settlement_order_commodity.dart
  40. 6
      lib/store/shop__details_page.dart
  41. 130
      lib/store/shopping/shopping_home/search_page.dart
  42. 111
      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(
onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page');
// Navigator.of(context).pushNamed('/router/welfare_page');
// Navigator.of(context).pushNamed('/router/roll_center_page');
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,

296
lib/home/welfare_page.dart

@ -34,78 +34,29 @@ class _WelfarePage extends State<WelfarePage> {
}
@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) {
return Container(
color: Colors.white,
child: Scaffold(
return Stack(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare_zx.webp"),
),
),
width: double.infinity,
height: 385.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Colors.transparent,
leadingColor: Colors.white,
title: "福利中心",
titleColor: Colors.white,
titleSize: 18.sp,
brightness: Brightness.dark,
),
body:SmartRefresher(
controller: refreshController,
enablePullDown: true,
@ -116,90 +67,39 @@ class _WelfarePage extends State<WelfarePage> {
return MyFooter(mode);
},
),
onRefresh: () {},
onRefresh:(){
setState(() {
});
},
physics: BouncingScrollPhysics(),
scrollController: scrollController,
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
Container(
margin: EdgeInsets.only(top: 125.h,left: 14,right: 14),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare_zx.webp"),
),
),
width: double.infinity,
height: 385.h,
borderRadius: BorderRadius.circular(6),
color: Color(0xFFF9FAF7),
),
Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 23.h + MediaQuery.of(context).padding.top,
left: 14.w,right: 14.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FutureBuilder(
// future: querySignInfo(),
builder: (context, snap) {
return Column(
children: [
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
// color: Colors.white,
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(),
activityTask(),
],
),
),
],
)
],
);
},
),
),
),
),
),
],
);
}
@ -210,8 +110,16 @@ class _WelfarePage extends State<WelfarePage> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
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(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -292,18 +200,50 @@ class _WelfarePage extends State<WelfarePage> {
Widget weekItem() {
return Container(
width:double.infinity,
height:95.h,
height:100.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
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(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -322,7 +262,7 @@ class _WelfarePage extends State<WelfarePage> {
TextSpan(
text: "30",
style: TextStyle(
fontSize: 26.sp,
fontSize: 24.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFF4500),
),
@ -330,50 +270,14 @@ class _WelfarePage extends State<WelfarePage> {
],
),
),
Text(
Expanded(child: Text(
"满30.1可用",
style: TextStyle(
fontSize: 14.sp,
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFF4500),
),
),
],
),
SizedBox(width: 30,),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"百年川椒(哈乐城店)",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
SizedBox(height: 10,),
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),
),
),
],
),
Expanded(child:
)),
Container(
width: 55.w,
height: 19.h,
@ -387,7 +291,7 @@ class _WelfarePage extends State<WelfarePage> {
]),
// border: Border.all(color: Colors.white,width: 0.5),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(3),
),
alignment: Alignment.center,
child:Text(
@ -398,7 +302,9 @@ class _WelfarePage extends State<WelfarePage> {
color: Color(0xFFFFFFFF),
),
),
))
)
],
),
],
),
);
@ -407,7 +313,7 @@ class _WelfarePage extends State<WelfarePage> {
///
Widget inviteFriends() {
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(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -470,7 +376,7 @@ class _WelfarePage extends State<WelfarePage> {
),
],
),
SizedBox(height: 12,),
SizedBox(height: 12.h,),
ListView.builder(
padding: EdgeInsets.zero,
itemCount:6,
@ -497,6 +403,14 @@ class _WelfarePage extends State<WelfarePage> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
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),
margin: EdgeInsets.only(bottom: 10.h),
@ -535,18 +449,18 @@ class _WelfarePage extends State<WelfarePage> {
),),
Container(
width: 55.w,
height: 19.h,
height: 21.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFF4F00),
Color(0xFFFF2700),
]),
Color(0xFFFF4F00),
],),
// border: Border.all(color: Colors.white,width: 0.5),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(3),
),
alignment: Alignment.center,
child:Text(

24
lib/integral/integral_page.dart

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

26
lib/integral/intergra_view/in_for_points.dart

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

2
lib/login/new_login_page.dart

@ -235,7 +235,7 @@ class _NewLoginPage extends State<NewLoginPage> {
EasyLoading.dismiss();
} 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(
children: [
Container(
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.bottomLeft,
// end: Alignment.topRight,
// colors: [
// Color(0xFFE5F7FF),
// Color(0xFFE8F5E9),
// ],
// stops: [0.1, 0.8],
// ),
// ),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [
Color(0xFFE5F7FF),
Color(0xFFE8F5E9),
],
stops: [0.1, 0.8],
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/mine_bg.webp"),
),
),
height: 375,
child: Column(
children: [
///
@ -244,7 +251,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
createTime: userInfo?.createTime ?? "",
),
],
),
),
@ -294,7 +300,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
);
},
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),
width: double.infinity,
decoration: BoxDecoration(
@ -303,8 +309,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
offset: Offset(0, 2),
blurRadius: 3,
spreadRadius: 0,
),
],
@ -391,7 +397,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
///广
Widget spreadImage() {
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(
onTap: (){
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(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],

10
lib/mine/mine_view/mine_item.dart

@ -18,18 +18,18 @@ class _MineItem extends State<MineItem> {
@override
Widget build(BuildContext context) {
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),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
),
],
),
child: Column(

8
lib/mine/mine_view/mine_order.dart

@ -16,16 +16,16 @@ class _MineOrderView extends State<MineOrderView> {
@override
Widget build(BuildContext context) {
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),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
),
],

2
lib/mine/mine_view/mine_view.dart

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

71
lib/order/order_detail_page.dart

@ -47,14 +47,13 @@ class _OrderDetailPage extends State<OrderDetailPage> {
);
queryDetails();
});
}
///
minLogin() async {
apiService.minLogin(orderInfo.storeId)
.catchError((onError) {debugPrint(onError);})
.then((baseData) {
apiService.minLogin(orderInfo.storeId).catchError((onError) {
debugPrint(onError);
}).then((baseData) {
if (baseData != null && baseData.isSuccess) {
Map<String, dynamic> minStoreInfo = baseData.data;
String minToken = minStoreInfo["token"];
@ -118,21 +117,23 @@ class _OrderDetailPage extends State<OrderDetailPage> {
color: Colors.white,
child: Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
child: Container(
height: (orderStatus >= 4 ? 118.h : 118.h) +
MediaQuery.of(context).padding.top +
kToolbarHeight +
48.h,
color: Color(0xFF3A405A),
width: MediaQuery.of(context).size.width,
Container(
// height: (orderStatus >= 4 ? 118.h : 118.h) +
// MediaQuery.of(context).padding.top +
// kToolbarHeight +
// 48.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
width: double.infinity,
height: 375.h,
),
Positioned(
child: Scaffold(
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
title: "订单详情",
@ -187,12 +188,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
),
),
left: 0,
right: 0,
top: 0,
bottom: 0,
),
)
],
),
);
@ -352,7 +348,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
Text(
S.of(context).yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
S
.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle(
fontSize: 20.sp,
color: Color(0xFF32A060),
@ -497,7 +495,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}
_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) {
SmartDialog.showToast("订单取消成功");
Future.delayed(Duration(milliseconds: 300), () {
@ -506,7 +506,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}
}
///
assessShowBottomSheet() {
showModalBottomSheet(
@ -534,8 +533,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Align(alignment: Alignment.center,
Expanded(
child: Align(
alignment: Alignment.center,
child: Text(
"订单评价",
style: TextStyle(
@ -543,7 +543,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
fontSize: 15.sp,
color: Color(0xFF000000),
),
),)),
),
)),
GestureDetector(
onTap: () {
setState(() {
@ -559,7 +560,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
SizedBox(width: 14),
],
),
SizedBox(height: 12.h,),
SizedBox(
height: 12.h,
),
Container(
width: double.infinity,
height: 1.h,
@ -589,7 +592,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
width: 45,
height: 45,
),
SizedBox(height: 4,),
SizedBox(
height: 4,
),
Text(
"不满意",
style: TextStyle(
@ -620,7 +625,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
width: 45,
height: 45,
),
SizedBox(height: 4,),
SizedBox(
height: 4,
),
Text(
"很满意",
style: TextStyle(

4
lib/order/order_view/order_address.dart

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

6
lib/order/order_view/order_commodity.dart

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

4
lib/order/order_view/order_info.dart

@ -32,8 +32,8 @@ class _OrderInfoView extends State<OrderInfoView> {
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 1),
blurRadius: 12,
offset: Offset(0, 2),
blurRadius: 3,
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),
height: 20.h * AppUtils.textScale(context),
textColor: Colors.white,
fontSize: 12.sp,
textColor: Color(0xFF32A060),
fontSize: 14.sp,
padding:
EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h),
backgroup: Color(0xFF32A060),
backgroup: Color(0xFFFFFFFF),
radius: 15.w,
),
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 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/";///线

4
lib/retrofit/min_api.g.dart

@ -100,7 +100,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => json==null?null:(json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
@ -241,7 +241,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<MinOrderInfo>.fromJson(
_result.data,
(json) => MinOrderInfo.fromJson(json),
(json) => json==null?null:MinOrderInfo.fromJson(json),
);
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 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/";///线
@RestApi(baseUrl: localBaseUrl)

2
lib/retrofit/retrofit_api.g.dart

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

124
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/round_button.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:flutter_screenutil/flutter_screenutil.dart';
@ -123,6 +124,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
} else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo(
@ -135,6 +137,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
} else
queryOrderInfo(
@ -142,11 +145,12 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
productId ?? "",
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel
);
});
@ -167,6 +171,7 @@ class _Settlement extends State<Settlement> {
actProductId,
actProductSkuId,
buyNum,
payChannel
) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
@ -178,7 +183,7 @@ class _Settlement extends State<Settlement> {
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"buyNum":buyNum,
"payChannel": payChannel
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
@ -222,7 +227,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
count1,
payChannel
);
return;
}
@ -276,7 +282,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
count1,
payChannel
);
}
}
@ -302,7 +309,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
count1,
payChannel
);
}
}
@ -398,11 +406,13 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0)
? promotion.id
: widget.arguments["pid"] ?? "";
: "";
// : widget.arguments["pid"] ?? "";
placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0)
? couponListBean.id
: widget.arguments["cid"] ?? "";
: "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -429,23 +439,18 @@ class _Settlement extends State<Settlement> {
} else {
///
BaseData<dynamic> baseData;
if (parentId == "") {
//
if (placeOrder) {
//
querySettlement();
} else {
}
else{
if (parentId == "") {
//
baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
}
} else {
if (placeOrder) {
//
querySettlement();
} else {
//
baseData = await minService
@ -607,25 +612,25 @@ class _Settlement extends State<Settlement> {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
child: Stack(
return Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
child: Container(
height: 175.h,
color: Color(0xFF3A405A),
width: MediaQuery.of(context).size.width,
Container(
// height: 175.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
Positioned(
child: Scaffold(
width: double.infinity,
height: 375.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Color(0xFF3A405A),
background: Colors.transparent,
leadingColor: Colors.white,
title: S.of(context).dingdanjiesuan,
titleColor: Colors.white,
@ -656,7 +661,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
count1,
payChannel
);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
@ -685,8 +691,8 @@ class _Settlement extends State<Settlement> {
couponCart,
activityCart,
settleOrderInfo,
coupons,
promotions,
payChannel == 4 ? null : coupons,
payChannel == 4 ? null : promotions,
couponCount(),
placeOrder,
remakers,
@ -717,7 +723,17 @@ class _Settlement extends State<Settlement> {
),
Container(
height: 54.h,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, -1),
blurRadius: 8,
spreadRadius: 0,
),
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -744,11 +760,12 @@ class _Settlement extends State<Settlement> {
width: 28,
),
RoundButton(
width: 103.w,
height: 54.h,
width: 88.w,
height: 32.h,
radius: 16,
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? S.current.jiesuan : "下单"),
: (placeOrder ? "提交订单" : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
@ -766,25 +783,32 @@ class _Settlement extends State<Settlement> {
: queryPlaceOrderFirst();
},
),
SizedBox(width: 17,)
],
),
),
],
),
),
),
left: 0,
right: 0,
top: 0,
bottom: 0,
),
)
],
),
);
}
payChannelCheck(int 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) {
@ -817,10 +841,11 @@ class _Settlement extends State<Settlement> {
couponBean: couponListBean);
},
);
// if (couponBean != null) {
if (couponBean != null) {
this.couponListBean = couponBean;
coupons = couponListBean?.promotionName??"";
promotions = "";
this.promotion = null;
queryOrderInfo(
address?.id,
selectedBtn,
@ -830,9 +855,10 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
count1,
payChannel
);
// }
}
}
///
@ -847,10 +873,11 @@ class _Settlement extends State<Settlement> {
);
if (pro != null) {
this.promotion = pro;
promotions = promotion.name;
promotions = promotion?.name ?? "";
coupons = "";
this.couponListBean = null;
queryOrderInfo(
address != null ? address.id : null,
address?.id,
selectedBtn,
null,
0,
@ -858,7 +885,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
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,
),
));
// widgets.add(buildTotalPrice());
widgets.add(buildTotalPrice());
return widgets;
}
@ -317,71 +317,71 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
);
}
// Widget buildTotalPrice() {
// return Container(
// margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// crossAxisAlignment: CrossAxisAlignment.baseline,
// textBaseline: TextBaseline.alphabetic,
// children: [
// Expanded(
// child: Text(
// S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
// ? ((widget.minOrderInfo != null)
// ? widget.minOrderInfo.orderProductVOList.length
// : "0")
// : (widget.settleOrderInfo != null)
// ? widget.settleOrderInfo.orderProductList.length
// : "0"),
// style: TextStyle(
// fontSize: 10.sp,
// color: Color(0xFFA29E9E),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// flex: 1,
// ),
// Container(
// child: Text(
// "已优惠:¥${discountPrice()}",
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF7B7B7B),
// fontWeight: MyFontWeight.medium,
// ),
// ),
// ),
// SizedBox(
// width: 15.w,
// ),
//
// Container(
// child: Text(
// S.of(context).jiesuanjine,
// style: TextStyle(
// fontSize: 12.sp,
// color: Color(0xFF353535),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// ),
// SizedBox(
// width: 5.w,
// ),
// Text(
// totalPrice(),
// textAlign: TextAlign.end,
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xFF32A060),
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
// ],
// ),
// );
// }
Widget buildTotalPrice() {
return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Text(
S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
? ((widget.minOrderInfo != null)
? widget.minOrderInfo.orderProductVOList.length
: "0")
: (widget.settleOrderInfo != null)
? widget.settleOrderInfo.orderProductList.length
: "0"),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
fontWeight: MyFontWeight.semi_bold,
),
),
flex: 1,
),
Container(
child: Text(
"已优惠:¥${discountPrice()}",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7B7B7B),
fontWeight: MyFontWeight.medium,
),
),
),
SizedBox(
width: 15.w,
),
Container(
child: Text(
S.of(context).jiesuanjine,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold,
),
),
),
SizedBox(
width: 5.w,
),
Text(
totalPrice(),
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
);
}
String discountPrice(){
if(widget.minOrderInfo != null){

6
lib/store/shop__details_page.dart

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

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

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

111
lib/store/store_view/product_sku.dart

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

Loading…
Cancel
Save