Browse Source

视频详情页,简介显示更多图标修改;

我的页面,印章卡改集换卡;
会员中心新增下拉刷新;
新增地址溢出处理;
订单详情新增套餐明细显示;
关于回乡,更多按钮显示;
订单结算页支付方式getOrderIfo更改;
打包费显示更改;
首页福利中心按钮跳转更改;
兑换福利页面新增正在加载;
new_revision_app
wurong 2 years ago
parent
commit
b91af0947d
  1. 3
      lib/community/community_view/class_details.dart
  2. 4
      lib/home/home_view/welfare_core.dart
  3. 1
      lib/home/huixiang_view/origin_info.dart
  4. 2
      lib/home/welfare_exchange.dart
  5. 2
      lib/mine/mine_view/mine_navbar.dart
  6. 3
      lib/mine/mine_vip/mine_vip_core.dart
  7. 4
      lib/order/order_detail_page.dart
  8. 210
      lib/order/order_view/order_commodity.dart
  9. 46
      lib/settlement/settlement.dart
  10. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart
  11. 66
      lib/view_widget/no_data_view.dart

3
lib/community/community_view/class_details.dart

@ -412,7 +412,8 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
color: Colors.black,
),
),
SizedBox(height: 3.h),
SizedBox(height: 5.h),
if((course?.introduce ?? "").length > 50)
GestureDetector(
onTap: () {
setState(() {

4
lib/home/home_view/welfare_core.dart

@ -105,7 +105,7 @@ class _WelfareCore extends State<WelfareCore> {
SizedBox(width: 10.w,),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
Navigator.of(context).pushNamed('/router/invite_friends');
},
child:Container(
width: double.infinity,
@ -144,7 +144,7 @@ class _WelfareCore extends State<WelfareCore> {
SizedBox(width: 10.w,),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
Navigator.of(context).pushNamed('/router/welfare_exchange');
},
child:Container(
width: double.infinity,

1
lib/home/huixiang_view/origin_info.dart

@ -108,6 +108,7 @@ class _OriginInfo extends State<OriginInfo> {
),
),
SizedBox(height: 3.h),
if((widget?.founder?.description ?? "").length > 35)
GestureDetector(
onTap: () {
setState(() {

2
lib/home/welfare_exchange.dart

@ -62,10 +62,12 @@ class _WelfareExchange extends State<WelfareExchange>
}
queryUser() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
EasyLoading.dismiss();
setState(() {});
SharedPreferences.getInstance().then((value) => {
value.setString('user', jsonEncode(baseData.data)),

2
lib/mine/mine_view/mine_navbar.dart

@ -246,7 +246,7 @@ class _MineNavbar extends State<MineNavbar> {
},
child: mineBottomItem(
widget?.userInfo?.happyBean?? "0",
"印章卡",
S.of(context).jihuanka,
),
),
),

3
lib/mine/mine_vip/mine_vip_core.dart

@ -72,7 +72,7 @@ class _MineVipCore extends State<MineVipCore> {
// value.setBool("FirstGongC", true);
// }
apiService =
ApiService(Dio(), context: context, token: value.getString("token"));
ApiService(Dio(), context: context, showLoading: false,token: value.getString("token"));
queryVipLevel();
queryBenefitList();
queryRuleDetails();
@ -204,7 +204,6 @@ class _MineVipCore extends State<MineVipCore> {
await queryRuleDetails();
}
@override
Widget build(BuildContext context) {
return Container(

4
lib/order/order_detail_page.dart

@ -44,12 +44,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
@override
void initState() {
super.initState();
jumpState = widget.arguments["jumpState"];
SharedPreferences.getInstance().then((value) {
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
context: context, token: value.getString("token"), showLoading: jumpState == 2? true:false);
queryDetails();
});
jumpState = widget.arguments["jumpState"];
}
///

210
lib/order/order_view/order_commodity.dart

@ -9,6 +9,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/separator.dart';
import '../../retrofit/data/shoppingCart.dart';
import '../../utils/flutter_utils.dart';
class OrderCommodity extends StatefulWidget {
@ -182,95 +183,160 @@ class _OrderCommodity extends State<OrderCommodity> {
Widget commodityItem(OrderProductVOList productList) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
child: Column(
children: [
MImage(
productList.skuImg,
width: 49,
height: 49,
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(
left: 8.w,
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MImage(
productList.skuImg,
width: 49,
height: 49,
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
// height: 44.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
productList.productName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
height: 4.h,
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(
left: 8.w,
),
Text(
productList.skuNameStr != null
? "${productList.skuNameStr ?? ""}"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
// height: 44.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
productList.productName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
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(
"x${productList.buyNum}",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF727272),
),
),
],
),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"x${productList.buyNum}",
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"))),
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF727272),
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xFF4C4C4C),
),
),
if (productList.discountAmount != null && productList.discountAmount != "0")
Text(
S.of(context).yuan_(productList.sellPrice),
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
decoration: TextDecoration.lineThrough,
color: Color(0xFFA29E9E),
),
)
],
),
),
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
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"))),
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
color: Color(0xFF4C4C4C),
),
),
if (productList.discountAmount != null && productList.discountAmount != "0")
Text(
S.of(context).yuan_(productList.sellPrice),
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
decoration: TextDecoration.lineThrough,
color: Color(0xFFA29E9E),
),
)
],
),
if (productList.setMealDataList.length != 0)
ListView.builder(
itemCount: productList.setMealDataList.length,
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (context, index) {
return orderMealsItem(productList.setMealDataList[index]);
},
),
],
),
);
}
Widget orderMealsItem(SetMealDataList setMealDataList) {
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(
"${(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(0xffFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
);
}).toList(),);
}
Widget discountItem(Color color, textName, condition, amount) {
return Container(
margin: EdgeInsets.only(top: 9.h, bottom: 9.h),

46
lib/settlement/settlement.dart

@ -1284,16 +1284,16 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(settleOrderInfo.isRaise || payChannel == 5)
? "NONE"
: ((useVipPriceSelect == false &&
couponListBean?.id != "" &&
((promotion?.id ?? productId) != ""))
? "MEMBER_RANK"
: (isVips == false)
? "MEMBER_RANK"
: "AUTO"),
// preferentialType(),
// (settleOrderInfo.isRaise || payChannel == 5)
// ? "NONE"
// : ((useVipPriceSelect == false &&
// couponListBean?.id != "" &&
// ((promotion?.id ?? productId) != ""))
// ? "MEMBER_RANK"
// : (isVips == false)
// ? "MEMBER_RANK"
// : "AUTO"),
preferentialType(),
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect,
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect,
count1,
@ -1305,17 +1305,17 @@ class _Settlement extends State<Settlement> {
String preferentialType(){
if(settleOrderInfo.isRaise || payChannel == 5)
return "NONE";
if((((promotion?.id ?? productId) ?? "") != "") && (couponListBean?.id ?? "") == ""){
return "ACTIVITY";
}else if((couponListBean?.id ?? "") != "" && (((promotion?.id ?? productId) ?? "") == "")){
return "COUPON";
}else if(useVipPriceSelect == false && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ?? "") == "")){
return "MEMBER_RANK";
}else if(useVipPriceSelect == true && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ??"") == "")){
if(settleOrderInfo.discountType == "ACTIVITY"){
return "ACTIVITY";
}else if(settleOrderInfo.discountType == "COUPON"){
return "COUPON";
}else if(settleOrderInfo.discountType == "MEMBER_RANK" || settleOrderInfo.discountType == "SURPRISE"){
return "MEMBER_RANK";
}else if(settleOrderInfo.discountType == "VIP"){
return "VIP";
}else {
return "AUTO";
}
return "AUTO";
}
}
vipPriceSelect(bool useVipPriceSelect) {
@ -1421,9 +1421,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
(couponBean?.id ?? 0) == 0
? ((isVips == false)
? "MEMBER_RANK"
: "AUTO")
? "AUTO"
: "COUPON",
// useVipPriceSelect,
// useBenefitSelect,
@ -1462,9 +1460,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
((pro?.id ?? 0) ?? productId) == 0
? ((isVips == false)
? "MEMBER_RANK"
: "AUTO")
?"AUTO"
: "ACTIVITY",
// useVipPriceSelect,
// useBenefitSelect,

2
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -118,7 +118,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
);
}
if (widget.diningStatus == 3) {
if (widget.diningStatus == 3 && widget.isTakeOut != 2) {
//
widgets.add(
discountItem(

66
lib/view_widget/no_data_view.dart

@ -27,41 +27,43 @@ class NoDataView extends StatelessWidget {
return Container(
margin: margin,
alignment: Alignment.center,
child: Column(
children: [
Image(
image: AssetImage(src),
width: iconWidth,
height: iconHeight,
),
SizedBox(
height: 35.h,
),
Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: fontSize,
height: 1.5,
color: Color(0xFF353535),
child: Expanded(
child: Column(
children: [
Image(
image: AssetImage(src),
width: iconWidth,
height: iconHeight,
),
),
SizedBox(
height: 10.h,
),
if (isShowBtn)
Container(
margin: EdgeInsets.symmetric(horizontal: 16.w),
child: RoundButton(
text: S.of(context).fanhuishouye,
textColor: Colors.white,
fontSize: 14.sp,
padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
SizedBox(
height: 35.h,
),
Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: fontSize,
height: 1.5,
color: Color(0xFF353535),
),
),
],
SizedBox(
height: 10.h,
),
if (isShowBtn)
Container(
margin: EdgeInsets.symmetric(horizontal: 16.w),
child: RoundButton(
text: S.of(context).fanhuishouye,
textColor: Colors.white,
fontSize: 14.sp,
padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
),
),
],
),
),
);
}

Loading…
Cancel
Save