Browse Source

1.动态详情列表评论,高于一条评论才显示“以显示全部”;

2.动态列表,新增点击置顶;
3.积分兑换,集换卡创建订单部分修改;
4.会员中心会员卡部分更改优化;
5.套餐修改,套餐内数据,可能需要新增buyNumber数量传过去;(我这边暂时没加)
6.选规格,会员价修改;
7.订单结算页部分调整;
8.结算页多规格显示修改;
9.库存不足的判断暂时去掉;
10.购物车套餐显示修改;
11.集换卡新增下拉刷新;
new_revision_app
wurong 2 years ago
parent
commit
97088781d1
  1. 55
      lib/community/community_child_page.dart
  2. 6
      lib/home/trading_card_page.dart
  3. 1
      lib/main_page.dart
  4. 627
      lib/mine/mine_vip/mine_vip_core.dart
  5. 4
      lib/order/exchange_order_page.dart
  6. 33
      lib/settlement/settlement.dart
  7. 138
      lib/settlement/settlement_view/settlement_order_commodity.dart
  8. 3
      lib/store/store_view/product_meals_sku.dart
  9. 2
      lib/store/store_view/product_sku.dart
  10. 39
      lib/store/store_view/shop_goods.dart
  11. 83
      lib/store/store_view/shop_goods_car.dart
  12. 2
      lib/view_widget/mine_vip_entry.dart
  13. 2
      lib/web/web_view/comment_list.dart

55
lib/community/community_child_page.dart

@ -17,6 +17,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import '../utils/font_weight.dart';
class CommunityChildPage extends StatefulWidget {
final String typeStr;
@ -43,12 +44,18 @@ class CommunityChildPageState extends State<CommunityChildPage>
bool isLoadingData = false;
ScrollController sc = ScrollController();
List<Article> articles = [];
int _currentIndex = 0;
@override
void initState() {
super.initState();
sc.addListener(() {
widget.onScroll();
if (sc.offset >= 500) {
_currentIndex =1;
}else if(sc.offset <= 500){
_currentIndex = 0;
}
});
onRefresh();
}
@ -196,9 +203,11 @@ class CommunityChildPageState extends State<CommunityChildPage>
userId: userId,
isList: true,
exitFull: () {
setState(() {
onRefresh();
});
// setState(() {
// onRefresh();
// });
queryCommunity(articles[position].id);
},
),
onTap: () {
@ -209,10 +218,11 @@ class CommunityChildPageState extends State<CommunityChildPage>
"userId": userId,
},
).then((value) {
onRefresh();
setState(() {});
// onRefresh();
// setState(() {});
queryCommunity(articles[position].id);
});
setState(() {});
// setState(() {});
},
);
@ -232,7 +242,38 @@ class CommunityChildPageState extends State<CommunityChildPage>
height: 55,
),
),
)
),
if(_currentIndex == 1)
GestureDetector(
onTap: () {
sc.jumpTo(0);
setState(() {});
},
child: Container(
margin: EdgeInsets.only(bottom:120.h, right: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Colors.white,
),
height:48,
width: 48,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(Icons.arrow_upward,size: 16,color: Color(0xFF808080),),
Text(
"顶部",
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xFF808080),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
),
),
],
);
},

6
lib/home/trading_card_page.dart

@ -37,6 +37,12 @@ class _TradingCardPage extends State<TradingCardPage> {
});
}
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
///
queryUserBalance() async {
BaseData<UserInfo> baseData =

1
lib/main_page.dart

@ -374,6 +374,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
).queryInfo().catchError((onError) {});
sharedPreferences.setString('user', jsonEncode(baseDate.data));
//
String mobile = baseDate.data.phone;
if (mobile != null && mobile != "") {
xgFlutterPlugin.setAccount(mobile, AccountType.PHONE_NUMBER);

627
lib/mine/mine_vip/mine_vip_core.dart

@ -23,9 +23,12 @@ import 'package:huixiang/view_widget/mine_vip_view.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/vip_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../retrofit/data/user_info.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart';
class MineVipCore extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -46,6 +49,7 @@ class _MineVipCore extends State<MineVipCore> {
int checkIndex = 0;
UserInfo userInfo;
int rankNameIndex;
final RefreshController refreshController = RefreshController();
final SwiperController controller = SwiperController();
@ -104,7 +108,9 @@ class _MineVipCore extends State<MineVipCore> {
///
queryVipLevel() async {
BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {});
BaseData<List<Rank>> rankData = await apiService.rankList().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (rankData != null && rankData.isSuccess) {
ranks.clear();
ranks.addAll(rankData.data);
@ -114,21 +120,29 @@ class _MineVipCore extends State<MineVipCore> {
setState(() {
controller.move((widget.arguments["rankLevel"] - 1), animation: false);
});
refreshController.refreshCompleted();
refreshController.loadComplete();
} else {
SmartDialog.showToast(rankData?.msg??"", alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
}
///
queryBenefitList() async {
BaseData<List<VipBenefitList>> baseData =
await apiService.benefitList().catchError((onError) {});
await apiService.benefitList().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) {
setState(() {
vipBenefitList.clear();
vipBenefitList.addAll(baseData.data);
vipBenefitList.sort((a, b) => (a.sort).compareTo(b.sort));
});
refreshController.refreshCompleted();
refreshController.loadComplete();
}
EasyLoading.dismiss();
}
@ -136,11 +150,15 @@ class _MineVipCore extends State<MineVipCore> {
//////
queryRuleDetails() async {
BaseData<VipRuleDetails> baseData =
await apiService.vipBenefit().catchError((onError) {});
await apiService.vipBenefit().catchError((onError) {
refreshController.refreshFailed();
refreshController.loadFailed();});
if (baseData != null && baseData.isSuccess) {
setState(() {
vipRuleDetails = baseData.data;
});
refreshController.refreshCompleted();
refreshController.loadComplete();
}
EasyLoading.dismiss();
}
@ -180,6 +198,13 @@ class _MineVipCore extends State<MineVipCore> {
}
}
_onRefresh() async {
await queryVipLevel();
await queryBenefitList();
await queryRuleDetails();
}
@override
Widget build(BuildContext context) {
return Container(
@ -259,310 +284,328 @@ class _MineVipCore extends State<MineVipCore> {
),
),
Expanded(child:
SingleChildScrollView(
SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Colors.white,
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_onRefresh();
},
physics: BouncingScrollPhysics(),
child: Column(
children: [
///
if(ranks.length > 0)
Container(
height: (MediaQuery.of(context).size.width) /
1.78 *
AppUtils.textScale(context),
child: Swiper(
viewportFraction: 0.95,
loop: false,
physics: BouncingScrollPhysics(),
index: checkIndex,
controller: controller,
onIndexChanged: (index) {
setState(() {
checkIndex = index;
});
},
itemBuilder: (context, position) {
return vipCar(position);
// MineVipView(
// vipLevel: !(ranks != null && ranks.isNotEmpty)
// ? widget.arguments["rankLevel"]
// : position + 1,
// curLevel: widget.arguments["rankLevel"],
// tag: (widget.arguments["rankLevel"] == (position + 1) ||
// !(ranks != null && ranks.isNotEmpty))
// ? "vip"
// : "",
// padding: 6.w,
// // rank: !(ranks != null && ranks.isNotEmpty)
// // ? 0
// // : widget.arguments["expendAmount"] ?? 0,
// rankMax: !(ranks != null && ranks.isNotEmpty)
// ? 0
// : ranks[position].rankOrigin,
// createTime: widget.arguments["createTime"],
// showRank: false,
// price: !(ranks != null && ranks.isNotEmpty)
// ? "0"
// : ranks[position].price,
// );
},
itemCount:
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1,
scrollController: ScrollController(),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
///
if(ranks.length > 0)
Container(
height: (MediaQuery.of(context).size.width) /
1.78 *
AppUtils.textScale(context),
child: Swiper(
viewportFraction: 0.95,
loop: false,
physics: BouncingScrollPhysics(),
index: checkIndex,
controller: controller,
onIndexChanged: (index) {
setState(() {
checkIndex = index;
});
},
itemBuilder: (context, position) {
return vipCar(position);
// MineVipView(
// vipLevel: !(ranks != null && ranks.isNotEmpty)
// ? widget.arguments["rankLevel"]
// : position + 1,
// curLevel: widget.arguments["rankLevel"],
// tag: (widget.arguments["rankLevel"] == (position + 1) ||
// !(ranks != null && ranks.isNotEmpty))
// ? "vip"
// : "",
// padding: 6.w,
// // rank: !(ranks != null && ranks.isNotEmpty)
// // ? 0
// // : widget.arguments["expendAmount"] ?? 0,
// rankMax: !(ranks != null && ranks.isNotEmpty)
// ? 0
// : ranks[position].rankOrigin,
// createTime: widget.arguments["createTime"],
// showRank: false,
// price: !(ranks != null && ranks.isNotEmpty)
// ? "0"
// : ranks[position].price,
// );
},
itemCount:
(ranks != null && ranks.isNotEmpty) ? ranks.length : 1,
),
),
),
///
if(vipBenefitList != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
///
if(vipBenefitList != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
Row(
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
),
SizedBox(
width: 4.w,
),
Text(
S.of(context).huiyuanquanyi,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
),
],
),
SizedBox(
width: 4.w,
),
Text(
S.of(context).huiyuanquanyi,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
height: 12.h,
),
vipLegalRight(),
],
),
SizedBox(
height: 12.h,
),
vipLegalRight(),
],
),
),
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
Row(
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
),
SizedBox(
width: 4.w,
),
Text(
S.of(context).huiyuanguize,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
),
],
),
SizedBox(
width: 4.w,
height: 12.h,
),
Text(
S.of(context).huiyuanguize,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
if (vipRuleDetails?.qa != null && vipRuleDetails.qa != "")
Container(
color: Colors.white,
padding: EdgeInsets.only(left: 8.w),
child: Html(
data: vipRuleDetails?.qa ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
),
],
),
SizedBox(
height: 12.h,
),
if (vipRuleDetails?.qa != null && vipRuleDetails.qa != "")
Container(
color: Colors.white,
padding: EdgeInsets.only(left: 8.w),
child: Html(
data: vipRuleDetails?.qa ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
],
),
),
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
Row(
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
),
SizedBox(
width: 4.w,
),
Text(
S.of(context).huiyuanjibieduizhao,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
),
],
),
SizedBox(
width: 4.w,
height: 12.h,
),
Text(
S.of(context).huiyuanjibieduizhao,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
MImage(
vipRuleDetails?.contrast ?? "",
width: double.infinity,
height: 281.h,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(
height: 16.h,
),
],
),
SizedBox(
height: 12.h,
),
MImage(
vipRuleDetails?.contrast ?? "",
width: double.infinity,
height: 281.h,
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(
height: 16.h,
),
],
),
),
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
///
if(vipRuleDetails != null)
Container(
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
Row(
children: [
Container(
width: 4.w,
height: 18.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFF000000),
Color(0xFF585858),
]),
),
),
SizedBox(
width: 4.w,
),
Text(
S.of(context).huiyuanhuodejifen,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
),
),
],
),
SizedBox(
width: 4.w,
height: 12.h,
),
Text(
S.of(context).huiyuanhuodejifen,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 16.sp,
color: Colors.black,
if (vipRuleDetails?.rule != null &&
vipRuleDetails.rule != "")
Container(
color: Colors.white,
child: Html(
data: vipRuleDetails?.rule ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
),
],
),
SizedBox(
height: 12.h,
),
if (vipRuleDetails?.rule != null &&
vipRuleDetails.rule != "")
Container(
color: Colors.white,
child: Html(
data: vipRuleDetails?.rule ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
],
),
),
],
),
],
),
),
],
),
],
),
),
)),
],
@ -618,8 +661,8 @@ class _MineVipCore extends State<MineVipCore> {
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
AppUtils.getLighterColor(ranks[position]?.color ?? ""),
Color(int.parse((ranks[position]?.color ?? "").replaceAll("#", "FF"), radix: 16)),
AppUtils.getLighterColor(ranks[position]?.color ?? "#85C9DD"),
Color(int.parse((ranks[position]?.color ?? "#85C9DD").replaceAll("#", "FF"), radix: 16)),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
@ -698,14 +741,12 @@ class _MineVipCore extends State<MineVipCore> {
),
child: Column(
mainAxisAlignment:
(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))?
MainAxisAlignment.spaceAround:
MainAxisAlignment.end,
MainAxisAlignment.spaceAround,
children: [
if(userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员"))
Align(alignment: Alignment.centerRight,
child: Text(
(ranks[position].rankName == "共创会员") ? "${AppUtils.calculateDouble(double.tryParse(ranks[position].price??""))}/永久" : (ranks[position]?.originScore ?? 0).toString(),
(ranks[position].rankName == "共创会员") ? "永久VIP" : (ranks[position]?.originScore ?? 0).toString(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
@ -734,7 +775,7 @@ class _MineVipCore extends State<MineVipCore> {
TextSpan(
text:"${AppUtils.calculateDouble(double.tryParse(userInfo.expendAmount??"0"))}",
style: TextStyle(
fontSize: 26.sp,
fontSize: 24.sp,
fontWeight: MyFontWeight.medium,
color: Color(int.parse((ranks[position]?.textColor ?? "").replaceAll("#", "FF"), radix: 16)),
),
@ -752,19 +793,19 @@ class _MineVipCore extends State<MineVipCore> {
),
],
),),
// if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员"))
// Container(
// height: 8.h,
// child: ClipRRect(
// borderRadius: BorderRadius.circular(6.5),
// child: LinearProgressIndicator(
// value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ?
// (userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0,
// backgroundColor: Colors.white,
// color: AppUtils.getLighterColor(ranks[position]?.color ?? ""),
// ),
// ),
// ),
if(userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员"))
Container(
height: 8.h,
child: ClipRRect(
borderRadius: BorderRadius.circular(6.5),
child: LinearProgressIndicator(
value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > (double.tryParse(userInfo?.expendAmount ?? "0").toInt())? ((checkIndex < rankNameIndex) ?
(userInfo?.memberRankVo?.nextOrigin ?? 0)/(userInfo?.memberRankVo?.nextOrigin ?? 0): (double.tryParse(userInfo?.expendAmount ?? "0").toInt()) / (userInfo?.memberRankVo?.nextOrigin ?? 0)) : 0,
backgroundColor: Colors.white,
color: AppUtils.getLighterColor(ranks[position]?.color ?? ""),
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,

4
lib/order/exchange_order_page.dart

@ -1213,8 +1213,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
"price": realPay.contains(S.of(context).jifen)
? realPay.substring(0, realPay.indexOf(S.of(context).jifen))
: "0",
"happyBeanPrice":realPay.contains(S.of(context).xiaofeijihuanka)
? realPay.substring(0, realPay.indexOf(S.of(context).xiaofeijihuanka))
"happyBeanPrice":realPay.contains(S.of(context).jihuanka)
? realPay.substring(0, realPay.indexOf(S.of(context).jihuanka))
: "0",
"realPay": realPay,
"points": points,

33
lib/settlement/settlement.dart

@ -874,6 +874,7 @@ class _Settlement extends State<Settlement> {
height: 16.h,
),
////
if ((storeInfo?.pickupType?.dineInTakeStatus ??
false) ==
true &&
@ -1098,13 +1099,17 @@ class _Settlement extends State<Settlement> {
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0,
0,
productId ?? 0,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"),
// useVipPriceSelect,
// useBenefitSelect,
count1,
@ -1180,13 +1185,17 @@ class _Settlement extends State<Settlement> {
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn != 1 && selectedBtn != 2)
? diningStatus
: selectedBtn,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: couponListBean?.id,
0,
0,
productId ?? 0,
(settleOrderInfo.isRaise || payChannel == 5)
? ""
: promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
"AUTO",
((promotion?.id ?? productId ?? "") != "") ? "ACTIVITY" : ((couponListBean?.id ?? "") != "" ? "COUPON":"AUTO"),
// useVipPriceSelect,
// useBenefitSelect,
count1,
@ -1296,13 +1305,13 @@ class _Settlement extends State<Settlement> {
String preferentialType(){
if(settleOrderInfo.isRaise || payChannel == 5)
return "NONE";
if((((promotion?.id ?? productId) ?? "") != "")){
if((((promotion?.id ?? productId) ?? "") != "") && (couponListBean?.id ?? "") == ""){
return "ACTIVITY";
}else if((couponListBean?.id ?? "") != ""){
}else if((couponListBean?.id ?? "") != "" && (((promotion?.id ?? productId) ?? "") == "")){
return "COUPON";
}else if(useVipPriceSelect == true && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){
}else if(useVipPriceSelect == true && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ??"") == "")){
return "VIP";
}if(useVipPriceSelect == false && couponListBean?.id == "" && ((promotion?.id ?? productId) == "")){
}if(useVipPriceSelect == false && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ?? "") == "")){
return "MEMBER_RANK";
}else {
return "AUTO";
@ -1412,7 +1421,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? ((isVips == false)
? "MEMBER_RANK"
: "AUTO")
: "COUPON",
@ -1453,7 +1462,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0
? ((isVips == false && vipLevelName == "黄金会员")
? ((isVips == false)
? "MEMBER_RANK"
: "AUTO")
: "ACTIVITY",

138
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -134,19 +134,36 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
if (widget.useVipPriceSelect &&
widget.settleOrderInfo.memberVO.isVip &&
(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) &&
(widget?.settleOrderInfo?.discountType == "VIP" && widget?.settleOrderInfo?.vipDiscountAmount != "0")) {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠",
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.discountAmount ?? ""):(widget?.settleOrderInfo?.vipDiscountAmount ?? "")));
(widget.tableId > 0
? !(widget?.minOrderInfo?.isRaise ?? false)
: !(widget?.settleOrderInfo?.isRaise ?? false)) &&
(widget?.settleOrderInfo?.discountType == "VIP" &&
widget?.settleOrderInfo?.vipDiscountAmount != "0")) {
widgets.add(vipItem(
Color(0xFFFF7A1A),
"VIP优惠",
AppUtils.calculateDouble(double.tryParse(
(widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null)
? (widget.minOrderInfo?.discountAmount ?? "")
: (widget?.settleOrderInfo?.vipDiscountAmount ?? "")))));
}
if (widget.useBenefitSelect &&
((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" || widget?.settleOrderInfo?.discountType == "SURPRISE")
&& 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 ?? "")));
((widget?.settleOrderInfo?.discountType == "MEMBER_RANK" ||
widget?.settleOrderInfo?.discountType == "SURPRISE") &&
widget?.settleOrderInfo?.benefitDiscountAmount != "0") &&
((widget.tableId > 0
? !(widget?.minOrderInfo?.isRaise ?? false)
: !(widget?.settleOrderInfo?.isRaise ?? false)))) {
widgets.add(vipItem(
Color(0xFFFF7A1A),
"会员优惠金额",
AppUtils.calculateDouble(double.tryParse(
(widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null)
? (widget.minOrderInfo?.benefitDiscountAmount ?? "")
: (widget?.settleOrderInfo?.benefitDiscountAmount ?? "")))));
}
if (widget.showVipTips) {
@ -266,15 +283,23 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
children: [
Text(
productList.buyNum > 1
? S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - AppUtils.stringAsFixedDouble2((double.tryParse(productList.discountAmount ?? "0") / productList.buyNum))))
: S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))),
? S.of(context).yuan_(AppUtils.calculateDouble(
double.tryParse(productList.sellPrice ?? "0") -
AppUtils.stringAsFixedDouble2((double.tryParse(
productList.discountAmount ?? "0") /
productList.buyNum))))
: S.of(context).yuan_(AppUtils.calculateDouble(
double.tryParse(productList.sellPrice ?? "0") -
double.tryParse(
productList.discountAmount ?? "0"))),
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xFF4C4C4C),
),
),
if (productList.discountAmount != null && productList.discountAmount != "0")
if (productList.discountAmount != null &&
productList.discountAmount != "0")
Text(
S.of(context).yuan_(productList.sellPrice),
style: TextStyle(
@ -289,7 +314,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
),
],
),
if(productList.setMealDataList.length != 0)
if (productList.setMealDataList.length != 0)
ListView.builder(
itemCount: productList.setMealDataList.length,
scrollDirection: Axis.vertical,
@ -306,48 +331,53 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
}
Widget orderMealsItem(SetMealDataList setMealDataList) {
return Container(
margin: EdgeInsets.symmetric(vertical:10.h,),
child: Row(
children: [
Expanded(
flex:2,
child: Text(
setMealDataList.productInfoList[0].productName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
return Column(children: setMealDataList.productInfoList.map((e) {
return Container(
margin: EdgeInsets.symmetric(
vertical: 10.h,
),
child: Row(
children: [
Expanded(
flex: 2,
child: Text(
e.productName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
),
),
Expanded(flex:3,
child: Text(
"${(setMealDataList.productInfoList[0].skuName == "") ? "": setMealDataList.productInfoList[0].skuName}",
Expanded(
flex: 3,
child: Text(
"${(e.skuName == "") ? "" : e.skuName}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Text(
"x${e.buyNumber.toString()}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
color: Color(0xffFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Text(
"x${setMealDataList.productInfoList[0].buyNumber.toString()}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
);
],
),
);
}).toList(),);
}
Widget discountItem(Color color, textName, condition, amount) {
@ -545,7 +575,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
),
Container(
child: Text(
"已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0": discountPrice()}",
"已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0" : discountPrice()}",
style: TextStyle(
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
@ -588,20 +618,24 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
///
String discountPrice() {
if (widget.minOrderInfo != null) {
return AppUtils.calculateDouble(double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0"));
return AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0"));
} else if (widget.tableId < 0) {
return "0";
} else {
return AppUtils.calculateDouble(double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0"));
return AppUtils.calculateDouble(
double.tryParse(widget?.settleOrderInfo?.totalDiscountAmount ?? "0"));
}
}
String totalPrice() {
if (widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null) {
return "${widget.minOrderInfo.finalPayPrice}";
return "${AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo.finalPayPrice))}";
}
if (widget.settleOrderInfo.orderProductList == null) return "";
return "${widget.settleOrderInfo.price}";
return "${AppUtils.calculateDouble(
double.tryParse(widget.settleOrderInfo.price ?? ""))}";
}
}

3
lib/store/store_view/product_meals_sku.dart

@ -93,7 +93,8 @@ class _ProductMealsSku extends State<ProductMealsSku> {
"productId": ele.productId,
"skuId": ele.skuInfoList.length == 1
? ele.skuInfoList.first.id
: ele.skuInfoList.firstWhere((e2) => e2.isSelected).id
: ele.skuInfoList.firstWhere((e2) => e2.isSelected).id,
// "buyNumber":1,
});
}
});

2
lib/store/store_view/product_sku.dart

@ -57,7 +57,7 @@ class _ProductSku extends State<ProductSku> {
return;
}
if (productSku == null) return;
selectedPrice = productSku.vipPrice;
selectedPrice = productSku.vipPrice ?? productSku.skuPrice ?? "";
String skuId = productSku.id;
if (widget.shopCarGoods == null ||
widget.shopCarGoods.shoppingCartSkuItemList == null) return;

39
lib/store/store_view/shop_goods.dart

@ -351,14 +351,15 @@ class _ShopGoods extends State<ShopGoods> {
widget.tableId == 0) {
showDeleteDialog();
} else {
if ((widget?.productListBean?.oversold ?? 0) == 0 &&
widget.count >=
(widget?.shoppingCartSkuItemListBean
?.skuStock ??
0)) {
SmartDialog.showToast("库存不足",
alignment: Alignment.center);
} else if (_jumpType == -1)
// if ((widget?.productListBean?.oversold ?? 0) == 0 &&
// widget.count >=
// (widget?.shoppingCartSkuItemListBean
// ?.skuStock ??
// 0)) {
// SmartDialog.showToast("库存不足",
// alignment: Alignment.center);
// } else
if (_jumpType == -1)
queryMiNiDetail(widget.productListBean.id);
else if (_jumpType == 0)
widget.add(widget.shoppingCartSkuItemListBean);
@ -431,16 +432,18 @@ class _ShopGoods extends State<ShopGoods> {
"NORMALSTORE" &&
widget.tableId == 0) {
showDeleteDialog();
} else if ((widget?.productListBean?.oversold ??
0) ==
0 &&
widget.count >=
(widget?.shoppingCartSkuItemListBean
?.skuStock ??
0)) {
SmartDialog.showToast("库存不足",
alignment: Alignment.center);
} else {
}
// else if ((widget?.productListBean?.oversold ??
// 0) ==
// 0 &&
// widget.count >=
// (widget?.shoppingCartSkuItemListBean
// ?.skuStock ??
// 0)) {
// SmartDialog.showToast("库存不足",
// alignment: Alignment.center);
// }
else {
await Navigator.of(context).pushNamed(
'/router/product_meals_sku',
arguments: {

83
lib/store/store_view/shop_goods_car.dart

@ -250,18 +250,7 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
(widget.productListBean?.attrStyle ?? 0) == 0)
GestureDetector(
onTap: () {
if ((widget?.productListBean?.oversold ?? 0) ==
0 &&
widget.count >=
(widget?.shoppingCartSkuItemListBean
?.skuStock ??
0)) {
SmartDialog.showToast("库存不足",
alignment: Alignment.center);
} else {
widget
.add(widget.shoppingCartSkuItemListBean);
}
widget.add(widget.shoppingCartSkuItemListBean);
},
child: Image.asset(
"assets/image/add.webp",
@ -310,48 +299,50 @@ class _ShopGoodsCar extends State<ShopGoodsCar> {
}
Widget shopCarMealsItem(SetMealDataList setMealDataList) {
return Container(
margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w),
child: Row(
children: [
Expanded(
flex: 2,
child: Text(
setMealDataList.productInfoList[0].productName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
return Column(children: setMealDataList.productInfoList.map((e) {
return Container(
margin: EdgeInsets.symmetric(vertical: 10.h, horizontal: 16.w),
child: Row(
children: [
Expanded(
flex: 2,
child: Text(
e.productName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
),
),
Expanded(
flex: 3,
child: Text(
"${(setMealDataList.productInfoList[0].skuName == "") ? "默认" : setMealDataList.productInfoList[0].skuName}",
Expanded(
flex: 3,
child: Text(
"${(e.skuName == "") ? "默认" : e.skuName}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Text(
"x${e.buyNumber.toString()}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffA29E9E),
color: Color(0xffFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Text(
"x${setMealDataList.productInfoList[0].buyNumber.toString()}",
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xffFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
);
],
),
);
}).toList(),);
}
}

2
lib/view_widget/mine_vip_entry.dart

@ -31,7 +31,7 @@ class MineVipEntry extends StatelessWidget {
this.createTime = ""});
String topLeft = "";
String levelText = "用户";
String levelText = "用户";
Color logoColor = Color(0xFFCACACA);
Color levelTextColor = Color(0xFFCACACA);
Color levelTextBackdrop = Color(0xFFFFF8EC);

2
lib/web/web_view/comment_list.dart

@ -128,7 +128,7 @@ class CommentListState extends State<CommentList> {
);
},
),
// if (memberList != null && memberList.length > 10)
if (memberList != null && memberList.length >= 1)
Container(
decoration: BoxDecoration(
color: Color(0xFFF2F2F2),

Loading…
Cancel
Save