Browse Source

Merge branch 'remove_uniapp' into new_revision_app

# Conflicts:
#	lib/main_page.dart
#	lib/retrofit/retrofit_api.g.dart
#	lib/settlement/settlement.dart
#	lib/store/store_view/product_sku.dart
#	lib/view_widget/new_coupon_widget.dart
zyh
w-R 3 years ago
parent
commit
36de0e8d9b
  1. 7
      lib/home/home_view/featured_acticvity.dart
  2. 3
      lib/login/login_page.dart
  3. 2
      lib/main_page.dart
  4. 6
      lib/retrofit/data/settleOrderInfo.dart
  5. 3
      lib/retrofit/retrofit_api.dart
  6. 46
      lib/settlement/settlement.dart
  7. 4
      lib/store/store_order.dart
  8. 3
      lib/store/store_view/product_sku.dart
  9. 17
      lib/view_widget/new_coupon_widget.dart
  10. 12
      lib/view_widget/update_dialog.dart
  11. 2
      pubspec.yaml

7
lib/home/home_view/featured_acticvity.dart

@ -197,8 +197,10 @@ class _FeaturedActivity extends State<FeaturedActivity> {
],
),
),
Row(
children: [
Container(
width: 48.w,
// width: 52.w,
margin: EdgeInsets.only(left: 8, bottom: 8),
padding: EdgeInsets.symmetric(
vertical: 4.h,
@ -229,6 +231,9 @@ class _FeaturedActivity extends State<FeaturedActivity> {
],
),
),
Spacer()
],
)
],
));
}

3
lib/login/login_page.dart

@ -343,7 +343,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
EasyLoading.dismiss();
} else {
// SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center);
if(value?.msg !=null)
SmartDialog.showToast("${value?.msg ??""}", alignment: Alignment.center);
}
});
}

2
lib/main_page.dart

@ -409,6 +409,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
bottomNavigationItem(S.of(context).main_menu1, 0),
bottomNavigationItem(S.of(context).main_menu2, 1),
bottomNavigationItem(S.of(context).main_menu3 , 2),
// bottomNavigationItem("订单", 2),
bottomNavigationItem(S.of(context).main_menu4, 3),
],
),
@ -490,7 +491,6 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
);
}
// Widget bottomNavigationBigItem(text, index) {
// var isSelected = index == clickIndex;
// return Expanded(

6
lib/retrofit/data/settleOrderInfo.dart

@ -16,6 +16,8 @@ class SettleOrderInfo {
String threshold;
String freePostAge;
List<OrderProductVOList> orderProductList;
String promotionId;
String memberCouponId;
static SettleOrderInfo fromJson(Map<String, dynamic> map) {
if (map == null) return null;
@ -40,6 +42,8 @@ class SettleOrderInfo {
settleOrderInfoBean.orderProductList = List()..addAll(
(map['orderProductList'] as List ?? []).map((o) => OrderProductVOList.fromJson(o))
);
settleOrderInfoBean.promotionId = map['promotionId'];
settleOrderInfoBean.memberCouponId = map['memberCouponId'];
return settleOrderInfoBean;
}
@ -58,6 +62,8 @@ class SettleOrderInfo {
"threshold": threshold,
"freePostAge": freePostAge,
"orderProductList": orderProductList,
"promotionId": promotionId,
"memberCouponId": memberCouponId,
};
}

3
lib/retrofit/retrofit_api.dart

@ -171,8 +171,7 @@ abstract class ApiService {
@Part(name: "file") File data, @Part(name: "folderId") int folderId,bool isVideo);
///
@GET(
"https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location={lat},{lng}&keywords={keywords}&offset={size}&page={page}&extensions=all")
@GET("https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location={lat},{lng}&keywords={keywords}&offset={size}&page={page}&extensions=all")
Future<dynamic> searchPoi(@Path("lat") String lat, @Path("lng") String lng,
@Path("keywords") String keywords, int size, int page);

46
lib/settlement/settlement.dart

@ -172,9 +172,29 @@ class _Settlement extends State<Settlement> {
"buyNum": buyNum,
"payChannel": payChannel
}).catchError((error) {});
this.promotion = null;
promotions = "";
this.couponListBean = null;
coupons = "";
if (baseData != null && baseData.isSuccess) {
setState(() {
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;
@ -668,8 +688,8 @@ class _Settlement extends State<Settlement> {
couponCart,
activityCart,
settleOrderInfo,
payChannel == 4 ? null : coupons,
payChannel == 4 ? null : promotions,
coupons,
promotions,
couponCount(),
placeOrder,
remakers,
@ -778,9 +798,9 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(
address?.id,
selectedBtn,
payChannel == 4 ? null : couponListBean?.id,
couponListBean?.id,
0,
payChannel == 4 ? null : promotion?.id,
promotion?.id,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
@ -819,10 +839,10 @@ class _Settlement extends State<Settlement> {
},
);
// if (couponBean != null) {
this.couponListBean = couponBean;
coupons = couponListBean?.promotionName ?? "";
promotions = "";
this.promotion = null;
// this.couponListBean = couponBean;
// coupons = couponListBean?.promotionName ?? "";
// promotions = "";
// this.promotion = null;
queryOrderInfo(
address?.id,
selectedBtn,
@ -848,16 +868,16 @@ class _Settlement extends State<Settlement> {
},
);
// if (pro != null) {
this.promotion = pro;
promotions = promotion?.name ?? "";
coupons = "";
this.couponListBean = null;
// this.promotion = pro;
// promotions = promotion?.name ?? "";
// coupons = "";
// this.couponListBean = null;
queryOrderInfo(
address?.id,
selectedBtn,
null,
0,
promotion != null ? promotion.id : (productId ?? null),
promotion != null ? pro.id : (productId ?? null),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",

4
lib/store/store_order.dart

@ -599,9 +599,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
"tableId": tableId,
"parentCode": parentCode,
"parentId": parentId,
"pName": pName,
// "pName": pName,
"pid": pid,
"cName": cName,
// "cName": cName,
"cid": cid,
"shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople,

3
lib/store/store_view/product_sku.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
@ -139,7 +138,7 @@ class _ProductSku extends State<ProductSku> {
Padding(
padding: EdgeInsets.only(top: 4, bottom: 7),
child: Text(
": " +
"已选: " +
(selectSkus.map((e) => "$e").toList().toString()),
maxLines: 1,
overflow: TextOverflow.ellipsis,

17
lib/view_widget/new_coupon_widget.dart

@ -16,9 +16,20 @@ class NewCouponWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return homeCoupon(context);
return buildCoupon(context);
}
String getCouponStoreName(){
String couponStoreName = coupon.tenantName;
if(coupon?.storeList != null && coupon.storeId != "0"){
coupon.storeList.forEach((element) {
if(element.id == coupon.storeId)
couponStoreName = element.storeName;
});
}
return couponStoreName;
}
///ui
Widget buildCoupon(BuildContext context) {
// if(coupon != null) {
@ -246,9 +257,7 @@ class NewCouponWidget extends StatelessWidget {
width: 8.w,
),
Expanded(
child: Text(
(coupon.storeId != "0" && coupon?.storeList != null && coupon.storeList.isNotEmpty && coupon.storeList.firstWhere((x) => x.id == coupon.storeId)!=null ?
coupon.storeList.firstWhere((x) => x.id == coupon.storeId).storeName : coupon.tenantName),
child: Text(getCouponStoreName(),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 16.sp,

12
lib/view_widget/update_dialog.dart

@ -30,7 +30,7 @@ class _UpdateDialog extends State<UpdateDialog> {
child: Center(
child: Container(
width: MediaQuery.of(context).size.width - 80.w,
height: 180.h,
height: 192.h,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
@ -39,7 +39,7 @@ class _UpdateDialog extends State<UpdateDialog> {
children: [
Container(
width: double.infinity,
height: 110.h,
// height: 110.h,
alignment: Alignment.center,
padding: EdgeInsets.all(20),
child: Column(
@ -102,9 +102,7 @@ class _UpdateDialog extends State<UpdateDialog> {
Expanded(
child: InkWell(
onTap: () {
(Theme.of(context).platform == TargetPlatform.android) ?
androidUpdate():Bridge.toAppStore().then((value) {
});
updateApp();
// Navigator.of(context).pop();
},
child: Container(
@ -139,8 +137,8 @@ class _UpdateDialog extends State<UpdateDialog> {
Navigator.of(context).pop();
}
androidUpdate() async {
String url = "http://application.lotus-wallet.com/huixaing?release_id=627cadff23389f2fe6d57cb1";
updateApp() async {
String url = Platform.isIOS ? "itms-apps://itunes.apple.com/app/id1575124838":"http://application.lotus-wallet.com/huixaing?release_id=627cadff23389f2fe6d57cb1";
if (await canLaunch(url)) {
await launch(url);
} else {

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.1+2
version: 1.0.95+3
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save