Browse Source

1.账号与安全页面,增加正在加载‘

2.结算会员更改,新增优惠类型:SURPRISE;
3.discountType = “MEMBER_RANK”跟SURPRISE一样的意思,在多处会员优惠显示处新增SURPRISE类型一起判断;
4.绑定手机号码页面,输入框内容文字,间距优化更改;
5.动态详情优化,列表滑动时如若键盘弹出,则收起;
6.登录页手机号码输入框间距调整;
7.订单详情页,新增单件商品折后价格;
8.VIP价格暂时废弃,经协商已从商品列表暂时去掉该段代码;
new_revision_app
wurong 2 years ago
parent
commit
5a7f7f6203
  1. 63
      lib/community/community_details.dart
  2. 2
      lib/login/new_login_page.dart
  3. 66
      lib/order/order_view/order_commodity.dart
  4. 8
      lib/retrofit/retrofit_api.dart
  5. 6
      lib/setting/account_security_page.dart
  6. 27
      lib/setting/binding_phone_page.dart
  7. 6
      lib/settlement/settlement.dart
  8. 7
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  9. 6
      lib/settlement/settlement_view/settlement_order_commodity.dart
  10. 61
      lib/store/store_view/shop_goods.dart

63
lib/community/community_details.dart

@ -2,6 +2,7 @@ import 'dart:ui';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/community/community_view/community_dynamic.dart'; import 'package:huixiang/community/community_view/community_dynamic.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
@ -15,8 +16,12 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/tips_dialog.dart'; import 'package:huixiang/view_widget/tips_dialog.dart';
import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/comment_list.dart';
import 'package:huixiang/web/web_view/input_comment.dart'; import 'package:huixiang/web/web_view/input_comment.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../view_widget/classic_header.dart';
import '../view_widget/my_footer.dart';
class CommunityDetails extends StatefulWidget { class CommunityDetails extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -54,6 +59,7 @@ class _CommunityDetails extends State<CommunityDetails>
double keyboard = -1; double keyboard = -1;
bool needShowSmiley = false; bool needShowSmiley = false;
bool needHideSmiley = false; bool needHideSmiley = false;
final RefreshController refreshController = RefreshController();
void didChangeMetrics() { void didChangeMetrics() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
@ -94,11 +100,21 @@ class _CommunityDetails extends State<CommunityDetails>
void initState() { void initState() {
super.initState(); super.initState();
// comunity = widget.arguments["comment"]; // comunity = widget.arguments["comment"];
EasyLoading.show(status: S.current.zhengzaijiazai);
businessId = widget.arguments["businessId"]; businessId = widget.arguments["businessId"];
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
commentFocus.addListener(_focusNodeListener); commentFocus.addListener(_focusNodeListener);
scrollController.addListener(() {
_queryMemberCommentList(); //
if(MediaQuery.of(context).viewInsets.bottom > 0)
FocusScope.of(context).requestFocus(FocusNode());
if(needShowSmiley && window.viewInsets.bottom > 0.1)
needHideSmiley = false;
setState(() {
emojiShowing = false;
});
});
_queryMemberCommentList(true);
queryDetails(businessId); queryDetails(businessId);
} }
@ -130,9 +146,10 @@ class _CommunityDetails extends State<CommunityDetails>
@override @override
void dispose(){ void dispose(){
super.dispose();
WidgetsBinding.instance.removeObserver(this); WidgetsBinding.instance.removeObserver(this);
commentFocus.removeListener(_focusNodeListener); commentFocus.removeListener(_focusNodeListener);
super.dispose(); refreshController.dispose();
} }
/// ///
@ -147,12 +164,22 @@ class _CommunityDetails extends State<CommunityDetails>
BaseData<Article> baseData = BaseData<Article> baseData =
await apiService.informationInfo(id).catchError((onError) { await apiService.informationInfo(id).catchError((onError) {
debugPrint(onError.toString()); debugPrint(onError.toString());
refreshController.refreshFailed();
}); });
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
article = baseData.data; article = baseData.data;
EasyLoading.dismiss();
refreshController.refreshCompleted();
}); });
}else {
refreshController.refreshFailed();
}
} }
_onRefresh() {
queryDetails(businessId);
_queryMemberCommentList(true);
} }
@override @override
@ -186,6 +213,25 @@ class _CommunityDetails extends State<CommunityDetails>
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
setState(() {
emojiShowing = false;
isKeyBoardShow = emojiShowing;
FocusScope.of(context).requestFocus(FocusNode());
_onRefresh();
});
},
scrollController:scrollController,
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
@ -243,6 +289,7 @@ class _CommunityDetails extends State<CommunityDetails>
], ],
), ),
), ),
),
flex: 1, flex: 1,
), ),
@ -299,7 +346,7 @@ class _CommunityDetails extends State<CommunityDetails>
state.queryMemberCommentList(); state.queryMemberCommentList();
commentTextController.text = ""; commentTextController.text = "";
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
_queryMemberCommentList(); _queryMemberCommentList(false);
} }
} }
@ -351,14 +398,15 @@ class _CommunityDetails extends State<CommunityDetails>
} }
/// ///
_queryMemberCommentList() async { _queryMemberCommentList(bool isOnRefresh) async {
if (!isOnRefresh) EasyLoading.show(status: S.current.zhengzaijiazai);
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null) if (apiService == null)
apiService = ApiService( apiService = ApiService(
Dio(), Dio(),
context: context, context: context,
token: sharedPreferences.getString("token"), token: sharedPreferences.getString("token"),
showLoading: true, // showLoading: true,
); );
BaseData<PageInfo<MemberCommentList>> baseData = BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({ await apiService.memberCommentList({
@ -372,6 +420,9 @@ class _CommunityDetails extends State<CommunityDetails>
memberList = baseData.data.list; memberList = baseData.data.list;
contentHeight(); contentHeight();
if (mounted) setState(() {}); if (mounted) setState(() {});
EasyLoading.dismiss();
}else {
refreshController.refreshFailed();
} }
} }
} }

2
lib/login/new_login_page.dart

@ -445,7 +445,7 @@ class _NewLoginPage extends State<NewLoginPage> {
Container( Container(
height: 30.h, height: 30.h,
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:10.h), margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0),
child: TextField( child: TextField(
style: TextStyle( style: TextStyle(
height: 1.h, height: 1.h,

66
lib/order/order_view/order_commodity.dart

@ -9,6 +9,8 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/separator.dart'; import 'package:huixiang/view_widget/separator.dart';
import '../../utils/flutter_utils.dart';
class OrderCommodity extends StatefulWidget { class OrderCommodity extends StatefulWidget {
final OrderInfo orderInfo; final OrderInfo orderInfo;
@ -181,12 +183,14 @@ class _OrderCommodity extends State<OrderCommodity> {
return Container( return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
MImage( MImage(
productList.skuImg, productList.skuImg,
width: 44.w, width: 49,
height: 44, height: 49,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(2),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
), ),
@ -194,18 +198,14 @@ class _OrderCommodity extends State<OrderCommodity> {
flex: 1, flex: 1,
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16.w, left: 8.w,
), ),
// height: 44.h, // height: 44.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Text(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Text(
productList.productName, productList.productName,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -214,7 +214,20 @@ class _OrderCommodity extends State<OrderCommodity> {
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
)), ),
SizedBox(
height: 4.h,
),
Text(
productList.skuNameStr != null
? "${productList.skuNameStr ?? ""}"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
Text( Text(
"x${productList.buyNum}", "x${productList.buyNum}",
style: TextStyle( style: TextStyle(
@ -224,40 +237,37 @@ class _OrderCommodity extends State<OrderCommodity> {
), ),
], ],
), ),
Row( ),
mainAxisAlignment: MainAxisAlignment.spaceBetween, ),
crossAxisAlignment: CrossAxisAlignment.center, Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded( Text(
flex: 1, productList.buyNum > 1
child: Text( ? S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - AppUtils.stringAsFixedDouble2((double.tryParse(productList.discountAmount ?? "0") / productList.buyNum))))
productList.skuNameStr != null : S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))),
? "${productList.skuNameStr}"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontWeight: MyFontWeight.medium,
color: Color(0xFFA29E9E), fontSize: 14.sp,
), color: Color(0xFF4C4C4C),
), ),
), ),
if (productList.discountAmount != null && productList.discountAmount != "0")
Text( Text(
S.of(context).yuan_(productList.sellPrice), S.of(context).yuan_(productList.sellPrice),
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
fontFamily: 'JDZhengHT', fontFamily: 'JDZhengHT',
color: Color(0xFF4C4C4C), decoration: TextDecoration.lineThrough,
color: Color(0xFFA29E9E),
), ),
) )
], ],
), ),
], ],
), ),
),
),
],
),
); );
} }

8
lib/retrofit/retrofit_api.dart

@ -553,4 +553,12 @@ abstract class ApiService {
///code获取设置/ ///code获取设置/
@GET("/raise/products") @GET("/raise/products")
Future<BaseData<List<FarmersList>>> getConfig(); Future<BaseData<List<FarmersList>>> getConfig();
///
@POST("/auth/changePhone")
Future<BaseData> changePhone(@Body() Map<String, dynamic> param);
///-
@GET("/auth/sendVerify/{mobile}")
Future<BaseData> changeSendVerify(@Path("mobile") String mobile);
} }

6
lib/setting/account_security_page.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
@ -25,10 +26,10 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai);
SharedPreferences.getInstance().then((value) => { SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), apiService = ApiService(Dio(),
context: context, token: value.getString("token"), context: context, token: value.getString("token"),),
showLoading: true),
queryUser(), queryUser(),
}); });
@ -46,6 +47,7 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
value.setString('user', jsonEncode(baseDate.data)), value.setString('user', jsonEncode(baseDate.data)),
}, },
); );
EasyLoading.dismiss();
} }
} }

27
lib/setting/binding_phone_page.dart

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -209,6 +210,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
fontSize: 18.sp, fontSize: 18.sp,
letterSpacing:1,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
),)), ),)),
if(phoneState == 2) if(phoneState == 2)
@ -218,7 +220,8 @@ class _BindingPhonePage extends State<BindingPhonePage> {
style: TextStyle( style: TextStyle(
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.regular, letterSpacing:0.5,
fontWeight: MyFontWeight.medium,
),)), ),)),
if(phoneState == 1) if(phoneState == 1)
inputPhone(), inputPhone(),
@ -349,7 +352,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
Container( Container(
height: 30.h, height: 30.h,
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:10.h), margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0),
child: TextField( child: TextField(
style: TextStyle( style: TextStyle(
height: 1.h, height: 1.h,
@ -374,10 +377,10 @@ class _BindingPhonePage extends State<BindingPhonePage> {
errorBorder: InputBorder.none, errorBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
hintText: "", hintText: S.of(context).qingshurushoujihao,
// contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12),
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 10.sp, fontSize: 14.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
), ),
), ),
@ -397,6 +400,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
color: _controllerPhone.text == "" color: _controllerPhone.text == ""
? Color(0xFFE7E3E3) ? Color(0xFFE7E3E3)
: Color(0xFF32A060), : Color(0xFF32A060),
margin: EdgeInsets.only(top: 10.h),
), ),
SizedBox( SizedBox(
height: 30.h, height: 30.h,
@ -443,9 +447,9 @@ class _BindingPhonePage extends State<BindingPhonePage> {
errorBorder: InputBorder.none, errorBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
hintText: "", hintText:S.of(context).input_code_hide,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 10.sp, fontSize: 14.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
), ),
), ),
@ -572,7 +576,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
Container( Container(
height: 30.h, height: 30.h,
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:10.h), margin: EdgeInsets.only(bottom:Platform.isIOS ? 10.h:0),
child: TextField( child: TextField(
style: TextStyle( style: TextStyle(
height: 1.h, height: 1.h,
@ -597,10 +601,10 @@ class _BindingPhonePage extends State<BindingPhonePage> {
errorBorder: InputBorder.none, errorBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
hintText: "", hintText: S.of(context).qingshurushoujihao,
// contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12), // contentPadding: EdgeInsets.only(top: 12, bottom: 12, left: 12),
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 10.sp, fontSize: 14.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
), ),
), ),
@ -620,6 +624,7 @@ class _BindingPhonePage extends State<BindingPhonePage> {
color: _controllerNewPhone.text == "" color: _controllerNewPhone.text == ""
? Color(0xFFE7E3E3) ? Color(0xFFE7E3E3)
: Color(0xFF32A060), : Color(0xFF32A060),
margin: EdgeInsets.only(top: 10.h),
), ),
SizedBox( SizedBox(
height: 30.h, height: 30.h,
@ -667,9 +672,9 @@ class _BindingPhonePage extends State<BindingPhonePage> {
errorBorder: InputBorder.none, errorBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
hintText: "", hintText:S.of(context).input_code_hide,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 10.sp, fontSize: 14.sp,
color: Color(0xFFA29E9E), color: Color(0xFFA29E9E),
), ),
), ),

6
lib/settlement/settlement.dart

@ -186,10 +186,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "", productSkuId ?? "",
actProductId ?? "", actProductId ?? "",
actProductSkuId ?? "", actProductSkuId ?? "",
(isVips == false || !placeOrder) (!placeOrder)
? ((vipLevelName == "黄金会员" && placeOrder) ? "NONE"
? "MEMBER_RANK"
: "NONE")
: "AUTO", : "AUTO",
// useVipPriceSelect, // useVipPriceSelect,
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, // (useVipPriceSelect == true && isVips) ? false:useBenefitSelect,

7
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -122,7 +122,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(widget.coupons != null && widget.coupons != "" || (widget.coupons != null && widget.coupons != "" ||
widget.promotions != null && widget.promotions != null &&
widget.promotions != "" || widget.promotions != "" ||
widget.payChannell == 5 || widget.payChannell == 7 ||(widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" ) widget.payChannell == 5 || widget.payChannell == 7 || ((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE") )
? false ? false
: vipSelect, : vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@ -179,7 +179,8 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
widget.promotions != null && widget.promotions != null &&
widget.promotions != "" || widget.promotions != "" ||
widget.payChannell == 5 || 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 == 7 ||((widget?.settleOrderInfo?.discountType ?? "") == "MEMBER_RANK" || (widget?.settleOrderInfo?.discountType ?? "") == "SURPRISE")
|| (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false ? false
: vipSelect) : vipSelect)
? "assets/image/vip_price.webp" ? "assets/image/vip_price.webp"
@ -278,7 +279,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
// ), // ),
// ), // ),
if (widget.placeOrder && if (widget.placeOrder &&
(widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != null && ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE") && widget?.settleOrderInfo?.benefitDiscountAmount != null &&
widget?.settleOrderInfo?.benefitDiscountAmount != "0")) widget?.settleOrderInfo?.benefitDiscountAmount != "0"))
Container( Container(
margin: EdgeInsets.only(bottom: 13), margin: EdgeInsets.only(bottom: 13),

6
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -141,10 +141,12 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
} }
if (widget.useBenefitSelect && if (widget.useBenefitSelect &&
(widget?.settleOrderInfo?.discountType == "MEMBER_RANK" && widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 ((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE")
&& widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0
? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) { ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) {
widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额", widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额",
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") :(widget?.settleOrderInfo?.benefitDiscountAmount ?? ""))); (widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "")
:(widget?.settleOrderInfo?.benefitDiscountAmount ?? "")));
} }
if (widget.showVipTips) { if (widget.showVipTips) {

61
lib/store/store_view/shop_goods.dart

@ -494,36 +494,37 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox( SizedBox(
height: 4.h, height: 4.h,
), ),
if (widget.productListBean.vipPrice != null) ///VIP价格
Row( // if (widget.productListBean.vipPrice != null)
children: [ // Row(
Container( // children: [
alignment: Alignment.center, // Container(
padding: EdgeInsets.symmetric(horizontal: 2.w), // alignment: Alignment.center,
margin: EdgeInsets.only(right: 4.w), // padding: EdgeInsets.symmetric(horizontal: 2.w),
decoration: new BoxDecoration( // margin: EdgeInsets.only(right: 4.w),
color: Color(0xff32A060), // decoration: new BoxDecoration(
borderRadius: BorderRadius.circular(4)), // color: Color(0xff32A060),
child: Text( // borderRadius: BorderRadius.circular(4)),
"VIP", // child: Text(
style: TextStyle( // "VIP",
fontSize: 12.sp, // style: TextStyle(
fontWeight: MyFontWeight.medium, // fontSize: 12.sp,
color: Color(0xFFFFFFFF), // fontWeight: MyFontWeight.medium,
), // color: Color(0xFFFFFFFF),
), // ),
), // ),
Text( // ),
"${AppUtils.calculateDouble(double.tryParse(widget.productListBean.vipPrice ?? "0") ?? 0)}", // Text(
style: TextStyle( // "${AppUtils.calculateDouble(double.tryParse(widget.productListBean.vipPrice ?? "0") ?? 0)}",
fontSize: 14.sp, // style: TextStyle(
fontWeight: MyFontWeight.medium, // fontSize: 14.sp,
fontFamily: 'JDZhengHT', // fontWeight: MyFontWeight.medium,
color: Color(0xff32A060), // fontFamily: 'JDZhengHT',
), // color: Color(0xff32A060),
), // ),
], // ),
), // ],
// ),
// Text( // Text(
// "${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.applyPrice) ?? 0)}", // "${AppUtils.calculateDouble(double.tryParse(widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.applyPrice) ?? 0)}",
// style: TextStyle( // style: TextStyle(

Loading…
Cancel
Save