|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class ReturnMoneyModel {
|
|
|
|
int? ret;
|
|
|
|
ReturnMoneySunModel? data;
|
|
|
|
String? msg;
|
|
|
|
|
|
|
|
ReturnMoneyModel({this.ret, this.data, this.msg});
|
|
|
|
|
|
|
|
ReturnMoneyModel.fromJson(Map<dynamic, dynamic> json) {
|
|
|
|
ret = json['ret'];
|
|
|
|
data = json['data'] != null
|
|
|
|
? new ReturnMoneySunModel.fromJson(json['data'])
|
|
|
|
: null;
|
|
|
|
msg = json['msg'];
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['ret'] = this.ret;
|
|
|
|
if (this.data != null) {
|
|
|
|
data['data'] = this.data!.toJson();
|
|
|
|
}
|
|
|
|
data['msg'] = this.msg;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ReturnMoneySunModel {
|
|
|
|
String? id;
|
|
|
|
String? sellerid;
|
|
|
|
String? isReturn;
|
|
|
|
ReturnJsonModel? returnJson;
|
|
|
|
String? isTogether;
|
|
|
|
TogetherJsonModel? togetherJson;
|
|
|
|
String? cdate;
|
|
|
|
|
|
|
|
ReturnMoneySunModel(
|
|
|
|
{this.id,
|
|
|
|
this.sellerid,
|
|
|
|
this.isReturn,
|
|
|
|
this.returnJson,
|
|
|
|
this.isTogether,
|
|
|
|
this.togetherJson,
|
|
|
|
this.cdate});
|
|
|
|
|
|
|
|
ReturnMoneySunModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
sellerid = json['sellerid'];
|
|
|
|
isReturn = json['is_return'];
|
|
|
|
|
|
|
|
if (json['return_json'] != null && json['return_json'] != '') {
|
|
|
|
if (json['return_json'] is Map) {
|
|
|
|
returnJson = new ReturnJsonModel.fromJson(json['return_json']);
|
|
|
|
} else {
|
|
|
|
returnJson =
|
|
|
|
new ReturnJsonModel.fromJson(jsonDecode(json['return_json']));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
isTogether = json['is_together'];
|
|
|
|
|
|
|
|
class LadderReturnMoneyModel {
|
|
|
|
/*
|
|
|
|
{
|
|
|
|
"price": "100",
|
|
|
|
"coupons": [
|
|
|
|
{
|
|
|
|
"id": "997",
|
|
|
|
"name": "免费券15"
|
|
|
|
if (json['together_json'] != null && json['together_json'] != '') {
|
|
|
|
if (json['together_json'] is Map) {
|
|
|
|
togetherJson = new TogetherJsonModel.fromJson(json['together_json']);
|
|
|
|
} else {
|
|
|
|
togetherJson =
|
|
|
|
new TogetherJsonModel.fromJson(jsonDecode(json['together_json']));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
cdate = json['cdate'];
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['id'] = this.id;
|
|
|
|
data['sellerid'] = this.sellerid;
|
|
|
|
data['is_return'] = this.isReturn;
|
|
|
|
data['return_json'] = this.returnJson;
|
|
|
|
data['is_together'] = this.isTogether;
|
|
|
|
data['together_json'] = this.togetherJson;
|
|
|
|
data['cdate'] = this.cdate;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ReturnJsonModel {
|
|
|
|
String? isRatio;
|
|
|
|
String? ratioData;
|
|
|
|
List<LadderData>? ladderData;
|
|
|
|
String? stime;
|
|
|
|
String? etime;
|
|
|
|
|
|
|
|
ReturnJsonModel(
|
|
|
|
{this.isRatio, this.ratioData, this.ladderData, this.stime, this.etime});
|
|
|
|
|
|
|
|
ReturnJsonModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
isRatio = json['is_ratio'];
|
|
|
|
ratioData = json['ratio_data'];
|
|
|
|
if (json['ladder_data'] != null) {
|
|
|
|
ladderData = <LadderData>[];
|
|
|
|
|
|
|
|
if (json['ladder_data'] is List) {
|
|
|
|
json['ladder_data'].forEach((v) {
|
|
|
|
ladderData!.add(new LadderData.fromJson(v));
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
jsonDecode(json['ladder_data']).forEach((v) {
|
|
|
|
ladderData!.add(new LadderData.fromJson(v));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stime = json['stime'];
|
|
|
|
etime = json['etime'];
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['is_ratio'] = this.isRatio;
|
|
|
|
data['ratio_data'] = this.ratioData;
|
|
|
|
if (this.ladderData != null) {
|
|
|
|
data['ladder_data'] = this.ladderData!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
data['stime'] = this.stime;
|
|
|
|
data['etime'] = this.etime;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class LadderData {
|
|
|
|
String? givePrice;
|
|
|
|
TextEditingController givePriceC = TextEditingController();
|
|
|
|
String? backPrice;
|
|
|
|
|
|
|
|
TextEditingController givePriceC = TextEditingController();
|
|
|
|
TextEditingController backPriceC = TextEditingController();
|
|
|
|
|
|
|
|
LadderReturnMoneyModel({
|
|
|
|
this.givePrice,
|
|
|
|
this.backPrice,
|
|
|
|
});
|
|
|
|
LadderReturnMoneyModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
givePrice = json['give_price']?.toString();
|
|
|
|
givePriceC.text = givePrice ?? '';
|
|
|
|
givePrice = json['back_price']?.toString();
|
|
|
|
LadderData({this.givePrice, this.backPrice});
|
|
|
|
|
|
|
|
LadderData.fromJson(Map<String, dynamic> json) {
|
|
|
|
givePrice = json['give_price'];
|
|
|
|
backPrice = json['back_price'];
|
|
|
|
givePriceC.text = givePrice ?? '';
|
|
|
|
backPriceC.text = backPrice ?? '';
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['give_price'] = this.givePrice;
|
|
|
|
data['back_price'] = this.backPrice;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class TogetherJsonModel {
|
|
|
|
String? isCoexist;
|
|
|
|
String? ratioData;
|
|
|
|
|
|
|
|
TogetherJsonModel({
|
|
|
|
this.isCoexist,
|
|
|
|
this.ratioData,
|
|
|
|
});
|
|
|
|
|
|
|
|
TogetherJsonModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
isCoexist = json['is_coexist'];
|
|
|
|
ratioData = json['ratio_data'];
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final data = <String, dynamic>{};
|
|
|
|
data['give_price'] = givePrice;
|
|
|
|
data['back_price'] = backPrice;
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['is_coexist'] = this.isCoexist;
|
|
|
|
data['ratio_data'] = this.ratioData;
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|