Browse Source

商城更改

zyh
w-R 3 years ago
parent
commit
5ab6129100
  1. 4
      lib/order/order_detail_page.dart
  2. 4
      lib/retrofit/min_api.dart
  3. 2
      lib/retrofit/min_api.g.dart
  4. 4
      lib/retrofit/retrofit_api.dart
  5. 2
      lib/retrofit/retrofit_api.g.dart
  6. 104
      lib/settlement/settlement.dart
  7. 15
      lib/settlement/settlement_model.dart
  8. 2
      lib/store/shopping/activity_prefecture_details.dart
  9. 185
      lib/store/shopping/shopping_goods_details.dart
  10. 14
      lib/store/shopping/shopping_home/bargain_details.dart
  11. 1
      lib/store/shopping/shopping_home/search_page.dart

4
lib/order/order_detail_page.dart

@ -350,9 +350,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
),
),
Text(
S
.of(context)
.yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
S.of(context).yuan_(orderInfo != null ? orderInfo.finalPayPrice : "0"),
style: TextStyle(
fontSize: 20.sp,
color: Color(0xFF32A060),

4
lib/retrofit/min_api.dart

@ -39,8 +39,8 @@ part 'min_api.g.dart';
// const baseUrl = "http://192.168.10.236:8765/app/";///
const base_url = "http://192.168.10.66:8775/app/";///
const baseUrl = "http://192.168.10.66:8775/app/";///
const base_url = "http://192.168.10.96:8765/app/";///
const baseUrl = "http://192.168.10.96:8765/app/";///
// const base_url = "http://192.168.10.37:8766/app/";

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.66:8775/app/';
baseUrl ??= 'http://192.168.10.96:8765/app/';
}
final Dio _dio;

4
lib/retrofit/retrofit_api.dart

@ -71,8 +71,8 @@ part 'retrofit_api.g.dart';
// const baseUrl = "http://192.168.10.37:8766/app/";
const base_url = "http://192.168.10.66:8776/app/";///
const baseUrl = "http://192.168.10.66:8776/app/";///
const base_url = "http://192.168.10.96:8766/app/";///
const baseUrl = "http://192.168.10.96:8766/app/";///
@RestApi(baseUrl: baseUrl)
abstract class ApiService {

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.66:8776/app/';
baseUrl ??= 'http://192.168.10.96:8766/app/';
}
final Dio _dio;

104
lib/settlement/settlement.dart

@ -20,6 +20,7 @@ import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/settlement/settlement_model.dart';
import 'package:huixiang/settlement/settlement_view/activity_coupon_remarks.dart';
import 'package:huixiang/settlement/settlement_view/distribution.dart';
import 'package:huixiang/settlement/settlement_view/pay_method.dart';
@ -69,10 +70,14 @@ class _Settlement extends State<Settlement> {
String actProductId;
String actProductSkuId;
ActivityDetails activityDetails;
int bargainType = 0;
BargainType bargainType = BargainType.BargainZBug;
LaunchJoinAct launchJoinAct;
String skuPrice1;
int joinA = 0;
JoinActivity joinA = JoinActivity.GoJoin;
String bargainOrderId;
String productSkuId;
int count1 = 0;
String productId;
@override
void initState() {
@ -91,6 +96,10 @@ class _Settlement extends State<Settlement> {
bargainType = widget.arguments["bargainType"];
skuPrice1 = widget.arguments["skuPrice1"];
joinA = widget.arguments["joinA"];
bargainOrderId = widget.arguments["bargainOrderId"];
productSkuId = widget.arguments["productSkuId"];
count1 = widget.arguments["buyNum"];
productId = widget.arguments["productId"];
if (tableId == 0) {
placeOrder = true;
}
@ -111,9 +120,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
widget.arguments["pid"],
widget.arguments["pid"] ?? (productId?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
} else if (coupons != null && coupons != "" || tableId <= 0) {
queryOrderInfo(
@ -121,9 +132,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
widget.arguments["cid"],
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
} else
queryOrderInfo(
@ -131,9 +144,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
null,
productId ?? "",
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
);
});
@ -150,8 +165,10 @@ class _Settlement extends State<Settlement> {
memberCouponId,
orderId,
promotionId,
productSkuId,
actProductId,
actProductSkuId,
buyNum,
) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
@ -159,8 +176,10 @@ class _Settlement extends State<Settlement> {
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId":productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId
"actProductSkuId": actProductSkuId,
"buyNum":buyNum
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
@ -186,7 +205,7 @@ class _Settlement extends State<Settlement> {
minOrderInfo = baseData.data;
});
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
}
}
@ -200,9 +219,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
return;
}
@ -252,9 +273,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
@ -276,9 +299,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
@ -288,32 +313,26 @@ class _Settlement extends State<Settlement> {
///
queryLaunchAct() async {
// if (minService == null)
// minService = MinApiService(
// Dio(),
// context: context,
// token: minToken,
// tenant: tenant,
// storeId: storeId,
// showLoading: false,
// );
BaseData baseData = await minService.launchAct({
"actProductId": activityDetails.actProduct.id,
"actRecordId": 0,
"actTemplateId": activityDetails.actProduct.templateId,
"actTimeId": activityDetails.actProduct.timeId,
"addressId": address == null ? null : address.id,
"isDirectBuy": (bargainType == 1 || bargainType == 2) ? false : true,
"isDirectBuy": (bargainType == BargainType.BargainBug ||
bargainType == BargainType.CollageBug)
? false
: true,
"getType": selectedBtn,
"productId": activityDetails.actProduct.productId,
"skuId": actProductSkuId ?? "",
"skuPrice": skuPrice1,
"skuPrice": settleOrderInfo.price,
"templateType": pageType,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
launchJoinAct = baseData.data;
if (bargainType == 1) {
if (bargainType == BargainType.BargainBug) {
toBargain();
} else {
activityPay();
@ -333,7 +352,10 @@ class _Settlement extends State<Settlement> {
"actTemplateId": activityDetails.actProduct.templateId,
"actTimeId": activityDetails.actProduct.timeId,
"addressId": address == null ? null : address.id,
"isDirectBuy": (bargainType == 1 || bargainType == 2) ? false : true,
"isDirectBuy": (bargainType == BargainType.BargainBug ||
bargainType == BargainType.CollageBug)
? false
: true,
"getType": selectedBtn,
"productId": activityDetails.actProduct.productId,
"skuId": actProductSkuId ?? "",
@ -517,7 +539,8 @@ class _Settlement extends State<Settlement> {
}
}
BaseData<WxPay> baseData = await minService.actPay({
"orderId": launchJoinAct.orderId,
"orderId":
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId,
"payChannel": placeOrderFirst.payChannel
}).catchError((error) {
print(error);
@ -541,18 +564,22 @@ class _Settlement extends State<Settlement> {
}
} else {
BaseData baseData = await minService.actPay({
"orderId": launchJoinAct.orderId,
"orderId":
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId,
"payChannel": payChannel
}).catchError((error) {
print(error);
});
if (baseData != null && baseData.isSuccess) {
toOrderDetails(launchJoinAct.orderId);
toOrderDetails(
bargainOrderId != null ? bargainOrderId : launchJoinAct.orderId);
} else {
SmartDialog.show(
widget: Tips(
() {
toOrderDetails(launchJoinAct.orderId);
toOrderDetails(bargainOrderId != null
? bargainOrderId
: launchJoinAct.orderId);
},
text: "${baseData.msg}",
));
@ -627,9 +654,11 @@ class _Settlement extends State<Settlement> {
isTake,
memberCouponId,
orderId,
promotionId,
promotionId ?? (productId?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
@ -676,7 +705,8 @@ class _Settlement extends State<Settlement> {
tableId,
),
if (placeOrder)
if (placeOrder &&
joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
@ -718,7 +748,9 @@ class _Settlement extends State<Settlement> {
RoundButton(
width: 103.w,
height: 54.h,
text: placeOrder ? S.current.jiesuan : "下单",
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? S.current.jiesuan : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
@ -728,7 +760,9 @@ class _Settlement extends State<Settlement> {
),
callback: () {
pageType != null
? joinA == 0
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
@ -794,9 +828,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
couponListBean != null ? couponListBean.id : null,
0,
null,
productId?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}
@ -820,9 +856,11 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
promotion != null ? promotion.id : null,
promotion != null ? promotion.id : (productId?? null),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1
);
}
}

15
lib/settlement/settlement_model.dart

@ -0,0 +1,15 @@
enum BargainType {
BargainZBug,
BargainBug,
CollageBug,
}
enum JoinActivity {
GoJoin,
CollageBug,
CollageZBug,
BargainZBug,
MZBug,
MBug,
BargainBug,
}

2
lib/store/shopping/activity_prefecture_details.dart

@ -873,7 +873,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
color: Color(0xFFFFCD00),
),
child: Text(
"最高可砍${double.parse(productList?.productPrice ?? "0") - double.parse(productList?.promotionPrice ?? "0")}",
"最高可砍${(double.parse(productList?.productPrice ?? "0") - double.parse(productList?.promotionPrice ?? "0")).toStringAsFixed(2)}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,

185
lib/store/shopping/shopping_goods_details.dart

@ -18,6 +18,7 @@ import 'package:huixiang/retrofit/data/shoppingCart.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/settlement/settlement_model.dart';
import 'package:huixiang/store/store_view/product_sku.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
@ -80,9 +81,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
int tempM = 0;
int tempS = 0;
LaunchJoinAct launchJoinAct;
int bargainType = 0;
BargainType bargainType = BargainType.BargainZBug;
String indexP;
int joinA = 0;
JoinActivity joinA = JoinActivity.GoJoin;
@override
void dispose() {
@ -105,8 +106,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
limitTime = widget.arguments["limitTime"];
bannerImg = widget.arguments["bannerImg"];
productId = widget.arguments["productId"];
startCountdownTimer();
if (pageType == "1") startCountdownTimer();
debugPrint("store_param tenant:$tenant storeId:$storeId");
SharedPreferences.getInstance().then((value) {
@ -251,7 +251,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}
}
///
// ///
// queryLaunchAct() async {
// if (minService == null)
// minService = MinApiService(
@ -270,7 +270,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
// "actTemplateId": activityDetails.actProduct.templateId,
// "actTimeId": activityDetails.actProduct.timeId,
// "addressId": "",
// "isDirectBuy": (bargainType == 1 || bargainType == 2) ? false : true,
// "isDirectBuy": (bargainType == BargainType.BargainBug ||
// bargainType == BargainType.CollageBug)
// ? false
// : true,
// "getType": 3,
// "productId":
// pageType == null ? productId : activityDetails.actProduct.productId,
@ -292,36 +295,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
// refreshController.refreshFailed();
// }
// }
//
// ///
// queryJoinAct() async {
// BaseData baseData = await minService.joinAct({
// "actProductId": pageType == null
// ? miNiDetail.productSkuVOList[0].id
// : activityDetails.actProduct.id,
// "actRecordId": indexP,
// "actTemplateId": activityDetails.actProduct.templateId,
// "actTimeId": activityDetails.actProduct.timeId,
// "addressId": "",
// "isDirectBuy": pageType == "3" ? false : true,
// "getType": 1,
// "productId":
// pageType == null ? productId : activityDetails.actProduct.productId,
// "skuId": skuId1,
// "skuPrice": skuPrice1,
// "templateType": pageType,
// }).catchError((error) {
// refreshController.refreshFailed();
// });
// if (baseData != null && baseData.isSuccess) {
// launchJoinAct = baseData.data;
// toOrder();
// refreshController.refreshCompleted();
// } else {
// SmartDialog.showToast(baseData.msg,alignment: Alignment.center);
// refreshController.refreshFailed();
// }
// }
///
showStoreSelector(MiNiDetail miNiDetail, String id, int count) async {
@ -520,6 +493,23 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
);
}
///
toGoods() async {
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
}
await Navigator.of(context).pushNamed(
'/router/settlement',
arguments: {
"storeInfo": storeInfo,
"productId": miNiDetail.id,
"productSkuId": skuId1,
"buyNum": count1,
},
);
}
///
toOrder() async {
await Navigator.of(context).pushNamed(
@ -534,7 +524,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
"skuId": skuId1,
"buyNum": count1,
"skuValue1": skuValue1,
// "orderId": launchJoinAct.orderId,
"actProductId": actProductId,
"actProductSkuId": skuId1,
"activityDetails": activityDetails,
@ -549,15 +538,15 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
});
}
///
toBargain() async {
await Navigator.of(context)
.pushNamed('/router/bargain_details', arguments: {
"actRecordId": launchJoinAct.actRecordId,
"limitNumber": limitNumber,
"storeInfo": storeInfo,
});
}
// ///
// toBargain() async {
// await Navigator.of(context)
// .pushNamed('/router/bargain_details', arguments: {
// "actRecordId": launchJoinAct.actRecordId,
// "limitNumber": limitNumber,
// "storeInfo": storeInfo,
// });
// }
@override
Widget build(BuildContext context) {
@ -631,7 +620,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Colors.white,
margin: EdgeInsets.only(bottom: 72.h),
child: Html(
data: pageType != null ? (activityDetails?.actProduct?.detail ?? "") : (miNiDetail?.detail ?? ""),
data: pageType != null
? (activityDetails?.actProduct?.detail ?? "")
: (miNiDetail?.detail ?? ""),
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
@ -777,11 +768,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
GestureDetector(
onTap: () {
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
}
// queryLaunchAct();
toGoods();
},
child: Container(
alignment: Alignment.center,
@ -818,7 +805,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
children: [
GestureDetector(
onTap: () {
joinA=4;
joinA = JoinActivity.MZBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -879,7 +866,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
GestureDetector(
onTap: () {
joinA=5;
joinA = JoinActivity.MBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -951,8 +938,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
children: [
GestureDetector(
onTap: () {
bargainType = 0;
joinA=3;
bargainType = BargainType.BargainZBug;
joinA = JoinActivity.BargainZBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -1013,7 +1000,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
GestureDetector(
onTap: () {
bargainType = 1;
bargainType = BargainType.BargainBug;
joinA = JoinActivity.BargainBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -1085,7 +1073,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
children: [
GestureDetector(
onTap: () {
joinA = 2;
joinA = JoinActivity.CollageZBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -1146,8 +1134,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
GestureDetector(
onTap: () {
bargainType = 2;
joinA = 1;
bargainType = BargainType.CollageBug;
joinA = JoinActivity.CollageBug;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
@ -1252,12 +1240,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFF32A057),
Color(0xFF61CE6B)
])),
child:
Row(
colors: [Color(0xFF32A057), Color(0xFF61CE6B)])),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -1287,8 +1271,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
SizedBox(width: 4.w),
Expanded(child:
Column(
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -1359,7 +1343,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Color(0xFFFFFFFF),
),
child: Text(
"最高可砍${double.parse(activityDetails?.actProduct?.productPrice ?? "0") - double.parse(activityDetails?.actProduct?.promotionPrice ?? "0")}",
"最高可砍${(double.parse(activityDetails?.actProduct?.productPrice ?? "0") - double.parse(activityDetails?.actProduct?.promotionPrice ?? "0")).toStringAsFixed(2)}",
style: TextStyle(
fontSize: 9.sp,
fontWeight: MyFontWeight.semi_bold,
@ -1387,9 +1371,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
)))
],
)),
pageType != null ?
(pageType == "2" ?
Row(
pageType != null
? (pageType == "2"
? Row(
children: [
MImage(
activityDetails?.actProduct?.rightImg ?? "",
@ -1418,8 +1402,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
SizedBox(height: 3),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {
@ -1431,7 +1417,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(1)),
borderRadius:
BorderRadius.circular(1)),
child: Text(
tempDay.toString(),
style: TextStyle(
@ -1443,7 +1430,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
Padding(
padding: EdgeInsets.only(left: 2.w, right: 2.w),
padding: EdgeInsets.only(
left: 2.w, right: 2.w),
child: Text(
":",
style: TextStyle(
@ -1463,7 +1451,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(1)),
borderRadius:
BorderRadius.circular(1)),
child: Text(
tempHour.toString(),
style: TextStyle(
@ -1475,7 +1464,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
Padding(
padding: EdgeInsets.only(left: 2.w, right: 2.w),
padding: EdgeInsets.only(
left: 2.w, right: 2.w),
child: Text(
":",
style: TextStyle(
@ -1484,7 +1474,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Color(0xFF32A060),
),
),
),InkWell(
),
InkWell(
onTap: () {
setState(() {});
},
@ -1494,7 +1485,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(1)),
borderRadius:
BorderRadius.circular(1)),
child: Text(
tempM.toString(),
style: TextStyle(
@ -1506,7 +1498,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
Padding(
padding: EdgeInsets.only(left: 2.w, right: 2.w),
padding: EdgeInsets.only(
left: 2.w, right: 2.w),
child: Text(
":",
style: TextStyle(
@ -1526,7 +1519,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(1)),
borderRadius:
BorderRadius.circular(1)),
child: Text(
tempS.toString(),
style: TextStyle(
@ -1537,19 +1531,25 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
),
],)
],),
],
)
],):Padding(padding:EdgeInsets.only(right:16),
child:
MImage(
],
),
)
],
)
: Padding(
padding: EdgeInsets.only(right: 16),
child: MImage(
activityDetails?.actProduct?.rightImg ?? "",
width: 72,
height: 30.h,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),)) : Container(),
),
))
: Container(),
],
),
),
@ -1601,7 +1601,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
height: 8.h,
),
Text(
pageType == null ? (miNiDetail?.shortName ?? "") : (activityDetails?.actProduct?.shortName ?? ""),
pageType == null
? (miNiDetail?.shortName ?? "")
: (activityDetails?.actProduct?.shortName ?? ""),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -1763,7 +1765,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
Expanded(
child: Text(
(skuValue1 ?? "请选择規格") + (count1 > 0 ? "x${count1}" : ""),
(skuValue1 ?? "请选择規格") +
(count1 > 0 ? "x${count1.toInt()}" : ""),
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
@ -1981,7 +1984,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
GestureDetector(
onTap: () {
joinA = 0;
joinA = JoinActivity.GoJoin;
indexP = actRecordAndJoinlDTOList.actRecord.id;
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");

14
lib/store/shopping/shopping_home/bargain_details.dart

@ -139,7 +139,7 @@ class _BargainDetails extends State<BargainDetails> {
"skuId": activityActRecordDetails.skuId,
"buyNum": 1,
"skuValue1": activityActRecordDetails.skuName,
"orderId":activityActRecordDetails.actRecordJoinList[0].orderId,
"bargainOrderId": activityActRecordDetails.actRecordJoinList[0].orderId,
"actProductId": activityActRecordDetails.actProduct.id,
"actProductSkuId": activityActRecordDetails.skuId,
},
@ -339,8 +339,8 @@ class _BargainDetails extends State<BargainDetails> {
color: Color(0xFF9476F7),
),
child: Text(
(limitNumber !=
(activityActRecordDetails?.actRecord?.joinNum ?? 0))
((activityActRecordDetails?.actRecord?.joinNum ?? 0) !=
(activityActRecordDetails?.successNumber ?? 0))
? "已砍${bargainNum.toStringAsFixed(2)}"
: "砍价成功",
style: TextStyle(
@ -535,7 +535,9 @@ class _BargainDetails extends State<BargainDetails> {
),
],
),
if ((activityActRecordDetails?.actRecord?.state ?? 0) == 1)
if ((activityActRecordDetails?.actRecord?.joinNum ?? 0) ==
(activityActRecordDetails?.successNumber ?? 0) &&
(activityActRecordDetails?.actRecord?.state ?? 0) != 3)
GestureDetector(
onTap: () {
toOrder();
@ -575,8 +577,8 @@ class _BargainDetails extends State<BargainDetails> {
color: Colors.black,
),
),
if (limitNumber !=
(activityActRecordDetails?.actRecord?.joinNum ?? 0))
if ((activityActRecordDetails?.actRecord?.joinNum ?? 0) !=
(activityActRecordDetails?.successNumber ?? 0))
GestureDetector(
child: Container(
width: double.infinity,

1
lib/store/shopping/shopping_home/search_page.dart

@ -145,6 +145,7 @@ class _SearchPage extends State<SearchPage> with AutomaticKeepAliveClientMixin,
await minService.findMiNiGroupList({
"id":widget.arguments["storeId"],
"searchKey" :text,
}).catchError((error) {
}).catchError((error) {
refreshController.refreshFailed();
});

Loading…
Cancel
Save