diff --git a/lib/community/headlines/article_list.dart b/lib/community/headlines/article_list.dart index 81645697..9bf6a0e0 100644 --- a/lib/community/headlines/article_list.dart +++ b/lib/community/headlines/article_list.dart @@ -100,7 +100,7 @@ class _ArticleList extends State { children: [ Expanded( child: Container( - height: 96, + height: 105, child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -115,6 +115,7 @@ class _ArticleList extends State { color: Colors.black, ), ), + SizedBox(height:5), Text( widget?.articles[position]?.viceTitle ?? "", overflow: TextOverflow.ellipsis, @@ -125,50 +126,49 @@ class _ArticleList extends State { color: Color(0xFF353535), ), ), - // SizedBox(height: 20), - Row( - children: [ - Expanded( - child: Text( - widget.articles != null - ? widget.articles[position]?.author?.name ?? "" - : "", - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF8E8E8E), - ), - ), - ), - SizedBox(width: 8), - Image.asset( - "assets/image/browse.png", - width: 14, - height: 14, - color: Color(0xFF808080), - ), - Expanded( - child: Text( - "${widget?.articles[position]?.viewers}" ?? "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), - ), - )), - Text( - widget?.articles[position]?.createTime?.split(" ")[0] ?? - "", - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF8D8D8D), - ), - ), - ], - ), + Expanded(child:Row( + children: [ + Expanded( + child: Text( + widget.articles != null + ? widget.articles[position]?.author?.name ?? "" + : "", + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF8E8E8E), + ), + ), + ), + SizedBox(width: 8), + Image.asset( + "assets/image/browse.png", + width: 14, + height: 14, + color: Color(0xFF808080), + ), + Expanded( + child: Text( + "${widget?.articles[position]?.viewers}" ?? "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + )), + Text( + widget?.articles[position]?.createTime?.split(" ")[0] ?? + "", + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF8D8D8D), + ), + ), + ], + ),), ], ), )), @@ -177,8 +177,8 @@ class _ArticleList extends State { widget?.articles[position]?.coverImg ?? "", fit: BoxFit.cover, radius: BorderRadius.all(Radius.circular(2)), - width: 96, - height: 96, + width: 100, + height: 100, ), ], ), diff --git a/lib/community/headlines/headlines_collection.dart b/lib/community/headlines/headlines_collection.dart index bbb6cdab..07c48dfe 100644 --- a/lib/community/headlines/headlines_collection.dart +++ b/lib/community/headlines/headlines_collection.dart @@ -86,7 +86,7 @@ class _HeadlinesCollection extends State { headlines?.coverImg ?? "", width: 225.w, height: 60.h, - fit: BoxFit.fill, + fit: BoxFit.cover, errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), diff --git a/lib/home/home_view/featured_acticvity.dart b/lib/home/home_view/featured_acticvity.dart index f9fe0e74..dfb3ac54 100644 --- a/lib/home/home_view/featured_acticvity.dart +++ b/lib/home/home_view/featured_acticvity.dart @@ -92,58 +92,60 @@ class _FeaturedActivity extends State { ), ), if (activityList != null && activityList.length > 1) - Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/web_page', - arguments: {"activityId": activityList[1].id}); - }, - child: Container( - child: stackItem(12.sp, activityList[1]), - margin: EdgeInsets.symmetric(horizontal: 5.w), - width: (MediaQuery.of(context).size.width - 42) / 2, - height: 190.h / 2, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Colors.green, - image: DecorationImage( - image: NetworkImage( - activityList[1].coverImg, + Expanded( + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/web_page', + arguments: {"activityId": activityList[1].id}); + }, + child: Container( + child: stackItem(12.sp, activityList[1]), + margin: EdgeInsets.symmetric(horizontal: 5.w), + width: (MediaQuery.of(context).size.width - 42) / 2, + height: 190.h / 2, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: Colors.green, + image: DecorationImage( + image: NetworkImage( + activityList[1].coverImg, + ), + fit: BoxFit.fill, ), - fit: BoxFit.fill, ), ), ), - ), - SizedBox( - height: 5, - ), - GestureDetector( - onTap: () { - Navigator.of(context).pushNamed('/router/web_page', - arguments: {"activityId": activityList[2].id}); - }, - child: Container( - child: stackItem(12.sp, activityList[2]), - margin: EdgeInsets.symmetric(horizontal: 5.w), - width: (MediaQuery.of(context).size.width - 42) / 2, - height: 190.h / 2, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(4), - color: Colors.blue, - image: DecorationImage( - image: NetworkImage( - activityList[2].coverImg, + SizedBox( + height: 5, + ), + GestureDetector( + onTap: () { + Navigator.of(context).pushNamed('/router/web_page', + arguments: {"activityId": activityList[2].id}); + }, + child: Container( + child: stackItem(12.sp, activityList[2]), + margin: EdgeInsets.symmetric(horizontal: 5.w), + width: (MediaQuery.of(context).size.width - 42) / 2, + height: 190.h / 2, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: Colors.blue, + image: DecorationImage( + image: NetworkImage( + activityList[2].coverImg, + ), + fit: BoxFit.fill, ), - fit: BoxFit.fill, ), ), ), - ), - ], + ], + ), ), ), ], @@ -157,72 +159,74 @@ class _FeaturedActivity extends State { } Widget stackItem(double textSize, Activity activity) { - return Container(color: Color.fromARGB(80, 0, 0, 0),child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 8, top: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - activity.mainTitle, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: textSize, - color: Colors.white, - ), + return Container( + color: Color.fromARGB(80, 0, 0, 0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 8, top: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + activity.mainTitle, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: textSize, + color: Colors.white, + ), + ), + SizedBox( + height: 2, + ), + Text( + activity?.viceTitle ?? "", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, + fontSize: 12.sp, + color: Colors.white, + ), + ), + ], ), - SizedBox( - height: 2, + ), + Container( + width: 58.w, + margin: EdgeInsets.only(left: 8, bottom: 8), + padding: EdgeInsets.symmetric( + vertical: 4.h, + horizontal: 8.w, ), - Text( - activity?.viceTitle??"", - style: TextStyle( - fontWeight: MyFontWeight.semi_bold, - fontSize: 12.sp, - color: Colors.white, - ), + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(20), ), - ], - ), - ), - Container( - width: 58.w, - margin: EdgeInsets.only(left: 8, bottom: 8), - padding: EdgeInsets.symmetric( - vertical: 4.h, - horizontal: 8.w, - ), - decoration: BoxDecoration( - color: Color(0xFF32A060), - borderRadius: BorderRadius.circular(20), - ), - alignment: Alignment.center, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "了解", - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.medium, - color: Colors.white, - ), - ), - Icon( - Icons.keyboard_arrow_right, - color: Colors.white, - size: 12, + alignment: Alignment.center, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "了解", + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, + ), + ), + Icon( + Icons.keyboard_arrow_right, + color: Colors.white, + size: 12, + ), + ], ), - ], - ), - ), - ], - )); + ), + ], + )); } } diff --git a/lib/home/home_view/quick_order.dart b/lib/home/home_view/quick_order.dart index 3fd1a771..b21ff508 100644 --- a/lib/home/home_view/quick_order.dart +++ b/lib/home/home_view/quick_order.dart @@ -52,8 +52,7 @@ class _QuickOrder extends State { "latitude": latitude, "longitude": longitude, "searchKey": searchKey - }).catchError((error) { - }); + }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { storeList = baseData.data; } @@ -62,7 +61,7 @@ class _QuickOrder extends State { getLatLng() async { SharedPreferences.getInstance().then( - (value) => { + (value) => { apiService = ApiService(Dio(), context: context, token: value.getString('token'), @@ -116,9 +115,9 @@ class _QuickOrder extends State { latLng = BMFCoordinate(event["latitude"], event["longitude"]); } BMFCalculateUtils.coordConvert( - coordinate: latLng, - fromType: BMF_COORD_TYPE.BD09LL, - toType: BMF_COORD_TYPE.COMMON) + coordinate: latLng, + fromType: BMF_COORD_TYPE.BD09LL, + toType: BMF_COORD_TYPE.COMMON) .then((value) { this.latLng = value; saveLatLng( @@ -143,8 +142,7 @@ class _QuickOrder extends State { }); Location.getInstance().prepareLoc(); - Location.getInstance().startLocation(context).then((value) { - }); + Location.getInstance().startLocation(context).then((value) {}); } saveLatLng(BMFCoordinate latLng, province, city, district) async { @@ -171,7 +169,7 @@ class _QuickOrder extends State { scrollDirection: Axis.horizontal, physics: BouncingScrollPhysics(), padding: EdgeInsets.symmetric(horizontal: 10), - itemCount:storeList == null ? 0 : storeList.length, + itemCount: storeList == null ? 0 : storeList.length, itemBuilder: (context, position) { return GestureDetector( onTap: () { @@ -188,7 +186,7 @@ class _QuickOrder extends State { ); } }, - child: storeItem(storeList[position],position), + child: storeItem(storeList[position], position), ); }, ), @@ -197,7 +195,7 @@ class _QuickOrder extends State { ); } - Widget storeItem(Store store,position) { + Widget storeItem(Store store, position) { return Container( width: 160, height: 160, @@ -226,7 +224,7 @@ class _QuickOrder extends State { child: MImage( store.facade, width: double.infinity, - height: 95, + height: 100, fit: BoxFit.cover, errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", @@ -243,7 +241,7 @@ class _QuickOrder extends State { child: SvgPicture.asset( "assets/svg/kuaijiexiadan_bg.svg", width: double.infinity, - height: 95, + height: 85, fit: BoxFit.fill, ), ), @@ -265,15 +263,18 @@ class _QuickOrder extends State { errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), - Padding(padding: EdgeInsets.only(left: 10,right: 10),child:Text( - store.storeName, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 13.sp, - fontWeight: MyFontWeight.medium, - color: Colors.black, + Padding( + padding: EdgeInsets.only(left: 10, right: 10), + child: Text( + store.storeName, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 13.sp, + fontWeight: MyFontWeight.medium, + color: Colors.black, + ), ), - ),), + ), // Text( // store?.remark ??"", // style: TextStyle( @@ -380,7 +381,7 @@ class _QuickOrder extends State { S.of(context).ninxiangjiquanxianweikaiqi, S.of(context).weilekaipaizhaoxuanzhetouxiang, S.of(context).kaiqiquanxian, - (result) async { + (result) async { if (result) { await openAppSettings(); } @@ -396,7 +397,12 @@ class _QuickOrder extends State { String tableId = uri.queryParameters["tableId"]; String tenantCode = uri.queryParameters["tenantCode"]; String shopId = uri.queryParameters["shopId"]; - if (tableId != null && tableId != "" && tenantCode != null && tenantCode != "" && shopId != null && shopId != "") { + if (tableId != null && + tableId != "" && + tenantCode != null && + tenantCode != "" && + shopId != null && + shopId != "") { Navigator.of(context).pushNamed( '/router/store_order', arguments: { diff --git a/lib/retrofit/min_api.dart b/lib/retrofit/min_api.dart index 3a8b91c6..3ee52d73 100644 --- a/lib/retrofit/min_api.dart +++ b/lib/retrofit/min_api.dart @@ -21,12 +21,12 @@ 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://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/";///费韬 diff --git a/lib/retrofit/min_api.g.dart b/lib/retrofit/min_api.g.dart index c9ad7289..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://user.prod.kunqi.lotus-wallet.com/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 fc8414cb..cf056f6e 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -53,8 +53,8 @@ import 'data/wx_pay.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 @@ -66,8 +66,8 @@ part 'retrofit_api.g.dart'; // const baseUrl = "http://192.168.10.37:8766/app/"; -const base_url = "http://192.168.10.142:8766/app/";///詹云久 -const baseUrl = "http://192.168.10.142:8766/app/";///詹云久 +// const base_url = "http://192.168.10.142:8766/app/";///詹云久 +// const baseUrl = "http://192.168.10.142:8766/app/";///詹云久 @RestApi(baseUrl: baseUrl) abstract class ApiService { diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 0adf7d45..d1a64c02 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.142:8766/app/'; + baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; } final Dio _dio; diff --git a/lib/view_widget/new_people_reward.dart b/lib/view_widget/new_people_reward.dart index 4769d8a2..8a0a702a 100644 --- a/lib/view_widget/new_people_reward.dart +++ b/lib/view_widget/new_people_reward.dart @@ -121,7 +121,7 @@ class _NewPeopleReward extends State { ), ), margin: EdgeInsets.symmetric(horizontal: 60, vertical: 5), - padding: EdgeInsets.only(left: 16.w, right: 33.w), + padding: EdgeInsets.only(left: 16.w, right: 25.w), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -138,7 +138,11 @@ class _NewPeopleReward extends State { ), ), TextSpan( - text:newUserCouponList.discountAmount, + text: double.tryParse( + "${newUserCouponList.discountAmount}" ?? "0") + .toInt() + .toString() ?? + "", style: TextStyle( fontSize: 35.sp, fontWeight: MyFontWeight.semi_bold, @@ -148,44 +152,46 @@ class _NewPeopleReward extends State { ], ), ), - Padding( - padding: EdgeInsets.only(top: 4, bottom: 4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - newUserCouponList.storeName, - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF181818), - ), - ), - Text( - newUserCouponList.couponName, - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFFD3623D), + Expanded( + child: Padding( + padding: EdgeInsets.only(top: 4, bottom: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + newUserCouponList.storeName, + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF181818), + ), ), - ), - Text( - "有效期至:${newUserCouponList.useEndTime}", - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFF727272), + Text( + newUserCouponList.couponName, + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFFD3623D), + ), ), - ) - ], - )), + Text( + "有效期至:${(newUserCouponList.useEndTime != null && newUserCouponList.useEndTime != "") ? newUserCouponList.useEndTime.split(" ")[0] : "$newUserCouponList.useEndTime"}", + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 10.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFF727272), + ), + ) + ], + )), + ), ], ), );