Browse Source

价格更改;

火锅店更改;
布局ui更改;
积分商城积分更改;
zyh
w-R 3 years ago
parent
commit
3bbb720f62
  1. BIN
      assets/image/2x/dian_pu.webp
  2. BIN
      assets/image/2x/ping_tai.webp
  3. BIN
      assets/image/3x/dian_pu.webp
  4. BIN
      assets/image/3x/ping_tai.webp
  5. BIN
      assets/image/dian_pu.webp
  6. BIN
      assets/image/ping_tai.webp
  7. 22
      lib/home/home_view/home_recommend_goods.dart
  8. 22
      lib/home/home_view/top_selling_list.dart
  9. 2
      lib/home/points_mall_view/points_goods_title.dart
  10. 5
      lib/home/points_mall_view/points_goods_view.dart
  11. 2
      lib/home/welfare_page.dart
  12. 92
      lib/mine/mine_view/mine_item.dart
  13. 8
      lib/order/exchange_order_page.dart
  14. 28
      lib/order/order_history_page.dart
  15. 2
      lib/order/order_utils.dart
  16. 81
      lib/order/order_view/order_pay_selected.dart
  17. 2
      lib/qr/invite_friends.dart
  18. 2
      lib/retrofit/min_api.g.dart
  19. 5
      lib/settlement/settlement.dart
  20. 8
      lib/store/store_view/shop_goods.dart

BIN
assets/image/2x/dian_pu.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/ping_tai.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

BIN
assets/image/3x/dian_pu.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/3x/ping_tai.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/dian_pu.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

BIN
assets/image/ping_tai.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

22
lib/home/home_view/home_recommend_goods.dart

@ -6,6 +6,7 @@ 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/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:huixiang/utils/font_weight.dart';
@ -40,7 +41,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 257.h,
height: 235.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: Colors.white,
@ -76,7 +77,7 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
Widget recommendGoodsItem(CommodityZone commodityZone) {
return Container(
width: 158.w,
margin: EdgeInsets.only(right: 7.w, left: 12.w, top: 12.h),
margin: EdgeInsets.only(right: 7.w, left: 12.w, top: 12.h,bottom: 12.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -115,19 +116,21 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
SizedBox(
height: 4.h,
),
Text.rich(
TextSpan(
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextSpan(
text: commodityZone?.price ?? "",
Text(
"¥${AppUtils.calculateDouble(double.tryParse(commodityZone?.price) ?? 0)}",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
fontWeight: FontWeight.bold,
color: Color(0xFFF85400),
),
),
TextSpan(
text: commodityZone?.applyPrice ?? "",
SizedBox(width: 5,),
Text(
"¥${AppUtils.calculateDouble(double.tryParse(commodityZone?.price) ?? 0)}",
style: TextStyle(
fontSize: 10.sp,
decoration: TextDecoration.lineThrough,
@ -137,7 +140,6 @@ class _HomeRecommendGoods extends State<HomeRecommendGoods> {
),
],
),
),
],
),
);

22
lib/home/home_view/top_selling_list.dart

@ -6,6 +6,7 @@ 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/utils/flutter_utils.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:huixiang/utils/font_weight.dart';
@ -176,21 +177,23 @@ class _TopSellingList extends State<TopSellingList> {
color: Color(0xFF0D0D0D),
),
),),
Text.rich(
TextSpan(
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextSpan(
text: goodList?.price ?? "",
Text(
"¥${AppUtils.calculateDouble(double.tryParse(goodList?.price) ?? 0)}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
TextSpan(
text: goodList?.applyPrice ?? "",
SizedBox(width: 5,),
Text(
"¥${AppUtils.calculateDouble(double.tryParse(goodList?.applyPrice) ?? 0)}",
style: TextStyle(
fontSize:10.sp,
fontSize: 10.sp,
decoration: TextDecoration.lineThrough,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
@ -198,7 +201,6 @@ class _TopSellingList extends State<TopSellingList> {
),
],
),
),
],
),),
Icon(

2
lib/home/points_mall_view/points_goods_title.dart

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

5
lib/home/points_mall_view/points_goods_view.dart

@ -52,7 +52,7 @@ class _PointGoods extends State<PointGoods> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (295.w / 2 + (295.h / 2) * AppUtils.textScale(context)),
200 / (286.w / 2 + (286.h / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
@ -121,6 +121,7 @@ class _PointGoods extends State<PointGoods> {
fontSize: 15.sp,
),
),
SizedBox(height: 5,),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -156,7 +157,7 @@ class _PointGoods extends State<PointGoods> {
// ],
// ),
],
),
)
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.end,

2
lib/home/welfare_page.dart

@ -773,7 +773,7 @@ class _WelfarePage extends State<WelfarePage> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (261 / 2 + (261 / 2) * AppUtils.textScale(context)),
200 / (286.w / 2 + (286.h / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(

92
lib/mine/mine_view/mine_item.dart

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
@ -185,7 +186,7 @@ class _MineItem extends State<MineItem> {
"assets/image/shop_yue.webp",
),
),),
///
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
@ -194,38 +195,38 @@ class _MineItem extends State<MineItem> {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context).pushNamed('/router/mine_shop_page');
Navigator.of(context)
.pushNamed('/router/exchange_history_page');
});
},
child: mineItem(
"我的评价",
"assets/image/mine_evaluation.webp",
S.of(context).duihuanlishi,
"assets/image/icon_mine_records_of_consumption.webp",
),
),),
////
// Expanded(child: InkWell(
// onTap: () {
// SharedPreferences.getInstance().then((value) {
// if (value.getString("token") == null ||
// value.getString("token") == "") {
// LoginTipsDialog().show(context);
// return;
// }
// Navigator.of(context).pushNamed('/router/mine_shop_page');
// });
// },
// child: mineItem(
// "我的评价",
// "assets/image/mine_evaluation.webp",
// ),
// ),),
],
),
SizedBox(height: 10.h,),
if(isShowMore)
Row(
children: [
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context)
.pushNamed('/router/exchange_history_page');
});
},
child: mineItem(
S.of(context).duihuanlishi,
"assets/image/icon_mine_records_of_consumption.webp",
),
),),
///
Expanded(child:
InkWell(
@ -253,13 +254,24 @@ class _MineItem extends State<MineItem> {
///
Expanded(child: InkWell(
onTap: () {
SmartDialog.showToast("该功能暂未开放!",
alignment: Alignment.center);
},
child: mineItem(
"商户入驻",
"assets/image/settled.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/help_feedback_page');
},
child: mineItem(
S.of(context).bangzhuyufankui,
"assets/image/fan_kui.webp",
),
),),
// Expanded(child: InkWell(
// onTap: () {
// Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
@ -285,27 +297,17 @@ class _MineItem extends State<MineItem> {
if(isShowMore)
Row(
children: [
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/bargain_group_order',
arguments: {"type":1});
},
child: mineItem(
"发票管理",
"assets/image/bill_gl.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/help_feedback_page');
},
child: mineItem(
S.of(context).bangzhuyufankui,
"assets/image/fan_kui.webp",
),
),),
////
// Expanded(child: InkWell(
// onTap: () {
// Navigator.of(context).pushNamed('/router/bargain_group_order',
// arguments: {"type":1});
// },
// child: mineItem(
// "发票管理",
// "assets/image/bill_gl.webp",
// ),
// ),),
///
Expanded(child: InkWell(
onTap: () {
@ -317,6 +319,8 @@ class _MineItem extends State<MineItem> {
),
),),
Expanded(child:Container(),),
Expanded(child:Container(),),
Expanded(child:Container(),),
],
),
GestureDetector(

8
lib/order/exchange_order_page.dart

@ -612,11 +612,11 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
),
Text(
widget.arguments["payType"] == 1
? "${double.parse(widget.arguments["onePrice"]) * buyNum}积分"
? "${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分"
: ((widget.arguments["price"] == null ||
widget.arguments["price"] == "0"
? ""
: "${double.parse(widget.arguments["price"]) * buyNum}积分") +
: "${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分") +
(widget.arguments["money"] == null ||
widget.arguments["money"] ==
"0.00"
@ -1006,12 +1006,12 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
if(widget.arguments["payType"] == 0)
return "";
if(widget.arguments["payType"] == 1){
return S.of(context).jifen_(double.parse(widget.arguments["onePrice"]) * buyNum);
return S.of(context).jifen_((double.parse(widget.arguments["onePrice"]) * buyNum).toInt());
}else if(widget.arguments["payType"] ==2){
return (widget.arguments["price"] == null ||
widget.arguments["price"] == "0"
? ""
: "${double.parse(widget.arguments["price"]) * buyNum}积分") +
: "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分") +
(widget.arguments["money"] == null ||
widget.arguments["money"] == "0.00"
? ""

28
lib/order/order_history_page.dart

@ -568,22 +568,30 @@ class _OrderHistoryList extends State<OrderHistoryList>
return OrderPaySelected();
},
);
// if (payChannel != null && payChannel > 0) {
// OrderUtils.carryOnPay(
// payChannel,
// minService,
// orderInfo,
// (BaseData baseData) {
// SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
// Future.delayed(Duration(seconds: 3), () {
// _onRefresh();
// });
// },
// );
// }
if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(
payChannel,
minService,
orderInfo,
(BaseData baseData) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, payResult);
}
}
payResult(BaseData baseData) {
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
Future.delayed(Duration(seconds: 3), () {
_onRefresh();
});
},
);
}
}
payResult(BaseData baseData) {}
orderCancel(String orderId) async {
BaseData baseData =

2
lib/order/order_utils.dart

@ -10,8 +10,6 @@ import 'package:huixiang/utils/min.dart';
class OrderUtils {
static carryOnPay(payChannel, MinApiService minService, OrderInfo orderInfo, Function queryDetails) async {
PlaceOrderFirst placeOrderFirst = PlaceOrderFirst();
placeOrderFirst.addressId = orderInfo.addressExt == null ? "" : orderInfo.addressExt.addressId;

81
lib/order/order_view/order_pay_selected.dart

@ -19,7 +19,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
builder: (BuildContext context, StateSetter setState) {
return Container(
width: double.infinity,
height: 200,
height: 250.h,
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
@ -35,11 +35,13 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
],
color: Colors.white,
borderRadius: BorderRadius.circular(8),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(bottom: 16.h),
@ -54,19 +56,27 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
GestureDetector(
onTap: () {
Navigator.of(context).pop(4);
// Navigator.of(context).pop(4);
setState(() {
checkIndex = 1;
payIndex = 4;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
Image.asset("assets/image/ping_tai.webp"),
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Text(
S.of(context).pingtaiyue,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff353535),
fontWeight: MyFontWeight.semi_bold,),
),
),),
checkView(1),
],
),
@ -76,13 +86,21 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
GestureDetector(
onTap: () {
Navigator.of(context).pop(3);
// Navigator.of(context).pop(3);
setState(() {
checkIndex = 2;
payIndex = 3;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
Image.asset("assets/image/dian_pu.webp"),
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child:Text(
S.of(context).dianpuyue,
style: TextStyle(
fontSize: 14.sp,
@ -90,6 +108,7 @@ class _OrderPaySelected extends State<OrderPaySelected> {
fontWeight: MyFontWeight.semi_bold,
),
),
),),
checkView(2),
],
),
@ -99,14 +118,18 @@ class _OrderPaySelected extends State<OrderPaySelected> {
),
GestureDetector(
onTap: () {
Navigator.of(context).pop(1);
// Navigator.of(context).pop(1);
setState(() {
checkIndex = 3;
payIndex = 1;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset("assets/image/icon_we_chat.webp"),
Padding(
Expanded(child: Padding(
padding: EdgeInsets.only(left: 8.w),
child: Text(
S.of(context).weixinzhifu,
@ -116,11 +139,35 @@ class _OrderPaySelected extends State<OrderPaySelected> {
fontWeight: MyFontWeight.semi_bold,
),
),
),
),),
checkView(3),
],
),
),
GestureDetector(
onTap: (){
Navigator.of(context).pop(payIndex);
},
child: Container(
width: double.infinity,
height: 34.h,
alignment: Alignment.center,
margin: EdgeInsets.only(top: 26.h),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(6),
),
child: Text(
S.of(context).queren,
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
),
)
],
),
);
@ -128,15 +175,17 @@ class _OrderPaySelected extends State<OrderPaySelected> {
);
}
var checkIndex = 3;
int payIndex = 1;
Widget checkView(var index) {
return Container(
padding: EdgeInsets.only(left: 16.w),
alignment: Alignment.center,
child: Image.asset(
/*checkIndex != index
? */"assets/image/icon_radio_unselected.webp",
// : "assets/image/icon_radio_selected.webp",
checkIndex != index
? "assets/image/icon_radio_unselected.webp"
: "assets/image/icon_radio_selected.webp",
width: 15.w,
height: 15.h,
),

2
lib/qr/invite_friends.dart

@ -777,7 +777,7 @@ class _InviteFriends extends State<InviteFriends> {
}
String buildShareUrl() {
return "http://192.168.10.134:5500/invite.html?invite=${phone}";
return "https://hx.lotus-wallet.com/invite.html?invite=${phone}";
}
}

2
lib/retrofit/min_api.g.dart

@ -308,7 +308,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<DownOrder>.fromJson(
_result.data,
(json) => json==null?null:DownOrder.fromJson(json),
(json) => json??""==""?null:DownOrder.fromJson(json),
);
return value;
}

5
lib/settlement/settlement.dart

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart';
import 'package:huixiang/generated/l10n.dart';
@ -213,7 +214,7 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(id) async {
print("ididididididid: $id");
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": widget.arguments["orderId"] ?? parentId,
"id":pageType != null ? widget.arguments["orderId"] : parentId,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
@ -445,7 +446,7 @@ class _Settlement extends State<Settlement> {
}
} else {
///
BaseData<dynamic> baseData;
BaseData<DownOrder> baseData;
if (placeOrder) {
//
querySettlement();

8
lib/store/store_view/shop_goods.dart

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/shoppingCart.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/custom_image.dart';
@ -40,7 +41,7 @@ class _ShopGoods extends State<ShopGoods> {
color: Colors.white,
padding: EdgeInsets.only(
right: 16.w,
bottom: 10.h,
bottom: 30.h,
top: 10.h,
),
child: Row(
@ -131,7 +132,7 @@ class _ShopGoods extends State<ShopGoods> {
Row(
children: [
Text(
"¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}",
"¥${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price) ?? 0)}",
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 16.sp,
@ -248,7 +249,8 @@ class _ShopGoods extends State<ShopGoods> {
height: 4.h,
),
Text(
"¥191.00",
"${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.applyPrice) ?? 0)}",
// "¥191.00",
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 12.sp,

Loading…
Cancel
Save