Browse Source

Merge remote-tracking branch 'origin/dev' into dev

new_revision_app
fmk 2 years ago
parent
commit
1137a4545b
  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. 68
      lib/order/order_view/order_commodity.dart
  9. 36
      lib/settlement/settlement.dart
  10. 2
      lib/settlement/settlement_view/settlement_order_commodity.dart
  11. 2
      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"];
}
///

68
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,7 +183,9 @@ class _OrderCommodity extends State<OrderCommodity> {
Widget commodityItem(OrderProductVOList productList) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MImage(
@ -268,7 +271,70 @@ class _OrderCommodity extends State<OrderCommodity> {
),
],
),
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) {

36
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,13 +1305,13 @@ class _Settlement extends State<Settlement> {
String preferentialType(){
if(settleOrderInfo.isRaise || payChannel == 5)
return "NONE";
if((((promotion?.id ?? productId) ?? "") != "") && (couponListBean?.id ?? "") == ""){
if(settleOrderInfo.discountType == "ACTIVITY"){
return "ACTIVITY";
}else if((couponListBean?.id ?? "") != "" && (((promotion?.id ?? productId) ?? "") == "")){
}else if(settleOrderInfo.discountType == "COUPON"){
return "COUPON";
}else if(useVipPriceSelect == false && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ?? "") == "")){
}else if(settleOrderInfo.discountType == "MEMBER_RANK" || settleOrderInfo.discountType == "SURPRISE"){
return "MEMBER_RANK";
}else if(useVipPriceSelect == true && (couponListBean?.id ?? "") == "" && ((promotion?.id ?? productId ??"") == "")){
}else if(settleOrderInfo.discountType == "VIP"){
return "VIP";
}else {
return "AUTO";
@ -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(

2
lib/view_widget/no_data_view.dart

@ -27,6 +27,7 @@ class NoDataView extends StatelessWidget {
return Container(
margin: margin,
alignment: Alignment.center,
child: Expanded(
child: Column(
children: [
Image(
@ -63,6 +64,7 @@ class NoDataView extends StatelessWidget {
),
],
),
),
);
}
}
Loading…
Cancel
Save