diff --git a/lib/home/welfare_page.dart b/lib/home/welfare_page.dart index e351af39..181de2ea 100644 --- a/lib/home/welfare_page.dart +++ b/lib/home/welfare_page.dart @@ -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 { ), ), 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 { 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 { ], ), )), + 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 { 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 { }, 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 { 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 { if (baseData != null && baseData.isSuccess) { queryCoupon(); showAlertDialog(); + }else{ + SmartDialog.showToast(baseData?.msg,alignment: Alignment.center); } } @@ -773,7 +774,7 @@ class _WelfarePage extends State { 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( diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 72a86318..c619dc66 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -39,7 +39,7 @@ part 'min_api.g.dart'; // const base_url = "http://192.168.10.37:8765/app/"; -const localBaseUrl = "http://192.168.10.236:8765/app/";///本地 +const localBaseUrl = "https://pos.api.lotus-wallet.com/app/";///本地 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线上 diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index f2fd3a6b..e97d9cdc 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -71,7 +71,7 @@ part 'retrofit_api.g.dart'; // const base_url = "http://192.168.10.132:8766/app/";///詹云久 -const localBaseUrl = "http://192.168.10.236:8766/app/";///本地 +const localBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///本地 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @RestApi(baseUrl: localBaseUrl) diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 2c45bf97..6c5be3ef 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -339,7 +339,7 @@ class _ApiService implements ApiService { data: _data); final value = BaseData.fromJson( _result.data, - (json) => json as dynamic, + (json) => json == null ? null :json as dynamic, ); return value; } diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 272b4269..d4b91c6e 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -55,9 +55,10 @@ class _UnionList extends State { itemBuilder: (context, position) { return InkWell( onTap: () { - // if (widget.storeList[position].posType.code == "NORMALSTORE") { - // showDeleteDialog(); - // } else if (widget.storeList[position].posType.code == + if (widget.storeList[position].posType.code == "NORMALSTORE") { + showDeleteDialog(); + } + // else if (widget.storeList[position].posType.code == // "RETAILSTORE" && // widget.storeList[position].storeName == "一心回乡商城") { // Navigator.of(context).pushNamed( @@ -69,7 +70,8 @@ class _UnionList extends State { // "storeName": widget.storeList[position].storeName // }, // ); - // } else + // } + else { Navigator.of(context).pushNamed( '/router/store_order', diff --git a/pubspec.yaml b/pubspec.yaml index 81e6a4ae..a91080b1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 一心回乡. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 2.0.6+6 +version: 2.0.8+7 environment: sdk: ">=2.7.0 <3.0.0"