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(
articles?.mainTitle ?? "",
overflow: TextOverflow.ellipsis,
maxLines: 1,
maxLines: 2,
style: TextStyle(
fontSize: 14.sp,
height: 1.2.h,
@ -408,7 +408,7 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
child: Text(
articles?.viceTitle ?? "",
overflow: TextOverflow.ellipsis,
maxLines: 3,
maxLines: 1,
style: TextStyle(
fontSize: 12.sp,
height: 1.2.h,
@ -420,18 +420,18 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Text(
articles?.author?.name ?? "",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF8E8E8E),
),
),
),
// Expanded(
// child: Text(
// articles?.author?.name ?? "",
// overflow: TextOverflow.ellipsis,
// maxLines: 1,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF8E8E8E),
// ),
// ),
// ),
SizedBox(width: 8),
Image.asset(
"assets/image/browse.webp",
@ -448,14 +448,15 @@ class _HeadlinesColumnDetails extends State<HeadlinesColumnDetails>
color: Color(0xFF8D8D8D),
),
)),
Expanded(child:
Text(
articles?.createTime ?? "",
articles?.createTime?.split(":")[0] ?? "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
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)
Container(
height: 120.h,
height: 108.h,
margin: EdgeInsets.only(top: 10.h),
child: ListView.builder(
scrollDirection: Axis.horizontal,
@ -87,7 +87,7 @@ class _DiscountZone extends State<DiscountZone> {
Widget discountItem(Coupon coupon) {
return Container(
width: 290.w,
height: 120.h,
height: 108.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,

166
lib/home/home_view/shortcut_operation.dart

@ -60,38 +60,37 @@ class _ShortcutOperation extends State<ShortcutOperation> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).main_menu2,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).main_menu2,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
),
),
),
SizedBox(height: 5.h),
Text(
S.of(context).xiadanzhuanjifen,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xff4D4D4D),
SizedBox(height: 5.h),
Text(
S.of(context).xiadanzhuanjifen,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
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,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).chongzhi,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).chongzhi,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
),
),
),
SizedBox(height: 5.h),
Text(
S.of(context).chongzhifuliduo,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xff4D4D4D),
SizedBox(height: 5.h),
Text(
S.of(context).chongzhifuliduo,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
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,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).fulizhongxin,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
S.of(context).fulizhongxin,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Colors.black,
),
),
),
SizedBox(height: 5.h),
Text(
S.of(context).tiantiandefuli,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xff4D4D4D),
SizedBox(height: 5.h),
Text(
S.of(context).tiantiandefuli,
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xff4D4D4D),
),
),
),
],
),
SizedBox(width: 16.w),
Expanded(
child: Image.asset(
"assets/image/home_welfare.webp",
width: 22.w,
height: 35.h,
fit: BoxFit.fill,
),
],
),),
Image.asset(
"assets/image/home_welfare.webp",
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{
await queryDetails();
Future.delayed(Duration(milliseconds: 350), () {
Future.delayed(Duration(milliseconds: 400), () {
EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
});
@ -516,9 +516,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
.catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功");
Future.delayed(Duration(milliseconds: 300), () {
// Future.delayed(Duration(milliseconds:450), () {
queryDetails();
});
// });
}
}

8
lib/retrofit/data/vip_card_home.dart

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

22
lib/vip/vip_view/vip_goods_discount.dart

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

Loading…
Cancel
Save