feat:副屏页面

This commit is contained in:
dzc committed 2025-03-18 15:32:30 +08:00
1 parent 29db4faa73
commit 6dc478077a
11 files changed
+275 -40

No files matched your search

@@ -1 +1,36 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:pj_supermarket_cloud/common/index.dart';
part 'sub_screen_models.g.dart';
@JsonSerializable()
class SubScreenProductEvent {
// 购物车列表
List<ShopCardEntity> shopList;
// 系统类型
SysType sysType;
// 支付用户
ServiceUser? payUser;
// 购物车总价
int totalPrice;
// 额外支付
int amountMealPrice;
SubScreenProductEvent({
required this.shopList,
required this.sysType,
required this.payUser,
required this.totalPrice,
required this.amountMealPrice,
});
factory SubScreenProductEvent.fromJson(Map<String, dynamic> json) =>
_$SubScreenProductEventFromJson(json);
Map<String, dynamic> toJson() => _$SubScreenProductEventToJson(this);
}
@@ -0,0 +1,36 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'sub_screen_models.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SubScreenProductEvent _$SubScreenProductEventFromJson(
Map<String, dynamic> json) =>
SubScreenProductEvent(
shopList: (json['shopList'] as List<dynamic>)
.map((e) => ShopCardEntity.fromJson(e as Map<String, dynamic>))
.toList(),
sysType: $enumDecode(_$SysTypeEnumMap, json['sysType']),
payUser: json['payUser'] == null
? null
: ServiceUser.fromJson(json['payUser'] as Map<String, dynamic>),
totalPrice: (json['totalPrice'] as num).toInt(),
amountMealPrice: (json['amountMealPrice'] as num).toInt(),
);
Map<String, dynamic> _$SubScreenProductEventToJson(
SubScreenProductEvent instance) =>
<String, dynamic>{
'shopList': instance.shopList,
'sysType': _$SysTypeEnumMap[instance.sysType]!,
'payUser': instance.payUser,
'totalPrice': instance.totalPrice,
'amountMealPrice': instance.amountMealPrice,
};
const _$SysTypeEnumMap = {
SysType.SUPERMARKET: 'SUPERMARKET',
SysType.CANTEEN: 'CANTEEN',
};