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;
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();

2
lib/main_page.dart

@ -354,7 +354,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
BaseData<AppUpdate> 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)){

6
lib/order/exchange_history_page.dart

@ -253,6 +253,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
),
),
Text(
exchangeOrder.payStatus != 1 ? "未支付":
orderStatus(exchangeOrder.state),
style: TextStyle(
color: Color(0xFFFE951E),
@ -469,7 +470,8 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
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<ExchangeHistoryList> {
});
},
child: buildBtnStatusTow(exchangeOrder.state),
),
))
],
)
],

2
lib/order/exchange_order_page.dart

@ -121,7 +121,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
GestureDetector(
onTap: () {
setState(() {
showAlertDialog();
// showAlertDialog();
});
},
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 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/";///线

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 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)

2
lib/store/shop__details_page.dart

@ -847,7 +847,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
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",

6
lib/union/union_page.dart

@ -110,7 +110,7 @@ class UnionPageState extends State<UnionPage>
}
});
getLatLng();
// getLatLng();
startLocation(false);
}
@ -164,12 +164,14 @@ class UnionPageState extends State<UnionPage>
zoomLevel: 15,
));
});
} else {
}
else {
getLatLng();
// EasyLoading.dismiss();
}
});
Location.getInstance().prepareLoc();
Location.getInstance().startLocation(context).then((value) {
if (!value) {

121
lib/view_widget/update_dialog.dart

@ -28,104 +28,113 @@ class _UpdateDialog extends State<UpdateDialog> {
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(
Stack(
alignment: Alignment.bottomCenter,
children: [
Text(
"发现新版本 v${widget.appUpdate.appLastVersion}",
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF000000),
Container(
// height: 100.h,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
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(
widget.appUpdate.appLastVersionExplain ?? "",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 17.sp,
height: 1.2,
fontWeight: MyFontWeight.regular,
color: Color(0xFF333333),
),
),
],
)
),
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();
SizedBox(height: 57.h,),
InkWell(
onTap: () {
updateApp();
},
child: Container(
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,
child: Text(
"下次再说",
"立即更新",
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF8C8C8C),
color: Color(0xFFFFFFFF),
),
),
),
),
flex: 1,
),
Container(
color: Color(0x1A000000),
width: 1.h,
),
Expanded(
child: InkWell(
onTap: () {
updateApp();
// Navigator.of(context).pop();
if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp))
InkWell(
onTap:() {
doNotUpdate();
},
child: Container(
width: double.infinity,
// height: 90.h,
alignment: Alignment.center,
padding: EdgeInsets.only(top: 8.h,bottom: 15.h),
child: Text(
"立即更新",
"以后再说",
style: TextStyle(
fontSize: 17.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
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
version: 2.0.14+9
version: 2.0.16+10
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save