Browse Source

会员更改

ff_new
w-R 3 years ago
parent
commit
cd49a53c83
  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. 13
      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. 27
      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(
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<LegalRightDetails> {
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<LegalRightDetails> {
],
),
),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have)
if ( vipBenefitList.actived && !vipBenefitList.have)
Container(
decoration: new BoxDecoration(
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,
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<MineVipCore> {
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<MineVipCore> {
],
),
),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have)
if (vipBenefitList.actived && !vipBenefitList.have)
Container(
decoration: new BoxDecoration(
color: Color(0xFFA29E9E),

2
lib/order/order_view/order_commodity.dart

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

8
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/";

2
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;

13
lib/settlement/settlement.dart

@ -91,7 +91,7 @@ class _Settlement extends State<Settlement> {
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<Settlement> {
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<Settlement> {
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<Settlement> {
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
),
/////
@ -436,7 +437,8 @@ class _Settlement extends State<Settlement> {
if (value != null) remakers = value;
})
});
}),
},
tableId,),
if (placeOrder)
@ -578,6 +580,7 @@ class _Settlement extends State<Settlement> {
0,
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 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<ActivityCouponRemarks> {
],
),
),
if (widget.placeOrder)
if (widget.placeOrder && widget.tableId <=0)
InkWell(
onTap: () {
widget.activityCart();
@ -133,11 +135,11 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
],
),
),
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();

6
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<StatefulWidget> createState() {
@ -341,7 +342,8 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
),
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(

27
lib/view_widget/mine_vip_view.dart

@ -18,6 +18,8 @@ class MineVipView extends StatelessWidget {
final double padding;
final UserInfo userInfo;
final List<Rank> 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)
if(vipLevel == 3)
TextSpan(
text: rankMax > 0 ? "/$rankMax" : "/0",
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(),
});

4
lib/view_widget/vip_dialog.dart

@ -223,7 +223,7 @@ class _VipDialog extends State<VipDialog> {
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<VipDialog> {
],
),
),
if (!vipBenefitList.actived && !vipBenefitList.have || vipBenefitList.actived && !vipBenefitList.have )
if (vipBenefitList.actived && !vipBenefitList.have )
Container(
decoration: new BoxDecoration(
color: Color(0xFFA29E9E),

Loading…
Cancel
Save