This commit is contained in:
cxc
2022-06-27 09:51:30 +08:00
commit 8cb96b4c5e
101 changed files with 11110 additions and 0 deletions

21
lib/models/et_date.dart Normal file
View File

@ -0,0 +1,21 @@
class EtDate {
int cYear;
int cMonth;
int cDay;
int lYear;
int lMonth;
int lDay;
int hour;
int minute;
EtDate({this.cYear, this.cMonth, this.cDay, this.lYear, this.lMonth, this.lDay, this.hour, this.minute});
getSolar() {
return "$cYear年$cMonth月$cDay日$hour时$minute分";
}
getLunar() {
return "$lYear年$lMonth月$lDay日$hour时$minute分";
}
}

View File

@ -0,0 +1,13 @@
class LoginBean {
String token = "";
LoginBean.fromMap(Map<String, dynamic> map) {
token = map["token"];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> map = <String, dynamic>{};
map["token"] = token;
return map;
}
}

50
lib/models/qimen.dart Normal file
View File

@ -0,0 +1,50 @@
import 'package:fengshui_compass/models/qimen_result.dart';
class Qimen {
String jieqi;
String dunju;
String zhifu;
String zhishi;
String bazi;
List<String> kong;
List<QimenResult> qimenResult;
Qimen(
{this.jieqi,
this.dunju,
this.zhifu,
this.zhishi,
this.bazi,
this.kong,
this.qimenResult});
Qimen.fromJson(Map<String, dynamic> json) {
jieqi = json['jieqi'];
dunju = json['dunju'];
zhifu = json['zhifu'];
zhishi = json['zhishi'];
bazi = json['bazi'];
kong = json['kong'].cast<String>();
if (json['qimenResult'] != null) {
qimenResult = [];
json['qimenResult'].forEach((v) {
qimenResult.add(QimenResult.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['jieqi'] = jieqi;
data['dunju'] = dunju;
data['zhifu'] = zhifu;
data['zhishi'] = zhishi;
data['bazi'] = bazi;
data['kong'] = kong;
if (this.qimenResult != null) {
data['qimenResult'] = qimenResult.map((v) => v.toJson()).toList();
}
return data;
}
}

View File

@ -0,0 +1,28 @@
// 计算天、地、星、神、门 五盘
class QimenResult {
String sky;
String earth;
String star;
String gate;
String god;
QimenResult({this.sky, this.earth, this.star, this.gate, this.god});
QimenResult.fromJson(Map<String, dynamic> json) {
sky = json['sky'];
earth = json['earth'];
star = json['star'];
gate = json['gate'];
god = json['god'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['sky'] = sky;
data['earth'] = earth;
data['star'] = star;
data['gate'] = gate;
data['god'] = god;
return data;
}
}

13
lib/models/user_bean.dart Normal file
View File

@ -0,0 +1,13 @@
class UserBean {
String userName = "";
UserBean.fromMap(Map<String, dynamic> map) {
userName = map["userName"];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> map = <String, dynamic>{};
map["userName"] = userName;
return map;
}
}