Commit f764c0bd authored by 朱璇's avatar 朱璇

Merge branch 'test' of git.wanmeizhensuo.com:linshengyu/gm_flutter into zx/gmFlutter

parents 8c840ac6 6bb7b838
......@@ -53,7 +53,6 @@ class LevelOneState extends BaseState<LevelOnePage>
@override
void initState() {
DioUtil.getInstance().setProxy("172.30.8.245");
super.initState();
_model.plan_id = widget.planId;
_model.init(() {
......
......@@ -53,7 +53,6 @@ class LevelTwoState extends BaseState<LevelTwoPage>
@override
void initState() {
DioUtil.getInstance().setProxy("172.30.8.245");
super.initState();
_model.plan_id = widget.planId;
_model.init(() {
......
......@@ -15,6 +15,15 @@ class PlanItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
StringBuffer stringBuffer = StringBuffer();
int i = 0;
plans.baseAttrs.forEach((element) {
stringBuffer.write(element);
if (i != plans.baseAttrs.length - 1) {
stringBuffer.write("|");
}
i++;
});
return Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Container(
......@@ -95,7 +104,7 @@ class PlanItem extends StatelessWidget {
Positioned(
left: 92,
top: 36,
child: baseText("TODO", 11, Color(0xff999999)),
child: baseText("${stringBuffer.toString()}", 11, Color(0xff999999)),
)
],
),
......
......@@ -57,7 +57,6 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
void initState() {
DioUtil.getInstance().setProxy("172.30.8.245");
super.initState();
_model.init();
planBarView =
......
......@@ -43,7 +43,6 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
@override
void initState() {
DioUtil.getInstance().setProxy("172.30.8.245");
_model.rank_type = widget.rank_type;
init();
super.initState();
......
......@@ -5,9 +5,9 @@
class PlanBean {
int error;
String message;
Null extra;
Null errorCode;
Null errorExtra;
Map extra;
Map errorCode;
Map errorExtra;
Data data;
UserType userType;
......
......@@ -6,27 +6,30 @@ class PlanFeedBean {
int error;
String message;
Map extra;
Map errorCode;
Map errorExtra;
UserType userType;
Data data;
UserType userType;
PlanFeedBean(
{this.error,
this.message,
this.extra,
this.errorCode,
this.errorExtra,
this.userType,
this.data});
this.data,
this.userType});
PlanFeedBean.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
errorCode = json['error_code'];
errorExtra = json['error_extra'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
userType = json['user_type'] != null
? new UserType.fromJson(json['user_type'])
: null;
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
......@@ -34,23 +37,14 @@ class PlanFeedBean {
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
data['error_code'] = this.errorCode;
data['error_extra'] = this.errorExtra;
if (this.userType != null) {
data['user_type'] = this.userType.toJson();
}
if (this.data != null) {
data['data'] = this.data.toJson();
}
return data;
}
}
class UserType {
UserType();
UserType.fromJson(Map<String, dynamic> json) {}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.userType != null) {
data['user_type'] = this.userType.toJson();
}
return data;
}
}
......@@ -79,17 +73,19 @@ class Data {
}
class Plans {
int id;
String cardType;
String name;
String positiveRate;
String salesCount;
List<BaseAttrs> baseAttrs;
List<String> baseAttrs;
String minPrice;
String maxPrice;
String projectImage;
Plans(
{this.cardType,
{this.id,
this.cardType,
this.name,
this.positiveRate,
this.salesCount,
......@@ -99,16 +95,12 @@ class Plans {
this.projectImage});
Plans.fromJson(Map<String, dynamic> json) {
id = json['id'];
cardType = json['card_type'];
name = json['name'];
positiveRate = json['positive_rate'];
salesCount = json['sales_count'];
if (json['base_attrs'] != null) {
baseAttrs = new List<BaseAttrs>();
json['base_attrs'].forEach((v) {
baseAttrs.add(new BaseAttrs.fromJson(v));
});
}
baseAttrs = json['base_attrs'].cast<String>();
minPrice = json['min_price'];
maxPrice = json['max_price'];
projectImage = json['project_image'];
......@@ -116,13 +108,12 @@ class Plans {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['card_type'] = this.cardType;
data['name'] = this.name;
data['positive_rate'] = this.positiveRate;
data['sales_count'] = this.salesCount;
if (this.baseAttrs != null) {
data['base_attrs'] = this.baseAttrs.map((v) => v.toJson()).toList();
}
data['base_attrs'] = this.baseAttrs;
data['min_price'] = this.minPrice;
data['max_price'] = this.maxPrice;
data['project_image'] = this.projectImage;
......@@ -130,24 +121,13 @@ class Plans {
}
}
class BaseAttrs {
int attrId;
String attrName;
String attrValue;
BaseAttrs({this.attrId, this.attrName, this.attrValue});
class UserType {
UserType();
BaseAttrs.fromJson(Map<String, dynamic> json) {
attrId = json['attr_id'];
attrName = json['attr_name'];
attrValue = json['attr_value'];
}
UserType.fromJson(Map<String, dynamic> json) {}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['attr_id'] = this.attrId;
data['attr_name'] = this.attrName;
data['attr_value'] = this.attrValue;
return data;
}
}
......@@ -11,6 +11,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:gm_flutter/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart';
import 'DemoPage.dart';
import 'DemoPage1.dart';
import 'commonModel/App.dart';
import 'commonModel/base/BaseComponent.dart';
import 'commonModel/base/BaseUtil.dart';
import 'commonModel/cache/CacheManager.dart';
......@@ -94,6 +95,8 @@ class MyApp extends State<MyAppWidget> {
@override
Widget build(BuildContext context) {
WindowUtil.setBarStatus(true);
CacheManager.getInstance().get(MEMORY_CACHE).save(COOKIE,
"_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393");
return MaterialApp(
theme: ThemeData(
primaryColor: Colors.white,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment