mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-01 23:59:50 +08:00
feat: member shop
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
44
lib/models_new/space/space_shop/below_label.dart
Normal file
44
lib/models_new/space/space_shop/below_label.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
class BelowLabel {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
BelowLabel({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory BelowLabel.fromJson(Map<String, dynamic> json) => BelowLabel(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space_shop/benefit_info.dart
Normal file
13
lib/models_new/space/space_shop/benefit_info.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class BenefitInfo {
|
||||
String? prefix;
|
||||
String? amount;
|
||||
dynamic suffix;
|
||||
|
||||
BenefitInfo({this.prefix, this.amount, this.suffix});
|
||||
|
||||
factory BenefitInfo.fromJson(Map<String, dynamic> json) => BenefitInfo(
|
||||
prefix: json['prefix'] as String?,
|
||||
amount: json['amount'] as String?,
|
||||
suffix: json['suffix'] as dynamic,
|
||||
);
|
||||
}
|
||||
17
lib/models_new/space/space_shop/cover.dart
Normal file
17
lib/models_new/space/space_shop/cover.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
String? imgWh;
|
||||
int? height;
|
||||
int? width;
|
||||
dynamic size;
|
||||
|
||||
Cover({this.url, this.imgWh, this.height, this.width, this.size});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
imgWh: json['imgWH'] as String?,
|
||||
height: json['height'] as int?,
|
||||
width: json['width'] as int?,
|
||||
size: json['size'] as dynamic,
|
||||
);
|
||||
}
|
||||
30
lib/models_new/space/space_shop/data.dart
Normal file
30
lib/models_new/space/space_shop/data.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:PiliPlus/models_new/space/space_shop/item.dart';
|
||||
|
||||
class SpaceShopData {
|
||||
List<SpaceShopItem>? data;
|
||||
bool? showMoreTab;
|
||||
String? clickUrl;
|
||||
String? showMoreDesc;
|
||||
bool? haveNextPage;
|
||||
int? nextSearchAfter;
|
||||
|
||||
SpaceShopData({
|
||||
this.data,
|
||||
this.showMoreTab,
|
||||
this.clickUrl,
|
||||
this.showMoreDesc,
|
||||
this.haveNextPage,
|
||||
this.nextSearchAfter,
|
||||
});
|
||||
|
||||
factory SpaceShopData.fromJson(Map<String, dynamic> json) => SpaceShopData(
|
||||
data: (json['data'] as List<dynamic>?)
|
||||
?.map((e) => SpaceShopItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
showMoreTab: json['showMoreTab'] as bool?,
|
||||
clickUrl: json['clickUrl'] as String?,
|
||||
showMoreDesc: json['showMoreDesc'] as String?,
|
||||
haveNextPage: json['haveNextPage'] as bool?,
|
||||
nextSearchAfter: json['nextSearchAfter'] as int?,
|
||||
);
|
||||
}
|
||||
144
lib/models_new/space/space_shop/item.dart
Normal file
144
lib/models_new/space/space_shop/item.dart
Normal file
@@ -0,0 +1,144 @@
|
||||
import 'package:PiliPlus/models_new/space/space_shop/below_label.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/benefit_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/cover.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/net_price.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/report_params.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/source_desc.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/source_front_tag.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
|
||||
class SpaceShopItem {
|
||||
String? contentId;
|
||||
int? contentType;
|
||||
dynamic contentSubType;
|
||||
dynamic trackId;
|
||||
Cover? cover;
|
||||
String? title;
|
||||
dynamic subTitle;
|
||||
String? cardUrl;
|
||||
List<BelowLabel>? belowLabels;
|
||||
dynamic topRightLabels;
|
||||
dynamic bottomRightLabels;
|
||||
dynamic topLeftLabels;
|
||||
dynamic bottomLeftLabels;
|
||||
List<dynamic>? titleFrontLabels;
|
||||
dynamic priceBehindLabels;
|
||||
NetPrice? netPrice;
|
||||
dynamic userInteractInfos;
|
||||
List<BenefitInfo>? benefitInfos;
|
||||
ReportParams? reportParams;
|
||||
dynamic ichibanItem;
|
||||
bool? isMarketItem;
|
||||
dynamic remainBoxStr;
|
||||
dynamic surpriseTips;
|
||||
String? outSchemaUrl;
|
||||
int? itemCode;
|
||||
dynamic merchantId;
|
||||
int? itemSource;
|
||||
String? itemSourceName;
|
||||
SourceDesc? sourceDesc;
|
||||
SourceFrontTag? sourceFrontTag;
|
||||
List<String>? openWhiteList;
|
||||
bool? sellOut;
|
||||
int? status;
|
||||
bool? preSaleEnd;
|
||||
bool? preSaleNotStart;
|
||||
int? jumpType;
|
||||
dynamic lrpriceStr;
|
||||
|
||||
SpaceShopItem({
|
||||
this.contentId,
|
||||
this.contentType,
|
||||
this.contentSubType,
|
||||
this.trackId,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.cardUrl,
|
||||
this.belowLabels,
|
||||
this.topRightLabels,
|
||||
this.bottomRightLabels,
|
||||
this.topLeftLabels,
|
||||
this.bottomLeftLabels,
|
||||
this.titleFrontLabels,
|
||||
this.priceBehindLabels,
|
||||
this.netPrice,
|
||||
this.userInteractInfos,
|
||||
this.benefitInfos,
|
||||
this.reportParams,
|
||||
this.ichibanItem,
|
||||
this.isMarketItem,
|
||||
this.remainBoxStr,
|
||||
this.surpriseTips,
|
||||
this.outSchemaUrl,
|
||||
this.itemCode,
|
||||
this.merchantId,
|
||||
this.itemSource,
|
||||
this.itemSourceName,
|
||||
this.sourceDesc,
|
||||
this.sourceFrontTag,
|
||||
this.openWhiteList,
|
||||
this.sellOut,
|
||||
this.status,
|
||||
this.preSaleEnd,
|
||||
this.preSaleNotStart,
|
||||
this.jumpType,
|
||||
this.lrpriceStr,
|
||||
});
|
||||
|
||||
factory SpaceShopItem.fromJson(Map<String, dynamic> json) => SpaceShopItem(
|
||||
contentId: json['contentId'] as String?,
|
||||
contentType: json['contentType'] as int?,
|
||||
contentSubType: json['contentSubType'] as dynamic,
|
||||
trackId: json['trackId'] as dynamic,
|
||||
cover: json['cover'] == null
|
||||
? null
|
||||
: Cover.fromJson(json['cover'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['subTitle'] as dynamic,
|
||||
cardUrl: json['cardUrl'] as String?,
|
||||
belowLabels: (json['belowLabels'] as List<dynamic>?)
|
||||
?.map((e) => BelowLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
topRightLabels: json['topRightLabels'] as dynamic,
|
||||
bottomRightLabels: json['bottomRightLabels'] as dynamic,
|
||||
topLeftLabels: json['topLeftLabels'] as dynamic,
|
||||
bottomLeftLabels: json['bottomLeftLabels'] as dynamic,
|
||||
titleFrontLabels: json['titleFrontLabels'] as List<dynamic>?,
|
||||
priceBehindLabels: json['priceBehindLabels'] as dynamic,
|
||||
netPrice: json['netPrice'] == null
|
||||
? null
|
||||
: NetPrice.fromJson(json['netPrice'] as Map<String, dynamic>),
|
||||
userInteractInfos: json['userInteractInfos'] as dynamic,
|
||||
benefitInfos: (json['benefitInfos'] as List<dynamic>?)
|
||||
?.map((e) => BenefitInfo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
reportParams: json['reportParams'] == null
|
||||
? null
|
||||
: ReportParams.fromJson(json['reportParams'] as Map<String, dynamic>),
|
||||
ichibanItem: json['ichibanItem'] as dynamic,
|
||||
isMarketItem: json['isMarketItem'] as bool?,
|
||||
remainBoxStr: json['remainBoxStr'] as dynamic,
|
||||
surpriseTips: json['surpriseTips'] as dynamic,
|
||||
outSchemaUrl: json['outSchemaUrl'] as String?,
|
||||
itemCode: json['itemCode'] as int?,
|
||||
merchantId: json['merchantId'] as dynamic,
|
||||
itemSource: json['itemSource'] as int?,
|
||||
itemSourceName: json['itemSourceName'] as String?,
|
||||
sourceDesc: json['sourceDesc'] == null
|
||||
? null
|
||||
: SourceDesc.fromJson(json['sourceDesc'] as Map<String, dynamic>),
|
||||
sourceFrontTag: json['sourceFrontTag'] == null
|
||||
? null
|
||||
: SourceFrontTag.fromJson(
|
||||
json['sourceFrontTag'] as Map<String, dynamic>,
|
||||
),
|
||||
openWhiteList: (json['openWhiteList'] as List?)?.fromCast(),
|
||||
sellOut: json['sellOut'] as bool?,
|
||||
status: json['status'] as int?,
|
||||
preSaleEnd: json['preSaleEnd'] as bool?,
|
||||
preSaleNotStart: json['preSaleNotStart'] as bool?,
|
||||
jumpType: json['jumpType'] as int?,
|
||||
lrpriceStr: json['lrpriceStr'] as dynamic,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space_shop/net_price.dart
Normal file
13
lib/models_new/space/space_shop/net_price.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class NetPrice {
|
||||
String? netPrice;
|
||||
String? priceSymbol;
|
||||
String? pricePrefix;
|
||||
|
||||
NetPrice({this.netPrice, this.priceSymbol, this.pricePrefix});
|
||||
|
||||
factory NetPrice.fromJson(Map<String, dynamic> json) => NetPrice(
|
||||
netPrice: json['netPrice'] as String?,
|
||||
priceSymbol: json['priceSymbol'] as String?,
|
||||
pricePrefix: json['pricePrefix'] as String?,
|
||||
);
|
||||
}
|
||||
11
lib/models_new/space/space_shop/report_params.dart
Normal file
11
lib/models_new/space/space_shop/report_params.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
class ReportParams {
|
||||
String? trail;
|
||||
String? trackId;
|
||||
|
||||
ReportParams({this.trail, this.trackId});
|
||||
|
||||
factory ReportParams.fromJson(Map<String, dynamic> json) => ReportParams(
|
||||
trail: json['trail'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
);
|
||||
}
|
||||
44
lib/models_new/space/space_shop/source_desc.dart
Normal file
44
lib/models_new/space/space_shop/source_desc.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
class SourceDesc {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
SourceDesc({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory SourceDesc.fromJson(Map<String, dynamic> json) => SourceDesc(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
46
lib/models_new/space/space_shop/source_front_tag.dart
Normal file
46
lib/models_new/space/space_shop/source_front_tag.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
class SourceFrontTag {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
SourceFrontTag({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory SourceFrontTag.fromJson(Map<String, dynamic> json) {
|
||||
return SourceFrontTag(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user