diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 2dcac26b..e8d60d7e 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -78,6 +78,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { List
articles = []; List gooods = []; Founder founder; + bool isSigned = false; queryHome() async { EasyLoading.show(status: S.of(context).zhengzaijiazai); @@ -264,7 +265,9 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { HomeBanner(bannerData, controller), ///签到 - SignView(), + SignView(isSigned,(value){setState(() { + isSigned = value; + });}), // ///热门文章 // HotArticle(articles), diff --git a/lib/home/home_view/sign_view.dart b/lib/home/home_view/sign_view.dart index e595cd34..25b74d92 100644 --- a/lib/home/home_view/sign_view.dart +++ b/lib/home/home_view/sign_view.dart @@ -7,6 +7,13 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class SignView extends StatelessWidget { + final bool isSigned; + final Function setSigned; + + SignView( + this.isSigned, + this.setSigned, + ); @override Widget build(BuildContext context) { @@ -37,7 +44,10 @@ class SignView extends StatelessWidget { value.getString('token') == "") { LoginTipsDialog().show(context); } else { - Navigator.of(context).pushNamed('/router/integral_page'); + Navigator.of(context).pushNamed('/router/integral_page') + .then((value) => { + if (value != null) setSigned(value), + }); } }); }, @@ -94,7 +104,7 @@ class SignView extends StatelessWidget { ], ), Text( - S.of(context).quqiandao, + isSigned ? S.of(context).yiqiandao : S.of(context).quqiandao, style: TextStyle( color: Color(0xFF727272), fontSize: 12.sp, diff --git a/lib/integral/integral_page.dart b/lib/integral/integral_page.dart index daabc11b..8effca3c 100644 --- a/lib/integral/integral_page.dart +++ b/lib/integral/integral_page.dart @@ -19,6 +19,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'intergra_view/integral_task.dart'; class IntegralPage extends StatefulWidget { + @override State createState() { return _IntegralPage(); @@ -92,6 +93,7 @@ class _IntegralPage extends State { Scaffold( backgroundColor: Colors.transparent, appBar: MyAppBar( + exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);}, background: Colors.transparent, leadingColor: Colors.white, title: "", diff --git a/lib/mine/fans_page.dart b/lib/mine/fans_page.dart index 3bb4d01b..bd888992 100644 --- a/lib/mine/fans_page.dart +++ b/lib/mine/fans_page.dart @@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; import 'package:huixiang/retrofit/data/follow_list.dart'; import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; diff --git a/lib/mine/mine_view/community_follow.dart b/lib/mine/mine_view/community_follow.dart index adc7e022..e12dbfd0 100644 --- a/lib/mine/mine_view/community_follow.dart +++ b/lib/mine/mine_view/community_follow.dart @@ -4,15 +4,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:huixiang/mine/follow_page.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/comunity_comment.dart'; -import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/social_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/my_tab.dart'; -import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../fans_page.dart'; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index 441049e6..1622bc1f 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -62,7 +62,6 @@ class _Settlement extends State { CouponListBean couponListBean; PromotionInfoListBean promotion; String mobile; - bool placeOrder = false; @override @@ -385,10 +384,10 @@ class _Settlement extends State { ), /// 预留的手机号, 可修改 - EditPhoneWidget( - storeInfo, - mobileChange, - ), + // EditPhoneWidget( + // storeInfo, + // mobileChange, + // ), ///订单商品 SettlementOrderCommodity( diff --git a/lib/store/store_view/store_order_list.dart b/lib/store/store_view/store_order_list.dart index 1ba9f8c8..ae7cf7e8 100644 --- a/lib/store/store_view/store_order_list.dart +++ b/lib/store/store_view/store_order_list.dart @@ -239,6 +239,7 @@ class _StoreOrderListPage extends State { widget.queryMiNiDetail(productListBeans[position].id,1); }, (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { + if(count > 0) widget.queryMiNiDetail(productListBeans[position].id,-1); }, productListBean: productListBeans[position], diff --git a/lib/view_widget/my_appbar.dart b/lib/view_widget/my_appbar.dart index aa421290..2013cf3a 100644 --- a/lib/view_widget/my_appbar.dart +++ b/lib/view_widget/my_appbar.dart @@ -16,6 +16,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { final double toolbarHeight; final bool leading; final Brightness brightness; + final Function exit; MyAppBar({ Key key, @@ -32,6 +33,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { this.titleSize = 18, this.brightness = Brightness.light, this.leading = true, + this.exit }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), super(key: key) { if (actions == null) @@ -58,7 +60,9 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget { leading: leading ? GestureDetector( onTap: () { + if(exit == null) Navigator.of(context).pop(); + else exit(); }, child: Container( alignment: Alignment.centerRight,