Browse Source

首页更改

zyh
w-R 3 years ago
parent
commit
bea49daca0
  1. BIN
      assets/image/2x/home_lm.webp
  2. BIN
      assets/image/2x/home_recharge.webp
  3. BIN
      assets/image/2x/home_welfare.webp
  4. BIN
      assets/image/3x/home_lm.webp
  5. BIN
      assets/image/3x/home_recharge.webp
  6. BIN
      assets/image/3x/home_welfare.webp
  7. BIN
      assets/image/home_lm.webp
  8. BIN
      assets/image/home_recharge.webp
  9. BIN
      assets/image/home_welfare.webp
  10. 2
      lib/community/community_view/class_details_video.dart
  11. 2
      lib/home/home_view/discount_zone.dart
  12. 2
      lib/home/home_view/home_banner.dart
  13. 2
      lib/home/home_view/home_recommend_goods.dart
  14. 223
      lib/home/home_view/shortcut_operation.dart
  15. 2
      lib/home/home_view/top_selling_list.dart
  16. 179
      lib/home/home_view/union_entry.dart
  17. 2
      lib/home/home_view/welfare_core.dart
  18. 100
      lib/home/points_mall_view/points_goods_view.dart
  19. 336
      lib/home/welfare_exchange.dart
  20. 13
      lib/home/welfare_page.dart
  21. 44
      lib/integral/integral_detailed_page.dart
  22. 122
      lib/mine/mine_page.dart
  23. 4
      lib/mine/mine_view/mine_calendar.dart
  24. 10
      lib/mine/mine_view/mine_item.dart
  25. 6
      lib/mine/mine_view/mine_order.dart
  26. 34
      lib/mine/mine_view/mine_view.dart
  27. 2
      lib/mine/recharge_page.dart
  28. 627
      lib/store/store_order.dart
  29. 7
      lib/union/union_list.dart
  30. 4
      lib/union/union_page.dart
  31. 14
      lib/view_widget/mine_vip_entry.dart
  32. 2
      pubspec.yaml

BIN
assets/image/2x/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/2x/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 746 B

BIN
assets/image/2x/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
assets/image/3x/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
assets/image/3x/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 778 B

BIN
assets/image/3x/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
assets/image/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 936 B

BIN
assets/image/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 664 B

BIN
assets/image/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

2
lib/community/community_view/class_details_video.dart

@ -96,7 +96,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ?videoWidget( key: globalKey,child:(videoPlayerController?.value?.isInitialized ?? false) ? videoWidget(
MediaQuery.of(context).size.height, MediaQuery.of(context).size.height,
(MediaQuery.of(context).size.height/videoPlayerController.value.aspectRatio)-43, (MediaQuery.of(context).size.height/videoPlayerController.value.aspectRatio)-43,
widget.coverImg, widget.coverImg,

2
lib/home/home_view/discount_zone.dart

@ -35,7 +35,7 @@ class _DiscountZone extends State<DiscountZone> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 24.h), margin: EdgeInsets.only(top: 14.h),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,

2
lib/home/home_view/home_banner.dart

@ -23,7 +23,7 @@ class _HomeBanner extends State<HomeBanner> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: AspectRatio( child: AspectRatio(
aspectRatio: 375/230, aspectRatio: 375/300,
child: Swiper( child: Swiper(
pagination: SwiperPagination( pagination: SwiperPagination(
margin: EdgeInsets.only(bottom: 12.h), margin: EdgeInsets.only(bottom: 12.h),

2
lib/home/home_view/home_recommend_goods.dart

@ -47,7 +47,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
color: Colors.white, color: Colors.white,
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 14.w, right: 14.w, top: 14.h, bottom: 24.h), left: 14.w, right: 14.w, top: 14.h, bottom: 14.h),
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

223
lib/home/home_view/shortcut_operation.dart

@ -24,93 +24,108 @@ class _ShortcutOperation extends State<ShortcutOperation> {
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 80.h, height: 70.h,
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(bottom:15.h,left: 10.w,right: 10.w), margin: EdgeInsets.only(bottom: 15.h, left: 9.w, right: 9.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded(child:GestureDetector( Expanded(
onTap: (){ child: GestureDetector(
widget.goToOrder(0); onTap: () {
}, widget.goToOrder(0);
child: Container( },
width: double.infinity, child: Container(
margin: EdgeInsets.symmetric(horizontal:5), width: double.infinity,
padding: EdgeInsets.all(10.h), margin: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration( padding: EdgeInsets.all(10.h),
color: Colors.white, decoration: BoxDecoration(
boxShadow: [ gradient: new LinearGradient(
BoxShadow( begin: Alignment.centerLeft,
color: Colors.black.withAlpha(12), end: Alignment.centerRight,
offset: Offset(0, 3), colors: [
blurRadius: 14, Color(0xFFD1E8D9),
spreadRadius: 0, Color(0xFFE4F7EA),
) ]),
], boxShadow: [
borderRadius: BorderRadius.circular(4), BoxShadow(
), color: Colors.black.withAlpha(12),
child: Row( offset: Offset(0, 2),
mainAxisAlignment: MainAxisAlignment.center, blurRadius: 4,
crossAxisAlignment: CrossAxisAlignment.center, spreadRadius: 1,
children: [ )
Column( ],
mainAxisAlignment: MainAxisAlignment.center, borderRadius: BorderRadius.circular(6),
crossAxisAlignment: CrossAxisAlignment.start, ),
children: [ child: Row(
Text( mainAxisAlignment: MainAxisAlignment.center,
"联盟", crossAxisAlignment: CrossAxisAlignment.center,
style: TextStyle( children: [
fontWeight: MyFontWeight.semi_bold, Column(
fontSize: 14.sp, mainAxisAlignment: MainAxisAlignment.center,
color: Color(0xFF0D0D0D), crossAxisAlignment: CrossAxisAlignment.start,
), children: [
Text(
"联盟",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF32A060),
), ),
SizedBox(height:5.h), ),
Text( SizedBox(height: 5.h),
"下单赚积分", Text(
style: TextStyle( "下单赚积分",
fontWeight: MyFontWeight.regular, style: TextStyle(
fontSize: 12.sp, fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D), fontSize: 12.sp,
), color: Color(0xFF61836F),
), ),
], ),
), ],
SizedBox(width: 3.w), ),
Expanded(child: Image.asset( SizedBox(width: 3.w),
Expanded(
child: Image.asset(
"assets/image/home_lm.webp", "assets/image/home_lm.webp",
width:36.w, width: 36.w,
height:36.h, height: 36.h,
),), ),
], ),
), ],
), ),
) ), ),
Expanded(child:GestureDetector( )),
onTap: (){ Expanded(
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/recharge_page'); Navigator.of(context).pushNamed('/router/recharge_page');
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.symmetric(horizontal:5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAEDCB),
Color(0xFFFAF4E2),
]),
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: 1,
) )
], ],
borderRadius: BorderRadius.circular(4.r), borderRadius: BorderRadius.circular(6.r),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -125,7 +140,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF0D0D0D), color: Color(0xFFFFBA1B),
), ),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
@ -134,41 +149,51 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4D4D4D), color: Color(0xFFA59162),
), ),
), ),
], ],
), ),
SizedBox(width: 3.w), SizedBox(width: 3.w),
Expanded(child: Image.asset( Expanded(
"assets/image/home_recharge.webp", child: Image.asset(
width:36.w, "assets/image/home_recharge.webp",
height:36.h, width: 36.w,
),), height: 36.h,
),
),
], ],
), ),
), ),
), ), ),
Expanded(child: GestureDetector( ),
onTap: (){ Expanded(
child: GestureDetector(
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,
margin: EdgeInsets.symmetric(horizontal:5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAE5CB),
Color(0xFFFAF1E4),
]),
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: 1,
) )
], ],
borderRadius: BorderRadius.circular(4.r), borderRadius: BorderRadius.circular(6.r),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -183,7 +208,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF0D0D0D), color: Color(0xFFFF910F),
), ),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
@ -192,24 +217,26 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4D4D4D), color: Color(0xFF89755D),
), ),
), ),
], ],
), ),
SizedBox(width: 3.w), SizedBox(width: 3.w),
Expanded(child: Image.asset( Expanded(
"assets/image/home_welfare.webp", child: Image.asset(
width:36.w, "assets/image/home_welfare.webp",
height:36.h, width: 36.w,
),), height: 36.h,
),
),
], ],
), ),
), ),
),), ),
], ),
), ],
); ),
);
} }
} }

2
lib/home/home_view/top_selling_list.dart

@ -44,7 +44,7 @@ class _TopSellingList extends State<TopSellingList> {
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 12.h,bottom: 23.h), margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 14.h),
padding: EdgeInsets.only(left: 12.w,top: 16.h), padding: EdgeInsets.only(left: 12.w,top: 16.h),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

179
lib/home/home_view/union_entry.dart

@ -30,7 +30,19 @@ class _UnionEntry extends State<UnionEntry> {
return Container( return Container(
height: 130.h, height: 130.h,
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(bottom:10.h,left: 10.w,right: 10.w,top: 14.h), margin: EdgeInsets.all(14.h),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(6.r),
),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -39,129 +51,78 @@ class _UnionEntry extends State<UnionEntry> {
onTap: (){ onTap: (){
widget.goToOrder(1); widget.goToOrder(1);
}, },
child: Container( child: Column(
width: double.infinity, crossAxisAlignment: CrossAxisAlignment.center,
margin: EdgeInsets.symmetric(horizontal:5.w), mainAxisAlignment: MainAxisAlignment.center,
padding: EdgeInsets.symmetric(vertical:12.h), children: [
decoration: BoxDecoration( Image.asset(
color: Colors.white, "assets/image/home_chi.webp",
boxShadow: [ fit: BoxFit.cover,
BoxShadow( width: 60.w,
color: Colors.black.withAlpha(12), height: 60.h,
offset: Offset(0, 3), ),
blurRadius: 14, SizedBox(height:4.h),
spreadRadius: 0, Text(
) "吃健康",
], style: TextStyle(
borderRadius: BorderRadius.circular(6.r), fontWeight: MyFontWeight.medium,
), fontSize: 15.sp,
child: Column( color: Color(0xFF0D0D0D),
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_chi.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
), ),
SizedBox(height:4.h), ),
Text( ],
"吃健康",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
),
],
),
), ),
) ), ) ),
Expanded(child:GestureDetector( Expanded(child:GestureDetector(
onTap: (){ onTap: (){
widget.goToOrder(2); widget.goToOrder(2);
}, },
child: Container( child: Column(
width: double.infinity, crossAxisAlignment: CrossAxisAlignment.center,
margin: EdgeInsets.symmetric(horizontal:5.w), mainAxisAlignment: MainAxisAlignment.center,
// padding: EdgeInsets.symmetric(vertical:12.h), children: [
decoration: BoxDecoration( Image.asset(
color: Colors.white, "assets/image/home_he.webp",
boxShadow: [ fit: BoxFit.cover,
BoxShadow( width: 60.w,
color: Colors.black.withAlpha(12), height: 60.h,
offset: Offset(0, 3), ),
blurRadius: 14, SizedBox(height:4.h),
spreadRadius: 0, Text(
) "喝健康",
], style: TextStyle(
borderRadius: BorderRadius.circular(6.r), fontWeight: MyFontWeight.medium,
), fontSize: 15.sp,
child: Column( color: Color(0xFF0D0D0D),
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
),
SizedBox(height:4.h),
Text(
"喝健康",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
), ),
], ),
), ],
), ),
) ), ) ),
Expanded(child: GestureDetector( Expanded(child: GestureDetector(
onTap: (){ onTap: (){
widget.goToOrder(3); widget.goToOrder(3);
}, },
child: Container( child:Column(
width: double.infinity, crossAxisAlignment: CrossAxisAlignment.center,
margin: EdgeInsets.symmetric(horizontal:5.w), mainAxisAlignment: MainAxisAlignment.center,
padding: EdgeInsets.symmetric(vertical:12.h), children: [
decoration: BoxDecoration( Image.asset(
color: Colors.white, "assets/image/home_wan.webp",
boxShadow: [ fit: BoxFit.cover,
BoxShadow( width: 60.w,
color: Colors.black.withAlpha(12), height: 60.h,
offset: Offset(0, 3), ),
blurRadius: 14, SizedBox(height:4.h),
spreadRadius: 0, Text(
) "玩健康",
], style: TextStyle(
borderRadius: BorderRadius.circular(6.r), fontWeight: MyFontWeight.medium,
), fontSize: 15.sp,
child: Column( color: Color(0xFF0D0D0D),
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_wan.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
),
SizedBox(height:4.h),
Text(
"玩健康",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
), ),
], ),
), ],
), ),
)), )),
], ],

2
lib/home/home_view/welfare_core.dart

@ -60,7 +60,7 @@ class _WelfareCore extends State<WelfareCore> {
),), ),),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left:9.w,right: 9.w,top: 16.h,bottom: 12.h), margin: EdgeInsets.only(left:10.w,right: 10.w,top: 14.h,bottom: 14.h),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

100
lib/home/points_mall_view/points_goods_view.dart

@ -5,6 +5,7 @@ import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
class PointGoods extends StatefulWidget { class PointGoods extends StatefulWidget {
final List<Goods> goods; final List<Goods> goods;
@ -19,50 +20,64 @@ class PointGoods extends StatefulWidget {
} }
class _PointGoods extends State<PointGoods> { class _PointGoods extends State<PointGoods> {
String pointPrice(Goods goods){ String pointPrice(Goods goods) {
if(goods == null) if (goods == null) return "";
return ""; if (goods?.onePrice != null && goods?.onePrice != "0") {
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice); return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){ } else if ((goods?.onePrice == null || goods?.onePrice == "0") &&
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}"); ((goods?.price != null && goods?.price != "0") ||
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){ (goods?.money != null && goods?.money != "0.00"))) {
return (goods?.price == "0" || goods?.price == null
? ""
: S.of(context).jifen_(goods?.price)) +
(goods?.money == "0" || goods?.money == null
? ""
: " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}");
} else if (goods.oneMoney != null && goods.oneMoney != "0.00") {
return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}"; return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}";
} }
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GridView.builder( return (widget.goods == null || widget.goods.length == 0)
itemCount: widget.goods == null ? 0 : widget.goods.length, ? NoDataView(
padding: EdgeInsets.only( src: "assets/image/xiao_fei.webp",
left: 16.w, isShowBtn: false,
right: 16.w, text: "当前分类暂无商品",
top: 18.h, fontSize: 16.sp,
bottom: 16.h, margin: EdgeInsets.all(60.h),
), )
shrinkWrap: true, : GridView.builder(
physics: NeverScrollableScrollPhysics(), itemCount: widget.goods == null ? 0 : widget.goods.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( padding: EdgeInsets.only(
//Widget数量 left: 16.w,
crossAxisCount: 2, right: 16.w,
//Widget之间间距 top: 18.h,
crossAxisSpacing: 11.w, bottom: 16.h,
//Widget之间间距 ),
mainAxisSpacing: 16.w, shrinkWrap: true,
//Widget宽高比例 0.59 physics: NeverScrollableScrollPhysics(),
childAspectRatio: gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
200 / (286 / 2 + (286 / 2) * AppUtils.textScale(context)), //Widget数量
), crossAxisCount: 2,
itemBuilder: (context, index) { //Widget之间间距
return GestureDetector( crossAxisSpacing: 11.w,
onTap: () { //Widget之间间距
widget.onTap(index); mainAxisSpacing: 16.w,
}, //Widget宽高比例 0.59
child: buildItem(widget.goods[index]), childAspectRatio:
); 200 / (266 / 2 + (266 / 2) * AppUtils.textScale(context)),
}, ),
); itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
widget.onTap(index);
},
child: buildItem(widget.goods[index]),
);
},
);
} }
Widget buildItem(Goods goods) { Widget buildItem(Goods goods) {
@ -91,7 +106,7 @@ class _PointGoods extends State<PointGoods> {
children: [ children: [
MImage( MImage(
goods.mainImgPath, goods.mainImgPath,
aspectRatio: 158/158, aspectRatio: 158 / 158,
radius: BorderRadius.only( radius: BorderRadius.only(
topLeft: Radius.circular(6), topLeft: Radius.circular(6),
topRight: Radius.circular(6), topRight: Radius.circular(6),
@ -111,17 +126,20 @@ class _PointGoods extends State<PointGoods> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child: Text( Expanded(
child: Text(
goods.name, goods.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Color(0xff353535), color: Color(0xff353535),
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
fontSize: 15.sp, fontSize: 15.sp,
), ),
)), )),
SizedBox(height: 5.h,), SizedBox(
height: 5.h,
),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

336
lib/home/welfare_exchange.dart

@ -16,8 +16,10 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -34,8 +36,10 @@ class _WelfareExchange extends State<WelfareExchange> {
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
int pageNum = 1; int pageNum = 1;
//1-2-3- //1-2-3-
int orderType = 1; int orderType = 1;
// //
bool orderDesc = true; bool orderDesc = true;
List<Goods> goods = []; List<Goods> goods = [];
@ -43,6 +47,12 @@ class _WelfareExchange extends State<WelfareExchange> {
List<GoodsCategory> gooodsCategorys = []; List<GoodsCategory> gooodsCategorys = [];
UserInfo userInfo; UserInfo userInfo;
String categoryId; String categoryId;
var _itemText = S.current.morenpaixu;
List<String> sortString = [
S.current.morenpaixu,
S.current.jifengaodaodi,
S.current.jifendidaogao,
];
@override @override
void dispose() { void dispose() {
@ -65,6 +75,7 @@ class _WelfareExchange extends State<WelfareExchange> {
await apiService.queryInfo().catchError((onError) {}); await apiService.queryInfo().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data; userInfo = baseData.data;
setState(() {});
SharedPreferences.getInstance().then((value) => { SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)), value.setString('user', jsonEncode(baseData.data)),
}); });
@ -95,7 +106,7 @@ class _WelfareExchange extends State<WelfareExchange> {
} }
BaseData<PageInfo<GoodsCategory>> dataCategory = BaseData<PageInfo<GoodsCategory>> dataCategory =
await apiService.goodsCategory({ await apiService.goodsCategory({
"current": 1, "current": 1,
"map": {}, "map": {},
"model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""},
@ -126,7 +137,7 @@ class _WelfareExchange extends State<WelfareExchange> {
"state": 1 "state": 1
}; };
BaseData<PageInfo<Goods>> pageGoods = BaseData<PageInfo<Goods>> pageGoods =
await apiService.creditGoods(param).catchError((onError) { await apiService.creditGoods(param).catchError((onError) {
refreshController.loadFailed(); refreshController.loadFailed();
refreshController.refreshFailed(); refreshController.refreshFailed();
}); });
@ -147,6 +158,7 @@ class _WelfareExchange extends State<WelfareExchange> {
refreshController.loadFailed(); refreshController.loadFailed();
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
setState(() {});
} }
_onRefresh() { _onRefresh() {
@ -155,102 +167,119 @@ class _WelfareExchange extends State<WelfareExchange> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Scaffold(
color: Color(0xFFF7F7F7), backgroundColor: Colors.transparent,
child: Stack( body: NestedScrollView(
children: [ headerSliverBuilder: (context, inner) {
Container( return [
// padding: EdgeInsets.only(top: 40.h), SliverAppBar(
height: 172.h, pinned: true,
decoration: BoxDecoration( backgroundColor: Colors.white,
// border: Border.all(color: Colors.white,width: 0.5), elevation: 0,
color: Color(0xFF277D4B), title: Text(
shape: BoxShape.rectangle, "福利兑换",
borderRadius: BorderRadius.only( style:
bottomRight: Radius.circular(40), TextStyle(fontWeight: FontWeight.w500, color: Colors.white),
bottomLeft: Radius.circular(40),
), ),
), centerTitle: true,
// child: ClipPath( leading: GestureDetector(
// onTap: () {
// clipper: BottonClipper(), Navigator.of(context).pop();
// child: Container(
// color: Colors.deepOrange,
// height: 300,
// ),
// ),
),
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,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
}, },
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 24,
),
),
), ),
onRefresh: () { flexibleSpace: FlexibleSpaceBar(
setState(() { background: Stack(
_onRefresh(); children: [
}); Container(
}, // padding: EdgeInsets.only(top: 40.h),
physics: BouncingScrollPhysics(), height: 172.h,
scrollController: scrollController, decoration: BoxDecoration(
child: Container( // border: Border.all(color: Colors.white,width: 0.5),
child: SingleChildScrollView( color: Color(0xFF277D4B),
physics: BouncingScrollPhysics(), shape: BoxShape.rectangle,
child: FutureBuilder( borderRadius: BorderRadius.only(
future: creditGoods(), bottomRight: Radius.circular(40),
builder: (context, snap) { bottomLeft: Radius.circular(40),
return Column( ),
children: [ ),
/// ),
pointUser(), Container(
alignment: Alignment.topCenter,
Container( margin: EdgeInsets.only(top: 106.h),
color: Colors.white, child: pointUser(),
child: Column( ),
children: [ ],
///Tab )),
PointsGoodsTitle( expandedHeight: 258.h,
gooodsCategorys, bottom: PreferredSize(
(orderType, orderDesc) { preferredSize: Size(double.infinity, 0),
this.orderType = orderType; child: DefaultTabController(
this.orderDesc = orderDesc; length: gooodsCategorys == null ? 0 : gooodsCategorys.length,
setState(() {}); child: Container(
}, color: Colors.white,
(index) { child: TabBar(
categoryId = gooodsCategorys[index].id; isScrollable: true,
pageNum = 1; //
setState(() {}); indicatorColor: Color(0xff39B54A),
}, labelColor: Color(0xff32A060),
), labelStyle: TextStyle(
fontSize: 14.sp,
///, fontWeight: FontWeight.bold,
pointList() ),
], unselectedLabelStyle: TextStyle(
), fontSize: 14.sp,
) fontWeight: MyFontWeight.regular,
], ),
); // controller: tabController,
}, //
unselectedLabelColor: Color(0xff4D4D4D),
indicatorSize: TabBarIndicatorSize.label,
//
tabs: gooodsCategorys == null
? []
: gooodsCategorys
.map((e) => MyTab(text: e.name))
.toList(),
onTap: (index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
creditGoods();
setState(() {});
},
),
), ),
), ),
), ),
), ),
), ];
], },
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: true,
physics: ClampingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: _onRefresh,
child: Container(
color: Colors.white,
padding: EdgeInsets.only(top: 19.h),
child: pointList(),
)),
), ),
); );
} }
@ -347,8 +376,9 @@ class _WelfareExchange extends State<WelfareExchange> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Navigator.of(context).pushNamed('/router/integral_detailed_page'); Navigator.of(context)
.pushNamed('/router/integral_detailed_page');
}, },
child: Row( child: Row(
children: [ children: [
@ -368,7 +398,7 @@ class _WelfareExchange extends State<WelfareExchange> {
color: Color(0xFF32A060), color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child:Icon( child: Icon(
Icons.keyboard_arrow_right, Icons.keyboard_arrow_right,
size: 20, size: 20,
color: Colors.white, color: Colors.white,
@ -390,7 +420,9 @@ class _WelfareExchange extends State<WelfareExchange> {
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox(width: 6,), SizedBox(
width: 6,
),
Image.asset( Image.asset(
"assets/image/icon_gold_coin.webp", "assets/image/icon_gold_coin.webp",
width: 18, width: 18,
@ -406,47 +438,49 @@ class _WelfareExchange extends State<WelfareExchange> {
); );
} }
Widget pointList(){ Widget pointList() {
return Container( return Container(
child: (goods == null || goods.length == 0)? NoDataView( child: (goods == null || goods.length == 0)
src: "assets/image/xiao_fei.webp", ? NoDataView(
isShowBtn: false, src: "assets/image/xiao_fei.webp",
text: "当前分类暂无商品", isShowBtn: false,
fontSize: 16.sp, text: "当前分类暂无商品",
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), fontSize: 16.sp,
):GridView.builder( margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
itemCount:goods == null ? 0 : goods.length, )
padding: EdgeInsets.only( : GridView.builder(
left: 16.w, itemCount: goods == null ? 0 : goods.length,
right: 16.w, padding: EdgeInsets.only(
top: 18.h, left: 16.w,
bottom: 16.h, right: 16.w,
), top: 18.h,
shrinkWrap: true, bottom: 16.h,
physics: BouncingScrollPhysics(), ),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( shrinkWrap: true,
//Widget数量 physics: BouncingScrollPhysics(),
crossAxisCount: 2, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
//Widget之间间距 //Widget数量
crossAxisSpacing: 11.w, crossAxisCount: 2,
//Widget之间间距 //Widget之间间距
mainAxisSpacing: 16.w, crossAxisSpacing: 11.w,
//Widget宽高比例 0.59 //Widget之间间距
childAspectRatio: mainAxisSpacing: 16.w,
200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)), //Widget宽高比例 0.59
), childAspectRatio:
itemBuilder: (context, index) { 200 / (266 / 2 + (266 / 2) * AppUtils.textScale(context)),
return GestureDetector( ),
onTap: () { itemBuilder: (context, index) {
Navigator.of(context).pushNamed( return GestureDetector(
'/router/integral_store_page', onTap: () {
arguments: {"goodsId": goods[index].id}, Navigator.of(context).pushNamed(
); '/router/integral_store_page',
}, arguments: {"goodsId": goods[index].id},
child: pointItem(goods[index]), );
); },
}, child: pointItem(goods[index]),
), );
},
),
); );
} }
@ -490,10 +524,8 @@ class _WelfareExchange extends State<WelfareExchange> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
right: 12.w, right: 12.w,
top: 10.h, top: 10.h,
),padding: EdgeInsets.only( ),
bottom: 8.h, padding: EdgeInsets.only(bottom: 8.h, left: 8.w),
left: 8.w
),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -501,7 +533,7 @@ class _WelfareExchange extends State<WelfareExchange> {
Text( Text(
goods.name, goods.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
height: 1.2, height: 1.2,
@ -511,7 +543,7 @@ class _WelfareExchange extends State<WelfareExchange> {
), ),
Spacer(), Spacer(),
Text( Text(
pointPrice(goods), pointPrice(goods),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
@ -532,17 +564,21 @@ class _WelfareExchange extends State<WelfareExchange> {
); );
} }
String pointPrice(Goods goods){ String pointPrice(Goods goods) {
if(goods == null) if (goods == null) return "";
return ""; if (goods?.onePrice != null && goods?.onePrice != "0") {
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice); return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){ } else if ((goods?.onePrice == null || goods?.onePrice == "0") &&
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}"); ((goods?.price != null && goods?.price != "0") ||
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){ (goods?.money != null && goods?.money != "0.00"))) {
return (goods?.price == "0" || goods?.price == null
? ""
: S.of(context).jifen_(goods?.price)) +
(goods?.money == "0" || goods?.money == null
? ""
: " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}");
} else if (goods.oneMoney != null && goods.oneMoney != "0.00") {
return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}"; return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}";
} }
} }
} }

13
lib/home/welfare_page.dart

@ -755,7 +755,14 @@ class _WelfarePage extends State<WelfarePage> {
), ),
), ),
SizedBox(height: 12,), SizedBox(height: 12,),
GridView.builder( (goods == null || goods.length == 0)? NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
text: "暂无商品可兑换",
fontSize: 16.sp,
margin: EdgeInsets.all(60.h),
)
:GridView.builder(
itemCount:goods.length>6?6:goods.length, itemCount:goods.length>6?6:goods.length,
padding: EdgeInsets.only( padding: EdgeInsets.only(
// left: 16.w, // left: 16.w,
@ -774,7 +781,7 @@ class _WelfarePage extends State<WelfarePage> {
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
//Widget宽高比例 0.59 //Widget宽高比例 0.59
childAspectRatio: childAspectRatio:
200 / (286 / 2 + (286 / 2) * AppUtils.textScale(context)), 200 / (266 / 2 + (266 / 2) * AppUtils.textScale(context)),
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return GestureDetector( return GestureDetector(
@ -844,7 +851,7 @@ class _WelfarePage extends State<WelfarePage> {
Text( Text(
goods.name, goods.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
height: 1.2, height: 1.2,

44
lib/integral/integral_detailed_page.dart

@ -155,30 +155,30 @@ class _IntegralDetailedPage extends State<IntegralDetailedPage>
leadingWidth: 56, leadingWidth: 56,
flexibleSpace: FlexibleSpaceBar( flexibleSpace: FlexibleSpaceBar(
background: Container( background: Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(top: 56.h), margin: EdgeInsets.only(top: 56.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
userInfo != null ? userInfo.points : "0", userInfo != null ? userInfo.points : "0",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
fontSize: 48.sp), fontSize: 48.sp),
), ),
Text( Text(
S.of(context).wodejifenzhi, S.of(context).wodejifenzhi,
style: TextStyle( style: TextStyle(
color: Color(0xFFF2F2F2), color: Color(0xFFF2F2F2),
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular), fontWeight: MyFontWeight.regular),
), ),
], ],
),
), ),
), ),
),
expandedHeight: 228, expandedHeight: 228,
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size(double.infinity, 38), preferredSize: Size(double.infinity, 38),

122
lib/mine/mine_page.dart

@ -195,9 +195,13 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
// alignment: Alignment.centerRight, // alignment: Alignment.centerRight,
children: [ children: [
Container( Container(
height: 317, height: 502.h,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF32A060) // color: Color(0xFF32A060)
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage("assets/image/settlement_bg.webp"),
),
), ),
), ),
FutureBuilder( FutureBuilder(
@ -205,68 +209,52 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
builder: (context, snapshot) { builder: (context, snapshot) {
return Column( return Column(
children: [ children: [
Stack(
children: [ ///
Container( MineView(
child: Column( userInfo,
children: [ () {
/// _toUserInfo();
MineView( },
userInfo, () {
() { toIntegralPage();
_toUserInfo(); },
}, (){
() { setState(() {
toIntegralPage(); totalMsg =0;
}, });
(){ },
setState(() { totalMsg,
totalMsg =0; infoNumber
}); ),
},
totalMsg, /// VIP等级信息
infoNumber MineVipEntry(
), tag: "vip",
ranks: ranks,
/// VIP等级信息 userInfo: userInfo,
MineVipEntry( rank: double.tryParse(
tag: "vip", userInfo?.expendAmount ?? "0")
ranks: ranks, .toInt(),
userInfo: userInfo, rankMax:
rank: double.tryParse( userInfo?.memberRankVo?.nextOrigin ?? 0,
userInfo?.expendAmount ?? "0") createTime: userInfo?.createTime ?? "",
.toInt(), ),
rankMax:
userInfo?.memberRankVo?.nextOrigin ?? 0, ///
createTime: userInfo?.createTime ?? "", MineOrderView(),
),
///广
], spreadImage(),
),
), /// item
Container( MineItem(),
margin: EdgeInsets.only(top: 258.h),
child: Column( ///
children: [ attainment(),
///
MineOrderView(), ///绿
MineCalendar()
///广
spreadImage(),
/// item
MineItem(),
///
attainment(),
///绿
MineCalendar()
],
),
)
],
)
// ///// // /////
// attention(), // attention(),
@ -298,8 +286,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
); );
}, },
child:Container( child:Container(
margin: EdgeInsets.only(left:14,right:14,bottom:10), margin: EdgeInsets.only(left:16.w,right:16.w,bottom:15.h),
padding: EdgeInsets.only(left:12, top:12, right:10,bottom: 12), padding: EdgeInsets.only(left:12.w, top:12.h, right:10.w,bottom: 17.h),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -395,7 +383,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
///广 ///广
Widget spreadImage() { Widget spreadImage() {
return Container( return Container(
margin: EdgeInsets.only(right:14.w,bottom:10.h,left: 14.w), margin: EdgeInsets.only(right:14.w,bottom:15.h,left: 14.w),
child: GestureDetector( child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/invite_friends'); Navigator.of(context).pushNamed('/router/invite_friends');

4
lib/mine/mine_view/mine_calendar.dart

@ -15,7 +15,7 @@ class _MineCalendar extends State<MineCalendar> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(14.w, 20.h, 14.w, 30.h), margin: EdgeInsets.fromLTRB(14.w, 0.h, 14.w, 30.h),
padding: EdgeInsets.only(top: 12.h,left: 12,), padding: EdgeInsets.only(top: 12.h,left: 12,),
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Colors.white, // color: Colors.white,
@ -41,7 +41,7 @@ class _MineCalendar extends State<MineCalendar> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/mine_greenery'); // Navigator.of(context).pushNamed('/router/mine_greenery');
}, },
child: Row( child: Row(
children: [ children: [

10
lib/mine/mine_view/mine_item.dart

@ -20,7 +20,7 @@ class _MineItem extends State<MineItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 20.h, 16.w, 30.h), margin: EdgeInsets.fromLTRB(16.w,0.h, 16.w, 15.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,
@ -38,13 +38,13 @@ class _MineItem extends State<MineItem> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 16,top:16,bottom:4,right: 16), padding: EdgeInsets.only(left: 16,top:16,bottom:13,right: 16),
child:Text( child:Text(
"其他", "其他",
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp, fontSize: 15.sp,
), ),
), ),
), ),
@ -223,7 +223,7 @@ class _MineItem extends State<MineItem> {
// ),), // ),),
], ],
), ),
SizedBox(height: 10.h,), SizedBox(height: 12.h,),
if(isShowMore) if(isShowMore)
Row( Row(
children: [ children: [
@ -314,7 +314,7 @@ class _MineItem extends State<MineItem> {
], ],
), ),
if(isShowMore) if(isShowMore)
SizedBox(height: 10.h,), SizedBox(height: 12.h,),
if(isShowMore) if(isShowMore)
Row( Row(
children: [ children: [

6
lib/mine/mine_view/mine_order.dart

@ -16,7 +16,7 @@ class _MineOrderView extends State<MineOrderView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(left:14, bottom:30, right:14), margin: EdgeInsets.only(left:14, bottom:15, right:14),
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,
@ -40,11 +40,11 @@ class _MineOrderView extends State<MineOrderView> {
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp, fontSize: 15.sp,
), ),
), ),
), ),
SizedBox(height: 8.h,), SizedBox(height: 10.h,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

34
lib/mine/mine_view/mine_view.dart

@ -67,13 +67,13 @@ class _MineView extends State<MineView> {
return Column( return Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 28.w), margin: EdgeInsets.only(top: 29.h),
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Container( Container(
height: 24, height: 24.h,
alignment: Alignment.center, alignment: Alignment.center,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
@ -82,23 +82,23 @@ class _MineView extends State<MineView> {
}); });
}, },
child: Container( child: Container(
height: 24, height: 24.h,
alignment:Alignment.center, alignment:Alignment.center,
child:Stack( child:Stack(
children: [ children: [
Image.asset( Image.asset(
"assets/image/icon_notices.webp", "assets/image/icon_notices.webp",
width:32.w, width:32,
height: 32.h, height: 32,
color: Colors.white, color: Colors.white,
), ),
if(widget.totalMsg != 0) if(widget.totalMsg != 0)
Container( Container(
width:36, width:36.w,
alignment: Alignment.topRight, alignment: Alignment.topRight,
child:Container( child:Container(
width:22, width:22.w,
height:14, height:14.h,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100), borderRadius: BorderRadius.circular(100),
border: Border.all( border: Border.all(
@ -131,8 +131,8 @@ class _MineView extends State<MineView> {
padding: EdgeInsets.all(8.h), padding: EdgeInsets.all(8.h),
child: Image.asset( child: Image.asset(
"assets/image/icon_scan_qr_code.webp", "assets/image/icon_scan_qr_code.webp",
width:32.w, width:32,
height: 32.h, height: 32,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -146,8 +146,8 @@ class _MineView extends State<MineView> {
margin: EdgeInsets.only(right: 12.w), margin: EdgeInsets.only(right: 12.w),
child: Image.asset( child: Image.asset(
"assets/image/icon_mine_setting.webp", "assets/image/icon_mine_setting.webp",
width: 32.w, width: 32,
height: 32.h, height: 32,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -259,8 +259,8 @@ class _MineView extends State<MineView> {
right: 2.w, right: 2.w,
child: Image.asset( child: Image.asset(
"assets/image/icon_mine_edit.webp", "assets/image/icon_mine_edit.webp",
width: 17.w, width: 17,
height: 17.w, height: 17,
), ),
), ),
], ],
@ -373,7 +373,7 @@ class _MineView extends State<MineView> {
widget.toIntegralPage(); widget.toIntegralPage();
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 4, bottom: 4, right: 16,left: 7), padding: EdgeInsets.only(top: 4.h, bottom: 4.h, right: 16.w,left: 7.w),
margin: EdgeInsets.only(right: 14.w), margin: EdgeInsets.only(right: 14.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@ -384,8 +384,8 @@ class _MineView extends State<MineView> {
children: [ children: [
Image.asset( Image.asset(
"assets/image/icon_gold_coin.webp", "assets/image/icon_gold_coin.webp",
width: 16.w, width: 16,
height: 16.h, height: 16,
), ),
Text( Text(
"天天领积分", "天天领积分",

2
lib/mine/recharge_page.dart

@ -558,7 +558,7 @@ class _RechargePage extends State<RechargePage> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"充值说明", "充值说明",

627
lib/store/store_order.dart

@ -22,9 +22,8 @@ import 'package:huixiang/store/store_view/shop_car.dart';
import 'package:huixiang/store/store_view/store_activity.dart'; import 'package:huixiang/store/store_view/store_activity.dart';
import 'package:huixiang/store/store_view/store_info.dart'; import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/store/store_view/store_order_list.dart'; import 'package:huixiang/store/store_view/store_order_list.dart';
import 'package:huixiang/union/union_view/union_coupon.dart';
import 'package:huixiang/union/union_view/vip.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_tab.dart'; import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/receive_success.dart';
@ -60,6 +59,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
String tenant = ""; String tenant = "";
String storeId = ""; String storeId = "";
int numberOfPeople = 0; int numberOfPeople = 0;
///token ///token
String minToken; String minToken;
String pName; String pName;
@ -138,11 +138,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
queryMemberInfo() async { queryMemberInfo() async {
BaseData baseData = await minService.memberInfo() BaseData baseData = await minService.memberInfo().catchError((error) {
.catchError((error){debugPrint(error);}); debugPrint(error);
});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SharedPreferences.getInstance().then( SharedPreferences.getInstance().then(
(value) => { (value) => {
value.setString('minMember', jsonEncode(baseData.data)), value.setString('minMember', jsonEncode(baseData.data)),
}, },
); );
@ -151,8 +152,10 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
getParentInfo() async { getParentInfo() async {
BaseData baseData = await minService.getParentInfo("$tableId") BaseData baseData =
.catchError((error) {debugPrint(error);}); await minService.getParentInfo("$tableId").catchError((error) {
debugPrint(error);
});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
if (baseData.data != null) { if (baseData.data != null) {
parentId = baseData.data["id"]; parentId = baseData.data["id"];
@ -183,7 +186,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
queryStoreInfo() async { queryStoreInfo() async {
BaseData baseData = await apiService.queryStoreInfo(storeId).catchError((error) { BaseData baseData =
await apiService.queryStoreInfo(storeId).catchError((error) {
debugPrint(error); debugPrint(error);
}); });
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
@ -203,217 +207,233 @@ class _StoreOrderPage extends State<StoreOrderPage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return WillPopScope(
color: Colors.white, onWillPop: () async {
child: Stack( if (dialogShowing) {
children: [ debugPrint("ssssasdadsasdadasd");
Positioned( SmartDialog.dismiss();
left: 0, return false;
right: 0, } else {
top: 0, return true;
bottom: 54.h, }
child: NestedScrollView( },
controller: controller, child:Container(
dragStartBehavior: DragStartBehavior.start, color: Colors.white,
physics: BouncingScrollPhysics(), child: Stack(
headerSliverBuilder: (BuildContext context, bool innerScrolled) { children: [
return [ Positioned(
SliverOverlapAbsorber( left: 0,
handle: NestedScrollView.sliverOverlapAbsorberHandleFor( right: 0,
context), top: 0,
sliver: SliverAppBar( bottom: 54.h,
expandedHeight: (storeInfo != null && child: NestedScrollView(
storeInfo.couponVOList != null) controller: controller,
? 400.h dragStartBehavior: DragStartBehavior.start,
: 395.h, physics: BouncingScrollPhysics(),
floating: false, headerSliverBuilder:
snap: false, (BuildContext context, bool innerScrolled) {
pinned: true, return [
stretch: false, SliverOverlapAbsorber(
brightness: Brightness.light, handle: NestedScrollView
leading: GestureDetector( .sliverOverlapAbsorberHandleFor(context),
behavior: HitTestBehavior.opaque, sliver: SliverAppBar(
onTap: () { expandedHeight: (storeInfo != null &&
Navigator.of(context).pop(); storeInfo.couponVOList != null)
}, ? 400.h
child: Container( : 395.h,
width: double.infinity, floating: false,
height: double.infinity, snap: false,
color: Colors.transparent, pinned: true,
alignment: Alignment.centerRight, stretch: false,
margin: EdgeInsets.only(left: 10.w), brightness: Brightness.light,
padding: EdgeInsets.all(10.h), leading: GestureDetector(
child: Icon( behavior: HitTestBehavior.opaque,
Icons.arrow_back_ios, onTap: () {
color: Colors.black, Navigator.of(context).pop();
size: 24, },
), child: Container(
), width: double.infinity,
), height: double.infinity,
flexibleSpace: FlexibleSpaceBar( color: Colors.transparent,
title: Title(controller, alignment: Alignment.centerRight,
storeInfo != null ? storeInfo.storeName : ''), margin: EdgeInsets.only(left: 10.w),
collapseMode: CollapseMode.pin, padding: EdgeInsets.all(10.h),
stretchModes: [ child: Icon(
StretchMode.zoomBackground, Icons.arrow_back_ios,
StretchMode.fadeTitle, color: Colors.black,
StretchMode.blurBackground, size: 24,
], ),
background: Container( ),
decoration: BoxDecoration( ),
color: Colors.white, flexibleSpace: FlexibleSpaceBar(
borderRadius: BorderRadius.circular(8.w), title: Title(
), controller,
child: Stack( storeInfo != null
children: [ ? storeInfo.storeName
Positioned( : ''),
child: Column( collapseMode: CollapseMode.pin,
stretchModes: [
StretchMode.zoomBackground,
StretchMode.fadeTitle,
StretchMode.blurBackground,
],
background: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
child: Stack(
children: [ children: [
buildSwiper(), Positioned(
Expanded( child: Column(
children: [
buildSwiper(),
Expanded(
child: Container(
color: Colors.transparent,
),
flex: 1,
),
],
),
top: 0,
bottom: 0,
left: 0,
right: 0,
),
Positioned(
child: Container( child: Container(
color: Colors.transparent, decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(8.w),
),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
///
StoreInfoView(storeInfo),
// Padding(padding:EdgeInsets.only(left: 14.w),
// child: Text(
// S.of(context).diandan,
// style: TextStyle(
// fontWeight: MyFontWeight.bold,
// fontSize: 15.sp,
// color: Color(0xFF000000),
// ),
// ),),
// Container(
// width:22.w,
// height: 3.h,
// color: Color(0xFF32A060),
// margin: EdgeInsets.only(top: 5.h,left: 14.w),
// ),
// ///
// if (storeInfo != null &&
// storeInfo.couponVOList != null)
// UnionCoupon(
// storeInfo,
// _receiveCoupon,
// coupon: true,
// ),
//
// if (storeInfo == null ||
// storeInfo.couponVOList == null)
// SizedBox(
// height: 8,
// ),
//
// ///VIP信息
// Vip(storeInfo, () {}, false),
],
),
), ),
flex: 1, top: 233.h,
bottom: 0,
left: 0,
right: 0,
), ),
], ],
), ),
top: 0,
bottom: 0,
left: 0,
right: 0,
), ),
Positioned( ),
child: Container( backgroundColor: Color(0x33FAFAFA),
decoration: BoxDecoration( centerTitle: false,
color: Colors.white, elevation: 0,
borderRadius: BorderRadius.circular(8.w), bottom: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width,
38.h,
),
child: Container(
padding:
EdgeInsets.symmetric(horizontal: 10.w),
width: MediaQuery.of(context).size.width,
child: TabBar(
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,
indicatorWeight: 3,
indicatorColor: Color(0xFF32A060),
labelPadding: EdgeInsets.only(
left: 8.w,
right: 8.w,
),
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 15.sp,
fontWeight: FontWeight.w400,
), ),
child: Column( labelStyle: TextStyle(
mainAxisAlignment: MainAxisAlignment.start, color: Colors.black,
crossAxisAlignment: CrossAxisAlignment.start, fontSize: 18.sp,
children: [ fontWeight: FontWeight.bold,
///
StoreInfoView(storeInfo),
// Padding(padding:EdgeInsets.only(left: 14.w),
// child: Text(
// S.of(context).diandan,
// style: TextStyle(
// fontWeight: MyFontWeight.bold,
// fontSize: 15.sp,
// color: Color(0xFF000000),
// ),
// ),),
// Container(
// width:22.w,
// height: 3.h,
// color: Color(0xFF32A060),
// margin: EdgeInsets.only(top: 5.h,left: 14.w),
// ),
// ///
// if (storeInfo != null &&
// storeInfo.couponVOList != null)
// UnionCoupon(
// storeInfo,
// _receiveCoupon,
// coupon: true,
// ),
//
// if (storeInfo == null ||
// storeInfo.couponVOList == null)
// SizedBox(
// height: 8,
// ),
//
// ///VIP信息
// Vip(storeInfo, () {}, false),
],
), ),
labelColor: Colors.black,
tabs: [
MyTab(text: S.of(context).diandan),
// MyTab(text: ""),
],
), ),
top:233.h,
bottom: 0,
left: 0,
right: 0,
), ),
],
),
),
),
backgroundColor: Color(0x33FAFAFA),
centerTitle: false,
elevation: 0,
bottom: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width,
38.h,
),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
width: MediaQuery.of(context).size.width,
child: TabBar(
controller: tabcontroller,
automaticIndicatorColorAdjustment: true,
isScrollable: true,
indicatorWeight: 3,
indicatorColor: Color(0xFF32A060),
labelPadding: EdgeInsets.only(
left: 8.w,
right: 8.w,
), ),
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 15.sp,
fontWeight: FontWeight.w400,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
labelColor: Colors.black,
tabs: [
MyTab(text: S.of(context).diandan),
// MyTab(text: ""),
],
), ),
), ),
), ];
), },
), body:
]; ///
}, TabBarView(
body: physics: NeverScrollableScrollPhysics(),
/// children: [
TabBarView( ///
physics: NeverScrollableScrollPhysics(), StoreOrderListPage(
children: [ widget.arguments,
/// activitys,
StoreOrderListPage( storeInfo,
widget.arguments, shopCarGoods,
activitys, controller,
storeInfo, minToken,
shopCarGoods, tenant,
controller, _queryMiNiDetail, () {
minToken, queryShopCar().then((value) {
tenant, this.shopCarGoods = value;
_queryMiNiDetail, setState(() {});
(){ });
queryShopCar().then((value) { }),
this.shopCarGoods = value;
setState(() {});
});
}
),
///, ///,
// StoreActivity( // StoreActivity(
// widget.arguments, // widget.arguments,
// activitys, // activitys,
// ), // ),
], ],
controller: tabcontroller, controller: tabcontroller,
), ),
), /*SmartRefresher( ), /*SmartRefresher(
controller: refreshController = controller: refreshController =
RefreshController(initialRefresh: false), RefreshController(initialRefresh: false),
enablePullDown: true, enablePullDown: true,
@ -425,104 +445,106 @@ class _StoreOrderPage extends State<StoreOrderPage>
}, },
child: child:
),*/ ),*/
), ),
// if(count() != 0) // if(count() != 0)
Positioned( Positioned(
bottom: 30, bottom: 30,
left: 0, left: 0,
right: 0, right: 0,
child: Stack( child: Stack(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 14),
height: 45.h,
// color: Color(0xFFFAFAFA),
decoration: BoxDecoration(
color: Color(0xFF383A38),
borderRadius: BorderRadius.circular(100),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
SizedBox(width:45.w,), Container(
Text.rich( margin: EdgeInsets.symmetric(horizontal: 14),
TextSpan(children: [ height: 45.h,
TextSpan( // color: Color(0xFFFAFAFA),
text: "", decoration: BoxDecoration(
style: TextStyle( color: Color(0xFF383A38),
fontSize: 12.sp, borderRadius: BorderRadius.circular(100),
color: Color(0xFFFFFFFF), ),
fontWeight: MyFontWeight.bold), child: Row(
), mainAxisAlignment: MainAxisAlignment.spaceAround,
TextSpan( crossAxisAlignment: CrossAxisAlignment.center,
text: children: [
shopCarGoods != null ? shopCarGoods.cartSum : "0.0", SizedBox(
style: TextStyle( width: 45.w,
fontSize: 20.sp, ),
color: Color(0xFFFFFFFF), Text.rich(
fontWeight: MyFontWeight.semi_bold), TextSpan(children: [
), TextSpan(
]), text: "",
), style: TextStyle(
Spacer(), fontSize: 12.sp,
GestureDetector( color: Color(0xFFFFFFFF),
onTap: () { fontWeight: MyFontWeight.bold),
toDownOrder(); ),
}, TextSpan(
child: RoundButton( text: shopCarGoods != null
width: 103.w, ? shopCarGoods.cartSum
height: 54.h, : "0.0",
text: S.current.jiesuan, style: TextStyle(
textColor: Colors.white, fontSize: 20.sp,
fontWeight: MyFontWeight.bold, color: Color(0xFFFFFFFF),
backgroup: Color(0xFF32A060), fontWeight: MyFontWeight.semi_bold),
radius: 100, ),
fontSize: 16.sp, ]),
padding: EdgeInsets.symmetric(vertical: 5.h), ),
Spacer(),
GestureDetector(
onTap: () {
toDownOrder();
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
textColor: Colors.white,
fontWeight: MyFontWeight.bold,
backgroup: Color(0xFF32A060),
radius: 100,
fontSize: 16.sp,
padding:
EdgeInsets.symmetric(vertical: 5.h),
),
),
],
), ),
), ),
Stack(
children: [
InkWell(
onTap: () {
if (count() != 0) showShoppingCart();
},
child: Image.asset(
"assets/image/shopping_bag.webp",
width: 66,
height: 66,
fit: BoxFit.fitWidth,
),
),
if (count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
),
),
],
),
], ],
), ),
), ),
Stack(
children: [
InkWell(
onTap: () {
if(count() != 0)
showShoppingCart();
},
child: Image.asset(
"assets/image/shopping_bag.webp",
width: 66,
height: 66,
fit: BoxFit.fitWidth,
),
),
if(count() != 0)
Positioned(
right: 5,
// top: 14,
child: RoundButton(
width: 17.w,
height: 17.h,
text: "${count()}",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFF65720),
fontSize: 12.sp,
radius: 100,
),
),
],
),
], ],
), )));
),
],
),
);
} }
/// ///
@ -635,7 +657,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
? storeInfo.bannerList[position].imgUrl ? storeInfo.bannerList[position].imgUrl
: "", : "",
height: 230.h, height: 230.h,
width:double.infinity, width: double.infinity,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.zero, radius: BorderRadius.zero,
errorSrc: "assets/image/default_2_1.webp", errorSrc: "assets/image/default_2_1.webp",
@ -687,12 +709,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
/// ///
_queryMiNiDetail(String id, int count) async { _queryMiNiDetail(String id, int count) async {
EasyLoading.show(status: S.current.zhengzaijiazai); EasyLoading.show(status: S.current.zhengzaijiazai);
if(count < 0){ if (count < 0) {
shopCarGoods.shoppingCartSkuItemList.forEach((element) { shopCarGoods.shoppingCartSkuItemList.forEach((element) {
if(element.productId == id){ if (element.productId == id) {
shopCartReduce(element); shopCartReduce(element);
setState(() { setState(() {});
});
} }
}); });
return; return;
@ -782,8 +803,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
this.shopCarGoods = value; this.shopCarGoods = value;
setState(() {}); setState(() {});
}); });
} } else {
else {
SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center); SmartDialog.showToast(baseDate?.msg, alignment: Alignment.center);
} }
} }
@ -854,8 +874,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
if (shopCartKey?.currentState != null) { if (shopCartKey?.currentState != null) {
shopCartKey.currentState.setState(() {}); shopCartKey.currentState.setState(() {});
} }
setState(() { setState(() {});
});
} }
return this.shopCarGoods; return this.shopCarGoods;
} }

7
lib/union/union_list.dart

@ -49,7 +49,7 @@ class _UnionList extends State<UnionList> {
itemCount:widget.storeList == null ? 0 : widget.storeList.length, itemCount:widget.storeList == null ? 0 : widget.storeList.length,
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 8.h, top: 8.h,
bottom: 84.h, /* + (375.h - 88.h) + 4.h*/ bottom: 100.h, /* + (375.h - 88.h) + 4.h*/
), ),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) { itemBuilder: (context, position) {
@ -142,8 +142,7 @@ class _UnionList extends State<UnionList> {
Widget buildStoreItem(Store store, position) { Widget buildStoreItem(Store store, position) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h), margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 12.h),
// padding: EdgeInsets.fromLTRB(20.w, 20.h, 20.w, 20.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(8)),
@ -186,7 +185,7 @@ class _UnionList extends State<UnionList> {
Positioned( Positioned(
bottom: 16.h, bottom: 16.h,
left: 12.w, left: 12.w,
right: 0, right: 12.w,
child: Container( child: Container(
height: 100.h, height: 100.h,
child: Row( child: Row(

4
lib/union/union_page.dart

@ -242,10 +242,10 @@ class UnionPageState extends State<UnionPage>
); );
} }
BaseData<List<Store>> baseData = await apiService.queryStore({ BaseData<List<Store>> baseData = await apiService.queryStore({
"city": city, // "city": city,
// "district": district, // "district": district,
// "province": province, // "province": province,
// "latitude": latitude, "latitude": latitude,
"longitude": longitude, "longitude": longitude,
"searchKey": searchKey, "searchKey": searchKey,
"serviceType": (tabController.index == 0 && index == -1) || index == 0 "serviceType": (tabController.index == 0 && index == -1) || index == 0

14
lib/view_widget/mine_vip_entry.dart

@ -70,15 +70,11 @@ class MineVipEntry extends StatelessWidget {
Widget widget = Container( Widget widget = Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(top: 12.h, bottom: 35.h, left: 12.w, right: 12.w), padding: EdgeInsets.only(top: 12.h, bottom: 22.h, left: 12.w, right: 12.w),
// margin: EdgeInsets.symmetric(horizontal: 14), margin: EdgeInsets.only(top: 23.h,left: 16.w,right: 16.w,bottom:15.h),
margin: EdgeInsets.only(top: 15.h,left: 14.w,right: 14.w,bottom:15.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF3D3D5D), color: Color(0xFF3D3D5D),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.circular(6),
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -100,7 +96,7 @@ class MineVipEntry extends StatelessWidget {
height: 24, height: 24,
), ),
SizedBox( SizedBox(
width: 4.w, width: 5.w,
), ),
Expanded( Expanded(
child: Text( child: Text(
@ -128,7 +124,7 @@ class MineVipEntry extends StatelessWidget {
], ],
), ),
SizedBox( SizedBox(
height: 14.h, height: 16.h,
), ),
Container( Container(
height: 4.h, height: 4.h,

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.0.8+7 version: 2.0.9+8
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save