Browse Source

1.动态详情:增加下拉刷新;

2.动态详情:查看图片放大,限制缩放尺寸等级,超出设置大小既还;
3.后台刷新处理,去掉,改为刷新该页面状态;
4.会员信息接口:加一个集换卡字段
5.详情页+打包费;(如果是外带就显示打包费)[结算页数据正确,下单后的金额,订单详情页数据待后端修改]
6.文章详情,如若没有作者,则去掉前面的间距;
7.集换卡,兑换流程页面部分字段修改;
new_revision_app
wurong 2 years ago
parent
commit
ce5551eb99
  1. 4
      lib/community/photo_view_gallery_screen.dart
  2. 2
      lib/home/points_mall_view/points_goods_view.dart
  3. 12
      lib/integral_store/integral_store_details_page.dart
  4. 4
      lib/main_page.dart
  5. 186
      lib/mine/mine_vip/mine_vip_core.dart
  6. 29
      lib/order/exchange_order_page.dart
  7. 64
      lib/order/exchange_order_success_page.dart
  8. 5
      lib/retrofit/data/min_order_info.dart
  9. 8
      lib/retrofit/data/order_product_vo.dart
  10. 3
      lib/retrofit/data/settleOrderInfo.dart
  11. 5
      lib/retrofit/data/user_info.dart
  12. 2
      lib/retrofit/min_api.dart
  13. 2
      lib/retrofit/retrofit_api.dart
  14. 73
      lib/settlement/settlement.dart
  15. 2
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  16. 19
      lib/settlement/settlement_view/settlement_order_commodity.dart
  17. 5
      lib/web/web_view/web_header.dart

4
lib/community/photo_view_gallery_screen.dart

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:huixiang/utils/ImgCachePath.dart';
import 'package:network_to_file_image/network_to_file_image.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';
import 'package:path/path.dart' as p;
@ -58,6 +59,9 @@ class _PhotoViewGalleryScreenState extends State<PhotoViewGalleryScreen> {
.replaceAll("https://pos.upload.gznl.top/", "").replaceAll("/", "")),
debug: true,
),
//
maxScale: PhotoViewComputedScale.contained *2.5,
minScale: PhotoViewComputedScale.contained *1,
);
},
itemCount: widget.images.length,

2
lib/home/points_mall_view/points_goods_view.dart

@ -23,7 +23,7 @@ class _PointGoods extends State<PointGoods> {
String pointPrice(Goods goods) {
if (goods == null) return "";
if (goods?.oneBean != null && goods?.oneBean != "0") {
return "${goods?.oneBean}印章";
return "${goods?.oneBean}集换卡";
}
if (goods?.onePrice != null && goods?.onePrice != "0") {
return S.of(context).jifen_(goods?.onePrice);

12
lib/integral_store/integral_store_details_page.dart

@ -34,6 +34,7 @@ class IntegralStoreDetailsPage extends StatefulWidget {
class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
ApiService apiService;
String points;
String happyBean;
int payType = 0;
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController();
@ -48,6 +49,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
queryGoodsById();
if (value.getString('user') != null) {
points = UserInfo.fromJson(jsonDecode(value.getString('user'))).points;
happyBean = UserInfo.fromJson(jsonDecode(value.getString('user'))).happyBean;
}
});
}
@ -62,8 +64,8 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
if (baseData != null && baseData.isSuccess) {
setState(() {
goods = baseData.data;
if(goods != null && points != null && double.tryParse(goods?.oneBean ?? "0")
!= 0 && double.tryParse(goods?.oneBean ?? "0") <= double.tryParse(points)){
if(goods != null && happyBean != null && double.tryParse(goods?.oneBean ?? "0")
!= 0 && double.tryParse(goods?.oneBean ?? "0") <= double.tryParse(happyBean)){
payType = 1;
} else if(goods != null && points != null && double.tryParse(goods.onePrice)
!= 0 && double.tryParse(goods.onePrice) <= double.tryParse(points)){
@ -86,7 +88,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
if(goods == null)
return "";
if(goods?.oneBean!=null && goods?.oneBean!="0"){
return "${goods?.oneBean}印章";
return "${goods?.oneBean}集换卡";
}else 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"))){
@ -173,7 +175,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
if(payType > 0){
toExchangeOrder();
}else{
SmartDialog.showToast(pointPrice().contains("印章")?"您的印章数量不足!" : "您的积分不足!", alignment: Alignment.center);
SmartDialog.showToast(pointPrice().contains("集换卡")?"您的集换卡数量不足!" : "您的积分不足!", alignment: Alignment.center);
return;
}
},
@ -192,7 +194,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
child: Text(
(payType > 0)
? "立即兑换"
: pointPrice().contains("印章")?"您的印章数量不足" :S.of(context).jifenbuzu,
: pointPrice().contains("集换卡")?"您的集换卡数量不足" :S.of(context).jifenbuzu,
// "兑换功能暂未开放",
style: TextStyle(
fontSize: 16.sp,

4
lib/main_page.dart

@ -75,7 +75,9 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
case AppLifecycleState.resumed: //
pushRoute();
if (DateTime.now().millisecondsSinceEpoch - lastTime > 420000)
Navigator.of(context).popAndPushNamed('/router/start_page');
//**
// Navigator.of(context).popAndPushNamed('/router/start_page');
setState((){});
break;
case AppLifecycleState.paused: //
lastTime = DateTime.now().millisecondsSinceEpoch;

186
lib/mine/mine_vip/mine_vip_core.dart

@ -82,6 +82,7 @@ class _MineVipCore extends State<MineVipCore> {
});
}
///
queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {});
if (rankData != null && rankData.isSuccess) {
@ -577,8 +578,193 @@ class _MineVipCore extends State<MineVipCore> {
],
),
);
}
Widget vipCar(){
return Container(
margin:EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h),
width: MediaQuery.of(context).size.width - 32.w,
height: ((MediaQuery.of(context).size.width - 32.w) /
2.11 *
AppUtils.textScale(context)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(8),
// bottomRight: Radius.circular(8),
// ),
// ),
// child: Text(
// topLeft,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.white,
// ),
// ),
// ),
// Container(
// padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
// margin: EdgeInsets.only(top: 10,right: 10),
// decoration: BoxDecoration(
// color: levelColor,
// borderRadius: BorderRadius.circular(10),
// ),
// child: Text(
// S.of(context).chakanquanyi,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFFF5EEE9),
// ),
// ),
// )
// ],
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 86.w,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.fromLTRB(9.w, 4.h, 8.w, 4.h),
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
),
child: Text(
"111",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.white,
),
),
),
Container(
margin: EdgeInsets.only(left: 13.w),
child: Text(
"hhh",
style: TextStyle(
color: Colors.grey,
fontWeight: MyFontWeight.semi_bold,
fontSize:22.sp,
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(right: 11.w, bottom: 9.h),
child: Image.asset(
"assets/image/icon_mine_huixiang_logo.webp",
width: 86.w,
height: 86.w,
fit: BoxFit.contain,
),
),
],
),
Expanded(
child: Container(
margin: EdgeInsets.only(
left: 13.w,
right: 12.w,
bottom: 12.h,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Text(
"消费¥",
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black,
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
flex: 1,
),
Text.rich(
TextSpan(
children: [
TextSpan(
text:"555",
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
),
],
),
// if (isUserVip)
Expanded(child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(context).kaitongriqi(
"2021-01-01"
),
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
Icon(
Icons.qr_code,
size: 24,
),
],
),),
],
),
),
flex: 1,
),
],
),
);
}
///vip

29
lib/order/exchange_order_page.dart

@ -41,6 +41,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
UserInfo userInfo;
dynamic payListen;
dynamic mBalance = 0;
String happyBean;
String points;
@override
void initState() {
@ -49,8 +51,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString("token")),
points =
UserInfo.fromJson(jsonDecode(value.getString('user'))).points,
points = UserInfo.fromJson(jsonDecode(value.getString('user'))).points,
happyBean = UserInfo.fromJson(jsonDecode(value.getString('user'))).happyBean,
queryUserBalance(),
});
@ -66,6 +68,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
? realPay.substring(0, realPay.indexOf("积分"))
: "0",
"points": points,
"happyBean":happyBean,
"realPay": realPay,
"payChannel": widget.arguments["payChannel"],
},
@ -93,8 +96,6 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
}
}
String points;
@override
Widget build(BuildContext context) {
return Scaffold(
@ -639,7 +640,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// : (widget.arguments["payType"] == 2 ?"${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分"
// :((widget.arguments["price"] == null ||
// widget.arguments["price"] == "0"
// ? (widget.arguments["oneBean"] != "0" && double.parse(userInfo?.points ?? "0") <= double.parse(widget.arguments["oneBean"] ??"0")
// ? (widget.arguments["oneBean"] != "0" && double.parse(userInfo?.happyBean ?? "0") <= double.parse(widget.arguments["oneBean"] ??"0")
// ? "${AppUtils.calculateDouble(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum)}印章"
// :(widget.arguments["onePrice"] != "0" && double.parse(userInfo?.points ?? "0") <= double.parse(widget.arguments["onePrice"])
// ?"${AppUtils.calculateDouble(double.parse(widget.arguments["onePrice"]) * buyNum)}积分"
@ -679,7 +680,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
payableAmount().contains("印章")? "现金抵扣印章":"现金抵扣积分",
payableAmount().contains("集换卡")? "现金抵扣集换卡":"现金抵扣积分",
style: TextStyle(
fontSize: 14,
color: Color(0xFF353535),
@ -785,7 +786,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
? (double.parse(widget
.arguments["oneBean"]) *
(buyNum + 1)) >
double.parse(points)
double.parse(happyBean)
: (widget.arguments["payType"] == 2
? (double.parse(widget.arguments[
"onePrice"]) *
@ -901,7 +902,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
),
),
SizedBox(
height: 10,
height: 10.h,
),
// GestureDetector(
// onTap: () {
@ -941,7 +942,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// ),
// ),
SizedBox(
height: 10,
height: 10.h,
),
GestureDetector(
onTap: () {
@ -1069,14 +1070,14 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
String payableAmount() {
if (widget.arguments["payType"] == 0) return "";
if (widget.arguments["payType"] == 1) {
return "${(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum).toInt()}印章";
return "${(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum).toInt()}集换卡";
} else if (widget.arguments["payType"] == 2) {
return "${(double.parse(widget.arguments["onePrice"]) * buyNum).toInt()}积分";
} else if (widget.arguments["payType"] == 3) {
return "${(double.parse(widget.arguments["price"]) * buyNum).toInt()}积分" + " + ${AppUtils.calculateDouble(double.tryParse(widget.arguments["money"]) * buyNum) ?? 0}";
} else if (widget.arguments["payType"] == 4) {
if ((widget.arguments["oneBean"] ?? "0") != "0") {
return "${AppUtils.calculateDouble(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum)}印章";
return "${AppUtils.calculateDouble(double.parse(widget.arguments["oneBean"] ?? "0") * buyNum)}集换卡";
} else if (widget.arguments["onePrice"] != "0") {
return "${AppUtils.calculateDouble(double.parse(widget.arguments["onePrice"]) * buyNum)}积分";
} else if ((widget.arguments["price"] != null || widget.arguments["price"] != "0") && (widget.arguments["money"] != null || widget.arguments["money"] != "0.00")) {
@ -1092,7 +1093,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
String handleNeedPay() {
if (widget.arguments["payType"] == 0) return "";
if (widget.arguments["payType"] == 1) {
return "${(double.parse(widget.arguments["oneBean"]) * buyNum).toInt()}印章";
return "${(double.parse(widget.arguments["oneBean"]) * buyNum).toInt()}集换卡";
}
if (widget.arguments["payType"] == 2) {
return S.of(context).jifen_(
@ -1214,11 +1215,11 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
: "0",
"realPay": realPay,
"points": points,
"happyBean":happyBean,
"payChannel": widget.arguments["payChannel"],
"id": baseDate.data
});
points =
"${int.tryParse(points) - int.tryParse(widget.arguments["price"])}";
points = "${int.tryParse(points) - int.tryParse(widget.arguments["price"])}";
Navigator.of(context).pop();
} else {
SmartDialog.showToast(baseDate.msg, alignment: Alignment.center);

64
lib/order/exchange_order_success_page.dart

@ -25,6 +25,7 @@ class ExchangeOrderSuccessPage extends StatefulWidget {
class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
int price = 0;
int happyBean = 0;
ApiService apiService;
@override
void initState() {
@ -37,6 +38,7 @@ class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
apiService = ApiService(Dio(), context: context, token: value.getString("token"));
userInfo = UserInfo.fromJson(jsonDecode(value.getString('user')));
userInfo.points = "$price";
userInfo.happyBean = "$happyBean";
value.setString('user', jsonEncode(userInfo.toJson()));
});
@ -79,7 +81,27 @@ class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
fontWeight: MyFontWeight.semi_bold),
),
SizedBox(
height: 70.h,
height:45.h,
),
Text(
widget.arguments["realPay"].toString().contains("集换卡") ? "消费集换卡":S.of(context).xiaofeijifen,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 14.sp,
),
),
SizedBox(
height: 5.h,
),
Text(
widget.arguments["realPay"],
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 21.sp,
fontWeight: MyFontWeight.bold),
),
SizedBox(
height: 34.h,
),
Row(
children: [
@ -87,53 +109,53 @@ class _ExchangeOrderSuccessPage extends State<ExchangeOrderSuccessPage> {
child: Column(
children: [
Text(
widget.arguments["realPay"],
"可用集换卡",
style: TextStyle(
color: Colors.black,
fontSize: 21.sp,
fontWeight: MyFontWeight.semi_bold),
color: Color(0xFF727272),
fontSize: 14.sp,
),
),
SizedBox(
height: 14.h,
),
Text(
S.of(context).xiaofeijifen,
"$happyBean",
style: TextStyle(
color: Color(0xFF727272),
fontSize: 14.sp,
),
)
color: Colors.black,
fontSize: 21.sp,
fontWeight: MyFontWeight.regular),
),
],
),
flex: 1,
),
Container(
width: 2.w,
height: 34.h,
color: Color(0xFFABABAB),
width: 1.w,
height: 53.h,
color: Color(0xFFD8D8D8),
margin: EdgeInsets.only(top: 18.h, bottom: 7.h),
),
Expanded(
child: Column(
children: [
Text(
"$price",
S.of(context).keyongjifen,
style: TextStyle(
color: Colors.black,
fontSize: 21.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF727272),
fontSize: 14.sp,
),
),
SizedBox(
height: 14.h,
),
Text(
S.of(context).keyongjifen,
"$price",
style: TextStyle(
color: Color(0xFF727272),
fontSize: 14.sp,
color: Colors.black,
fontSize: 21.sp,
fontWeight: MyFontWeight.regular,
),
)
),
],
),
flex: 1,

5
lib/retrofit/data/min_order_info.dart

@ -61,6 +61,7 @@ class MinOrderInfo {
String activityNoPrice,
String activityDiscountPrice,
String totalDiscountPrice,
String totalPackagingFee,
String benefitDiscountAmount,
int orderSource,
dynamic address,
@ -145,6 +146,7 @@ class MinOrderInfo {
this.activityNoPrice = activityNoPrice;
this.activityDiscountPrice = activityDiscountPrice;
this.totalDiscountPrice = totalDiscountPrice;
this.totalPackagingFee = totalPackagingFee;
this.benefitDiscountAmount = benefitDiscountAmount;
this.orderSource = orderSource;
this.address = address;
@ -232,6 +234,7 @@ class MinOrderInfo {
this.activityNoPrice = json['activityNoPrice'];
this.activityDiscountPrice = json['activityDiscountPrice'];
this.totalDiscountPrice = json['totalDiscountPrice'];
this.totalPackagingFee = json['totalPackagingFee'];
this.benefitDiscountAmount = json['benefitDiscountAmount'];
this.orderSource = json['orderSource'];
this.address = json['address'];
@ -322,6 +325,7 @@ class MinOrderInfo {
String activityNoPrice;
String activityDiscountPrice;
String totalDiscountPrice;
String totalPackagingFee;
String benefitDiscountAmount;
int orderSource;
dynamic address;
@ -409,6 +413,7 @@ class MinOrderInfo {
map['activityNoPrice'] = this.activityNoPrice;
map['activityDiscountPrice'] = this.activityDiscountPrice;
map['totalDiscountPrice'] = this.totalDiscountPrice;
map['totalPackagingFee'] = this.totalPackagingFee;
map['benefitDiscountAmount'] = this.benefitDiscountAmount;
map['orderSource'] = this.orderSource;
map['address'] = this.address;

8
lib/retrofit/data/order_product_vo.dart

@ -19,7 +19,8 @@ class OrderProductVOList {
String skuId,
String skuImg,
String skuNameStr,
List<SetMealDataList> setMealDataList
List<SetMealDataList> setMealDataList,
String packagingFee,
}) {
this.actInfo = actInfo;
this.additionalComment = additionalComment;
@ -39,6 +40,7 @@ class OrderProductVOList {
this.skuImg = skuImg;
this.skuNameStr = skuNameStr;
this.setMealDataList = setMealDataList;
this.packagingFee = packagingFee;
}
OrderProductVOList.fromJson(dynamic json) {
@ -66,6 +68,7 @@ class OrderProductVOList {
this.setMealDataList = []..addAll(
(json['setMealDataList'] as List ?? [])
.map((o) => SetMealDataList.fromJson(o)));
this.packagingFee = json['packagingFee'];
}
ActInfo actInfo;
@ -86,7 +89,7 @@ class OrderProductVOList {
String skuImg;
String skuNameStr;
List<SetMealDataList> setMealDataList;
String packagingFee;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
@ -114,6 +117,7 @@ class OrderProductVOList {
map['skuImg'] = this.skuImg;
map['skuNameStr'] = this.skuNameStr;
map['setMealDataList']=this.setMealDataList;
map['packagingFee'] = this.packagingFee;
return map;
}

3
lib/retrofit/data/settleOrderInfo.dart

@ -25,6 +25,7 @@ class SettleOrderInfo {
String vipDiscountAmount;
String totalDiscountAmount;
String discountType;
String packagingFee;
static SettleOrderInfo fromJson(Map<String, dynamic> map) {
@ -58,6 +59,7 @@ class SettleOrderInfo {
settleOrderInfoBean.vipDiscountAmount = map['vipDiscountAmount'];
settleOrderInfoBean.totalDiscountAmount = map['totalDiscountAmount'];
settleOrderInfoBean.discountType = map['discountType'];
settleOrderInfoBean.packagingFee = map['packagingFee'];
return settleOrderInfoBean;
}
@ -84,6 +86,7 @@ class SettleOrderInfo {
"vipDiscountAmount":vipDiscountAmount,
"totalDiscountAmount": totalDiscountAmount,
"discountType":discountType,
"packagingFee" : packagingFee,
};

5
lib/retrofit/data/user_info.dart

@ -49,8 +49,7 @@ class UserInfo {
String signature;
String background;
bool hasPayPassword;
String happyBean;
factory UserInfo.fromJson(Map<String, dynamic> json) =>
UserInfo()
@ -83,6 +82,7 @@ class UserInfo {
..signature = json['signature'] as String
..background = json['background'] as String
..hasPayPassword = json['hasPayPassword'] as bool
..happyBean = json['happyBean'] as String
..memberRankVo = json['memberRankVo'] == null
? null
: MemberRank.fromJson(json['memberRankVo'] as Map<String, dynamic>);
@ -117,6 +117,7 @@ class UserInfo {
'signature' : this.signature,
'background' : this.background,
'hasPayPassword' : this.hasPayPassword,
'happyBean':this.happyBean,
'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(),
};
}

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.129:8765/app/";///
const localBaseUrl = "http://192.168.10.78:8765/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.dart

@ -66,7 +66,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.129:8766/app/";///
const localBaseUrl = "http://192.168.10.78:8766/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线

73
lib/settlement/settlement.dart

@ -141,7 +141,9 @@ class _Settlement extends State<Settlement> {
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
0,
0,
widget.arguments["pid"] ?? (productId ?? 0),
@ -157,7 +159,9 @@ class _Settlement extends State<Settlement> {
} else if (coupons != null && coupons != "" && tableId <= 0) {
queryOrderInfo(
address != null ? address.id : null,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
widget.arguments["cid"],
0,
productId ?? 0,
@ -173,7 +177,9 @@ class _Settlement extends State<Settlement> {
} else
queryOrderInfo(
null,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
0,
0,
productId ?? 0,
@ -268,7 +274,9 @@ class _Settlement extends State<Settlement> {
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
@ -360,7 +368,9 @@ class _Settlement extends State<Settlement> {
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
null,
0,
productId ?? null,
@ -414,7 +424,9 @@ class _Settlement extends State<Settlement> {
}
await queryOrderInfo(
address.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
null,
0,
productId ?? null,
@ -444,7 +456,9 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(
address.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
0,
0,
productId ?? 0,
@ -542,10 +556,7 @@ class _Settlement extends State<Settlement> {
? true
: false; //
placeOrderFirst.isTakeOut =
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true &&
(subscribeParam?.isEnableSubscribe ?? false) == false &&
selectedBtn != 1 &&
selectedBtn != 2)
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn;
placeOrderFirst.notes = remakers +
@ -837,7 +848,9 @@ class _Settlement extends State<Settlement> {
});
queryOrderInfo(
addressId,
isTake,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
memberCouponId,
orderId,
promotionId ?? (productId ?? 0),
@ -885,6 +898,7 @@ class _Settlement extends State<Settlement> {
minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
diningStatus,
settleOrderInfo,
minOrderInfo,
tableId,
@ -1146,6 +1160,21 @@ class _Settlement extends State<Settlement> {
onTap: () {
setState(() {
diningStatus = 3;
queryOrderInfo(
address?.id,
3,
0,
0,
productId ?? 0,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
// useVipPriceSelect,
// useBenefitSelect,
count1,
payChannel,
tableId);
});
},
child: Container(
@ -1216,7 +1245,9 @@ class _Settlement extends State<Settlement> {
} else {
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
@ -1251,7 +1282,9 @@ class _Settlement extends State<Settlement> {
} else {
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
0,
0,
productId ?? 0,
@ -1275,7 +1308,9 @@ class _Settlement extends State<Settlement> {
} else {
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
null,
0,
productId ?? null,
@ -1333,7 +1368,9 @@ class _Settlement extends State<Settlement> {
} else {
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
couponBean?.id,
0,
productId ?? 0,
@ -1372,7 +1409,9 @@ class _Settlement extends State<Settlement> {
// this.couponListBean = null;
queryOrderInfo(
address?.id,
selectedBtn,
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
0,
0,
(pro?.id ?? 0) ?? productId,

2
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ||(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" )
? false
: vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,

19
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -14,6 +14,7 @@ import '../../retrofit/data/shoppingCart.dart';
class SettlementOrderCommodity extends StatefulWidget {
final int isTakeOut;
final int diningStatus;
final int tableId;
final SettleOrderInfo settleOrderInfo;
@ -26,6 +27,7 @@ class SettlementOrderCommodity extends StatefulWidget {
SettlementOrderCommodity(
this.isTakeOut,
this.diningStatus,
this.settleOrderInfo,
this.minOrderInfo,
this.tableId,
@ -116,6 +118,20 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
);
}
if (widget.diningStatus == 3) {
//
widgets.add(
discountItem(
Color(0xFFFF7A1A),
"打包费",
"",
(widget.minOrderInfo != null)
? "+ ${widget.minOrderInfo?.totalPackagingFee ?? "0"}"
: "+ ${widget.settleOrderInfo?.packagingFee ?? "0"}",
),
);
}
if (widget.useVipPriceSelect &&
widget.settleOrderInfo.memberVO.isVip &&
(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) &&
@ -125,7 +141,8 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
}
if (widget.useBenefitSelect &&
(widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) {
(widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0
? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) {
widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额",
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") :(widget?.settleOrderInfo?.benefitDiscountAmount ?? "")));
}

5
lib/web/web_view/web_header.dart

@ -47,8 +47,8 @@ class _WebHeader extends State<WebHeader> {
InkWell(
child: Text(
"${widget.activity != null ? (widget.activity.storeName ?? "")
: (widget.article != null && widget.article.author != null)
? (widget.article.author.name ?? "") : ""}",
: ((widget.article != null && widget.article.author != null)
? (widget.article.author.name ?? "") : "")}",
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: widget.fontSize - 2,
@ -85,6 +85,7 @@ class _WebHeader extends State<WebHeader> {
}
},
),
if((widget?.activity?.storeName ?? "") != "" || (widget?.article?.author?.name ?? "") != "")
SizedBox(
width: 10.w,
),

Loading…
Cancel
Save