diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index 7e081cec..3b44046f 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -151,7 +151,7 @@ class _CommunityDynamic extends State { margin: EdgeInsets.only(top: 2), key: globalKey, alignment: Alignment.topCenter, - padding: EdgeInsets.all(16), + padding: EdgeInsets.only(left: 16,top: 16,right: 16), decoration: BoxDecoration( color: Colors.white, boxShadow: [ @@ -333,12 +333,16 @@ class _CommunityDynamic extends State { height: 5.h, ), if (!widget.isDetails) - Row( + Container( + // padding: EdgeInsets.only(bottom: 16), + child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( - child: Row( + child: Container( + padding: EdgeInsets.only(bottom: 16), + child:Row( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -361,33 +365,37 @@ class _CommunityDynamic extends State { ), ), ], - ), + )), ), Expanded( - child: Row( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SvgPicture.asset( - "assets/svg/pinglun.svg", - width: 16, - height: 16, - ), - SizedBox( - width: 5, - ), - Text( - "${widget.article.comments ?? 0}", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF1A1A1A), - ), - ), - ], - )), + child:Container( + padding: EdgeInsets.only(bottom: 16), + child:Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset( + "assets/svg/pinglun.svg", + width: 16, + height: 16, + ), + SizedBox( + width: 5, + ), + Text( + "${widget.article.comments ?? 0}", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF1A1A1A), + ), + ), + ], + ))), Expanded( - child: Row( + child:Container( + padding: EdgeInsets.only(bottom: 16), + child:Row( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -408,31 +416,32 @@ class _CommunityDynamic extends State { ), ), ], - ), + )), ), if (widget?.article?.author != widget.userId ?? "") - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - setState(() { - choiceShowBottomSheet(); - }); - }, - child: Container( - padding: EdgeInsets.only(top:3), - alignment: Alignment.center, - child: Text( - "...", - style: TextStyle( - fontSize: 18.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black, + Expanded( + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + choiceShowBottomSheet(); + }); + }, + child: Container( + padding: EdgeInsets.only(top:3,bottom: 16), + alignment: Alignment.center, + // color: Colors.red, + child: Text( + "...", + style: TextStyle( + fontSize: 18.sp, + fontWeight: MyFontWeight.medium, + color: Colors.black, + ), ), - ), - ))), + ))), ], - ), + ),), ], ), ), @@ -774,45 +783,45 @@ class _CommunityDynamic extends State { SizedBox( height: 10, ), - // GestureDetector( - // onTap: () { - // setState(() { - // Navigator.of(context).pop(); - // share(); - // }); - // }, - // child: Container( - // child: Row( - // children: [ - // SizedBox( - // width: 4, - // ), - // Image.asset( - // "assets/image/icon_share.webp", - // fit: BoxFit.cover, - // width: 25, - // height: 25, - // color: Color(0xff515151), - // ), - // SizedBox( - // width: 12, - // ), - // Text( - // "分享", - // style: TextStyle( - // fontSize: 17.sp, - // fontWeight: MyFontWeight.medium, - // color: Color(0xFF1A1A1A), - // ), - // ), - // ], - // ), - // )), - // Container( - // margin: EdgeInsets.symmetric(vertical: 12), - // height: 1.h, - // color: Color(0xFFF7F7F7), - // ), + GestureDetector( + onTap: () { + setState(() { + // Navigator.of(context).pop(); + // share(); + }); + }, + child: Container( + child: Row( + children: [ + SizedBox( + width: 4, + ), + Image.asset( + "assets/image/icon_share.webp", + fit: BoxFit.cover, + width: 25, + height: 25, + color: Color(0xff515151), + ), + SizedBox( + width: 12, + ), + Text( + "分享", + style: TextStyle( + fontSize: 17.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF1A1A1A), + ), + ), + ], + ), + )), + Container( + margin: EdgeInsets.symmetric(vertical: 12), + height: 1.h, + color: Color(0xFFF7F7F7), + ), GestureDetector( onTap: () { setState(() { diff --git a/lib/main.dart b/lib/main.dart index bc39a419..c7e96c95 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -131,6 +131,8 @@ final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); EventBus eventBus = EventBus(sync: true); +Route lastRoutePage;//记录最后一次启动的页面 + class MyApp extends StatelessWidget { final Locale appLocale; final bool isFirst; @@ -186,6 +188,12 @@ class MyApp extends StatelessWidget { ), onGenerateRoute: (settings) { final String name = settings.name; + if(lastRoutePage?.settings?.name == name){//这次启动的页面是否和上一次启动的页面相同 + if(lastRoutePage?.settings?.name == "/router/personal_page"//这次启动的是不是个人页面 + && lastRoutePage.navigator != null)//上一次启动的页面是否已经退出 + lastRoutePage.navigator.pop();//如果上一次启动的页面还没退出就主动退出上一次的页面,并接着启动这次要启动的页面 + + } final Function pageContentBuilder = routers[name]; if (pageContentBuilder != null) { final Route route = CupertinoPageRoute( @@ -195,6 +203,7 @@ class MyApp extends StatelessWidget { }, settings: settings, ); + lastRoutePage = route; return route; } return MaterialPageRoute( diff --git a/lib/mine/mine_view/wallet_coupon_view.dart b/lib/mine/mine_view/wallet_coupon_view.dart index 70763885..5a76028e 100644 --- a/lib/mine/mine_view/wallet_coupon_view.dart +++ b/lib/mine/mine_view/wallet_coupon_view.dart @@ -31,7 +31,59 @@ class _WalletCoupon extends State { ), ], ), - child: Row( + child: (Theme.of(context).platform == TargetPlatform.android) + ? GestureDetector( + onTap: () { + SharedPreferences.getInstance().then((value) { + if (value.getString("token") == null || + value.getString("token") == "") { + LoginTipsDialog().show(context); + return; + } + Navigator.of(context).pushNamed('/router/roll_center_page'); + }); + }, + child: Row( + children: [ + Image.asset( + "assets/image/icon_mine_invoice_assistant.webp", + width: 48.h, + height: 48.h, + ), + SizedBox( + width: 12.w, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + S.of(context).lingquanzhongxin, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 16.sp, + color: Color(0xFF353535), + ), + ), + SizedBox( + height: 3, + ), + Text( + "联盟下单享不停、海量优惠券等你来领!", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 12.sp, + color: Color(0xFF7B7B7B), + ), + ), + ], + ), + ) + ], + )) + : Row( children: [ Expanded( flex: 1, diff --git a/lib/mine/personal_page.dart b/lib/mine/personal_page.dart index ebe544ca..a6075b95 100644 --- a/lib/mine/personal_page.dart +++ b/lib/mine/personal_page.dart @@ -4,7 +4,6 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/community/photo_view_gallery_screen.dart'; @@ -14,7 +13,6 @@ import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/comunity_comment.dart'; import 'package:huixiang/retrofit/data/member_Infor.dart'; import 'package:huixiang/retrofit/data/page.dart'; -import 'package:huixiang/retrofit/data/social_info.dart'; import 'package:huixiang/retrofit/data/upload_result.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 0c0e7b7e..16c36e48 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,15 +21,15 @@ import 'data/shoppingCart.dart'; part 'min_api.g.dart'; -// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.api.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///正式 // const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222 -const base_url = "http://192.168.10.236:8765/app/";///费韬 -const baseUrl = "http://192.168.10.236:8765/app/";///费韬 +// const base_url = "http://192.168.10.236:8775/app/";///费韬 +// const baseUrl = "http://192.168.10.236:8775/app/";///费韬 // const base_url = "http://192.168.10.143:8765/app/";///詹云久 diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index 1c1cc751..02d9988a 100644 --- a/lib/retrofit/min_api.g.dart +++ b/lib/retrofit/min_api.g.dart @@ -9,7 +9,7 @@ part of 'min_api.dart'; class _MinApiService implements MinApiService { _MinApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8765/app/'; + baseUrl ??= 'https://pos.api.lotus-wallet.com/app/'; } final Dio _dio; diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 3fe839b8..d5dd83b8 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -58,14 +58,14 @@ import 'data/vip_rule_details.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 +const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///正式 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 -const base_url = "http://192.168.10.236:8776/app/"; ///费韬 -const baseUrl = "http://192.168.10.236:8776/app/"; ///费韬 +// const base_url = "http://192.168.10.236:8776/app/"; ///费韬 +// const baseUrl = "http://192.168.10.236:8776/app/"; ///费韬 // const base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 33d0301a..35c2bbd6 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8776/app/'; + baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; } final Dio _dio;