Browse Source

店铺推荐样式更改,精彩活动右边加权重,新人奖励弹窗样式优化更改,头条合集:cover

ff_new
w-R 3 years ago
parent
commit
2fafa2b87c
  1. 12
      lib/community/headlines/article_list.dart
  2. 2
      lib/community/headlines/headlines_collection.dart
  3. 8
      lib/home/home_view/featured_acticvity.dart
  4. 24
      lib/home/home_view/quick_order.dart
  5. 8
      lib/retrofit/min_api.dart
  6. 2
      lib/retrofit/min_api.g.dart
  7. 8
      lib/retrofit/retrofit_api.dart
  8. 2
      lib/retrofit/retrofit_api.g.dart
  9. 14
      lib/view_widget/new_people_reward.dart

12
lib/community/headlines/article_list.dart

@ -100,7 +100,7 @@ class _ArticleList extends State<ArticleList> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
height: 96, height: 105,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -115,6 +115,7 @@ class _ArticleList extends State<ArticleList> {
color: Colors.black, color: Colors.black,
), ),
), ),
SizedBox(height:5),
Text( Text(
widget?.articles[position]?.viceTitle ?? "", widget?.articles[position]?.viceTitle ?? "",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -125,8 +126,7 @@ class _ArticleList extends State<ArticleList> {
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),
// SizedBox(height: 20), Expanded(child:Row(
Row(
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
@ -168,7 +168,7 @@ class _ArticleList extends State<ArticleList> {
), ),
), ),
], ],
), ),),
], ],
), ),
)), )),
@ -177,8 +177,8 @@ class _ArticleList extends State<ArticleList> {
widget?.articles[position]?.coverImg ?? "", widget?.articles[position]?.coverImg ?? "",
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.all(Radius.circular(2)), radius: BorderRadius.all(Radius.circular(2)),
width: 96, width: 100,
height: 96, height: 100,
), ),
], ],
), ),

2
lib/community/headlines/headlines_collection.dart

@ -86,7 +86,7 @@ class _HeadlinesCollection extends State<HeadlinesCollection> {
headlines?.coverImg ?? "", headlines?.coverImg ?? "",
width: 225.w, width: 225.w,
height: 60.h, height: 60.h,
fit: BoxFit.fill, fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),

8
lib/home/home_view/featured_acticvity.dart

@ -92,7 +92,8 @@ class _FeaturedActivity extends State<FeaturedActivity> {
), ),
), ),
if (activityList != null && activityList.length > 1) if (activityList != null && activityList.length > 1)
Container( Expanded(
child: Container(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
@ -146,6 +147,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
], ],
), ),
), ),
),
], ],
), ),
), ),
@ -157,7 +159,9 @@ class _FeaturedActivity extends State<FeaturedActivity> {
} }
Widget stackItem(double textSize, Activity activity) { Widget stackItem(double textSize, Activity activity) {
return Container(color: Color.fromARGB(80, 0, 0, 0),child: Column( return Container(
color: Color.fromARGB(80, 0, 0, 0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

24
lib/home/home_view/quick_order.dart

@ -52,8 +52,7 @@ class _QuickOrder extends State<QuickOrder> {
"latitude": latitude, "latitude": latitude,
"longitude": longitude, "longitude": longitude,
"searchKey": searchKey "searchKey": searchKey
}).catchError((error) { }).catchError((error) {});
});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
storeList = baseData.data; storeList = baseData.data;
} }
@ -143,8 +142,7 @@ class _QuickOrder extends State<QuickOrder> {
}); });
Location.getInstance().prepareLoc(); Location.getInstance().prepareLoc();
Location.getInstance().startLocation(context).then((value) { Location.getInstance().startLocation(context).then((value) {});
});
} }
saveLatLng(BMFCoordinate latLng, province, city, district) async { saveLatLng(BMFCoordinate latLng, province, city, district) async {
@ -226,7 +224,7 @@ class _QuickOrder extends State<QuickOrder> {
child: MImage( child: MImage(
store.facade, store.facade,
width: double.infinity, width: double.infinity,
height: 95, height: 100,
fit: BoxFit.cover, fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
@ -243,7 +241,7 @@ class _QuickOrder extends State<QuickOrder> {
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/kuaijiexiadan_bg.svg", "assets/svg/kuaijiexiadan_bg.svg",
width: double.infinity, width: double.infinity,
height: 95, height: 85,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
), ),
@ -265,7 +263,9 @@ class _QuickOrder extends State<QuickOrder> {
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),
Padding(padding: EdgeInsets.only(left: 10,right: 10),child:Text( Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: Text(
store.storeName, store.storeName,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
@ -273,7 +273,8 @@ class _QuickOrder extends State<QuickOrder> {
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: Colors.black, color: Colors.black,
), ),
),), ),
),
// Text( // Text(
// store?.remark ??"", // store?.remark ??"",
// style: TextStyle( // style: TextStyle(
@ -396,7 +397,12 @@ class _QuickOrder extends State<QuickOrder> {
String tableId = uri.queryParameters["tableId"]; String tableId = uri.queryParameters["tableId"];
String tenantCode = uri.queryParameters["tenantCode"]; String tenantCode = uri.queryParameters["tenantCode"];
String shopId = uri.queryParameters["shopId"]; 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( Navigator.of(context).pushNamed(
'/router/store_order', '/router/store_order',
arguments: { arguments: {

8
lib/retrofit/min_api.dart

@ -21,12 +21,12 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "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 baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
const base_url = "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 baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const base_url = "http://192.168.10.236:8765/app/";/// // const base_url = "http://192.168.10.236:8765/app/";///
// const baseUrl = "http://192.168.10.236:8765/app/";/// // const baseUrl = "http://192.168.10.236:8765/app/";///

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://user.prod.kunqi.lotus-wallet.com/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

8
lib/retrofit/retrofit_api.dart

@ -53,8 +53,8 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "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 baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222 // const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "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 baseUrl = "http://192.168.10.37:8766/app/";
const base_url = "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/";/// // const baseUrl = "http://192.168.10.142:8766/app/";///
@RestApi(baseUrl: baseUrl) @RestApi(baseUrl: baseUrl)
abstract class ApiService { abstract class ApiService {

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.142:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

14
lib/view_widget/new_people_reward.dart

@ -121,7 +121,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
), ),
), ),
margin: EdgeInsets.symmetric(horizontal: 60, vertical: 5), 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( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -138,7 +138,11 @@ class _NewPeopleReward extends State<NewPeopleReward> {
), ),
), ),
TextSpan( TextSpan(
text:newUserCouponList.discountAmount, text: double.tryParse(
"${newUserCouponList.discountAmount}" ?? "0")
.toInt()
.toString() ??
"",
style: TextStyle( style: TextStyle(
fontSize: 35.sp, fontSize: 35.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -148,7 +152,8 @@ class _NewPeopleReward extends State<NewPeopleReward> {
], ],
), ),
), ),
Padding( Expanded(
child: Padding(
padding: EdgeInsets.only(top: 4, bottom: 4), padding: EdgeInsets.only(top: 4, bottom: 4),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -175,7 +180,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
), ),
), ),
Text( Text(
"有效期至:${newUserCouponList.useEndTime}", "有效期至:${(newUserCouponList.useEndTime != null && newUserCouponList.useEndTime != "") ? newUserCouponList.useEndTime.split(" ")[0] : "$newUserCouponList.useEndTime"}",
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
@ -186,6 +191,7 @@ class _NewPeopleReward extends State<NewPeopleReward> {
) )
], ],
)), )),
),
], ],
), ),
); );

Loading…
Cancel
Save