|
|
|
@ -109,166 +109,159 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
|
|
|
|
|
children: [ |
|
|
|
|
AspectRatio( |
|
|
|
|
aspectRatio: 1, |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () {}, |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(16, 20, 16, 8), |
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 20, 10, 14), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)), |
|
|
|
|
boxShadow: [ |
|
|
|
|
BoxShadow( |
|
|
|
|
color: Colors.black.withAlpha(25), |
|
|
|
|
offset: Offset(0, 1), |
|
|
|
|
blurRadius: 12, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
AspectRatio( |
|
|
|
|
aspectRatio: 1.8, |
|
|
|
|
child: buildSwiper(), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
left: 10.w, |
|
|
|
|
right: 10.w, |
|
|
|
|
top: 16.h, |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: |
|
|
|
|
MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.storeName |
|
|
|
|
: "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
), |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(16, 20, 16, 8), |
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 20, 10, 14), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)), |
|
|
|
|
boxShadow: [ |
|
|
|
|
BoxShadow( |
|
|
|
|
color: Colors.black.withAlpha(25), |
|
|
|
|
offset: Offset(0, 1), |
|
|
|
|
blurRadius: 12, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
AspectRatio( |
|
|
|
|
aspectRatio: 1.8, |
|
|
|
|
child: buildSwiper(), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
left: 10.w, |
|
|
|
|
right: 10.w, |
|
|
|
|
top: 16.h, |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: |
|
|
|
|
MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.storeName |
|
|
|
|
: "", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
fontWeight: FontWeight.w500, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.centerRight, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).ren( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo |
|
|
|
|
.perCapitaConsumption |
|
|
|
|
: "", |
|
|
|
|
), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.centerRight, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).ren( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo |
|
|
|
|
.perCapitaConsumption |
|
|
|
|
: "", |
|
|
|
|
), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.address |
|
|
|
|
: "", |
|
|
|
|
maxLines: 2, |
|
|
|
|
textAlign: TextAlign.justify, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.address |
|
|
|
|
: "", |
|
|
|
|
maxLines: 2, |
|
|
|
|
textAlign: TextAlign.justify, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
children: itemServer( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.businessService |
|
|
|
|
: "", |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
children: itemServer( |
|
|
|
|
storeInfo != null |
|
|
|
|
? storeInfo.businessService : "", |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: |
|
|
|
|
MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.end, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).yingyeshijian(storeInfo == |
|
|
|
|
null |
|
|
|
|
? "" |
|
|
|
|
: (storeInfo.openStartTime == |
|
|
|
|
null && |
|
|
|
|
storeInfo.openEndTime == |
|
|
|
|
null) |
|
|
|
|
? S.of(context).quantian |
|
|
|
|
: "${storeInfo.openStartTime.substring(0, storeInfo.openStartTime.lastIndexOf(":"))} - ${storeInfo.openEndTime.substring(0, storeInfo.openEndTime.lastIndexOf(":"))}"), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: |
|
|
|
|
MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.end, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).yingyeshijian(storeInfo == null |
|
|
|
|
? "" : (storeInfo.openStartTime == null && storeInfo.openEndTime == null) |
|
|
|
|
? S.of(context).quantian |
|
|
|
|
: "${storeInfo.openStartTime.substring(0, storeInfo.openStartTime.lastIndexOf(":"))} " |
|
|
|
|
"- ${storeInfo.openEndTime.substring(0, storeInfo.openEndTime.lastIndexOf(":"))}"), |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
if (storeInfo == null || |
|
|
|
|
storeInfo.latitude == null || |
|
|
|
|
storeInfo.longitude == null || |
|
|
|
|
storeInfo.latitude == "" || |
|
|
|
|
storeInfo.longitude == "") |
|
|
|
|
return; |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/location_map', |
|
|
|
|
arguments: { |
|
|
|
|
"lat": storeInfo.latitude, |
|
|
|
|
"lng": storeInfo.longitude, |
|
|
|
|
"storeName": |
|
|
|
|
storeInfo.storeName, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_location.png", |
|
|
|
|
width: 24.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
if (storeInfo == null || |
|
|
|
|
storeInfo.latitude == null || |
|
|
|
|
storeInfo.longitude == null || |
|
|
|
|
storeInfo.latitude == "" || |
|
|
|
|
storeInfo.longitude == "") |
|
|
|
|
return; |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/location_map', |
|
|
|
|
arguments: { |
|
|
|
|
"lat": storeInfo.latitude, |
|
|
|
|
"lng": storeInfo.longitude, |
|
|
|
|
"storeName": |
|
|
|
|
storeInfo.storeName, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_location.png", |
|
|
|
|
width: 24.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
showCallMobile(); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_call.png", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
showCallMobile(); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_call.png", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -336,9 +329,8 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
|
|
|
|
|
padding: EdgeInsets.only(top: 16.h, bottom: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: isEnable() ? Color(0xFF32A060) : Color(0xFFD8D8D8), |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(4), |
|
|
|
|
topRight: Radius.circular(4), |
|
|
|
|
borderRadius: BorderRadius.vertical( |
|
|
|
|
top: Radius.circular(4), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -649,8 +641,6 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
|
|
|
|
|
.couponVOList[position] |
|
|
|
|
.discountPercent)) |
|
|
|
|
: "", |
|
|
|
|
// (storeInfo != null && storeInfo.couponVOList != null) ? storeInfo.couponVOList[position].couponImg : "", |
|
|
|
|
// S.of(context).manlijiandaijinquan(30, 5), |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
@ -661,9 +651,12 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
|
|
|
|
|
Text( |
|
|
|
|
S.of(context).youxiaoqizhi( |
|
|
|
|
(storeInfo != null && |
|
|
|
|
storeInfo.couponVOList != null && |
|
|
|
|
storeInfo.couponVOList != |
|
|
|
|
null && |
|
|
|
|
// storeInfo.couponVOList[position].useStartTime != null && |
|
|
|
|
storeInfo.couponVOList[position].useEndTime != null) |
|
|
|
|
storeInfo.couponVOList[position] |
|
|
|
|
.useEndTime != |
|
|
|
|
null) |
|
|
|
|
// ? "${storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}" |
|
|
|
|
? "${storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}" |
|
|
|
|
: "", |
|
|
|
@ -704,14 +697,15 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
|
|
|
|
|
0) |
|
|
|
|
? Colors.grey |
|
|
|
|
: Color(0xFF32A060), |
|
|
|
|
padding: EdgeInsets.fromLTRB(8, 4, 8, 4), |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
horizontal: 8.w, vertical: 4.h), |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|