diff --git a/assets/image/2x/update.webp b/assets/image/2x/update.webp new file mode 100644 index 00000000..5dbd837a Binary files /dev/null and b/assets/image/2x/update.webp differ diff --git a/assets/image/3x/update.webp b/assets/image/3x/update.webp new file mode 100644 index 00000000..6f6a6d1b Binary files /dev/null and b/assets/image/3x/update.webp differ diff --git a/assets/image/update.webp b/assets/image/update.webp new file mode 100644 index 00000000..5229d984 Binary files /dev/null and b/assets/image/update.webp differ diff --git a/lib/main.dart b/lib/main.dart index 22f8a3ad..45a7e988 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -131,9 +131,9 @@ void main() async { Locale locale; if (sharedPreferences.containsKey("language") && sharedPreferences.getString("language") == "zh") { - locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); - } else { locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH'); + } else { + locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); } ImgCachePath(); // initSdk(); diff --git a/lib/main_page.dart b/lib/main_page.dart index 717afd4a..acd0675c 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -354,7 +354,7 @@ class _MainPage extends State with WidgetsBindingObserver { PackageInfo packageInfo = await PackageInfo.fromPlatform(); BaseData baseData = await apiService.appVersion().catchError((onError) {}); if (baseData != null && baseData.isSuccess) { - // baseData.data.appLastVersion = "2.0.11"; + baseData.data.appLastVersion = "2.0.17"; // baseData.data.appLastVersionUp = "1.0.1"; if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion) && AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){ diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index c75e29c5..ebf56a16 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -253,6 +253,7 @@ class _ExchangeHistoryList extends State { ), ), Text( + exchangeOrder.payStatus != 1 ? "未支付": orderStatus(exchangeOrder.state), style: TextStyle( color: Color(0xFFFE951E), @@ -469,7 +470,8 @@ class _ExchangeHistoryList extends State { color: Color(0xFF353535), ), ), - exchangeOrder.useTyped == 1 ? + if(exchangeOrder.useTyped != 3) + (exchangeOrder.useTyped == 1 ? GestureDetector( onTap: () { // if (exchangeOrder.state == 1) { @@ -501,7 +503,7 @@ class _ExchangeHistoryList extends State { }); }, child: buildBtnStatusTow(exchangeOrder.state), - ), + )) ], ) ], diff --git a/lib/order/exchange_order_page.dart b/lib/order/exchange_order_page.dart index 59cfca6d..75f4e5bc 100644 --- a/lib/order/exchange_order_page.dart +++ b/lib/order/exchange_order_page.dart @@ -121,7 +121,7 @@ class _ExchangeOrderPage extends State { GestureDetector( onTap: () { setState(() { - showAlertDialog(); + // showAlertDialog(); }); }, child: Row( diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index c619dc66..72a86318 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 = "https://pos.api.lotus-wallet.com/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8765/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 e97d9cdc..f2fd3a6b 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 = "https://pos.platform.lotus-wallet.com/app/";///本地 +const localBaseUrl = "http://192.168.10.236:8766/app/";///本地 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线上 @RestApi(baseUrl: localBaseUrl) diff --git a/lib/store/shop__details_page.dart b/lib/store/shop__details_page.dart index ffbf4adf..758b62b8 100644 --- a/lib/store/shop__details_page.dart +++ b/lib/store/shop__details_page.dart @@ -847,7 +847,7 @@ class _ShopDetailsPage extends State { itemBuilder: (context, position) { return MImage( miNiDetail?.imgs != null ? miNiDetail.imgs[position]:"", - fit: BoxFit.fill, + fit: BoxFit.cover, radius: BorderRadius.zero, noCompress: true, errorSrc: "assets/image/default_2_1.webp", diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 224b27b3..b6fe49a0 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -110,7 +110,7 @@ class UnionPageState extends State } }); - getLatLng(); + // getLatLng(); startLocation(false); } @@ -141,9 +141,9 @@ class UnionPageState extends State latLng = BMFCoordinate(event["latitude"], event["longitude"]); } BMFCalculateUtils.coordConvert( - coordinate: latLng, - fromType: BMF_COORD_TYPE.BD09LL, - toType: BMF_COORD_TYPE.COMMON) + coordinate: latLng, + fromType: BMF_COORD_TYPE.BD09LL, + toType: BMF_COORD_TYPE.COMMON) .then((value) { this.latLng = value; saveLatLng( @@ -164,12 +164,14 @@ class UnionPageState extends State zoomLevel: 15, )); }); - } else { + } + else { getLatLng(); // EasyLoading.dismiss(); } }); + Location.getInstance().prepareLoc(); Location.getInstance().startLocation(context).then((value) { if (!value) { diff --git a/lib/view_widget/update_dialog.dart b/lib/view_widget/update_dialog.dart index 3e0d9b27..d79729bb 100644 --- a/lib/view_widget/update_dialog.dart +++ b/lib/view_widget/update_dialog.dart @@ -28,104 +28,113 @@ class _UpdateDialog extends State { return Material( type: MaterialType.transparency, child: Center( - child: Container( + child: + Container( width: MediaQuery.of(context).size.width - 80.w, - // height: 216.h, decoration: BoxDecoration( - color: Colors.white, + color: Colors.transparent, borderRadius: BorderRadius.circular(8.r), ), child: Column( mainAxisSize: MainAxisSize.min, children: [ - Container( - width: double.infinity, - // height: 110.h, - alignment: Alignment.center, - padding: EdgeInsets.all(20), - child: Column( - children: [ - Text( - "发现新版本 v${widget.appUpdate.appLastVersion}", - style: TextStyle( - fontSize: 17.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF000000), - ), + Stack( + alignment: Alignment.bottomCenter, + children: [ + Container( + // height: 100.h, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: Colors.white, + width: 0, + style: BorderStyle.solid ), - SizedBox(height: 12.h,), - Text( - widget.appUpdate.appLastVersionExplain ?? "", - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 17.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF333333), - ), - ), - ], + // borderRadius: BorderRadius.only( + // topLeft: Radius.circular(8.r), + // topRight: Radius.circular(8.r), + // ), + ), + ), + Image.asset( + "assets/image/update.webp", + width: MediaQuery.of(context).size.width - 80.w, + fit:BoxFit.cover, ) + ], ), Container( - color: Color(0x1A000000), - height: 1.h, - ), - Container( - height:55.h, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp)) - Expanded( - child: InkWell( - onTap:() { - doNotUpdate(); - }, - child: Container( - width: double.infinity, - // height: 90.h, - alignment: Alignment.center, - child: Text( - "下次再说", - style: TextStyle( - fontSize: 17.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF8C8C8C), - ), - ), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: Colors.white, + width: 0, + style: BorderStyle.solid + ), + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(8.r), + bottomRight: Radius.circular(8.r), + ), + ), + padding: EdgeInsets.symmetric(horizontal: 14.w), + child: Column( + children: [ + SizedBox(height:32.h,), + Text( + widget.appUpdate.appLastVersionExplain ?? "", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 17.sp, + height: 1.2, + fontWeight: MyFontWeight.regular, + color: Color(0xFF333333), + ), + ), + SizedBox(height: 57.h,), + InkWell( + onTap: () { + updateApp(); + }, + child: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(27), + ), + margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 8.h), + padding: EdgeInsets.symmetric(vertical: 11.h), + alignment: Alignment.center, + child: Text( + "立即更新", + style: TextStyle( + fontSize: 17.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFFFFFFFF), ), ), - flex: 1, - ), - Container( - color: Color(0x1A000000), - width: 1.h, ), - Expanded( - child: InkWell( - onTap: () { - updateApp(); - // Navigator.of(context).pop(); - }, - child: Container( - width: double.infinity, - // height: 90.h, - alignment: Alignment.center, - child: Text( - "立即更新", - style: TextStyle( - fontSize: 17.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF32A060), - ), + ), + if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp)) + InkWell( + onTap:() { + doNotUpdate(); + }, + child: Container( + width: double.infinity, + alignment: Alignment.center, + padding: EdgeInsets.only(top: 8.h,bottom: 15.h), + child: Text( + "以后再说", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8C8C8C), ), ), ), - flex: 1, ), - ], - ), - ), + ], + ),) ], ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 79ff9585..b7b3e4f0 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.14+9 +version: 2.0.16+10 environment: sdk: ">=2.7.0 <3.0.0"