Browse Source

更改

ff_new
w-R 3 years ago
parent
commit
1788191d4d
  1. 5
      lib/home/home_page.dart
  2. 14
      lib/home/home_view/sign_view.dart
  3. 2
      lib/integral/integral_page.dart
  4. 1
      lib/mine/fans_page.dart
  5. 3
      lib/mine/mine_view/community_follow.dart
  6. 9
      lib/settlement/settlement.dart
  7. 1
      lib/store/store_view/store_order_list.dart
  8. 4
      lib/view_widget/my_appbar.dart

5
lib/home/home_page.dart

@ -78,6 +78,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
List<Article> articles = []; List<Article> articles = [];
List<Goods> gooods = []; List<Goods> gooods = [];
Founder founder; Founder founder;
bool isSigned = false;
queryHome() async { queryHome() async {
EasyLoading.show(status: S.of(context).zhengzaijiazai); EasyLoading.show(status: S.of(context).zhengzaijiazai);
@ -264,7 +265,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
HomeBanner(bannerData, controller), HomeBanner(bannerData, controller),
/// ///
SignView(), SignView(isSigned,(value){setState(() {
isSigned = value;
});}),
// /// // ///
// HotArticle(articles), // HotArticle(articles),

14
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'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class SignView extends StatelessWidget { class SignView extends StatelessWidget {
final bool isSigned;
final Function setSigned;
SignView(
this.isSigned,
this.setSigned,
);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -37,7 +44,10 @@ class SignView extends StatelessWidget {
value.getString('token') == "") { value.getString('token') == "") {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
} else { } 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( Text(
S.of(context).quqiandao, isSigned ? S.of(context).yiqiandao : S.of(context).quqiandao,
style: TextStyle( style: TextStyle(
color: Color(0xFF727272), color: Color(0xFF727272),
fontSize: 12.sp, fontSize: 12.sp,

2
lib/integral/integral_page.dart

@ -19,6 +19,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'intergra_view/integral_task.dart'; import 'intergra_view/integral_task.dart';
class IntegralPage extends StatefulWidget { class IntegralPage extends StatefulWidget {
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _IntegralPage(); return _IntegralPage();
@ -92,6 +93,7 @@ class _IntegralPage extends State<IntegralPage> {
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: MyAppBar( appBar: MyAppBar(
exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);},
background: Colors.transparent, background: Colors.transparent,
leadingColor: Colors.white, leadingColor: Colors.white,
title: "", title: "",

1
lib/mine/fans_page.dart

@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/base_data.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/follow_list.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';

3
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:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/mine/follow_page.dart'; import 'package:huixiang/mine/follow_page.dart';
import 'package:huixiang/retrofit/data/base_data.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/data/social_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_tab.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 'package:shared_preferences/shared_preferences.dart';
import '../fans_page.dart'; import '../fans_page.dart';

9
lib/settlement/settlement.dart

@ -62,7 +62,6 @@ class _Settlement extends State<Settlement> {
CouponListBean couponListBean; CouponListBean couponListBean;
PromotionInfoListBean promotion; PromotionInfoListBean promotion;
String mobile; String mobile;
bool placeOrder = false; bool placeOrder = false;
@override @override
@ -385,10 +384,10 @@ class _Settlement extends State<Settlement> {
), ),
/// ///
EditPhoneWidget( // EditPhoneWidget(
storeInfo, // storeInfo,
mobileChange, // mobileChange,
), // ),
/// ///
SettlementOrderCommodity( SettlementOrderCommodity(

1
lib/store/store_view/store_order_list.dart

@ -239,6 +239,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
widget.queryMiNiDetail(productListBeans[position].id,1); widget.queryMiNiDetail(productListBeans[position].id,1);
}, },
(ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) { (ShoppingCartSkuItemListBean shoppingCartSkuItemListBean) {
if(count > 0)
widget.queryMiNiDetail(productListBeans[position].id,-1); widget.queryMiNiDetail(productListBeans[position].id,-1);
}, },
productListBean: productListBeans[position], productListBean: productListBeans[position],

4
lib/view_widget/my_appbar.dart

@ -16,6 +16,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final double toolbarHeight; final double toolbarHeight;
final bool leading; final bool leading;
final Brightness brightness; final Brightness brightness;
final Function exit;
MyAppBar({ MyAppBar({
Key key, Key key,
@ -32,6 +33,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.titleSize = 18, this.titleSize = 18,
this.brightness = Brightness.light, this.brightness = Brightness.light,
this.leading = true, this.leading = true,
this.exit
}) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight),
super(key: key) { super(key: key) {
if (actions == null) if (actions == null)
@ -58,7 +60,9 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
leading: leading leading: leading
? GestureDetector( ? GestureDetector(
onTap: () { onTap: () {
if(exit == null)
Navigator.of(context).pop(); Navigator.of(context).pop();
else exit();
}, },
child: Container( child: Container(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,

Loading…
Cancel
Save