diff --git a/lib/mine/mine_vip/legal_right_details.dart b/lib/mine/mine_vip/legal_right_details.dart index 9f285d01..47c816fe 100644 --- a/lib/mine/mine_vip/legal_right_details.dart +++ b/lib/mine/mine_vip/legal_right_details.dart @@ -270,7 +270,7 @@ class _LegalRightDetails extends State { Container( color: Color(0xFFFFF6E9), child: Html( - data: vipBenefitList[checkIndex]?.describes ?? "", + data: vipBenefitList[checkIndex]?.introduce ?? "", style: { "html": Style( color: Color(0xFF674119), @@ -468,7 +468,7 @@ class _LegalRightDetails extends State { errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), - if (!vipBenefitList.actived) + if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -496,7 +496,7 @@ class _LegalRightDetails extends State { ], ), ), - if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) + if ( vipBenefitList.actived && !vipBenefitList.have) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), diff --git a/lib/mine/mine_vip/mine_vip_core.dart b/lib/mine/mine_vip/mine_vip_core.dart index 070b16d0..c2902ed6 100644 --- a/lib/mine/mine_vip/mine_vip_core.dart +++ b/lib/mine/mine_vip/mine_vip_core.dart @@ -262,10 +262,12 @@ class _MineVipCore extends State { : widget.arguments["expendAmount"] ?? 0, rankMax: !(ranks != null && ranks.isNotEmpty) ? 0 - : (position < (ranks.length - 1)) - ? ranks[position + 1].rankOrigin : ranks[position].rankOrigin, createTime: widget.arguments["createTime"], + showRank: false, + price: !(ranks != null && ranks.isNotEmpty) + ? "0" + : ranks[position].price, ); }, itemCount: @@ -650,7 +652,7 @@ class _MineVipCore extends State { errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), - if (!vipBenefitList.actived) + if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have ) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -678,7 +680,7 @@ class _MineVipCore extends State { ], ), ), - if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have) + if (vipBenefitList.actived && !vipBenefitList.have) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), diff --git a/lib/order/order_view/order_commodity.dart b/lib/order/order_view/order_commodity.dart index bc9911a5..1856edec 100644 --- a/lib/order/order_view/order_commodity.dart +++ b/lib/order/order_view/order_commodity.dart @@ -412,7 +412,7 @@ class _OrderCommodity extends State { ), // Container( // child: Text( - // "已优惠:¥${widget.orderInfo.orderDetail.activityPrice}", + // ":¥${widget.orderInfo.orderDetail.activityPrice}", // style: TextStyle( // fontSize: 12.sp, // color: Color(0xFF7B7B7B), diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 699cf918..aac0a961 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -53,11 +53,11 @@ import 'data/wx_pay.dart'; part 'retrofit_api.g.dart'; -// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///正式 -// const baseUrl = "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 base_url = "http://192.168.10.236:8766/app/"; ///费韬 -const baseUrl = "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 base_url = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/"; diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 1eb48e20..d1a64c02 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -9,7 +9,7 @@ part of 'retrofit_api.dart'; class _ApiService implements ApiService { _ApiService(this._dio, {this.baseUrl}) { ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://192.168.10.236:8766/app/'; + baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/'; } final Dio _dio; diff --git a/lib/settlement/settlement.dart b/lib/settlement/settlement.dart index f9fd75c1..eb7905b2 100644 --- a/lib/settlement/settlement.dart +++ b/lib/settlement/settlement.dart @@ -91,7 +91,7 @@ class _Settlement extends State { tenant: tenant, storeId: storeId, ); - if(promotions != null && promotions != ""){ + if(promotions != null && promotions != "" || tableId <=0){ queryOrderInfo( address != null ? address.id : null, selectedBtn, @@ -99,7 +99,7 @@ class _Settlement extends State { 0, widget.arguments["pid"], ); - }else if(coupons != null && coupons != ""){ + }else if(coupons != null && coupons != "" || tableId <=0){ queryOrderInfo( address != null ? address.id : null, selectedBtn, @@ -229,9 +229,9 @@ class _Settlement extends State { placeOrderFirst.payChannel = payChannel; placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO.promotionId = - promotion != null ? promotion.id : widget.arguments["pid"]??""; + (promotion != null && tableId <= 0) ? promotion.id : widget.arguments["pid"]??""; placeOrderFirst.promotionInfoDTO.couponId = - couponListBean != null ? couponListBean.id : widget.arguments["cid"]??""; + (couponListBean != null && tableId <= 0) ? couponListBean.id : widget.arguments["cid"]??""; placeOrderFirst.recMobile = (mobile == null || mobile == "") ? mobile : storeInfo.headMobile; placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; @@ -416,6 +416,7 @@ class _Settlement extends State { selectedBtn, settleOrderInfo, minOrderInfo, + tableId, ), ///优惠券/备注/会员优惠金额 @@ -436,7 +437,8 @@ class _Settlement extends State { if (value != null) remakers = value; }) }); - }), + }, + tableId,), if (placeOrder) @@ -547,13 +549,13 @@ class _Settlement extends State { this.couponListBean = couponBean; coupons = couponListBean.promotionName; promotions = ""; - queryOrderInfo( - address != null ? address.id : null, - selectedBtn, - couponListBean != null ? couponListBean.id : null, - 0, - null, - ); + queryOrderInfo( + address != null ? address.id : null, + selectedBtn, + couponListBean != null ? couponListBean.id : null, + 0, + null, + ); } } @@ -571,13 +573,14 @@ class _Settlement extends State { this.promotion = pro; promotions = promotion.name; coupons = ""; - queryOrderInfo( - address != null ? address.id : null, - selectedBtn, - null, - 0, - promotion != null ? promotion.id : null, - ); + queryOrderInfo( + address != null ? address.id : null, + selectedBtn, + null, + 0, + promotion != null ? promotion.id : null, + ); + } } } diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index b7014d7b..657d8a53 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -16,6 +16,7 @@ class ActivityCouponRemarks extends StatefulWidget { final int couponCount; final bool placeOrder; final String remark; + final int tableId; ActivityCouponRemarks( this.couponCart, @@ -27,6 +28,7 @@ class ActivityCouponRemarks extends StatefulWidget { this.placeOrder, this.remark, this.editRemark, + this.tableId ); @override @@ -97,7 +99,7 @@ class _ActivityCouponRemarks extends State { ], ), ), - if (widget.placeOrder) + if (widget.placeOrder && widget.tableId <=0) InkWell( onTap: () { widget.activityCart(); @@ -133,11 +135,11 @@ class _ActivityCouponRemarks extends State { ], ), ), - if (widget.placeOrder) + if (widget.placeOrder && widget.tableId <=0) SizedBox( height: 13, ), - if (widget.placeOrder) + if (widget.placeOrder && widget.tableId <=0) InkWell( onTap: () { widget.couponCart(); diff --git a/lib/settlement/settlement_view/settlement_order_commodity.dart b/lib/settlement/settlement_view/settlement_order_commodity.dart index 537f739d..4b7e12c1 100644 --- a/lib/settlement/settlement_view/settlement_order_commodity.dart +++ b/lib/settlement/settlement_view/settlement_order_commodity.dart @@ -10,12 +10,13 @@ import 'package:huixiang/view_widget/separator.dart'; class SettlementOrderCommodity extends StatefulWidget { final int isTakeOut; + final int tableId; final SettleOrderInfo settleOrderInfo; final MinOrderInfo minOrderInfo; SettlementOrderCommodity( - this.isTakeOut, this.settleOrderInfo, this.minOrderInfo); + this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId); @override State createState() { @@ -341,7 +342,8 @@ class _SettlementOrderCommodity extends State { ), Container( 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")) }", style: TextStyle( diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index 9e35d485..b1c4daf3 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -18,6 +18,8 @@ class MineVipView extends StatelessWidget { final double padding; final UserInfo userInfo; final List ranks; + final bool showRank; + final String price; MineVipView({ this.vipLevel = 1, @@ -29,6 +31,8 @@ class MineVipView extends StatelessWidget { this.rankMax = 0, this.rank = 0, this.createTime = "", + this.showRank, + this.price }); String topLeft = ""; @@ -217,9 +221,9 @@ class MineVipView extends StatelessWidget { // rank > rankMax // ? S.of(context).dangqiandengji // : "${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 - : "消费¥${rankMax - (rank ?? 0)}元 ${S.of(context).daoxiayidengji}"), + : "消费¥${rankMax - (rank ?? 0)}元 ${S.of(context).daoxiayidengji}")), overflow: TextOverflow.ellipsis, style: TextStyle( color: textColor, @@ -233,33 +237,43 @@ class MineVipView extends StatelessWidget { TextSpan( children: [ TextSpan( - text: (vipLevel < curLevel)?rankMax.toString():rank.toString(), + text: vipLevel == 3?"":((vipLevel <= curLevel)?rankMax.toString():rank.toString()), style: TextStyle( fontSize: 26.sp, fontWeight: MyFontWeight.semi_bold, color: textColor, ), ), - if ((rank ?? 0) <= rankMax) - TextSpan( - text: rankMax > 0 ? "/$rankMax" : "/0", - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.regular, - color: textColor, - ), + if(vipLevel == 3) + TextSpan( + text: "${S.of(context).lijikaitong}¥${price??""}/永久", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + 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( height: 8.h, child: ClipRRect( borderRadius: BorderRadius.circular(6.5), 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, color: levelColor, ), @@ -318,6 +332,7 @@ class MineVipView extends StatelessWidget { .pushNamed('/router/mine_vip_core', arguments: { "rankLevel": curLevel, "userInfo":userInfo.masterCardRankName, + "createTime": (userInfo != null) ? "${userInfo.createTime}" : "", "expendAmount": double.tryParse(userInfo?.expendAmount??"0").toInt(), }); diff --git a/lib/view_widget/vip_dialog.dart b/lib/view_widget/vip_dialog.dart index c999d362..ec08d23a 100644 --- a/lib/view_widget/vip_dialog.dart +++ b/lib/view_widget/vip_dialog.dart @@ -223,7 +223,7 @@ class _VipDialog extends State { errorSrc: "assets/image/default_1.png", fadeSrc: "assets/image/default_1.png", ), - if (!vipBenefitList.actived) + if (!vipBenefitList.actived || !vipBenefitList.actived && !vipBenefitList.have ) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E), @@ -251,7 +251,7 @@ class _VipDialog extends State { ], ), ), - if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have ) + if (vipBenefitList.actived && !vipBenefitList.have ) Container( decoration: new BoxDecoration( color: Color(0xFFA29E9E),