Browse Source

首页更改,

部分bug更改;
zyh
w-R 3 years ago
parent
commit
d467bf6058
  1. 11
      lib/home/home_page.dart
  2. 13
      lib/home/home_view/discount_zone.dart
  3. 70
      lib/home/home_view/home_recommend_goods.dart
  4. 58
      lib/home/home_view/top_selling_list.dart
  5. 2
      lib/home/points_mall_view/points_goods_title.dart
  6. 48
      lib/home/points_mall_view/points_goods_view.dart
  7. 9
      lib/home/welfare_exchange.dart
  8. 14
      lib/home/welfare_page.dart
  9. 5
      lib/integral_store/integral_store_details_page.dart
  10. 4
      lib/mine/mine_page.dart
  11. 6
      lib/mine/mine_view/mine_item.dart
  12. 1080
      lib/retrofit/data/home_rank.dart
  13. 5
      lib/retrofit/retrofit_api.dart
  14. 21
      lib/retrofit/retrofit_api.g.dart
  15. 7
      lib/settlement/settlement_view/coupon.dart
  16. 2
      lib/store/store_order.dart
  17. 7
      lib/view_widget/coupon_details_dialog.dart
  18. 1
      lib/view_widget/item_title.dart
  19. 4
      lib/view_widget/mine_vip_entry.dart
  20. 10
      lib/view_widget/new_coupon_widget.dart
  21. 7
      lib/view_widget/recharge_details_dialog.dart

11
lib/home/home_page.dart

@ -25,6 +25,7 @@ import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/founder.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/goods_category.dart';
import 'package:huixiang/retrofit/data/home_rank.dart';
import 'package:huixiang/retrofit/data/login_info.dart';
import 'package:huixiang/retrofit/data/msg_stats.dart';
import 'package:huixiang/retrofit/data/page.dart';
@ -146,6 +147,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
int totalMsg = 0;
List<Coupon> coupons = [];
int state = 1;
HomeRank homeRank;
queryHome() async {
// EasyLoading.show(status: S.of(context).zhengzaijiazai);
@ -180,6 +182,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
articles.addAll(article.data.list);
}
final BaseData<HomeRank> rank = await apiService.recommendRank().catchError((onError) {});
if (rank != null && rank.isSuccess) {
homeRank = rank.data;
}
final BaseData<PageInfo<Goods>> goodsData = await apiService.creditGoods({
"orderDesc": true,
"orderType": 1,
@ -510,13 +517,13 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
DiscountZone(coupons),
///-
HomeRecommendGoods(),
HomeRecommendGoods(homeRank),
///
WelfareCore(),
///
TopSellingList(),
TopSellingList(homeRank),
// ///
// QuickOrder(),

13
lib/home/home_view/discount_zone.dart

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/classic_header.dart';
@ -74,7 +75,7 @@ class _DiscountZone extends State<DiscountZone> {
Widget discountItem(Coupon coupon) {
return Container(
width: 270.w,
width: 290.w,
height: 100.h,
decoration: BoxDecoration(
image: DecorationImage(
@ -82,7 +83,7 @@ class _DiscountZone extends State<DiscountZone> {
image: AssetImage("assets/image/discount.webp"),
),
),
margin: EdgeInsets.only(right: 6.w),
margin: EdgeInsets.only(right: 10.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -140,6 +141,7 @@ class _DiscountZone extends State<DiscountZone> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
padding: EdgeInsets.only(right: 5),
child:discountWidget(coupon),
)),
],
@ -174,8 +176,7 @@ class _DiscountZone extends State<DiscountZone> {
),
Text(
coupon != null
? double.tryParse("${coupon.discountAmount}" ?? "0")
.toInt()
? double.tryParse("${coupon.discountAmount}" ?? "0").toInt()
.toString()
: "",
style: TextStyle(
@ -274,7 +275,7 @@ class _DiscountZone extends State<DiscountZone> {
),
Text(
coupon != null
? double.tryParse("${coupon.limitAmount}" ?? "0").toStringAsFixed(2)
? "${AppUtils.calculateDouble(double.tryParse(coupon.limitAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 28.sp,
@ -303,7 +304,7 @@ class _DiscountZone extends State<DiscountZone> {
: "",
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),

70
lib/home/home_view/home_recommend_goods.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:huixiang/retrofit/data/home_rank.dart';
import 'package:huixiang/retrofit/data/shopping_home_config.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -11,6 +12,11 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HomeRecommendGoods extends StatefulWidget {
// final List<CommodityZone> commodityZone;
final HomeRank homeRank;
HomeRecommendGoods(this.homeRank);
@override
State<StatefulWidget> createState() {
return _HomeRecommendGoods();
@ -40,15 +46,25 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
borderRadius: BorderRadius.circular(6),
color: Colors.white,
),
margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 14.h,bottom: 24.h),
margin: EdgeInsets.only(
left: 14.w, right: 14.w, top: 14.h, bottom: 24.h),
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemCount:3,
itemCount: widget.homeRank?.commodityZone?.length ?? 0,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: recommendGoodsItem(),
onTap: () {
Navigator.of(context).pushNamed(
'/router/store_order',
arguments: {
"id": widget.homeRank.commodityZone[position].storeId,
"tenant": widget.homeRank.commodityZone[position].tenantCode,
"storeName": ""
},
);
},
child: recommendGoodsItem(widget.homeRank?.commodityZone[position]),
);
},
),
@ -58,7 +74,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
);
}
Widget recommendGoodsItem() {
Widget recommendGoodsItem(CommodityZone commodityZone) {
return Container(
width: 158.w,
margin: EdgeInsets.only(right: 7.w, left: 12.w, top: 12.h),
@ -72,35 +88,14 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
),
child:
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: Image.asset(
"assets/image/icon_story_td.webp",
width: 158.w,
child: MImage(
commodityZone?.productImg ?? "",
fit: BoxFit.contain,
radius: BorderRadius.circular(4),
width: 158,
height: 158,
fit: BoxFit.cover,
),
),),
Container(
width: 81.w,
height: 27.h,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
bottomLeft: Radius.circular(0),
bottomRight: Radius.circular(100),
topRight: Radius.circular(100),),
color: Color(0xFF32A060),
),
child: Text(
"直降¥120.00",
style: TextStyle(
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
fontSize: 12.sp,
),
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
),
),
],
@ -109,7 +104,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
height: 8.h,
),
Text(
"花生吐司",
commodityZone?.productName ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -117,14 +112,15 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),SizedBox(
),
SizedBox(
height: 4.h,
),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "¥123.00",
text: commodityZone?.price ?? "",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
@ -132,7 +128,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
),
),
TextSpan(
text: "¥123.00",
text: commodityZone?.applyPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
decoration: TextDecoration.lineThrough,

58
lib/home/home_view/top_selling_list.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:huixiang/retrofit/data/home_rank.dart';
import 'package:huixiang/retrofit/data/shopping_home_config.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -11,6 +12,8 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class TopSellingList extends StatefulWidget {
final HomeRank homeRank;
TopSellingList(this.homeRank);
@override
State<StatefulWidget> createState() {
return _TopSellingList();
@ -34,8 +37,10 @@ class _TopSellingList extends State<TopSellingList> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/hot_list.webp"),
image: NetworkImage(
widget?.homeRank?.commodityListImg ?? ""
),
fit: BoxFit.cover,
),
),
margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 12.h,bottom: 23.h),
@ -63,11 +68,12 @@ class _TopSellingList extends State<TopSellingList> {
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemCount:3,
itemCount:widget.homeRank.commodityList.length ?? 0,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: hotSaleItem(),
onTap: () {
},
child: hotSaleItem(widget.homeRank.commodityList[position],position),
);
},
),
@ -77,7 +83,7 @@ class _TopSellingList extends State<TopSellingList> {
);
}
Widget hotSaleItem() {
Widget hotSaleItem(CommodityList commodityList,index) {
return Container(
width: 290.w,
decoration: BoxDecoration(
@ -91,7 +97,7 @@ class _TopSellingList extends State<TopSellingList> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"好喝榜",
commodityList?.typeName ?? "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
@ -102,15 +108,23 @@ class _TopSellingList extends State<TopSellingList> {
),
Expanded(child: ListView.builder(
padding: EdgeInsets.zero,
itemCount:6,
itemCount:widget.homeRank.commodityList[index].goodList.length>3?3:widget.homeRank.commodityList[index].goodList.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
Navigator.of(context).pushNamed(
'/router/store_order',
arguments: {
"id": widget.homeRank.commodityList[index].goodList[position].storeId,
"tenant": widget.homeRank.commodityList[index].goodList[position].tenantCode,
"storeName": ""
},
);
},
child: rankingItem(),
child: rankingItem(widget.homeRank.commodityList[index].goodList[position],position),
);
},
),)
@ -119,7 +133,7 @@ class _TopSellingList extends State<TopSellingList> {
);
}
Widget rankingItem() {
Widget rankingItem(GoodList goodList,index) {
return Container(
margin: EdgeInsets.only(right:14.w,top: 12.h,bottom: 12.h),
child: Row(
@ -128,14 +142,18 @@ class _TopSellingList extends State<TopSellingList> {
children: [
Stack(
children: [
Image.asset(
"assets/image/icon_story_td.webp",
width: 54.w,
height: 54,
MImage(
goodList.productImg ?? "",
fit: BoxFit.cover,
), Image.asset(
"assets/image/ranking1.webp",
width: 25.w,
radius: BorderRadius.circular(4),
width: 54,
height: 54,
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
),
Image.asset(
index == 0 ? "assets/image/ranking1.webp" :(index == 1 ? "assets/image/ranking2.webp": "assets/image/ranking3.webp"),
width: 25,
height: 25,
fit: BoxFit.cover,
),
@ -151,7 +169,7 @@ class _TopSellingList extends State<TopSellingList> {
children: [
Padding(padding:EdgeInsets.only(top: 5.h,bottom: 8.h),
child: Text(
"暴打柠檬茶",
goodList?.productName ?? "",
style: TextStyle(
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
@ -162,7 +180,7 @@ class _TopSellingList extends State<TopSellingList> {
TextSpan(
children: [
TextSpan(
text: "¥22.00",
text: goodList?.price ?? "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
@ -170,7 +188,7 @@ class _TopSellingList extends State<TopSellingList> {
),
),
TextSpan(
text: "¥22.00",
text: goodList?.applyPrice ?? "",
style: TextStyle(
fontSize:10.sp,
decoration: TextDecoration.lineThrough,

2
lib/home/points_mall_view/points_goods_title.dart

@ -48,7 +48,7 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
// ),
ItemTitle(
text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.webp",
// imgPath: "assets/image/icon_points_mall.webp",
moreText: _itemText,
moreType: 1,
items: sortString

48
lib/home/points_mall_view/points_goods_view.dart

@ -25,9 +25,9 @@ class _PointGoods extends State<PointGoods> {
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}";
}
}
@ -52,7 +52,7 @@ class _PointGoods extends State<PointGoods> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (295 / 2 + (295 / 2) * AppUtils.textScale(context)),
200 / (305 / 2 + (305 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
@ -127,32 +127,34 @@ class _PointGoods extends State<PointGoods> {
children: [
Text(
pointPrice(goods),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
Row(
children: [
Image.asset(
"assets/image/green_leaf.webp",
fit: BoxFit.cover,
width: 12,
height: 12,
),
Text(
"x100",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFE5600D),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
// Row(
// children: [
// Image.asset(
// "assets/image/green_leaf.webp",
// fit: BoxFit.cover,
// width: 12,
// height: 12,
// ),
// Text(
// "x100",
// overflow: TextOverflow.ellipsis,
// maxLines: 2,
// style: TextStyle(
// color: Color(0xFF32A060),
// fontWeight: MyFontWeight.semi_bold,
// fontSize: 15.sp,
// ),
// ),
// ],
// ),
],
),
// Row(

9
lib/home/welfare_exchange.dart

@ -426,7 +426,7 @@ class _WelfareExchange extends State<WelfareExchange> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (261 / 2 + (261 / 2) * AppUtils.textScale(context)),
200 / (285 / 2 + (285 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
@ -505,6 +505,8 @@ class _WelfareExchange extends State<WelfareExchange> {
Spacer(),
Text(
pointPrice(goods),
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
@ -529,10 +531,11 @@ class _WelfareExchange extends State<WelfareExchange> {
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
return "${AppUtils.calculateDouble(double.tryParse(goods.oneMoney) ?? 0)}";
}
}
}

14
lib/home/welfare_page.dart

@ -41,6 +41,8 @@ class _WelfarePage extends State<WelfarePage> {
bool orderDesc = true;
int orderType = 1;
int type = 1;
// int index = 0;
@override
void initState() {
@ -372,8 +374,8 @@ class _WelfarePage extends State<WelfarePage> {
),
)),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
child:weekWidget(cop),
@ -523,7 +525,7 @@ class _WelfarePage extends State<WelfarePage> {
),
Text(
coupon != null
? double.tryParse("${cop.limitAmount}" ?? "0").toStringAsFixed(2)
? "${AppUtils.calculateDouble(double.tryParse(cop.limitAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 24.sp,
@ -601,7 +603,7 @@ class _WelfarePage extends State<WelfarePage> {
),
),
);
if(cop.status == 1)
if(cop.status == 1 || cop.status == 2)
return Align(
alignment: Alignment.centerRight,
child: InkWell(
@ -874,9 +876,9 @@ class _WelfarePage extends State<WelfarePage> {
if(goodsPrice?.onePrice!=null && goodsPrice?.onePrice!="0"){
return S.of(context).jifen_(goodsPrice?.onePrice);
}else if((goodsPrice?.onePrice == null || goodsPrice?.onePrice == "0") && ((goodsPrice?.price != null && goodsPrice?.price != "0") || (goodsPrice?.money != null && goodsPrice?.money != "0.00"))){
return (goodsPrice?.price== "0"|| goodsPrice?.price == null ? "" : S.of(context).jifen_(goodsPrice?.price)) + (goodsPrice?.money== "0"|| goodsPrice?.money == null ? "" : " + ${goodsPrice?.money}");
return (goodsPrice?.price== "0"|| goodsPrice?.price == null ? "" : S.of(context).jifen_(goodsPrice?.price)) + (goodsPrice?.money== "0"|| goodsPrice?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goodsPrice?.money) ?? 0)}");
}else if(goodsPrice.oneMoney != null && goodsPrice.oneMoney != "0.00"){
return "${goodsPrice.oneMoney}";
return "${AppUtils.calculateDouble(double.tryParse(goodsPrice.oneMoney) ?? 0)}";
}
}

5
lib/integral_store/integral_store_details_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -84,9 +85,9 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${AppUtils.calculateDouble(double.tryParse(goods?.money) ?? 0)}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
return "${AppUtils.calculateDouble(double.tryParse(goods?.oneMoney) ?? 0)}";
}
}

4
lib/mine/mine_page.dart

@ -18,7 +18,6 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:huixiang/view_widget/mine_vip_entry.dart';
import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart';
@ -26,7 +25,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart';
import 'mine_view/wallet_coupon_view.dart';
class MinePage extends StatefulWidget {
@ -247,7 +245,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
),
),
Container(
margin: EdgeInsets.only(top: 255),
margin: EdgeInsets.only(top: 265),
child: Column(
children: [
///

6
lib/mine/mine_view/mine_item.dart

@ -122,7 +122,7 @@ class _MineItem extends State<MineItem> {
// "assets/image/icon_location_address.webp",
// ),
// ),),
// ///
// ///
// Expanded(child: InkWell(
// onTap: () {
// showCallMobile();
@ -394,9 +394,9 @@ class _MineItem extends State<MineItem> {
title: Text(S.of(context).bodadianhua),
actions: [
CupertinoActionSheetAction(
child: Text("15392949097"),
child: Text("19947603193"),
onPressed: () {
callMobile("15392949097");
callMobile("19947603193");
Navigator.of(context).pop();
},
isDefaultAction: true,

1080
lib/retrofit/data/home_rank.dart

File diff suppressed because it is too large Load Diff

5
lib/retrofit/retrofit_api.dart

@ -36,6 +36,7 @@ import 'data/goods.dart';
import 'data/goods_category.dart';
import 'data/headlines_list.dart';
import 'data/headlines_list_details.dart';
import 'data/home_rank.dart';
import 'data/invitation_list.dart';
import 'data/logistics.dart';
import 'data/member_Infor.dart';
@ -523,4 +524,8 @@ abstract class ApiService {
@GET("/home/version")
Future<BaseData<AppUpdate>> appVersion();
///App推荐排行
@GET("/home/recommendRank")
Future<BaseData<HomeRank>> recommendRank();
}

21
lib/retrofit/retrofit_api.g.dart

@ -1981,4 +1981,25 @@ class _ApiService implements ApiService {
);
return value;
}
@override
Future<BaseData<HomeRank>> recommendRank() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/home/recommendRank',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<HomeRank>.fromJson(
_result.data,
(json) => HomeRank.fromJson(json),
);
return value;
}
}

7
lib/settlement/settlement_view/coupon.dart

@ -3,6 +3,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/separator.dart';
@ -294,9 +295,7 @@ class _CouponWidget extends State<CouponWidget> {
),
Text(
widget.couponList != null
? double.tryParse("${widget.couponList.discountAmount}" ?? "0")
.toInt()
.toString()
? "${AppUtils.calculateDouble(double.tryParse(widget.couponList.discountAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 30.sp,
@ -394,7 +393,7 @@ class _CouponWidget extends State<CouponWidget> {
),
Text(
widget.couponList != null
? double.tryParse("${widget.couponList.limitAmount}" ?? "0").toStringAsFixed(2)
? "${AppUtils.calculateDouble(double.tryParse(widget.couponList.limitAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 28.sp,

2
lib/store/store_order.dart

@ -438,7 +438,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
// if(count() != 0)
Positioned(
bottom: 0,
bottom: 30,
left: 0,
right: 0,
child: Stack(

7
lib/view_widget/coupon_details_dialog.dart

@ -26,7 +26,7 @@ class _CouponDetailsWidget extends State<CouponDetailsWidget> {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height:291.h,
height:355.h,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
@ -34,6 +34,8 @@ class _CouponDetailsWidget extends State<CouponDetailsWidget> {
topRight: Radius.circular(8),
),
),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -78,6 +80,7 @@ class _CouponDetailsWidget extends State<CouponDetailsWidget> {
),
Container(
color: Colors.white,
margin: EdgeInsets.symmetric(horizontal: 12),
child: Html(
data: widget.coupon.remark ?? "",
customImageRenders: {
@ -89,6 +92,6 @@ class _CouponDetailsWidget extends State<CouponDetailsWidget> {
},
),
),
]));
])));
}
}

1
lib/view_widget/item_title.dart

@ -117,6 +117,7 @@ class ItemTitle extends StatelessWidget {
items: items,
value: moreText,
onChanged: onChanged,
underline: Container(color: Colors.transparent),
),
);
}

4
lib/view_widget/mine_vip_entry.dart

@ -70,9 +70,9 @@ class MineVipEntry extends StatelessWidget {
Widget widget = Container(
width: double.infinity,
padding: EdgeInsets.only(top: 12.h, bottom: 25.h, left: 12, right: 12),
padding: EdgeInsets.only(top: 12.h, bottom: 35.h, left: 12, right: 12),
// margin: EdgeInsets.symmetric(horizontal: 14),
margin: EdgeInsets.only(top: 15,left: 14,right: 14),
margin: EdgeInsets.only(top: 15,left: 14,right: 14,bottom:15),
decoration: BoxDecoration(
color: Color(0xFF3D3D5D),
borderRadius: BorderRadius.only(

10
lib/view_widget/new_coupon_widget.dart

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/separator.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -45,6 +46,7 @@ class NewCouponWidget extends StatelessWidget {
height: (coupon != null && coupon.isEx) ? 155.h : 135.h,
width: double.infinity,
margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h),
padding: EdgeInsets.only(right: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
@ -184,7 +186,7 @@ class NewCouponWidget extends StatelessWidget {
child: priceWidget(context),
)),
Container(
margin: EdgeInsets.only(right: 23.w),
margin: EdgeInsets.only(right: 15.w),
child: rightBtn(context),
)
],
@ -408,7 +410,7 @@ class NewCouponWidget extends StatelessWidget {
.toString()
: "",
style: TextStyle(
fontSize: 40.sp,
fontSize: 35.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
@ -513,7 +515,7 @@ class NewCouponWidget extends StatelessWidget {
),
Text(
coupon != null
? double.tryParse("${coupon.limitAmount}" ?? "0").toStringAsFixed(2)
? "${AppUtils.calculateDouble(double.tryParse(coupon.limitAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 35.sp,
@ -541,7 +543,7 @@ class NewCouponWidget extends StatelessWidget {
"0"
: "",
style: TextStyle(
fontSize: 40.sp,
fontSize: 37.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),

7
lib/view_widget/recharge_details_dialog.dart

@ -33,8 +33,9 @@ class _RechargeWidget extends State<RechargeWidget> {
topLeft: const Radius.circular(25.0),
topRight: const Radius.circular(25.0))),
child: Container(
width: 299,
height:299,
height:355,
child:SingleChildScrollView(
physics: BouncingScrollPhysics(),
child:Column(
children: [
Row(
@ -101,6 +102,6 @@ class _RechargeWidget extends State<RechargeWidget> {
),)
],
),
));
)));
}
}

Loading…
Cancel
Save