Commit e1275790 authored by 林生雨's avatar 林生雨

w

parent d5f93445
......@@ -236,6 +236,16 @@ class LevelOneItem extends StatelessWidget {
if (cards.plan == null && isDebug) {
throw new Exception();
}
String price;
if (cards.plan.minPrice.empty() && cards.plan.maxPrice.empty()) {
price = "暂无报价";
} else if (cards.plan.minPrice.empty() && !cards.plan.maxPrice.empty()) {
price = "${cards.plan.maxPrice}";
} else if (!cards.plan.minPrice.empty() && cards.plan.maxPrice.empty()) {
price = "${cards.plan.minPrice}";
} else {
price = "${cards.plan.minPrice}-${cards.plan.maxPrice}";
}
return Container(
height: 118,
margin: EdgeInsets.only(left: 15, right: 15),
......@@ -254,8 +264,14 @@ class LevelOneItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)),
baseText(cards.plan.maxPrice, 15, Color(0xffFF5963))
price == "暂无报价"
? Container(
width: 0,
height: 0,
)
: baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15,
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963))
],
),
),
......@@ -274,9 +290,7 @@ class LevelOneItem extends StatelessWidget {
top: 40,
right: 0,
child: baseText(
"指导价:¥${cards.plan.minPrice}-${cards.plan.maxPrice}",
11,
Color(0xff666666)),
"指导价:${cards.plan.guide_price}", 11, Color(0xff666666)),
),
Positioned(
left: 0,
......
......@@ -29,7 +29,7 @@ class FilterView extends StatelessWidget {
width: MediaQuery.of(context).size.width,
child: PlanProgressBar(
0,
5000,
19600,
0,
20010,
call,
......
......@@ -43,8 +43,8 @@ class PlanModel extends BaseModel {
String tag_id = "0";
String order_by = "";
String current_city_id = "";
String min_price = "";
String max_price = "";
String min_price = "0";
String max_price = "100000000";
String rank_type = "";
List<String> normalData = ["全部项目", "智能筛选", "筛选"];
......
......@@ -243,9 +243,6 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
);
},
),
baseSliverBack((){
Navigator.pop(context);
}),
],
),
);
......
......@@ -129,6 +129,7 @@ class Plan {
String projectImage;
String consultType;
String messageUrl;
String guide_price;
Plan(
{this.planName,
......@@ -147,6 +148,7 @@ class Plan {
minPrice = json['min_price'];
maxPrice = json['max_price'];
positiveRate = json['positive_rate'];
guide_price = json['guide_price'];
salesCount = json['sales_count'];
if (json['base_attrs'] != null) {
baseAttrs = new List<BaseAttrs>();
......@@ -163,6 +165,7 @@ class Plan {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['plan_name'] = this.planName;
data['min_price'] = this.minPrice;
data['guide_price'] = this.guide_price;
data['max_price'] = this.maxPrice;
data['plan_id'] = this.plan_id;
data['positive_rate'] = this.positiveRate;
......
......@@ -71,8 +71,7 @@ class MainManager {
innerSetData(map, USER_ID);
innerSetData(map, USER_AGENT);
innerSetData(map, BASE_URL);
DioUtil.setDefOptions(baseUrl: "${map[BASE_URL]}/", agent: map[USER_AGENT]);
// innerSetData(map, BASE_URL);
// if (map[COOKIE] == null) {
// CacheManager.getInstance().get(MEMORY_CACHE).save(COOKIE,
// "_gm_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393");
......@@ -88,7 +87,11 @@ class MainManager {
print(
"LSY QQWWEERRTTYY ${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE)}"
" ${CacheManager.getInstance().get(MEMORY_CACHE).get(COOKIE) is String}");
if (map[BASE_URL] != null) {
DioUtil.setDefOptions(
baseUrl: "${map[BASE_URL]}/", agent: map[USER_AGENT]);
DioUtil.getInstance().changeOpt();
}
// SimpleEventBus.instance().notifyListener("PlanPage!initState", "");
}
......
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