Browse Source

Merge remote-tracking branch 'origin/dev' into remove_uniapp

ff_new
fmk 3 years ago
parent
commit
8dc778acc1
  1. 6
      lib/mine/mine_vip/legal_right_details.dart
  2. 10
      lib/mine/mine_vip/mine_vip_core.dart
  3. 2
      lib/order/order_view/order_commodity.dart
  4. 8
      lib/retrofit/retrofit_api.dart
  5. 2
      lib/retrofit/retrofit_api.g.dart
  6. 41
      lib/settlement/settlement.dart
  7. 8
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  8. 6
      lib/settlement/settlement_view/settlement_order_commodity.dart
  9. 39
      lib/view_widget/mine_vip_view.dart
  10. 4
      lib/view_widget/vip_dialog.dart

6
lib/mine/mine_vip/legal_right_details.dart

@ -270,7 +270,7 @@ class _LegalRightDetails extends State<LegalRightDetails> {
Container( Container(
color: Color(0xFFFFF6E9), color: Color(0xFFFFF6E9),
child: Html( child: Html(
data: vipBenefitList[checkIndex]?.describes ?? "", data: vipBenefitList[checkIndex]?.introduce ?? "",
style: { style: {
"html": Style( "html": Style(
color: Color(0xFF674119), color: Color(0xFF674119),
@ -468,7 +468,7 @@ class _LegalRightDetails extends State<LegalRightDetails> {
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),
if (!vipBenefitList.actived) if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have)
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
@ -496,7 +496,7 @@ class _LegalRightDetails extends State<LegalRightDetails> {
], ],
), ),
), ),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) if ( vipBenefitList.actived && !vipBenefitList.have)
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),

10
lib/mine/mine_vip/mine_vip_core.dart

@ -262,10 +262,12 @@ class _MineVipCore extends State<MineVipCore> {
: widget.arguments["expendAmount"] ?? 0, : widget.arguments["expendAmount"] ?? 0,
rankMax: !(ranks != null && ranks.isNotEmpty) rankMax: !(ranks != null && ranks.isNotEmpty)
? 0 ? 0
: (position < (ranks.length - 1))
? ranks[position + 1].rankOrigin
: ranks[position].rankOrigin, : ranks[position].rankOrigin,
createTime: widget.arguments["createTime"], createTime: widget.arguments["createTime"],
showRank: false,
price: !(ranks != null && ranks.isNotEmpty)
? "0"
: ranks[position].price,
); );
}, },
itemCount: itemCount:
@ -650,7 +652,7 @@ class _MineVipCore extends State<MineVipCore> {
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),
if (!vipBenefitList.actived) if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have )
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
@ -678,7 +680,7 @@ class _MineVipCore extends State<MineVipCore> {
], ],
), ),
), ),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) if (vipBenefitList.actived && !vipBenefitList.have)
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),

2
lib/order/order_view/order_commodity.dart

@ -412,7 +412,7 @@ class _OrderCommodity extends State<OrderCommodity> {
), ),
// Container( // Container(
// child: Text( // child: Text(
// "已优惠:¥${widget.orderInfo.orderDetail.activityPrice}", // ":¥${widget.orderInfo.orderDetail.activityPrice}",
// style: TextStyle( // style: TextStyle(
// fontSize: 12.sp, // fontSize: 12.sp,
// color: Color(0xFF7B7B7B), // color: Color(0xFF7B7B7B),

8
lib/retrofit/retrofit_api.dart

@ -53,11 +53,11 @@ 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://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";

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.236:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

41
lib/settlement/settlement.dart

@ -91,7 +91,7 @@ class _Settlement extends State<Settlement> {
tenant: tenant, tenant: tenant,
storeId: storeId, storeId: storeId,
); );
if(promotions != null && promotions != ""){ if(promotions != null && promotions != "" || tableId <=0){
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
@ -99,7 +99,7 @@ class _Settlement extends State<Settlement> {
0, 0,
widget.arguments["pid"], widget.arguments["pid"],
); );
}else if(coupons != null && coupons != ""){ }else if(coupons != null && coupons != "" || tableId <=0){
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
@ -229,9 +229,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.payChannel = payChannel; placeOrderFirst.payChannel = payChannel;
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId = placeOrderFirst.promotionInfoDTO.promotionId =
promotion != null ? promotion.id : widget.arguments["pid"]??""; (promotion != null && tableId <= 0) ? promotion.id : widget.arguments["pid"]??"";
placeOrderFirst.promotionInfoDTO.couponId = placeOrderFirst.promotionInfoDTO.couponId =
couponListBean != null ? couponListBean.id : widget.arguments["cid"]??""; (couponListBean != null && tableId <= 0) ? couponListBean.id : widget.arguments["cid"]??"";
placeOrderFirst.recMobile = placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; (mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -416,6 +416,7 @@ class _Settlement extends State<Settlement> {
selectedBtn, selectedBtn,
settleOrderInfo, settleOrderInfo,
minOrderInfo, minOrderInfo,
tableId,
), ),
///// /////
@ -436,7 +437,8 @@ class _Settlement extends State<Settlement> {
if (value != null) remakers = value; if (value != null) remakers = value;
}) })
}); });
}), },
tableId,),
if (placeOrder) if (placeOrder)
@ -547,13 +549,13 @@ class _Settlement extends State<Settlement> {
this.couponListBean = couponBean; this.couponListBean = couponBean;
coupons = couponListBean.promotionName; coupons = couponListBean.promotionName;
promotions = ""; promotions = "";
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
couponListBean != null ? couponListBean.id : null, couponListBean != null ? couponListBean.id : null,
0, 0,
null, null,
); );
} }
} }
@ -571,13 +573,14 @@ class _Settlement extends State<Settlement> {
this.promotion = pro; this.promotion = pro;
promotions = promotion.name; promotions = promotion.name;
coupons = ""; coupons = "";
queryOrderInfo( queryOrderInfo(
address != null ? address.id : null, address != null ? address.id : null,
selectedBtn, selectedBtn,
null, null,
0, 0,
promotion != null ? promotion.id : null, promotion != null ? promotion.id : null,
); );
} }
} }
} }

8
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -16,6 +16,7 @@ class ActivityCouponRemarks extends StatefulWidget {
final int couponCount; final int couponCount;
final bool placeOrder; final bool placeOrder;
final String remark; final String remark;
final int tableId;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
@ -27,6 +28,7 @@ class ActivityCouponRemarks extends StatefulWidget {
this.placeOrder, this.placeOrder,
this.remark, this.remark,
this.editRemark, this.editRemark,
this.tableId
); );
@override @override
@ -97,7 +99,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder) if (widget.placeOrder && widget.tableId <=0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.activityCart(); widget.activityCart();
@ -133,11 +135,11 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder) if (widget.placeOrder && widget.tableId <=0)
SizedBox( SizedBox(
height: 13, height: 13,
), ),
if (widget.placeOrder) if (widget.placeOrder && widget.tableId <=0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.couponCart(); widget.couponCart();

6
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -10,12 +10,13 @@ import 'package:huixiang/view_widget/separator.dart';
class SettlementOrderCommodity extends StatefulWidget { class SettlementOrderCommodity extends StatefulWidget {
final int isTakeOut; final int isTakeOut;
final int tableId;
final SettleOrderInfo settleOrderInfo; final SettleOrderInfo settleOrderInfo;
final MinOrderInfo minOrderInfo; final MinOrderInfo minOrderInfo;
SettlementOrderCommodity( SettlementOrderCommodity(
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo); this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -341,7 +342,8 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
), ),
Container( Container(
child: Text( child: Text(
"已优惠:¥${(widget.minOrderInfo != null) ? (widget.minOrderInfo.discountAmount ?? "0") : (double.parse(widget.settleOrderInfo.discountAmount ?? "0") "已优惠:¥${(widget.minOrderInfo != null) ? (double.parse(widget.minOrderInfo.discountAmount ?? "0") + double.parse(widget.settleOrderInfo.benefitDiscountAmount ?? "0")) :
(double.parse(widget.tableId <= 0 ? "0" : (widget.settleOrderInfo.discountAmount ?? "0"))
+ double.parse(widget?.settleOrderInfo?.benefitDiscountAmount ?? "0")) + double.parse(widget?.settleOrderInfo?.benefitDiscountAmount ?? "0"))
}", }",
style: TextStyle( style: TextStyle(

39
lib/view_widget/mine_vip_view.dart

@ -18,6 +18,8 @@ class MineVipView extends StatelessWidget {
final double padding; final double padding;
final UserInfo userInfo; final UserInfo userInfo;
final List<Rank> ranks; final List<Rank> ranks;
final bool showRank;
final String price;
MineVipView({ MineVipView({
this.vipLevel = 1, this.vipLevel = 1,
@ -29,6 +31,8 @@ class MineVipView extends StatelessWidget {
this.rankMax = 0, this.rankMax = 0,
this.rank = 0, this.rank = 0,
this.createTime = "", this.createTime = "",
this.showRank,
this.price
}); });
String topLeft = ""; String topLeft = "";
@ -217,9 +221,9 @@ class MineVipView extends StatelessWidget {
// rank > rankMax // rank > rankMax
// ? S.of(context).dangqiandengji // ? S.of(context).dangqiandengji
// : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", // : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}",
(vipLevel < curLevel)?"":(((rank ?? 0) > rankMax || curLevel == 3 || curLevel ==2) (vipLevel == 3)?"":((vipLevel < curLevel)?"":(((rank ?? 0) > rankMax || curLevel == 3 || curLevel ==2)
? S.of(context).dangqiandengji ? S.of(context).dangqiandengji
: "消费¥${rankMax - (rank ?? 0)}${S.of(context).daoxiayidengji}"), : "消费¥${rankMax - (rank ?? 0)}${S.of(context).daoxiayidengji}")),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
@ -233,33 +237,43 @@ class MineVipView extends StatelessWidget {
TextSpan( TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: (vipLevel < curLevel)?rankMax.toString():rank.toString(), text: vipLevel == 3?"":((vipLevel <= curLevel)?rankMax.toString():rank.toString()),
style: TextStyle( style: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: textColor, color: textColor,
), ),
), ),
if ((rank ?? 0) <= rankMax) if(vipLevel == 3)
TextSpan( TextSpan(
text: rankMax > 0 ? "/$rankMax" : "/0", text: "${S.of(context).lijikaitong}${price??""}/永久",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: textColor, color: textColor,
),
), ),
),
// if ((rank ?? 0) <= rankMax)
// TextSpan(
// text: rankMax > 0 ? "/$rankMax" : "/0",
// style: TextStyle(
// fontSize: 14.sp,
// fontWeight: MyFontWeight.regular,
// color: textColor,
// ),
// ),
], ],
), ),
), ),
], ],
), ),
if(vipLevel <= curLevel && (showRank??true))
Container( Container(
height: 8.h, height: 8.h,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(6.5), borderRadius: BorderRadius.circular(6.5),
child: LinearProgressIndicator( child: LinearProgressIndicator(
value: rankMax > (rank ?? 0) ? ((vipLevel < curLevel) ? rankMax/rankMax:(rank ?? 0) / rankMax) : 0, value: rankMax > (rank ?? 0) ? ((vipLevel < curLevel) ? rankMax/rankMax: (rank ?? 0) / rankMax) : 0,
backgroundColor: Colors.white, backgroundColor: Colors.white,
color: levelColor, color: levelColor,
), ),
@ -318,6 +332,7 @@ class MineVipView extends StatelessWidget {
.pushNamed('/router/mine_vip_core', arguments: { .pushNamed('/router/mine_vip_core', arguments: {
"rankLevel": curLevel, "rankLevel": curLevel,
"userInfo":userInfo.masterCardRankName, "userInfo":userInfo.masterCardRankName,
"createTime": (userInfo != null) ? "${userInfo.createTime}" : "", "createTime": (userInfo != null) ? "${userInfo.createTime}" : "",
"expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(), "expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(),
}); });

4
lib/view_widget/vip_dialog.dart

@ -223,7 +223,7 @@ class _VipDialog extends State<VipDialog> {
errorSrc: "assets/image/default_1.png", errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png",
), ),
if (!vipBenefitList.actived) if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have )
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
@ -251,7 +251,7 @@ class _VipDialog extends State<VipDialog> {
], ],
), ),
), ),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have ) if (vipBenefitList.actived && !vipBenefitList.have )
Container( Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),

Loading…
Cancel
Save