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", "assets/image/welfare_spread.webp",
width:double.infinity, width:double.infinity,
fit: BoxFit.fill, fit: BoxFit.fill,
height:100.h, height:80.h,
), ),
borderRadius: BorderRadius.circular(6.w), borderRadius: BorderRadius.circular(6.w),
), ),

173
lib/integral/integral_page.dart

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

141
lib/order/order_detail_page.dart

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

2
lib/setting/account_security_page.dart

@ -85,7 +85,7 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { 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( child: Container(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),

2
lib/setting/platform_code_page.dart

@ -77,7 +77,7 @@ class _PlatformCodePage extends State<PlatformCodePage> {
"smsCode": smsCode, "smsCode": smsCode,
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
Navigator.of(context).popAndPushNamed( Navigator.of(context).pushReplacementNamed(
'/router/platform_pay_code', '/router/platform_pay_code',
arguments: { arguments: {
"inputText": inputText, "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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.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:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.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:pin_input_text_field/pin_input_text_field.dart';
import 'package:shared_preferences/shared_preferences.dart';
class PlatformPayCode extends StatefulWidget { class PlatformPayCode extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;
@ -120,7 +113,7 @@ class _PlatformPayCode extends State<PlatformPayCode> {
onTap: (){ onTap: (){
setState(() { setState(() {
if(inputCode.length == 6){ 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, "inputCode":inputCode,
"inputText":widget.arguments["inputText"] "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/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.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:huixiang/view_widget/round_button.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.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) { toOrderDetails(String orderId) {
Navigator.of(context).popAndPushNamed( Navigator.of(context).pushReplacementNamed(
'/router/order_details', '/router/order_details',
arguments: { arguments: {
"id": orderId, "id": orderId,
@ -654,7 +654,7 @@ class _Settlement extends State<Settlement> {
/// ///
toBargain() async { toBargain() async {
await Navigator.of(context) await Navigator.of(context)
.popAndPushNamed('/router/bargain_details', arguments: { .pushReplacementNamed('/router/bargain_details', arguments: {
"actRecordId": launchJoinAct.actRecordId, "actRecordId": launchJoinAct.actRecordId,
// "limitNumber": limitNumber, // "limitNumber": limitNumber,
"storeInfo": storeInfo, "storeInfo": storeInfo,
@ -663,194 +663,198 @@ class _Settlement extends State<Settlement> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
children: [ color: Colors.white,
Container( child: Stack(
// height: 175.h, children: [
// color: Color(0xFF3A405A), Container(
// width: MediaQuery.of(context).size.width, // height: 175.h,
decoration: BoxDecoration( // color: Color(0xFF3A405A),
image: DecorationImage( // width: MediaQuery.of(context).size.width,
fit: BoxFit.fill, decoration: BoxDecoration(
image: AssetImage("assets/image/settlement_bg.webp"), image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/settlement_bg.webp"),
),
), ),
width: double.infinity,
height: 375.h,
), ),
width: double.infinity, Scaffold(
height: 375.h, backgroundColor: Colors.transparent,
), appBar: MyAppBar(
Scaffold( background: Colors.transparent,
backgroundColor: Colors.transparent, leadingColor: Colors.white,
appBar: MyAppBar( title: S.of(context).dingdanjiesuan,
background: Colors.transparent, titleColor: Colors.white,
leadingColor: Colors.white, brightness: Brightness.dark,
title: S.of(context).dingdanjiesuan, titleSize: 18.sp,
titleColor: Colors.white, ),
brightness: Brightness.dark, body: Container(
titleSize: 18.sp, child: Column(
), children: [
body: Container( Expanded(
child: Column( child: Container(
children: [ child: SingleChildScrollView(
Expanded( physics: BouncingScrollPhysics(),
child: Container( child: Container(
child: SingleChildScrollView( child: Column(
physics: BouncingScrollPhysics(), children: [
child: Container( DistributionMode((addressId, isTake, memberCouponId,
child: Column( orderId, promotionId) {
children: [ setState(() {
DistributionMode((addressId, isTake, memberCouponId, this.selectedBtn = 0;
orderId, promotionId) { });
setState(() { queryOrderInfo(
this.selectedBtn = 0; addressId,
}); isTake,
queryOrderInfo( memberCouponId,
addressId, orderId,
isTake, promotionId ?? (productId ?? ""),
memberCouponId, productSkuId ?? "",
orderId, actProductId ?? "",
promotionId ?? (productId ?? ""), actProductSkuId ?? "",
productSkuId ?? "", count1,
actProductId ?? "", payChannel,
actProductSkuId ?? "", tableId ?? 0);
count1, }, queryAddress, storeInfo, address,
payChannel, selectedAddress, pageType),
tableId ?? 0);
}, queryAddress, storeInfo, address, SizedBox(
selectedAddress, pageType), height: 16,
),
SizedBox(
height: 16, ///
), // EditPhoneWidget(
// storeInfo,
/// // mobileChange,
// EditPhoneWidget( // ),
// storeInfo,
// mobileChange, ///
// ), if(settleOrderInfo != null || minOrderInfo != null)
SettlementOrderCommodity(
/// selectedBtn,
SettlementOrderCommodity( settleOrderInfo,
selectedBtn, minOrderInfo,
settleOrderInfo, tableId,
minOrderInfo, pageType,
tableId, ),
pageType,
), /////
ActivityCouponRemarks(
///// couponCart,
ActivityCouponRemarks( activityCart,
couponCart, settleOrderInfo,
activityCart, minOrderInfo,
settleOrderInfo, coupons,
minOrderInfo, promotions,
coupons, couponCount(),
promotions, placeOrder,
couponCount(), remakers,
placeOrder, () {
remakers, Navigator.of(context).pushNamed(
() { '/router/edit_remarks_page',
Navigator.of(context).pushNamed( arguments: {},
'/router/edit_remarks_page', ).then((value) => {
arguments: {}, setState(() {
).then((value) => { if (value != null) remakers = value;
setState(() { })
if (value != null) remakers = value; });
}) },
}); tableId,
}, ),
tableId,
), if (placeOrder && joinA != JoinActivity.BargainBug)
if (placeOrder && joinA != JoinActivity.BargainBug)
/// ///
PayMethod(payChannelCheck), PayMethod(payChannelCheck),
], ],
),
), ),
), ),
), ),
flex: 1,
), ),
flex: 1, Container(
), height: 54.h,
Container( decoration: BoxDecoration(
height: 54.h, color: Colors.white,
decoration: BoxDecoration( boxShadow: [
color: Colors.white, BoxShadow(
boxShadow: [ color: Color(0x08213303).withAlpha(12),
BoxShadow( offset: Offset(0, -1),
color: Color(0x08213303).withAlpha(12), blurRadius: 8,
offset: Offset(0, -1), spreadRadius: 0,
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,
), ),
), ],
Text( ),
(minOrderInfo != null child: Row(
? "${minOrderInfo.finalPayPrice}" crossAxisAlignment: CrossAxisAlignment.center,
: "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), children: [
style: TextStyle( Spacer(),
fontSize: 20.sp, Text(
fontWeight: MyFontWeight.semi_bold, S.of(context).heji,
color: Color(0xFF32A060), style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
), ),
), Text(
SizedBox( (minOrderInfo != null
width: 28, ? "${minOrderInfo.finalPayPrice}"
), : "${settleOrderInfo == null ? "0" : settleOrderInfo.price}"),
RoundButton( style: TextStyle(
width: 88.w, fontSize: 20.sp,
height: 32.h, fontWeight: MyFontWeight.semi_bold,
radius: 16, color: Color(0xFF32A060),
text: joinA == JoinActivity.BargainBug ),
? "发起砍价"
: (placeOrder ? "提交订单" : "下单"),
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
fontSize: 16.sp,
padding: EdgeInsets.symmetric(
vertical: 5.h,
), ),
callback: () { SizedBox(
if (orderButton) { width: 28,
SmartDialog.showToast("订单正在提交中...", ),
alignment: Alignment.center); RoundButton(
return; width: 88.w,
} else height: 32.h,
orderButton = true; radius: 16,
pageType != null text: joinA == JoinActivity.BargainBug
? bargainOrderId != null ? "发起砍价"
? activityPay() : (placeOrder ? "提交订单" : "下单"),
: joinA == JoinActivity.GoJoin textColor: Colors.white,
? queryJoinAct() fontWeight: MyFontWeight.regular,
: queryLaunchAct() backgroup: Color(0xFF32A060),
: queryPlaceOrderFirst(); fontSize: 16.sp,
}, padding: EdgeInsets.symmetric(
), vertical: 5.h,
SizedBox( ),
width: 17, 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 { toOrder() async {
await Navigator.of(context).popAndPushNamed( await Navigator.of(context).pushReplacementNamed(
'/router/settlement', '/router/settlement',
arguments: { arguments: {
"storeInfo": storeInfo, "storeInfo": storeInfo,

2
lib/store/store_view/product_sku.dart

@ -306,7 +306,7 @@ class _ProductSku extends State<ProductSku> {
children: [ children: [
Expanded(child: GestureDetector( Expanded(child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details'); Navigator.of(context).pushReplacementNamed('/router/group_details');
}, },
child: Container( child: Container(
alignment: Alignment.center, 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 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: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save