Browse Source

更新ui更改;

兑换历史列表状态更改;
zyh
w-R 3 years ago
parent
commit
a8ca79ec99
  1. BIN
      assets/image/2x/update.webp
  2. BIN
      assets/image/3x/update.webp
  3. BIN
      assets/image/update.webp
  4. 4
      lib/main.dart
  5. 2
      lib/main_page.dart
  6. 6
      lib/order/exchange_history_page.dart
  7. 2
      lib/order/exchange_order_page.dart
  8. 2
      lib/retrofit/min_api.dart
  9. 2
      lib/retrofit/retrofit_api.dart
  10. 2
      lib/store/shop__details_page.dart
  11. 12
      lib/union/union_page.dart
  12. 169
      lib/view_widget/update_dialog.dart
  13. 2
      pubspec.yaml

BIN
assets/image/2x/update.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
assets/image/3x/update.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
assets/image/update.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

4
lib/main.dart

@ -131,9 +131,9 @@ void main() async {
Locale locale; Locale locale;
if (sharedPreferences.containsKey("language") && if (sharedPreferences.containsKey("language") &&
sharedPreferences.getString("language") == "zh") { sharedPreferences.getString("language") == "zh") {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} else {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH'); locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
} else {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} }
ImgCachePath(); ImgCachePath();
// initSdk(); // initSdk();

2
lib/main_page.dart

@ -354,7 +354,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
PackageInfo packageInfo = await PackageInfo.fromPlatform(); PackageInfo packageInfo = await PackageInfo.fromPlatform();
BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {}); BaseData<AppUpdate> baseData = await apiService.appVersion().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
// baseData.data.appLastVersion = "2.0.11"; baseData.data.appLastVersion = "2.0.17";
// baseData.data.appLastVersionUp = "1.0.1"; // baseData.data.appLastVersionUp = "1.0.1";
if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion) if(AppUtils.versionCompare(packageInfo.version,baseData.data?.appLastVersion)
&& AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){ && AppUtils.versionCompare(value.getString("appLastVersion")??"1.0.0",baseData.data?.appLastVersion)){

6
lib/order/exchange_history_page.dart

@ -253,6 +253,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
), ),
), ),
Text( Text(
exchangeOrder.payStatus != 1 ? "未支付":
orderStatus(exchangeOrder.state), orderStatus(exchangeOrder.state),
style: TextStyle( style: TextStyle(
color: Color(0xFFFE951E), color: Color(0xFFFE951E),
@ -469,7 +470,8 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),
exchangeOrder.useTyped == 1 ? if(exchangeOrder.useTyped != 3)
(exchangeOrder.useTyped == 1 ?
GestureDetector( GestureDetector(
onTap: () { onTap: () {
// if (exchangeOrder.state == 1) { // if (exchangeOrder.state == 1) {
@ -501,7 +503,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
}); });
}, },
child: buildBtnStatusTow(exchangeOrder.state), child: buildBtnStatusTow(exchangeOrder.state),
), ))
], ],
) )
], ],

2
lib/order/exchange_order_page.dart

@ -121,7 +121,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
showAlertDialog(); // showAlertDialog();
}); });
}, },
child: Row( child: Row(

2
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 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/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
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 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/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)

2
lib/store/shop__details_page.dart

@ -847,7 +847,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return MImage( return MImage(
miNiDetail?.imgs != null ? miNiDetail.imgs[position]:"", miNiDetail?.imgs != null ? miNiDetail.imgs[position]:"",
fit: BoxFit.fill, fit: BoxFit.cover,
radius: BorderRadius.zero, radius: BorderRadius.zero,
noCompress: true, noCompress: true,
errorSrc: "assets/image/default_2_1.webp", errorSrc: "assets/image/default_2_1.webp",

12
lib/union/union_page.dart

@ -110,7 +110,7 @@ class UnionPageState extends State<UnionPage>
} }
}); });
getLatLng(); // getLatLng();
startLocation(false); startLocation(false);
} }
@ -141,9 +141,9 @@ class UnionPageState extends State<UnionPage>
latLng = BMFCoordinate(event["latitude"], event["longitude"]); latLng = BMFCoordinate(event["latitude"], event["longitude"]);
} }
BMFCalculateUtils.coordConvert( BMFCalculateUtils.coordConvert(
coordinate: latLng, coordinate: latLng,
fromType: BMF_COORD_TYPE.BD09LL, fromType: BMF_COORD_TYPE.BD09LL,
toType: BMF_COORD_TYPE.COMMON) toType: BMF_COORD_TYPE.COMMON)
.then((value) { .then((value) {
this.latLng = value; this.latLng = value;
saveLatLng( saveLatLng(
@ -164,12 +164,14 @@ class UnionPageState extends State<UnionPage>
zoomLevel: 15, zoomLevel: 15,
)); ));
}); });
} else { }
else {
getLatLng(); getLatLng();
// EasyLoading.dismiss(); // EasyLoading.dismiss();
} }
}); });
Location.getInstance().prepareLoc(); Location.getInstance().prepareLoc();
Location.getInstance().startLocation(context).then((value) { Location.getInstance().startLocation(context).then((value) {
if (!value) { if (!value) {

169
lib/view_widget/update_dialog.dart

@ -28,104 +28,113 @@ class _UpdateDialog extends State<UpdateDialog> {
return Material( return Material(
type: MaterialType.transparency, type: MaterialType.transparency,
child: Center( child: Center(
child: Container( child:
Container(
width: MediaQuery.of(context).size.width - 80.w, width: MediaQuery.of(context).size.width - 80.w,
// height: 216.h,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.transparent,
borderRadius: BorderRadius.circular(8.r), borderRadius: BorderRadius.circular(8.r),
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Stack(
width: double.infinity, alignment: Alignment.bottomCenter,
// height: 110.h, children: [
alignment: Alignment.center, Container(
padding: EdgeInsets.all(20), // height: 100.h,
child: Column( decoration: BoxDecoration(
children: [ color: Colors.white,
Text( border: Border.all(
"发现新版本 v${widget.appUpdate.appLastVersion}", color: Colors.white,
style: TextStyle( width: 0,
fontSize: 17.sp, style: BorderStyle.solid
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF000000),
),
), ),
SizedBox(height: 12.h,), // borderRadius: BorderRadius.only(
Text( // topLeft: Radius.circular(8.r),
widget.appUpdate.appLastVersionExplain ?? "", // topRight: Radius.circular(8.r),
textAlign: TextAlign.center, // ),
style: TextStyle( ),
fontSize: 17.sp, ),
fontWeight: MyFontWeight.regular, Image.asset(
color: Color(0xFF333333), "assets/image/update.webp",
), width: MediaQuery.of(context).size.width - 80.w,
), fit:BoxFit.cover,
],
) )
],
), ),
Container( Container(
color: Color(0x1A000000), decoration: BoxDecoration(
height: 1.h, color: Colors.white,
), border: Border.all(
Container( color: Colors.white,
height:55.h, width: 0,
child: Row( style: BorderStyle.solid
mainAxisSize: MainAxisSize.max, ),
children: [ borderRadius: BorderRadius.only(
if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp)) bottomLeft: Radius.circular(8.r),
Expanded( bottomRight: Radius.circular(8.r),
child: InkWell( ),
onTap:() { ),
doNotUpdate(); padding: EdgeInsets.symmetric(horizontal: 14.w),
}, child: Column(
child: Container( children: [
width: double.infinity, SizedBox(height:32.h,),
// height: 90.h, Text(
alignment: Alignment.center, widget.appUpdate.appLastVersionExplain ?? "",
child: Text( textAlign: TextAlign.center,
"下次再说", style: TextStyle(
style: TextStyle( fontSize: 17.sp,
fontSize: 17.sp, height: 1.2,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.regular,
color: Color(0xFF8C8C8C), 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( if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp))
onTap: () { InkWell(
updateApp(); onTap:() {
// Navigator.of(context).pop(); doNotUpdate();
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
// height: 90.h, alignment: Alignment.center,
alignment: Alignment.center, padding: EdgeInsets.only(top: 8.h,bottom: 15.h),
child: Text( child: Text(
"立即更新", "以后再说",
style: TextStyle( style: TextStyle(
fontSize: 17.sp, fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.regular,
color: Color(0xFF32A060), color: Color(0xFF8C8C8C),
),
), ),
), ),
), ),
flex: 1,
), ),
], ],
), ),)
),
], ],
), ),
), ),

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev 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: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save