Commit 6e6f686e authored by 林生雨's avatar 林生雨

w

parent 376e160a
......@@ -38,7 +38,6 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
@override
void initState() {
// DioUtil.getInstance().setProxy("172.30.9.128");
super.initState();
_model.init(widget._planIds);
}
......@@ -471,7 +470,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
flex: 1,
child: baseText(left.empty() ? "暂无" : left, 12,
isName ? Color(0xff666666) : Color(0xff3FB5AF),
bold: isName ? false : true, maxLines: 100, isWarp: true, textAlign: TextAlign.end),
bold: isName ? false : true,
maxLines: 100,
isWarp: true,
textAlign: TextAlign.end),
),
Container(
width: 40,
......
......@@ -64,7 +64,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(() {
......@@ -255,9 +254,7 @@ class LevelOneState extends BaseState<LevelOnePage>
List<Widget> getTabs() {
List<Widget> list = [];
for (int i = 0; i < _model.tabsList.length; i++) {
list.add(baseTabBarItem(_model.tabsList[i].name,
leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabsList.length - 1 ? 21.5 : 14));
list.add(baseTabBarItem(_model.tabsList[i].name));
}
return list;
}
......@@ -441,32 +438,29 @@ class LevelOneState extends BaseState<LevelOnePage>
));
if (_model.planoverItem != null) {
_model.planoverItem.explanationAttrs.forEach((element) {
List<Widget> textList = [];
if (element.attrName.length < 4) {
for (int i = 0; i < element.attrName.length; i++) {
textList.add(baseText(
element.attrName.substring(i, i + 1), 13, Color(0xff999999)));
if (i < element.attrName.length - 1) {
textList.add(Expanded(
child: Container(),
));
}
}
}
list.add(Container(
margin: EdgeInsets.only(bottom: 10),
child: Row(
children: <Widget>[
Container(
width: 55,
// constraints: BoxConstraints(
// maxWidth: 55,
// minWidth: 50
// ),
child: Text(
element.attrName.length == 2
? "${element.attrName.substring(0, 1)} ${element.attrName.substring(1, 2)}"
: element.attrName,
textScaleFactor: 1.0,
softWrap: true,
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.start,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 13,
color: Color(0xff999999),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
)),
width: 52,
child: element.attrName.length < 4
? Row(
children: textList,
)
: baseText(element.attrName, 13, Color(0xff999999))),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 12),
......@@ -482,8 +476,6 @@ class LevelOneState extends BaseState<LevelOnePage>
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
),
// baseText(element.attrValue, 13, Color(0xff666666)
// ),
),
)
],
......@@ -522,7 +514,7 @@ class LevelOneState extends BaseState<LevelOnePage>
.jumpPage(context, "level_one_plan_compare", map, false);
},
child: Container(
margin: EdgeInsets.only(left: 21),
margin: EdgeInsets.only(left: 21, right: 20),
width: 30,
child: Column(
mainAxisSize: MainAxisSize.min,
......@@ -541,12 +533,12 @@ class LevelOneState extends BaseState<LevelOnePage>
),
),
Expanded(
child: Container(),
),
GestureDetector(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
......@@ -559,18 +551,23 @@ class LevelOneState extends BaseState<LevelOnePage>
..show(context);
},
child: Container(
width: ScreenUtil().setWidth(137),
height: 40,
decoration: BoxDecoration(
color: Color(0xff51CDC7),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("咨询", 14, Colors.white, bold: true),
)),
GestureDetector(
))),
Container(
width: 15,
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
......@@ -582,15 +579,16 @@ class LevelOneState extends BaseState<LevelOnePage>
context, widget.PAGE_NAME, "${widget.planId}", "", "");
},
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
width: ScreenUtil().setWidth(137),
height: 40,
decoration: BoxDecoration(
color: Color(0xffF96079),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("获取底价", 14, Colors.white, bold: true),
)),
))),
Container(
width: 15,
)
],
),
);
......
......@@ -3,7 +3,6 @@
* @date 2020/6/29
**/
import 'dart:async';
import 'dart:math';
import 'dart:ui';
import 'package:cached_network_image/cached_network_image.dart';
......@@ -25,7 +24,6 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/cache/CacheManager.dart';
import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart';
import 'package:gm_flutter/commonModel/net/DioUtil.dart';
import 'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart';
import 'package:gm_flutter/main.mark.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
......@@ -58,7 +56,6 @@ class LevelTwoState extends BaseState<LevelTwoPage>
@override
void initState() {
// DioUtil.getInstance().setProxy('172.30.9.253');
super.initState();
_model.plan_id = widget.planId;
_model.init(() {
......@@ -255,9 +252,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List<Widget> getTabs() {
List<Widget> list = [];
for (int i = 0; i < _model.tabsList.length; i++) {
list.add(baseTabBarItem(_model.tabsList[i].name,
leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabsList.length - 1 ? 21.5 : 14));
list.add(baseTabBarItem(_model.tabsList[i].name));
}
return list;
}
......@@ -384,7 +379,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List<Widget> list = [];
list.add(Row(
children: <Widget>[
baseText("项目说明", 15, Color(0xff282828),bold: true),
baseText("项目说明", 15, Color(0xff282828), bold: true),
Expanded(
child: Container(),
),
......@@ -409,27 +404,29 @@ class LevelTwoState extends BaseState<LevelTwoPage>
));
if (_model.planoverItem != null) {
_model.planoverItem.explanationAttrs.forEach((element) {
List<Widget> textList = [];
if (element.attrName.length < 4) {
for (int i = 0; i < element.attrName.length; i++) {
textList.add(baseText(
element.attrName.substring(i, i + 1), 13, Color(0xff999999)));
if (i < element.attrName.length - 1) {
textList.add(Expanded(
child: Container(),
));
}
}
}
list.add(Container(
margin: EdgeInsets.only(bottom: 10),
child: Row(
children: <Widget>[
Container(
width: 55,
child: Text(
element.attrName.length == 2
? "${element.attrName.substring(0, 1)} ${element.attrName.substring(1, 2)}"
: element.attrName,
textScaleFactor: 1.0,
softWrap: true,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 13,
color: Color(0xff999999),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
)),
width: 52,
child: element.attrName.length < 4
? Row(
children: textList,
)
: baseText(element.attrName, 13, Color(0xff999999))),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 12),
......@@ -486,7 +483,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
.jumpPage(context, "level_two_plan_compare", map, false);
},
child: Container(
margin: EdgeInsets.only(left: 21),
margin: EdgeInsets.only(left: 21, right: 20),
width: 30,
child: Column(
mainAxisSize: MainAxisSize.min,
......@@ -504,10 +501,13 @@ class LevelTwoState extends BaseState<LevelTwoPage>
),
),
),
GestureDetector(
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
......@@ -520,8 +520,6 @@ class LevelTwoState extends BaseState<LevelTwoPage>
..show(context);
},
child: Container(
width: ScreenUtil().setWidth(137),
margin: EdgeInsets.only(left: 20),
height: 40,
decoration: BoxDecoration(
color: Color(0xff51CDC7),
......@@ -529,13 +527,17 @@ class LevelTwoState extends BaseState<LevelTwoPage>
alignment: Alignment.center,
child: baseText("咨询", 14, Colors.white, bold: true),
)),
Expanded(
child: Container(),
),
GestureDetector(
Container(
width: 15,
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
......@@ -547,15 +549,16 @@ class LevelTwoState extends BaseState<LevelTwoPage>
context, widget.PAGE_NAME, "${widget.planId}", "", "");
},
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
width: ScreenUtil().setWidth(137),
height: 40,
decoration: BoxDecoration(
color: Color(0xffF96079),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("获取底价", 14, Colors.white, bold: true),
)),
))),
Container(
width: 15,
),
],
),
);
......
......@@ -101,7 +101,8 @@ class PlanModel extends BaseModel {
PlanModelInstance.getInstance().max_price = max_price;
low = 0;
projectSelectIndex = 0;
PlanModelInstance.getInstance().projectSelectIndex = projectSelectIndex;
PlanModelInstance.getInstance().projectSelectIndex =
projectSelectIndex;
high = 20100;
sortPos = 0;
picLive.notifyView(event.data.ranks);
......@@ -114,8 +115,10 @@ class PlanModel extends BaseModel {
PlanModelInstance.getInstance().high = high;
PlanModelInstance.getInstance().sortPos = sortPos;
if (call != null) {
SimpleEventBus.instance().notifyListener("FilterViewState", "reset");
SimpleEventBus.instance().notifyListener("ProjectViewState", "reset");
SimpleEventBus.instance()
.notifyListener("FilterViewState", "reset");
SimpleEventBus.instance()
.notifyListener("ProjectViewState", "reset");
call();
}
refreshFeed(true, needCache: needCache);
......@@ -182,6 +185,19 @@ class PlanModel extends BaseModel {
feedsLive.notifyView(Pair(ENDLOADING, []));
}
} else {
//去重复
event.data.plans.forEach((element) {
bool haveIt = false;
for (int i = 0; i < feedDatas.length; i++) {
if (feedDatas[i].id == element.id) {
haveIt = true;
break;
}
}
if (!haveIt) {
feedDatas.add(element);
}
});
feedDatas.addAll(event.data.plans);
feedsLive.notifyView(Pair(ENDLOADING, feedDatas));
}
......
......@@ -64,7 +64,6 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
void initState() {
print("LSY PLAN INIT ");
// DioUtil.getInstance().setProxy("172.30.9.128");
_model.init(needCache: true);
super.initState();
planBarView =
......
......@@ -44,8 +44,19 @@ class TopListModel extends BaseModel {
datasLive.notifyView([]);
}
} else {
event.data.plans.forEach((element) {
bool haveIt = false;
for (int i = 0; i < datas.length; i++) {
if (datas[i].id == element.id) {
haveIt = true;
break;
}
}
if (!haveIt) {
datas.add(element);
}
});
stateLive.notifyView(ENDLOADING);
datas.addAll(event.data.plans);
datasLive.notifyView(datas);
}
} else {
......
......@@ -49,7 +49,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();
......@@ -200,7 +199,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
for (int i = 0; i < _model.tabs.length; i++) {
list.add(baseTabBarItem(_model.tabs[i].name,
leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabs.length - 1 ? 21.5 : 14));
rightPadding: i == _model.tabs.length - 1 ? 21.5 : 14,
isScroll: true));
}
return list;
}
......
......@@ -457,10 +457,14 @@ Widget baseTabBar(
}
Widget baseTabBarItem(String text,
{double leftPadding, double rightPadding, double wantWidth}) {
{double leftPadding,
double rightPadding,
double wantWidth,
bool isScroll = false}) {
leftPadding = leftPadding ?? 14.0;
rightPadding = rightPadding ?? 14.0;
return Row(
return isScroll
? Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
......@@ -473,6 +477,11 @@ Widget baseTabBarItem(String text,
width: rightPadding,
)
],
)
: Center(
child: Tab(
text: text,
),
);
// Container(
// height: 40.0,
......
......@@ -13,7 +13,7 @@ import 'DioUtil.dart';
/**
* 生产环境
*/
const String APP_HOST_RELEASE = "http://backend.paas-merchant.env";
const String APP_HOST_RELEASE = "https://backend.igengmei.com";
/**
* 测试环境
*/
......@@ -26,7 +26,7 @@ const String APP_HOST_DEBUG = "http://backend.paas-merchant.env";
/**
* 开发环境
*/
const String APP_HOST_DEV = "https://x6cgr5y5-gengmei.mock.coding.io";
const String APP_HOST_DEV = "https://backend.igengmei.com";
class Api {
static String BUILD_CONFIG;
......
......@@ -18,6 +18,6 @@ flutter build aar --release --target-platform android-arm
#rm -rf /Users/apple/lsy/gengmei_android/gm-flutter/libs/flutterApp.aar
#cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/zcc/Downloads/gm-flutter/libs/flutterApp.aar
cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/apple/lsy/gengmei_android/libs/flutterApp.aar
cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/apple/lsy/gengmei_android/gm-flutter/libs/flutterApp.aar
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