|
|
|
@ -2,6 +2,7 @@ import 'package:dio/dio.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:flutter_easyloading/flutter_easyloading.dart'; |
|
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
|
import 'package:flutter_swiper/flutter_swiper.dart'; |
|
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
|
import 'package:huixiang/retrofit/data/base_data.dart'; |
|
|
|
@ -353,10 +354,9 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 12,), |
|
|
|
|
(cop.useStartTime == null && |
|
|
|
|
cop.useEndTime == null)? |
|
|
|
|
(cop.status == 0)? |
|
|
|
|
Text( |
|
|
|
|
S.of(context).quantian, |
|
|
|
|
"发放时间: ${cop?.publishStartTime ?? ""}", |
|
|
|
|
maxLines: 1, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -365,7 +365,7 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), |
|
|
|
|
), |
|
|
|
|
):Text( |
|
|
|
|
"有效期至 ${cop?.useEndTime ?? ""}", |
|
|
|
|
"有效期至 ${cop?.publishEndTime ?? ""}", |
|
|
|
|
maxLines:1, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -377,9 +377,10 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
|
|
|
|
|
Column( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.end, |
|
|
|
|
children: [ |
|
|
|
|
Expanded(child: Container( |
|
|
|
|
child:weekWidget(cop), |
|
|
|
@ -589,7 +590,7 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
receiveCoupon(cop.id); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 14,vertical: 2), |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 2.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(3), |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
@ -623,7 +624,7 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
// height: 19.h, |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal:8,vertical: 2), |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal:8.w,vertical: 1.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(3), |
|
|
|
|
border: Border.all( |
|
|
|
@ -633,8 +634,6 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child:Text( |
|
|
|
|
S.of(context).qushiyong, |
|
|
|
|
maxLines: 1, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
@ -652,6 +651,8 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
queryCoupon(); |
|
|
|
|
showAlertDialog(); |
|
|
|
|
}else{ |
|
|
|
|
SmartDialog.showToast(baseData?.msg,alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -773,7 +774,7 @@ class _WelfarePage extends State<WelfarePage> {
|
|
|
|
|
mainAxisSpacing: 16.w, |
|
|
|
|
//子Widget宽高比例 0.59 |
|
|
|
|
childAspectRatio: |
|
|
|
|
200 / (286.w / 2 + (286.h / 2) * AppUtils.textScale(context)), |
|
|
|
|
200 / (286 / 2 + (286 / 2) * AppUtils.textScale(context)), |
|
|
|
|
), |
|
|
|
|
itemBuilder: (context, index) { |
|
|
|
|
return GestureDetector( |
|
|
|
|