Browse Source

vip页面更改

dart3_last
wurong 2 years ago
parent
commit
8b13d81410
  1. 33
      lib/community/headlines/headlines_column_details.dart
  2. 4
      lib/home/home_view/discount_zone.dart
  3. 166
      lib/home/home_view/shortcut_operation.dart
  4. 6
      lib/order/order_detail_page.dart
  5. 8
      lib/retrofit/data/vip_card_home.dart
  6. 22
      lib/vip/vip_view/vip_goods_discount.dart

33
lib/community/headlines/headlines_column_details.dart

@ -395,7 +395,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
Text( Text(
articles?.mainTitle ?? "", articles?.mainTitle ?? "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 2,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
height: 1.2.h, height: 1.2.h,
@ -408,7 +408,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
child: Text( child: Text(
articles?.viceTitle ?? "", articles?.viceTitle ?? "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 3, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
height: 1.2.h, height: 1.2.h,
@ -420,18 +420,18 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( // Expanded(
child: Text( // child: Text(
articles?.author?.name ?? "", // articles?.author?.name ?? "",
overflow: TextOverflow.ellipsis, // overflow: TextOverflow.ellipsis,
maxLines: 1, // maxLines: 1,
style: TextStyle( // style: TextStyle(
fontSize: 12.sp, // fontSize: 12.sp,
fontWeight: MyFontWeight.medium, // fontWeight: MyFontWeight.medium,
color: Color(0xFF8E8E8E), // color: Color(0xFF8E8E8E),
), // ),
), // ),
), // ),
SizedBox(width: 8), SizedBox(width: 8),
Image.asset( Image.asset(
"assets/image/browse.webp", "assets/image/browse.webp",
@ -448,14 +448,15 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
color: Color(0xFF8D8D8D), color: Color(0xFF8D8D8D),
), ),
)), )),
Expanded(child:
Text( Text(
articles?.createTime ?? "", articles?.createTime?.split(":")[0] ?? "",
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFF8D8D8D), color: Color(0xFF8D8D8D),
), ),
), ),)
], ],
), ),
], ],

4
lib/home/home_view/discount_zone.dart

@ -62,7 +62,7 @@ class _DiscountZone extends State<DiscountZone> {
),), ),),
if(widget.coupon.length != 0) if(widget.coupon.length != 0)
Container( Container(
height: 120.h, height: 108.h,
margin: EdgeInsets.only(top: 10.h), margin: EdgeInsets.only(top: 10.h),
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
@ -87,7 +87,7 @@ class _DiscountZone extends State<DiscountZone> {
Widget discountItem(Coupon coupon) { Widget discountItem(Coupon coupon) {
return Container( return Container(
width: 290.w, width: 290.w,
height: 120.h, height: 108.h,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,

166
lib/home/home_view/shortcut_operation.dart

@ -60,38 +60,37 @@ class _ShortcutOperation extends State<ShortcutOperation> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Expanded(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
S.of(context).main_menu2, Text(
style: TextStyle( S.of(context).main_menu2,
fontWeight: MyFontWeight.semi_bold, style: TextStyle(
fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold,
color: Colors.black, fontSize: 14.sp,
color: Colors.black,
),
), ),
), SizedBox(height: 5.h),
SizedBox(height: 5.h), Text(
Text( S.of(context).xiadanzhuanjifen,
S.of(context).xiadanzhuanjifen, style: TextStyle(
style: TextStyle( fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, fontSize: 12.sp,
fontSize: 12.sp, color: Color(0xff4D4D4D),
color: Color(0xff4D4D4D), ),
), ),
), ],
],
),
SizedBox(width:16.w),
Expanded(
child: Image.asset(
"assets/image/home_lm.webp",
width: 24.w,
height: 31.h,
fit: BoxFit.fill,
), ),
), ),
Image.asset(
"assets/image/home_lm.webp",
width: 24.w,
height: 31.h,
fit: BoxFit.fill,
),
], ],
), ),
), ),
@ -121,38 +120,37 @@ class _ShortcutOperation extends State<ShortcutOperation> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Expanded(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
S.of(context).chongzhi, Text(
style: TextStyle( S.of(context).chongzhi,
fontWeight: MyFontWeight.semi_bold, style: TextStyle(
fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold,
color: Colors.black, fontSize: 14.sp,
color: Colors.black,
),
), ),
), SizedBox(height: 5.h),
SizedBox(height: 5.h), Text(
Text( S.of(context).chongzhifuliduo,
S.of(context).chongzhifuliduo, style: TextStyle(
style: TextStyle( fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, fontSize: 12.sp,
fontSize: 12.sp, color: Color(0xff4D4D4D),
color: Color(0xff4D4D4D), ),
), ),
), ],
],
),
SizedBox(width:16.w),
Expanded(
child: Image.asset(
"assets/image/home_recharge.webp",
width: 21.w,
height: 33.h,
fit: BoxFit.fill,
), ),
), ),
Image.asset(
"assets/image/home_recharge.webp",
width: 21.w,
height: 33.h,
fit: BoxFit.fill,
)
], ],
), ),
), ),
@ -184,37 +182,35 @@ class _ShortcutOperation extends State<ShortcutOperation> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Expanded(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Text( children: [
S.of(context).fulizhongxin, Text(
style: TextStyle( S.of(context).fulizhongxin,
fontWeight: MyFontWeight.semi_bold, style: TextStyle(
fontSize: 14.sp, fontWeight: MyFontWeight.semi_bold,
color: Colors.black, fontSize: 14.sp,
color: Colors.black,
),
), ),
), SizedBox(height: 5.h),
SizedBox(height: 5.h), Text(
Text( S.of(context).tiantiandefuli,
S.of(context).tiantiandefuli, style: TextStyle(
style: TextStyle( fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, fontSize: 12.sp,
fontSize: 12.sp, color: Color(0xff4D4D4D),
color: Color(0xff4D4D4D), ),
), ),
), ],
], ),),
), Image.asset(
SizedBox(width: 16.w), "assets/image/home_welfare.webp",
Expanded( width: 22.w,
child: Image.asset( height: 35.h,
"assets/image/home_welfare.webp", fit: BoxFit.fill,
width: 22.w,
height: 35.h,
fit: BoxFit.fill,
),
), ),
], ],
), ),

6
lib/order/order_detail_page.dart

@ -225,7 +225,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
payResult(BaseData baseData) async{ payResult(BaseData baseData) async{
await queryDetails(); await queryDetails();
Future.delayed(Duration(milliseconds: 350), () { Future.delayed(Duration(milliseconds: 400), () {
EasyLoading.dismiss(); EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center); SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
}); });
@ -516,9 +516,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
.catchError((onError) {}); .catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功"); SmartDialog.showToast("订单取消成功");
Future.delayed(Duration(milliseconds: 300), () { // Future.delayed(Duration(milliseconds:450), () {
queryDetails(); queryDetails();
}); // });
} }
} }

8
lib/retrofit/data/vip_card_home.dart

@ -150,6 +150,7 @@ class ProductVips {
dynamic materialId, dynamic materialId,
String details, String details,
String thumbnailImg, String thumbnailImg,
String image,
String info, String info,
num buyCount, num buyCount,
num sellCountLimit, num sellCountLimit,
@ -190,6 +191,7 @@ class ProductVips {
_materialId = materialId; _materialId = materialId;
_details = details; _details = details;
_thumbnailImg = thumbnailImg; _thumbnailImg = thumbnailImg;
_image = image;
_info = info; _info = info;
_buyCount = buyCount; _buyCount = buyCount;
_sellCountLimit = sellCountLimit; _sellCountLimit = sellCountLimit;
@ -233,6 +235,7 @@ class ProductVips {
_materialId = json['materialId']; _materialId = json['materialId'];
_details = json['details']; _details = json['details'];
_thumbnailImg = json['thumbnailImg']; _thumbnailImg = json['thumbnailImg'];
_image = json['image'];
_info = json['info']; _info = json['info'];
_buyCount = json['buyCount']; _buyCount = json['buyCount'];
_sellCountLimit = json['sellCountLimit']; _sellCountLimit = json['sellCountLimit'];
@ -274,6 +277,7 @@ class ProductVips {
dynamic _materialId; dynamic _materialId;
String _details; String _details;
String _thumbnailImg; String _thumbnailImg;
String _image;
String _info; String _info;
num _buyCount; num _buyCount;
num _sellCountLimit; num _sellCountLimit;
@ -314,6 +318,7 @@ ProductVips copyWith({ String id,
dynamic materialId, dynamic materialId,
String details, String details,
String thumbnailImg, String thumbnailImg,
String image,
String info, String info,
num buyCount, num buyCount,
num sellCountLimit, num sellCountLimit,
@ -354,6 +359,7 @@ ProductVips copyWith({ String id,
materialId: materialId ?? _materialId, materialId: materialId ?? _materialId,
details: details ?? _details, details: details ?? _details,
thumbnailImg: thumbnailImg ?? _thumbnailImg, thumbnailImg: thumbnailImg ?? _thumbnailImg,
image:image ?? _image,
info: info ?? _info, info: info ?? _info,
buyCount: buyCount ?? _buyCount, buyCount: buyCount ?? _buyCount,
sellCountLimit: sellCountLimit ?? _sellCountLimit, sellCountLimit: sellCountLimit ?? _sellCountLimit,
@ -395,6 +401,7 @@ ProductVips copyWith({ String id,
dynamic get materialId => _materialId; dynamic get materialId => _materialId;
String get details => _details; String get details => _details;
String get thumbnailImg => _thumbnailImg; String get thumbnailImg => _thumbnailImg;
String get image => _image;
String get info => _info; String get info => _info;
num get buyCount => _buyCount; num get buyCount => _buyCount;
num get sellCountLimit => _sellCountLimit; num get sellCountLimit => _sellCountLimit;
@ -438,6 +445,7 @@ ProductVips copyWith({ String id,
map['materialId'] = _materialId; map['materialId'] = _materialId;
map['details'] = _details; map['details'] = _details;
map['thumbnailImg'] = _thumbnailImg; map['thumbnailImg'] = _thumbnailImg;
map['image'] = _image;
map['info'] = _info; map['info'] = _info;
map['buyCount'] = _buyCount; map['buyCount'] = _buyCount;
map['sellCountLimit'] = _sellCountLimit; map['sellCountLimit'] = _sellCountLimit;

22
lib/vip/vip_view/vip_goods_discount.dart

@ -85,9 +85,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommend(){ Widget vipGoodsRecommend(){
return Container( return Container(
margin: EdgeInsets.only(top: 12.h), margin: EdgeInsets.only(top: 12.h),
height: 261.h, height: 253.h,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(top: 16.h,left: 13.h), padding: EdgeInsets.only(top:20.h,left: 13.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w), borderRadius: BorderRadius.circular(6.w),
color: Colors.white, color: Colors.white,
@ -124,7 +124,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
), ),
], ],
), ),
SizedBox(height:10.h,), SizedBox(height:15.h,),
vipGoodsRecommendList(), vipGoodsRecommendList(),
], ],
), ),
@ -159,32 +159,32 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendItem(ProductVips productVips){ Widget vipGoodsRecommendItem(ProductVips productVips){
return Container( return Container(
width: 140.w, width: 130.w,
margin: EdgeInsets.only(right:13.w,left:6.w), // margin: EdgeInsets.only(right:13.w,left:6.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
MImage( MImage(
productVips.thumbnailImg ?? "", productVips.image ?? "",
width: 140.w, width: 116,
height: 145.h, height: 116,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(6), radius: BorderRadius.circular(6),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
), ),
Expanded(child: Padding(padding:EdgeInsets.only(top:10.h,bottom:7.h), Padding(padding:EdgeInsets.only(top:10.h,bottom:7.h),
child: Text( child: Text(
productVips.productName ?? "", productVips.productName ?? "",
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xff0D0D0D), color: Color(0xff0D0D0D),
fontSize:14.sp, fontSize:13.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
),), ),),
)), ),
Row( Row(
children: [ children: [
Text( Text(

Loading…
Cancel
Save