Browse Source

更改结算页外卖,物流,堂食,根据对应字段显示隐藏对应按钮;

更改系统语言顺序;
优化点餐页banner自动滑动;
new_revision_app
wurong 2 years ago
parent
commit
a5d74631eb
  1. BIN
      assets/image/2x/order_wl.webp
  2. BIN
      assets/image/3x/order_wl.webp
  3. BIN
      assets/image/order_wl.webp
  4. 2
      lib/home/guide_page.dart
  5. 7
      lib/home/welfare_exchange.dart
  6. 2
      lib/login/new_login_page.dart
  7. 6
      lib/main.dart
  8. 6
      lib/retrofit/data/delivery_info.dart
  9. 42
      lib/retrofit/data/pickup_type.dart
  10. 6
      lib/retrofit/data/store_info.dart
  11. 5
      lib/settlement/settlement.dart
  12. 58
      lib/settlement/settlement_view/distribution.dart
  13. 2
      lib/store/store_order.dart

BIN
assets/image/2x/order_wl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

BIN
assets/image/3x/order_wl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/order_wl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

2
lib/home/guide_page.dart

@ -430,7 +430,7 @@ class _GuidePage extends State<GuidePage> {
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
width: double.infinity, width: double.infinity,
height: 305.h, height: 325.h,
padding: EdgeInsets.only(left: 16.w, right: 16.w), padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Colors.white, color: Colors.white,

7
lib/home/welfare_exchange.dart

@ -31,7 +31,6 @@ class WelfareExchange extends StatefulWidget {
class _WelfareExchange extends State<WelfareExchange> class _WelfareExchange extends State<WelfareExchange>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
ApiService apiService; ApiService apiService;
final ScrollController scrollController = ScrollController();
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
int pageNum = 1; int pageNum = 1;
@ -45,12 +44,6 @@ class _WelfareExchange extends State<WelfareExchange>
List<GoodsCategory> gooodsCategorys = []; List<GoodsCategory> gooodsCategorys = [];
UserInfo userInfo; UserInfo userInfo;
String categoryId; String categoryId;
var _itemText = S.current.morenpaixu;
List<String> sortString = [
S.current.morenpaixu,
S.current.jifengaodaodi,
S.current.jifendidaogao,
];
@override @override
void dispose() { void dispose() {

2
lib/login/new_login_page.dart

@ -832,7 +832,7 @@ class _NewLoginPage extends State<NewLoginPage> {
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
width: double.infinity, width: double.infinity,
height: 305.h, height: 325.h,
padding: EdgeInsets.only(left: 16.w, right: 16.w), padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: Colors.white, color: Colors.white,

6
lib/main.dart

@ -199,10 +199,10 @@ class MyApp extends StatelessWidget {
Locale locale; Locale locale;
if (locales[0].countryCode == "TW") { if (locales[0].countryCode == "TW") {
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'); locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW');
} else if (locales[0].countryCode == "CN"){ } else if (locales[0].countryCode == "US"){
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
} else{
locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US'); locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US');
} else{
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
} }
return appLocale ?? locale; return appLocale ?? locale;
}, },

6
lib/retrofit/data/delivery_info.dart

@ -7,9 +7,8 @@ class DeliveryInfo {
bool dianwodaStatus; bool dianwodaStatus;
bool meituanRegStatus; bool meituanRegStatus;
bool meituanStatus; bool meituanStatus;
bool dineInTakeStatus;
DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus,this.dineInTakeStatus}); DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus});
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo( factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool, dadaRegStatus: json['dadaRegStatus'] as bool,
@ -19,8 +18,6 @@ class DeliveryInfo {
dianwodaStatus: json['dianwodaStatus'] as bool, dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool, meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool, meituanStatus: json['meituanStatus'] as bool,
dineInTakeStatus: json['dineInTakeStatus'] as bool,
); );
Map<String, dynamic> toJson() => <String, dynamic>{ Map<String, dynamic> toJson() => <String, dynamic>{
@ -31,7 +28,6 @@ class DeliveryInfo {
'dianwodaStatus': this.dianwodaStatus, 'dianwodaStatus': this.dianwodaStatus,
'meituanRegStatus': this.meituanRegStatus, 'meituanRegStatus': this.meituanRegStatus,
'meituanStatus': this.meituanStatus, 'meituanStatus': this.meituanStatus,
'dineInTakeStatus': this.dineInTakeStatus,
}; };
} }

42
lib/retrofit/data/pickup_type.dart

@ -0,0 +1,42 @@
/// dineInTakeStatus : true
/// takeawayStatus : null
/// expressDeliveryStatus : null
class PickupType {
PickupType({
bool dineInTakeStatus,
dynamic takeawayStatus,
dynamic expressDeliveryStatus,}){
_dineInTakeStatus = dineInTakeStatus;
_takeawayStatus = takeawayStatus;
_expressDeliveryStatus = expressDeliveryStatus;
}
PickupType.fromJson(dynamic json) {
_dineInTakeStatus = json['dineInTakeStatus'];
_takeawayStatus = json['takeawayStatus'];
_expressDeliveryStatus = json['expressDeliveryStatus'];
}
bool _dineInTakeStatus;
dynamic _takeawayStatus;
dynamic _expressDeliveryStatus;
PickupType copyWith({ bool dineInTakeStatus,
dynamic takeawayStatus,
dynamic expressDeliveryStatus,
}) => PickupType( dineInTakeStatus: dineInTakeStatus ?? _dineInTakeStatus,
takeawayStatus: takeawayStatus ?? _takeawayStatus,
expressDeliveryStatus: expressDeliveryStatus ?? _expressDeliveryStatus,
);
bool get dineInTakeStatus => _dineInTakeStatus;
dynamic get takeawayStatus => _takeawayStatus;
dynamic get expressDeliveryStatus => _expressDeliveryStatus;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['dineInTakeStatus'] = _dineInTakeStatus;
map['takeawayStatus'] = _takeawayStatus;
map['expressDeliveryStatus'] = _expressDeliveryStatus;
return map;
}
}

6
lib/retrofit/data/store_info.dart

@ -3,6 +3,7 @@ import 'package:huixiang/retrofit/data/coupon_vo.dart';
import 'package:huixiang/retrofit/data/delivery_info.dart'; import 'package:huixiang/retrofit/data/delivery_info.dart';
import 'package:huixiang/retrofit/data/member_source.dart'; import 'package:huixiang/retrofit/data/member_source.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/data/pickup_type.dart';
import 'package:huixiang/retrofit/data/promotion.dart'; import 'package:huixiang/retrofit/data/promotion.dart';
import 'package:huixiang/retrofit/data/store_type.dart'; import 'package:huixiang/retrofit/data/store_type.dart';
import 'package:huixiang/retrofit/data/mini.dart'; import 'package:huixiang/retrofit/data/mini.dart';
@ -15,6 +16,7 @@ class StoreInfo {
String createTime; String createTime;
String createUser; String createUser;
DeliveryInfo deliveryInfo; DeliveryInfo deliveryInfo;
PickupType pickupType;
String district; String district;
String headMobile; String headMobile;
String tel; String tel;
@ -67,6 +69,9 @@ class StoreInfo {
..deliveryInfo = json['deliveryInfo'] == null ..deliveryInfo = json['deliveryInfo'] == null
? null ? null
: DeliveryInfo.fromJson(json['deliveryInfo'] as Map<String, dynamic>) : DeliveryInfo.fromJson(json['deliveryInfo'] as Map<String, dynamic>)
..pickupType = json['pickupType'] == null
? null
: PickupType.fromJson(json['pickupType'] as Map<String, dynamic>)
..district = json['district'] as String ..district = json['district'] as String
..headMobile = json['headMobile'] as String ..headMobile = json['headMobile'] as String
..tel = json['tel'] as String ..tel = json['tel'] as String
@ -117,6 +122,7 @@ class StoreInfo {
'createTime': this.createTime, 'createTime': this.createTime,
'createUser': this.createUser, 'createUser': this.createUser,
'deliveryInfo': this.deliveryInfo.toJson(), 'deliveryInfo': this.deliveryInfo.toJson(),
'pickupType':this.pickupType.toJson(),
'district': this.district, 'district': this.district,
'headMobile': this.headMobile, 'headMobile': this.headMobile,
'tel': this.tel, 'tel': this.tel,

5
lib/settlement/settlement.dart

@ -530,7 +530,7 @@ class _Settlement extends State<Settlement> {
((subscribeParam?.isEnableSubscribe ?? false) == true) ((subscribeParam?.isEnableSubscribe ?? false) == true)
? true ? true
: false; // : false; //
placeOrderFirst.isTakeOut = ((storeInfo?.deliveryInfo?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false) ? diningStatus : selectedBtn; placeOrderFirst.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn!=1&&selectedBtn!=2) ? diningStatus : selectedBtn;
placeOrderFirst.notes = remakers + placeOrderFirst.notes = remakers +
(reservationTime ?? "") + (reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true ((subscribeParam?.isEnableSubscribe ?? false) == true
@ -835,7 +835,8 @@ class _Settlement extends State<Settlement> {
height: 16.h, height: 16.h,
), ),
if((storeInfo?.deliveryInfo?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false &&settleOrderInfo !=null) if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false
&& selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null)
takeStatus(), takeStatus(),
/// ///

58
lib/settlement/settlement_view/distribution.dart

@ -146,21 +146,22 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1, flex: 1,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
// if (widget.storeInfo.storeName == "一心回乡商城") { // if (widget.storeInfo.storeName == "一心回乡商城")
// SmartDialog.showToast("该功能暂未开放!", if ((widget?.storeInfo?.pickupType?.takeawayStatus ?? false) == false) {
// alignment: Alignment.center); SmartDialog.showToast("该功能暂未开放!",
// return; alignment: Alignment.center);
// } return;
// selectedBtn = 1; }
// widget.queryAddress(selectedBtn); selectedBtn = 1;
SmartDialog.showToast("该功能暂未开放!", widget.queryAddress(selectedBtn);
alignment: Alignment.center); // SmartDialog.showToast("该功能暂未开放!",
// alignment: Alignment.center);
}, },
child: Container( child: Container(
height: 50.h, height: 50.h,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
S.of(context).waimaipeisong, (widget?.storeInfo?.pickupType?.takeawayStatus ?? false) == false ? "" :S.of(context).waimaipeisong,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -174,19 +175,22 @@ class _DistributionMode extends State<DistributionMode> {
flex: 1, flex: 1,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
// if (widget.storeInfo.storeName == "一心回乡商城") { // if (widget.storeInfo.storeName == "一心回乡商城")
// selectedBtn = 2; if((widget?.storeInfo?.pickupType?.expressDeliveryStatus ?? false) == false){
// widget.queryAddress(selectedBtn); SmartDialog.showToast("该功能暂未开放!",
// return; alignment: Alignment.center);
// } return;
SmartDialog.showToast("该功能暂未开放!", }
alignment: Alignment.center); selectedBtn = 2;
widget.queryAddress(selectedBtn);
// SmartDialog.showToast("该功能暂未开放!",
// alignment: Alignment.center);
}, },
child: Container( child: Container(
height: 50.h, height: 50.h,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
S.of(context).kuaidiwuliu, (widget?.storeInfo?.pickupType?.expressDeliveryStatus ?? false) == false ? "" :S.of(context).kuaidiwuliu,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -202,7 +206,7 @@ class _DistributionMode extends State<DistributionMode> {
selectedBtn == 0 selectedBtn == 0
? Container( ? Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 15), padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 15.h),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -311,7 +315,7 @@ class _DistributionMode extends State<DistributionMode> {
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 15), padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 15.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -320,14 +324,8 @@ class _DistributionMode extends State<DistributionMode> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
(widget.storeInfo.storeName == "一心回乡商城") Image.asset(
? Icon( (widget.storeInfo?.pickupType?.expressDeliveryStatus ?? false == true) ? "assets/image/order_wl.webp":"assets/image/icon_permission_location.webp",
Icons.local_shipping,
color: Color(0xFF727272),
size: 24,
)
: Image.asset(
"assets/image/icon_permission_location.webp",
height: 24.h, height: 24.h,
width: 24.w, width: 24.w,
), ),
@ -342,7 +340,7 @@ class _DistributionMode extends State<DistributionMode> {
), ),
), ),
SizedBox( SizedBox(
width: 13, width: 13.w,
), ),
Expanded( Expanded(
child: Text( child: Text(
@ -380,7 +378,7 @@ class _DistributionMode extends State<DistributionMode> {
], ],
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 4, left: 25), padding: EdgeInsets.only(top: 4.h, left: 25.w),
child: Text( child: Text(
(widget?.address?.city ?? "") + (widget?.address?.city ?? "") +
(widget?.address?.area ?? "") + (widget?.address?.area ?? "") +

2
lib/store/store_order.dart

@ -700,7 +700,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
color: Colors.white.withAlpha(76), color: Colors.white.withAlpha(76),
), ),
), ),
autoplay: true, autoplay: (storeInfo?.bannerList?.length ?? 0) == 0 ? false :true,
duration: 1000, duration: 1000,
autoplayDelay: 2000, autoplayDelay: 2000,
itemBuilder: (context, position) { itemBuilder: (context, position) {

Loading…
Cancel
Save