Commit 4146105c authored by 林生雨's avatar 林生雨

W

parent 1af25d1f
...@@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart'; ...@@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'; import 'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart'; import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
class ProjectDetailsItemView extends StatelessWidget { class ProjectDetailsItemView extends StatelessWidget {
Groups listData; Groups listData;
...@@ -53,14 +54,16 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -53,14 +54,16 @@ class ProjectDetailsItemView extends StatelessWidget {
Container( Container(
margin: EdgeInsets.only(right: 25.0, left: 15, bottom: 25), margin: EdgeInsets.only(right: 25.0, left: 15, bottom: 25),
width: 78, width: 78,
child: baseText(attrs.attrName, 13, Color(0xFF999999), child: baseText(attrs.attrName.empty() ? "无" : attrs.attrName, 13,
Color(0xFF999999),
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis)), overflow: TextOverflow.ellipsis)),
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(right: 15, bottom: 25), margin: EdgeInsets.only(right: 15, bottom: 25),
child: baseText(attrs.attrValue, 14, Color(0xFF282828), child: baseText(attrs.attrValue.empty() ? "无" : attrs.attrValue,
14, Color(0xFF282828),
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis)), overflow: TextOverflow.ellipsis)),
......
...@@ -67,6 +67,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -67,6 +67,7 @@ class LevelOneItem extends StatelessWidget {
if (cards.doctor == null && isDebug) { if (cards.doctor == null && isDebug) {
throw new Exception(); throw new Exception();
} }
var price = NumPlanUtil.getPrice(cards.doctor.minPrice, cards.doctor.maxPrice);
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
...@@ -126,9 +127,15 @@ class LevelOneItem extends StatelessWidget { ...@@ -126,9 +127,15 @@ class LevelOneItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)), price == "暂无报价"
baseText("${cards.doctor.minPrice}-${cards.doctor.maxPrice}", ? Container(
15, Color(0xffFF5963)), width: 0,
height: 0,
)
: baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15,
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963),
bold: price != "暂无报价")
], ],
), ),
), ),
...@@ -186,6 +193,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -186,6 +193,7 @@ class LevelOneItem extends StatelessWidget {
if (cards.hospital == null && isDebug) { if (cards.hospital == null && isDebug) {
throw new Exception(); throw new Exception();
} }
var price = NumPlanUtil.getPrice(cards.hospital.minPrice, cards.hospital.maxPrice);
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
...@@ -232,12 +240,15 @@ class LevelOneItem extends StatelessWidget { ...@@ -232,12 +240,15 @@ class LevelOneItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)), price == "暂无报价"
baseText( ? Container(
"${cards.hospital.minPrice}-${cards.hospital.maxPrice}", width: 0,
15, height: 0,
Color(0xffFF5963), )
bold: true), : baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15,
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963),
bold: price != "暂无报价")
], ],
), ),
), ),
...@@ -354,7 +365,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -354,7 +365,7 @@ class LevelOneItem extends StatelessWidget {
top: 40, top: 40,
right: 0, right: 0,
child: baseText( child: baseText(
"指导价:${cards.plan.guide_price}", 11, Color(0xff666666)), "指导价:${cards.plan.guide_price??"暂无报价"}", 11, Color(0xff666666)),
), ),
Positioned( Positioned(
left: 0, left: 0,
......
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