Browse Source

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

# Conflicts:
#	lib/home/home_page.dart
#	lib/settlement/settlement.dart
dart3_last
wurong 2 years ago
parent
commit
a83981c51a
  1. 2
      ios/Flutter/AppFrameworkInfo.plist
  2. 2
      ios/Podfile
  3. 4
      ios/Podfile.lock
  4. 12
      ios/Runner.xcodeproj/project.pbxproj
  5. 1
      ios/Runner/Info.plist
  6. 2
      lib/community/community_view/class_list_view.dart
  7. 160
      lib/home/home_page.dart
  8. 404
      lib/settlement/settlement.dart
  9. 2
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  10. 278
      pubspec.lock

2
ios/Flutter/AppFrameworkInfo.plist

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>

2
ios/Podfile

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

4
ios/Podfile.lock

@ -325,7 +325,7 @@ SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
BaiduMapKit: f227cfb43581e91466fb4f1344f655eab5788777
BMKLocationKit: 688d8e1194980b96fc9a6585c0eb42e62fbaf780
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_baidu_mapapi_base: cb406be78c3a949fb58a45dc6627f139d580bd37
flutter_baidu_mapapi_map: 81c4e6e93dc668e311d9b521421deaf292390434
flutter_baidu_mapapi_search: 13a360334e91abea0bcf820546b2ef4548e42e08
@ -355,6 +355,6 @@ SPEC CHECKSUMS:
webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232
ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736
PODFILE CHECKSUM: 77c662d4cd560e96445691f5bf7f29e2b140072c
PODFILE CHECKSUM: 27a0f08c504497d82c425d2ccb28d9958a6e156a
COCOAPODS: 1.11.3

12
ios/Runner.xcodeproj/project.pbxproj

@ -617,7 +617,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -667,7 +667,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.1.9;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -819,7 +819,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -869,7 +869,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.1.9;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -912,7 +912,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -962,7 +962,7 @@
"$(PROJECT_DIR)/baidu",
"$(PROJECT_DIR)/Runner/baidu",
);
MARKETING_VERSION = 3.1.7;
MARKETING_VERSION = 3.1.9;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",

1
ios/Runner/Info.plist

@ -144,6 +144,7 @@
</dict>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>

2
lib/community/community_view/class_list_view.dart

@ -217,7 +217,7 @@ class _ClassListView extends State<ClassListView> {
maxLines: 2,
style: TextStyle(
fontSize: 13.sp,
height: 1.2.h,
height: 1.5.h,
fontWeight: MyFontWeight.medium,
color: Colors.black,
),

160
lib/home/home_page.dart

@ -163,6 +163,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final BaseData brand =
await apiService.queryHomeBrand().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
refreshController.refreshFailed();
});
if (brand != null && brand.isSuccess) {
@ -287,9 +289,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
queryUserBalance() async {
BaseData<UserInfo> baseData =
await apiService.queryInfo().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);});
await apiService.queryInfo().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data;
mRaiseMoney = double.tryParse(userInfo.raiseMoney);
@ -504,86 +504,85 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: FutureBuilder(
future:queryHome(),
future: queryHome(),
builder: (context, snapshot) {
return Column(
children: [
///banner
HomeBanner(bannerData, controller),
///
UnionEntry((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///
ShortcutOperation((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///广
spread(),
// ///
// SignView(isSigned, (value) {
// setState(() {
// isSigned = value;
// });
// }),
///
DiscountZone(coupons),
///-
HomeRecommendGoods(homeRank),
///
if(mRaiseMoney != 0.0)
HappyHelpFarmers(),
///
WelfareCore(),
///
TopSellingList(homeRank),
// ///
// QuickOrder(),
// ///
// CouponView(),
// ///
// FeaturedActivity(),
// ///
// HomeIntegralStore(gooods),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///
PointGoods(
goods,
(index) {
_toDetails(index);
},
),
],
);
children: [
///banner
HomeBanner(bannerData, controller),
///
UnionEntry((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///
ShortcutOperation((int jpIndex) {
widget.changeTab(1,jpIndex);
}),
///广
spread(),
// ///
// SignView(isSigned, (value) {
// setState(() {
// isSigned = value;
// });
// }),
///
DiscountZone(coupons),
///-
HomeRecommendGoods(homeRank),
///
if(mRaiseMoney != 0)
HappyHelpFarmers(),
///
WelfareCore(),
///
TopSellingList(homeRank),
// ///
// QuickOrder(),
// ///
// CouponView(),
// ///
// FeaturedActivity(),
// ///
// HomeIntegralStore(gooods),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///
PointGoods(
goods,
(index) {
_toDetails(index);
},
),
],
);})
),
),
),
@ -603,6 +602,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/invite_friends');
// Navigator.of(context).pushNamed('/router/mine_greenery');
},
child: ClipRRect(
child:Image.asset(

404
lib/settlement/settlement.dart

@ -120,7 +120,8 @@ class _Settlement extends State<Settlement> {
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: false);
showLoading: false
);
queryMemberInfo();
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
@ -189,68 +190,68 @@ class _Settlement extends State<Settlement> {
try {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"useVipPrice": useVipPriceSelect,
"buyNum": buyNum,
"payChannel": payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if (!isRaiseChannel && settleOrderInfo.isRaise) {
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
settleOrderInfo.isRaise ? 7 : payChannel,
tableId);
}
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
"memberCouponId": memberCouponId,
"orderId": orderId,
"promotionId": promotionId,
"productSkuId": productSkuId,
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"useVipPrice":useVipPriceSelect,
"buyNum": buyNum,
"payChannel":payChannel,
"tableId": tableId
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
settleOrderInfo = baseData.data;
if ((settleOrderInfo?.promotionId ?? "") != "") {
settleOrderInfo.promotionInfoList.forEach((element) {
if (element.id == settleOrderInfo.promotionId) {
this.promotion = element;
promotions = promotion?.name ?? "";
}
});
}
if ((settleOrderInfo?.memberCouponId ?? "") != "") {
settleOrderInfo.couponList.forEach((element) {
if (element.id == settleOrderInfo.memberCouponId) {
this.couponListBean = element;
coupons = couponListBean?.promotionName ?? "";
}
});
}
if (settleOrderInfo.orderProductList == null ||
settleOrderInfo.orderProductList.length == 0) {
placeOrder = true;
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if(!isRaiseChannel && settleOrderInfo.isRaise){
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
settleOrderInfo.isRaise ? 7 :payChannel,
tableId);
}
} finally {
} else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
}finally{
setState(() {});
EasyLoading.dismiss();
}
@ -263,7 +264,7 @@ class _Settlement extends State<Settlement> {
});
if (baseData != null && baseData.isSuccess) {
SharedPreferences.getInstance().then(
(value) => {
(value) => {
value.setString('minMember', jsonEncode(baseData.data)),
},
);
@ -312,76 +313,76 @@ class _Settlement extends State<Settlement> {
}
queryAddress(int selectedBtn) async {
setState(() {
this.selectedBtn = selectedBtn;
});
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude),
double.tryParse(storeInfo.longitude),
);
if (baseDate != null && baseDate.isSuccess) {
setState(() {
address = baseDate.data[0];
this.selectedBtn = selectedBtn;
});
for (int i = 1; i < baseDate.data.length; i++) {
Address address1 = baseDate.data[i];
if (address != null) {
queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
return;
}
BaseData<List<Address>> baseDate =
await minService.queryAddress().catchError((error) {});
BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address.longitude),
double.tryParse(address.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address1.longitude),
double.tryParse(address1.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate bmfCoordinate = BMFCoordinate(
double.tryParse(storeInfo.latitude),
double.tryParse(storeInfo.longitude),
);
if (baseDate != null && baseDate.isSuccess) {
setState(() {
address = baseDate.data[0];
});
for (int i = 1; i < baseDate.data.length; i++) {
Address address1 = baseDate.data[i];
BMFCoordinate coordinate = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address.longitude),
double.tryParse(address.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
BMFCoordinate coordinate1 = await BMFCalculateUtils.coordConvert(
coordinate: BMFCoordinate(
double.tryParse(address1.longitude),
double.tryParse(address1.latitude),
),
fromType: BMF_COORD_TYPE.COMMON,
toType: BMF_COORD_TYPE.BD09LL);
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
double mi = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate);
double mi1 = await BMFCalculateUtils.getLocationDistance(
bmfCoordinate, coordinate1);
if (mi1 < mi) {
address = address1;
}
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
await queryOrderInfo(
address.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
}
///
@ -498,9 +499,7 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00")
? payChannel = 0
: (settleOrderInfo.isRaise ? 7 : payChannel));
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : (settleOrderInfo.isRaise ? 7:payChannel));
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) ? promotion.id : "";
@ -753,8 +752,8 @@ class _Settlement extends State<Settlement> {
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake,
memberCouponId, orderId, promotionId) {
DistributionMode((addressId, isTake, memberCouponId,
orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
@ -785,58 +784,50 @@ class _Settlement extends State<Settlement> {
// ),
///
if (settleOrderInfo != null ||
minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions != "")
? false
: useVipPriceSelect,
this.showVipTips),
if(settleOrderInfo != null || minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions!="") ? false :useVipPriceSelect,
this.showVipTips
),
/////
if (settleOrderInfo != null ||
minOrderInfo != null)
ActivityCouponRemarks(
couponCart,
activityCart,
settleOrderInfo,
minOrderInfo,
coupons,
promotions,
couponCount(),
placeOrder,
remakers,
() {
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {
setState(() {
if (value != null)
remakers = value;
})
});
},
tableId,
vipPriceSelect,
if(settleOrderInfo != null || minOrderInfo != null)
ActivityCouponRemarks(
couponCart,
activityCart,
settleOrderInfo,
minOrderInfo,
coupons,
promotions,
couponCount(),
placeOrder,
remakers,
() {
setState(() {
this.showVipTips = true;
});
}),
if (settleOrderInfo != null &&
placeOrder &&
joinA != JoinActivity.BargainBug)
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {
setState(() {
if (value != null) remakers = value;
})
});},
tableId,
vipPriceSelect,
(){
setState(() {
this.showVipTips = true;
});
}
),
///
PayMethod(payChannelCheck, coupons, promotions,
useVipPriceSelect, settleOrderInfo),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo),
],
),
),
@ -906,10 +897,10 @@ class _Settlement extends State<Settlement> {
orderButton = true;
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
@ -930,23 +921,23 @@ class _Settlement extends State<Settlement> {
payChannelCheck(int payChannel) {
this.payChannel = payChannel;
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);
}
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
payChannel,
tableId);}
}
vipPriceSelect(bool useVipPriceSelect) {
@ -966,8 +957,7 @@ class _Settlement extends State<Settlement> {
useVipPriceSelect,
count1,
payChannel,
tableId);
}
tableId);}
}
mobileChange(String mobile) {
@ -1007,8 +997,10 @@ class _Settlement extends State<Settlement> {
// promotions = "";
// this.promotion = null;
if (tableId > 0) {
if (couponBean == null) queryCancelMemberCoupon(parentId);
if (couponBean.id != null) queryUseMemberCoupon(couponBean.id);
if(couponBean == null)
queryCancelMemberCoupon(parentId);
if (couponBean.id != null)
queryUseMemberCoupon(couponBean.id);
} else {
queryOrderInfo(
address?.id,
@ -1048,7 +1040,7 @@ class _Settlement extends State<Settlement> {
selectedBtn,
null,
0,
(pro.id ?? "") ?? productId,
(pro.id??"")??productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",

2
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -76,7 +76,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if(!widget?.settleOrderInfo?.isRaise ?? false)
if(!(widget?.settleOrderInfo?.isRaise ?? false))
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,

278
pubspec.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save