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. 50
      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(
alignment: Alignment.center,
width: double.infinity,
height: 305.h,
height: 325.h,
padding: EdgeInsets.only(left: 16.w, right: 16.w),
decoration: new BoxDecoration(
color: Colors.white,

7
lib/home/welfare_exchange.dart

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

2
lib/login/new_login_page.dart

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

6
lib/main.dart

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

6
lib/retrofit/data/delivery_info.dart

@ -7,9 +7,8 @@ class DeliveryInfo {
bool dianwodaStatus;
bool meituanRegStatus;
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(
dadaRegStatus: json['dadaRegStatus'] as bool,
@ -19,8 +18,6 @@ class DeliveryInfo {
dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool,
dineInTakeStatus: json['dineInTakeStatus'] as bool,
);
Map<String, dynamic> toJson() => <String, dynamic>{
@ -31,7 +28,6 @@ class DeliveryInfo {
'dianwodaStatus': this.dianwodaStatus,
'meituanRegStatus': this.meituanRegStatus,
'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/member_source.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/store_type.dart';
import 'package:huixiang/retrofit/data/mini.dart';
@ -15,6 +16,7 @@ class StoreInfo {
String createTime;
String createUser;
DeliveryInfo deliveryInfo;
PickupType pickupType;
String district;
String headMobile;
String tel;
@ -67,6 +69,9 @@ class StoreInfo {
..deliveryInfo = json['deliveryInfo'] == null
? null
: 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
..headMobile = json['headMobile'] as String
..tel = json['tel'] as String
@ -117,6 +122,7 @@ class StoreInfo {
'createTime': this.createTime,
'createUser': this.createUser,
'deliveryInfo': this.deliveryInfo.toJson(),
'pickupType':this.pickupType.toJson(),
'district': this.district,
'headMobile': this.headMobile,
'tel': this.tel,

5
lib/settlement/settlement.dart

@ -530,7 +530,7 @@ class _Settlement extends State<Settlement> {
((subscribeParam?.isEnableSubscribe ?? false) == true)
? true
: 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 +
(reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true
@ -835,7 +835,8 @@ class _Settlement extends State<Settlement> {
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(),
///

50
lib/settlement/settlement_view/distribution.dart

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

2
lib/store/store_order.dart

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

Loading…
Cancel
Save