Browse Source

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

zyh
fmk 3 years ago
parent
commit
dfb18906b8
  1. 2
      lib/home/welfare_page.dart
  2. 173
      lib/integral/integral_page.dart
  3. 1
      lib/main.dart
  4. 141
      lib/order/order_detail_page.dart
  5. 2
      lib/setting/account_security_page.dart
  6. 2
      lib/setting/platform_code_page.dart
  7. 9
      lib/setting/platform_pay_code.dart
  8. 1
      lib/setting/setting_page.dart
  9. 358
      lib/settlement/settlement.dart
  10. 2
      lib/store/shopping/shopping_home/bargain_details.dart
  11. 2
      lib/store/store_view/product_sku.dart
  12. 2
      pubspec.yaml

2
lib/home/welfare_page.dart

@ -704,7 +704,7 @@ class _WelfarePage extends State<WelfarePage> {
"assets/image/welfare_spread.webp",
width:double.infinity,
fit: BoxFit.fill,
height:100.h,
height:80.h,
),
borderRadius: BorderRadius.circular(6.w),
),

173
lib/integral/integral_page.dart

@ -81,104 +81,107 @@ class _IntegralPage extends State<IntegralPage> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
// Positioned(
// child: Container(
// height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top,
// decoration: BoxDecoration(
// image: DecorationImage(
// fit: BoxFit.fill,
// image: AssetImage("assets/image/jifen.webp"),
// ),
// ),
// ),
// top: 0,
// left: 0,
// right: 0,
// ),
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/jifen.webp"),
return Container(
color: Colors.white,
child: Stack(
children: [
// Positioned(
// child: Container(
// height: 122.h + kToolbarHeight + MediaQuery.of(context).padding.top,
// decoration: BoxDecoration(
// image: DecorationImage(
// fit: BoxFit.fill,
// image: AssetImage("assets/image/jifen.webp"),
// ),
// ),
// ),
// top: 0,
// left: 0,
// right: 0,
// ),
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/jifen.webp"),
),
),
width: double.infinity,
height: 215.h,
),
width: double.infinity,
height: 215.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);},
background: Colors.transparent,
leadingColor: Colors.white,
title: "",
titleColor: Colors.white,
titleSize: 16.sp,
brightness: Brightness.dark,
action: Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/integral_detailed_page');
},
child: Text(
S.of(context).mingxi,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
exit: (){Navigator.of(context).pop(signInfo.todayHasSignin ?? false);},
background: Colors.transparent,
leadingColor: Colors.white,
title: "",
titleColor: Colors.white,
titleSize: 16.sp,
brightness: Brightness.dark,
action: Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/integral_detailed_page');
},
child: Text(
S.of(context).mingxi,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
),
),
),
),
),
),
body:SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
body:SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh:(){
setState(() {
querySignInfo();
});
},
),
onRefresh:(){
setState(() {
querySignInfo();
});
},
physics: BouncingScrollPhysics(),
scrollController: scrollController,
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FutureBuilder(
future: querySignInfo(),
builder: (context, snap) {
return Column(
children: [
/// VIP等级显示
IntegralVip(rankLevel, signInfo, userInfo,"${ (signInfo?.signInList?.length ) ?? "0"}",
((signInfo?.rewardList != null && signInfo.rewardList.length > (signInfo?.signInList?.length ?? 0)) ?
signInfo.rewardList[signInfo?.signInList?.length ?? 0]:0).toString()),
physics: BouncingScrollPhysics(),
scrollController: scrollController,
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: FutureBuilder(
future: querySignInfo(),
builder: (context, snap) {
return Column(
children: [
/// VIP等级显示
IntegralVip(rankLevel, signInfo, userInfo,"${ (signInfo?.signInList?.length ) ?? "0"}",
((signInfo?.rewardList != null && signInfo.rewardList.length > (signInfo?.signInList?.length ?? 0)) ?
signInfo.rewardList[signInfo?.signInList?.length ?? 0]:0).toString()),
///
InForPoints(signInfo, _signIn),
///
InForPoints(signInfo, _signIn),
///
IntegralTask(signInfo),
],
);
},
///
IntegralTask(signInfo),
],
);
},
),
),
),
),
),
),
],
],
),
);
}

1
lib/main.dart

@ -163,6 +163,7 @@ class MyApp extends StatelessWidget {
child: ScreenUtilInit(
designSize: Size(375, 812),
builder: () => MaterialApp(
title: "",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,

141
lib/order/order_detail_page.dart

@ -121,84 +121,87 @@ class _OrderDetailPage extends State<OrderDetailPage> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
// height: (orderStatus >= 4 ? 118.h : 118.h) +
// MediaQuery.of(context).padding.top +
// kToolbarHeight +
// 48.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
return Container(
color: Colors.white,
child: Stack(
children: [
Container(
// height: (orderStatus >= 4 ? 118.h : 118.h) +
// MediaQuery.of(context).padding.top +
// kToolbarHeight +
// 48.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
width: double.infinity,
height: 375.h,
),
width: double.infinity,
height: 375.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
title: "订单详情",
titleColor: Colors.white,
background: Colors.transparent,
leadingColor: Colors.white,
brightness: Brightness.dark,
),
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
///
OrderStatus(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
orderInfo,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
title: "订单详情",
titleColor: Colors.white,
background: Colors.transparent,
leadingColor: Colors.white,
brightness: Brightness.dark,
),
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
///
OrderStatus(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
orderInfo,
),
///
if(orderInfo != null)
OrderAddress(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
paySelected,
_orderCancel,
orderInfo,
),
///
if(orderInfo != null)
OrderAddress(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
paySelected,
_orderCancel,
orderInfo,
),
///
if(orderInfo != null)
OrderCommodity(orderInfo),
///
if(orderInfo != null)
OrderCommodity(orderInfo),
///
if(orderInfo != null)
OrderInfoView(orderInfo, isTakeOut),
///
if(orderInfo != null)
OrderInfoView(orderInfo, isTakeOut),
Container(
height: 42.h,
),
],
Container(
height: 42.h,
),
],
),
),
),
),
),
)
],
)
],
),
);
}

2
lib/setting/account_security_page.dart

@ -85,7 +85,7 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
children: [
GestureDetector(
onTap: () {
Navigator.of(context).popAndPushNamed('/router/platform_code_page',arguments:{"userInfo":userInfo});
Navigator.of(context).pushReplacementNamed('/router/platform_code_page',arguments:{"userInfo":userInfo});
},
child: Container(
padding: EdgeInsets.all(15),

2
lib/setting/platform_code_page.dart

@ -77,7 +77,7 @@ class _PlatformCodePage extends State<PlatformCodePage> {
"smsCode": smsCode,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).popAndPushNamed(
Navigator.of(context).pushReplacementNamed(
'/router/platform_pay_code',
arguments: {
"inputText": inputText,

9
lib/setting/platform_pay_code.dart

@ -1,17 +1,10 @@
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/pay_selected_dialog.dart';
import 'package:pin_input_text_field/pin_input_text_field.dart';
import 'package:shared_preferences/shared_preferences.dart';
class PlatformPayCode extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -120,7 +113,7 @@ class _PlatformPayCode extends State<PlatformPayCode> {
onTap: (){
setState(() {
if(inputCode.length == 6){
Navigator.of(context).popAndPushNamed('/router/platform_pay_code_success',arguments:{
Navigator.of(context).pushReplacementNamed('/router/platform_pay_code_success',arguments:{
"inputCode":inputCode,
"inputText":widget.arguments["inputText"]
});

1
lib/setting/setting_page.dart

@ -9,7 +9,6 @@ import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';

358
lib/settlement/settlement.dart

@ -642,7 +642,7 @@ class _Settlement extends State<Settlement> {
}
toOrderDetails(String orderId) {
Navigator.of(context).popAndPushNamed(
Navigator.of(context).pushReplacementNamed(
'/router/order_details',
arguments: {
"id": orderId,
@ -654,7 +654,7 @@ class _Settlement extends State<Settlement> {
///
toBargain() async {
await Navigator.of(context)
.popAndPushNamed('/router/bargain_details', arguments: {
.pushReplacementNamed('/router/bargain_details', arguments: {
"actRecordId": launchJoinAct.actRecordId,
// "limitNumber": limitNumber,
"storeInfo": storeInfo,
@ -663,194 +663,198 @@ class _Settlement extends State<Settlement> {
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
// height: 175.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
return Container(
color: Colors.white,
child: Stack(
children: [
Container(
// height: 175.h,
// color: Color(0xFF3A405A),
// width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
),
width: double.infinity,
height: 375.h,
),
width: double.infinity,
height: 375.h,
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Colors.transparent,
leadingColor: Colors.white,
title: S.of(context).dingdanjiesuan,
titleColor: Colors.white,
brightness: Brightness.dark,
titleSize: 18.sp,
),
body: Container(
child: Column(
children: [
Expanded(
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake, memberCouponId,
orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId ?? (productId ?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel,
tableId ?? 0);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
SizedBox(
height: 16,
),
///
// EditPhoneWidget(
// storeInfo,
// mobileChange,
// ),
///
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
),
/////
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,
),
if (placeOrder && joinA != JoinActivity.BargainBug)
Scaffold(
backgroundColor: Colors.transparent,
appBar: MyAppBar(
background: Colors.transparent,
leadingColor: Colors.white,
title: S.of(context).dingdanjiesuan,
titleColor: Colors.white,
brightness: Brightness.dark,
titleSize: 18.sp,
),
body: Container(
child: Column(
children: [
Expanded(
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
DistributionMode((addressId, isTake, memberCouponId,
orderId, promotionId) {
setState(() {
this.selectedBtn = 0;
});
queryOrderInfo(
addressId,
isTake,
memberCouponId,
orderId,
promotionId ?? (productId ?? ""),
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
count1,
payChannel,
tableId ?? 0);
}, queryAddress, storeInfo, address,
selectedAddress, pageType),
SizedBox(
height: 16,
),
///
// EditPhoneWidget(
// storeInfo,
// mobileChange,
// ),
///
if(settleOrderInfo != null || minOrderInfo != null)
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
tableId,
pageType,
),
/////
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,
),
if (placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
],
PayMethod(payChannelCheck),
],
),
),
),
),
flex: 1,
),
flex: 1,
),
Container(
height: 54.h,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, -1),
blurRadius: 8,
spreadRadius: 0,
),
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Spacer(),
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
Container(
height: 54.h,
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x08213303).withAlpha(12),
offset: Offset(0, -1),
blurRadius: 8,
spreadRadius: 0,
),
),
Text(
(minOrderInfo != null
? "${minOrderInfo.finalPayPrice}"
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Spacer(),
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
),
SizedBox(
width: 28,
),
RoundButton(
width: 88.w,
height: 32.h,
radius: 16,
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? "提交订单" : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
Text(
(minOrderInfo != null
? "${minOrderInfo.finalPayPrice}"
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
callback: () {
if (orderButton) {
SmartDialog.showToast("订单正在提交中...",
alignment: Alignment.center);
return;
} else
orderButton = true;
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
SizedBox(
width: 17,
)
],
SizedBox(
width: 28,
),
RoundButton(
width: 88.w,
height: 32.h,
radius: 16,
text: joinA == JoinActivity.BargainBug
? "发起砍价"
: (placeOrder ? "提交订单" : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
),
callback: () {
if (orderButton) {
SmartDialog.showToast("订单正在提交中...",
alignment: Alignment.center);
return;
} else
orderButton = true;
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
},
),
SizedBox(
width: 17,
)
],
),
),
),
],
],
),
),
),
)
],
)
],
),
);
}

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

@ -128,7 +128,7 @@ class _BargainDetails extends State<BargainDetails> {
///
toOrder() async {
await Navigator.of(context).popAndPushNamed(
await Navigator.of(context).pushReplacementNamed(
'/router/settlement',
arguments: {
"storeInfo": storeInfo,

2
lib/store/store_view/product_sku.dart

@ -306,7 +306,7 @@ class _ProductSku extends State<ProductSku> {
children: [
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details');
Navigator.of(context).pushReplacementNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,

2
pubspec.yaml

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

Loading…
Cancel
Save