Browse Source

优惠选择优化;

后台停留7分钟后重启应用页面更改;
商品详情优化,增加正在加载;
部分优化;
new_revision_app
wurong 2 years ago
parent
commit
60844c080f
  1. 17
      lib/home/start_page.dart
  2. 2
      lib/main.dart
  3. 2
      lib/main_page.dart
  4. 2
      lib/settlement/settlement.dart
  5. 4
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  6. 13
      lib/store/shop_details_page.dart

17
lib/home/start_page.dart

@ -1,15 +1,10 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class StartPage extends StatefulWidget {
final bool isFirst;
StartPage(this.isFirst);
// final bool isFirst;
//
// StartPage(this.isFirst);
@override
State<StatefulWidget> createState() {
return _StartPage();
@ -36,8 +31,10 @@ class _StartPage extends State<StartPage> {
@override
void initState() {
super.initState();
Future.delayed(Duration(seconds:3), () {
Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ? '/router/guide_Page' : '/router/new_login_page');
Future.delayed(Duration(seconds:2), () {
// Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ?
// '/router/guide_Page' : '/router/new_login_page');
Navigator.of(context).popAndPushNamed('/router/main_page');
});
}
}

2
lib/main.dart

@ -93,6 +93,7 @@ import 'community/report/report_success.dart';
import 'home/guide_page.dart';
import 'home/help_farmers/help_farmers_page.dart';
import 'home/home_view/activity_list.dart';
import 'home/start_page.dart';
import 'home/welfare_exchange.dart';
import 'home/welfare_page.dart';
import 'login/login_store_select.dart';
@ -352,6 +353,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/about_page': (context, {arguments}) => AboutPage(),
'/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/main_page': (context, {arguments}) => MainPage(arguments: arguments),
'/router/start_page': (context, {arguments}) => StartPage(),
'/router/test_page': (context, {arguments}) => TestPage(),
'/router/communityFollow': (context, {arguments}) => CommunityFollow(arguments:arguments),
'/router/releasePage': (context, {arguments}) => ReleasePage(),

2
lib/main_page.dart

@ -74,7 +74,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
case AppLifecycleState.resumed: //
pushRoute();
if(DateTime.now().millisecondsSinceEpoch - lastTime > 420000)
Navigator.of(context).popAndPushNamed('/router/main_page');
Navigator.of(context).popAndPushNamed('/router/start_page');
break;
case AppLifecycleState.paused: //
lastTime = DateTime.now().millisecondsSinceEpoch;

2
lib/settlement/settlement.dart

@ -184,7 +184,7 @@ class _Settlement extends State<Settlement> {
? ((vipLevelName == "黄金会员" && placeOrder)
? "MEMBER_RANK"
: "NONE")
: "VIP",
: "AUTO",
// useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1,

4
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 7)
widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ||(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -179,7 +179,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 ||
widget.payChannell == 7 || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK"|| (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect)
? "assets/image/vip_price.webp"

13
lib/store/shop_details_page.dart

@ -92,6 +92,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
///
queryStoreInfo() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
SharedPreferences value = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
@ -113,7 +114,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
}
minLogin();
}
EasyLoading.dismiss();
// EasyLoading.dismiss();
}
///
@ -145,7 +146,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
this.shopCarGoods = value;
setState(() {});
});
EasyLoading.dismiss();
// EasyLoading.dismiss();
}
});
}
@ -163,6 +164,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
selectSkus.add(element.attrValueList[0].attrValue);
});
});
EasyLoading.dismiss();
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
@ -601,8 +603,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Column(
body: Column(
children: [
Expanded(
child: SmartRefresher(
@ -635,7 +636,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
),
Container(
width: double.infinity,
// padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 16.h),
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -785,7 +785,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
)
],
),
),
);
}
@ -828,7 +827,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
),
),
SizedBox(
width: 2,
width: 2.w,
),
Expanded(
child: Text(

Loading…
Cancel
Save