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. 6
      lib/union/union_page.dart
  12. 121
      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",

6
lib/union/union_page.dart

@ -110,7 +110,7 @@ class UnionPageState extends State<UnionPage>
} }
}); });
getLatLng(); // getLatLng();
startLocation(false); startLocation(false);
} }
@ -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) {

121
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,
alignment: Alignment.center,
padding: EdgeInsets.all(20),
child: Column(
children: [ children: [
Text( Container(
"发现新版本 v${widget.appUpdate.appLastVersion}", // height: 100.h,
style: TextStyle( decoration: BoxDecoration(
fontSize: 17.sp, color: Colors.white,
fontWeight: MyFontWeight.semi_bold, border: Border.all(
color: Color(0xFF000000), color: Colors.white,
width: 0,
style: BorderStyle.solid
),
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(8.r),
// topRight: Radius.circular(8.r),
// ),
), ),
), ),
SizedBox(height: 12.h,), Image.asset(
"assets/image/update.webp",
width: MediaQuery.of(context).size.width - 80.w,
fit:BoxFit.cover,
)
],
),
Container(
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( Text(
widget.appUpdate.appLastVersionExplain ?? "", widget.appUpdate.appLastVersionExplain ?? "",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 17.sp, fontSize: 17.sp,
height: 1.2,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFF333333), color: Color(0xFF333333),
), ),
), ),
], SizedBox(height: 57.h,),
) InkWell(
), onTap: () {
Container( updateApp();
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( child: Container(
width: double.infinity, width: double.infinity,
// height: 90.h, 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, alignment: Alignment.center,
child: Text( child: Text(
"下次再说", "立即更新",
style: TextStyle( style: TextStyle(
fontSize: 17.sp, fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF8C8C8C), color: Color(0xFFFFFFFF),
), ),
), ),
), ),
), ),
flex: 1, if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp))
), InkWell(
Container( onTap:() {
color: Color(0x1A000000), doNotUpdate();
width: 1.h,
),
Expanded(
child: InkWell(
onTap: () {
updateApp();
// Navigator.of(context).pop();
}, },
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