Browse Source

1、消息中心的公共跳转

2、热榜适配的修复
3、我的人脉搜索按钮的修改
tags/0.0.1
PH2 4 years ago
parent
commit
99e75fee4e
4 changed files with 146 additions and 112 deletions
  1. +7
    -7
      lib/pages/message_notice_page/message_notice_page.dart
  2. +87
    -56
      lib/pages/message_notice_page/model/message_notice_style_model.dart
  3. +49
    -48
      lib/widgets/hot_ranking/hot_ranking_goods/hot_ranking_goods.dart
  4. +3
    -1
      lib/widgets/team/input/team_input_widget.dart

+ 7
- 7
lib/pages/message_notice_page/message_notice_page.dart View File

@@ -57,8 +57,8 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
} }


/// TODO 需要实现 子widget点击事件,公共跳转 /// TODO 需要实现 子widget点击事件,公共跳转
void _onItemClick(){
void _onItemClick(SkipModel model){
RouterUtil.route(model, model.toJson(), context);
} }


@override @override
@@ -276,7 +276,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
/// 官方通知样式 /// 官方通知样式
Widget _buildOfficialNoticeStyleWidget(OfficialNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) { Widget _buildOfficialNoticeStyleWidget(OfficialNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) {
return GestureDetector( return GestureDetector(
onTap: ()=> _onItemClick(),
onTap: ()=> _onItemClick(styleModel),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10), padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10),
@@ -333,7 +333,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
/// 官方活动样式 /// 官方活动样式
Widget _buildOfficialActivitiesStyleWidget(OfficialActivityStyle styleModel, MessageNoticeDataItemModel dataModel) { Widget _buildOfficialActivitiesStyleWidget(OfficialActivityStyle styleModel, MessageNoticeDataItemModel dataModel) {
return GestureDetector( return GestureDetector(
onTap: ()=> _onItemClick(),
onTap: ()=> _onItemClick(styleModel),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10), padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10),
@@ -380,7 +380,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
/// 交易通知样式 /// 交易通知样式
Widget _buildTradeNoticeStyleWidget(TransactionNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) { Widget _buildTradeNoticeStyleWidget(TransactionNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) {
return GestureDetector( return GestureDetector(
onTap: ()=> _onItemClick(),
onTap: ()=> _onItemClick(styleModel),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10), padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10),
@@ -426,7 +426,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
/// 推广通知样式 /// 推广通知样式
Widget _buildPromoteNoticeStyleWidget(PromotionNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) { Widget _buildPromoteNoticeStyleWidget(PromotionNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) {
return GestureDetector( return GestureDetector(
onTap: ()=> _onItemClick(),
onTap: ()=> _onItemClick(styleModel),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10), padding: const EdgeInsets.only(left: 15, right: 15, top: 12.5, bottom: 10),
@@ -480,7 +480,7 @@ class __MessageNoticePageContainerState extends State<_MessageNoticePageContaine
/// 反馈通知样式 /// 反馈通知样式
Widget _buildFeedbackNoticeStyleWidget(FeedbackNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) { Widget _buildFeedbackNoticeStyleWidget(FeedbackNotificationStyle styleModel, MessageNoticeDataItemModel dataModel) {
return GestureDetector( return GestureDetector(
onTap: ()=> _onItemClick(),
onTap: ()=> _onItemClick(styleModel),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
padding: const EdgeInsets.only(left: 15, right: 15, top: 14, bottom: 10), padding: const EdgeInsets.only(left: 15, right: 15, top: 14, bottom: 10),


+ 87
- 56
lib/pages/message_notice_page/model/message_notice_style_model.dart View File

@@ -1,3 +1,6 @@
import 'package:zhiying_base_widget/dialog/global_dialog/intellect_search_goods_dialog/model/no_goods_dialog_style_model.dart';
import 'package:zhiying_comm/models/base/skip_model.dart';

class MessageNoticeStyleModel { class MessageNoticeStyleModel {
bool isFist; bool isFist;
String styleType; String styleType;
@@ -78,7 +81,7 @@ class MessageNoticeStyleModel {
} }
} }


class FeedbackNotificationStyle {
class FeedbackNotificationStyle extends SkipModel {
String bg_color; String bg_color;
String icon; String icon;
String message_value_color; String message_value_color;
@@ -95,19 +98,29 @@ class FeedbackNotificationStyle {
this.title_value_color, this.title_value_color,
}); });


factory FeedbackNotificationStyle.fromJson(Map<String, dynamic> json) {
return FeedbackNotificationStyle(
bg_color: json['bg_color'],
icon: json['icon'],
message_value_color: json['message_value_color'],
skip_identifier: json['skip_identifier'],
time_color: json['time_color'],
title_value_color: json['title_value_color'],
);
// factory FeedbackNotificationStyle.fromJson(Map<String, dynamic> json) {
// return FeedbackNotificationStyle(
// bg_color: json['bg_color'],
// icon: json['icon'],
// message_value_color: json['message_value_color'],
// skip_identifier: json['skip_identifier'],
// time_color: json['time_color'],
// title_value_color: json['title_value_color'],
// );
// }

FeedbackNotificationStyle.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
bg_color = json['bg_color'];
icon = json['icon'];
message_value_color = json['message_value_color'];
skip_identifier = json['skip_identifier'];
time_color = json['time_color'];
title_value_color = json['title_value_color'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final Map<String, dynamic> data = super.toJson();
data['bg_color'] = this.bg_color; data['bg_color'] = this.bg_color;
data['icon'] = this.icon; data['icon'] = this.icon;
data['message_value_color'] = this.message_value_color; data['message_value_color'] = this.message_value_color;
@@ -144,7 +157,7 @@ class MainNotificationStyle {
} }
} }


class MainNotificationStyleItem {
class MainNotificationStyleItem extends SkipModel {
String bg_color; String bg_color;
String icon; String icon;
String name; String name;
@@ -188,7 +201,7 @@ class MainNotificationStyleItem {
} }
} }


class OfficialActivityStyle {
class OfficialActivityStyle extends SkipModel {
String bg_color; String bg_color;
String message_value_color; String message_value_color;
String skip_identifier; String skip_identifier;
@@ -203,18 +216,17 @@ class OfficialActivityStyle {
this.title_value_color, this.title_value_color,
}); });


factory OfficialActivityStyle.fromJson(Map<String, dynamic> json) {
return OfficialActivityStyle(
bg_color: json['bg_color'],
message_value_color: json['message_value_color'],
skip_identifier: json['skip_identifier'],
time_color: json['time_color'],
title_value_color: json['title_value_color'],
);
OfficialActivityStyle.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
bg_color = json['bg_color'];
message_value_color = json['message_value_color'];
skip_identifier = json['skip_identifier'];
time_color = json['time_color'];
title_value_color = json['title_value_color'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final Map<String, dynamic> data = super.toJson();
data['bg_color'] = this.bg_color; data['bg_color'] = this.bg_color;
data['message_value_color'] = this.message_value_color; data['message_value_color'] = this.message_value_color;
data['skip_identifier'] = this.skip_identifier; data['skip_identifier'] = this.skip_identifier;
@@ -224,7 +236,7 @@ class OfficialActivityStyle {
} }
} }


class OfficialNotificationStyle {
class OfficialNotificationStyle extends SkipModel {
String bg_color; String bg_color;
String icon; String icon;
String message_value_color; String message_value_color;
@@ -241,19 +253,18 @@ class OfficialNotificationStyle {
this.title_value_color, this.title_value_color,
}); });


factory OfficialNotificationStyle.fromJson(Map<String, dynamic> json) {
return OfficialNotificationStyle(
bg_color: json['bg_color'],
icon: json['icon'],
message_value_color: json['message_value_color'],
skip_identifier: json['skip_identifier'],
time_color: json['time_color'],
title_value_color: json['title_value_color'],
);
OfficialNotificationStyle.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
bg_color = json['bg_color'];
icon = json['icon'];
message_value_color = json['message_value_color'];
skip_identifier = json['skip_identifier'];
time_color = json['time_color'];
title_value_color = json['title_value_color'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final Map<String, dynamic> data = super.toJson();
data['bg_color'] = this.bg_color; data['bg_color'] = this.bg_color;
data['icon'] = this.icon; data['icon'] = this.icon;
data['message_value_color'] = this.message_value_color; data['message_value_color'] = this.message_value_color;
@@ -264,7 +275,7 @@ class OfficialNotificationStyle {
} }
} }


class PromotionNotificationStyle {
class PromotionNotificationStyle extends SkipModel {
String bg_color; String bg_color;
String icon; String icon;
String message_value_color; String message_value_color;
@@ -281,19 +292,28 @@ class PromotionNotificationStyle {
this.title_value_color, this.title_value_color,
}); });


factory PromotionNotificationStyle.fromJson(Map<String, dynamic> json) {
return PromotionNotificationStyle(
bg_color: json['bg_color'],
icon: json['icon'],
message_value_color: json['message_value_color'],
skip_identifier: json['skip_identifier'],
time_color: json['time_color'],
title_value_color: json['title_value_color'],
);
// factory PromotionNotificationStyle.fromJson(Map<String, dynamic> json) {
// return PromotionNotificationStyle(
// bg_color: json['bg_color'],
// icon: json['icon'],
// message_value_color: json['message_value_color'],
// skip_identifier: json['skip_identifier'],
// time_color: json['time_color'],
// title_value_color: json['title_value_color'],
// );
// }
PromotionNotificationStyle.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
bg_color = json['bg_color'];
icon = json['icon'];
message_value_color = json['message_value_color'];
skip_identifier = json['skip_identifier'];
time_color = json['time_color'];
title_value_color = json['title_value_color'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final Map<String, dynamic> data = super.toJson();
data['bg_color'] = this.bg_color; data['bg_color'] = this.bg_color;
data['icon'] = this.icon; data['icon'] = this.icon;
data['message_value_color'] = this.message_value_color; data['message_value_color'] = this.message_value_color;
@@ -304,7 +324,7 @@ class PromotionNotificationStyle {
} }
} }


class TransactionNotificationStyle {
class TransactionNotificationStyle extends SkipModel {
String bg_color; String bg_color;
String earnings; String earnings;
String icon; String icon;
@@ -323,20 +343,31 @@ class TransactionNotificationStyle {
this.title_value_color, this.title_value_color,
}); });


factory TransactionNotificationStyle.fromJson(Map<String, dynamic> json) {
return TransactionNotificationStyle(
bg_color: json['bg_color'],
earnings: json['earnings'],
icon: json['icon'],
message_value_color: json['message_value_color'],
skip_identifier: json['skip_identifier'],
time_color: json['time_color'],
title_value_color: json['title_value_color'],
);
// factory TransactionNotificationStyle.fromJson(Map<String, dynamic> json) {
// return TransactionNotificationStyle(
// bg_color: json['bg_color'],
// earnings: json['earnings'],
// icon: json['icon'],
// message_value_color: json['message_value_color'],
// skip_identifier: json['skip_identifier'],
// time_color: json['time_color'],
// title_value_color: json['title_value_color'],
// );
// }

TransactionNotificationStyle.fromJson(Map<String, dynamic> json) {
super.fromJson(json);
bg_color = json['bg_color'];
earnings = json['earnings'];
icon = json['icon'];
message_value_color = json['message_value_color'];
skip_identifier = json['skip_identifier'];
time_color = json['time_color'];
title_value_color = json['title_value_color'];
} }


Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
final Map<String, dynamic> data = super.toJson();
data['bg_color'] = this.bg_color; data['bg_color'] = this.bg_color;
data['earnings'] = this.earnings; data['earnings'] = this.earnings;
data['icon'] = this.icon; data['icon'] = this.icon;


+ 49
- 48
lib/widgets/hot_ranking/hot_ranking_goods/hot_ranking_goods.dart View File

@@ -40,6 +40,7 @@ class HotRankingGoods extends StatelessWidget {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
/// 商品图片
Container( Container(
width: 254.w, width: 254.w,
height: 254.w, height: 254.w,
@@ -52,59 +53,55 @@ class HotRankingGoods extends StatelessWidget {
decoration: decoration:
BoxDecoration(borderRadius: BorderRadius.circular(6)), BoxDecoration(borderRadius: BorderRadius.circular(6)),
), ),
/// 商品图片右边视图
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left: 20.w), margin: EdgeInsets.only(left: 20.w),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
// mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Container(
height: 70.h,
child: Row(
children: <Widget>[
Expanded(
child: RichText(
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
maxLines: 2,
text: TextSpan(children: <InlineSpan>[
WidgetSpan(
alignment:
ui.PlaceholderAlignment.middle,
child: Container(
padding: EdgeInsets.only(
left: 4.w,
right: 4.w,
top: 1,
bottom: 1),
decoration: BoxDecoration(
color: HexColor.fromHex(
providers.providerBgColor),
borderRadius:
BorderRadius.circular(2.5)),
child: Text(
good.providerName ?? "",
style: TextStyle(
color: HexColor.fromHex(
providers.providerNameColor,
),
fontSize: 18.sp),
),
)),
WidgetSpan(
child: SizedBox(
width: 4.h,
)),
TextSpan(
text: good.goodTitle,
style: TextStyle(
color: HexColor.fromHex(
styleModel.titleColor ?? ""),
fontSize: 30.sp))
])))
],
),
),
/// 商品标题
RichText(
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
maxLines: 2,
text: TextSpan(children: <InlineSpan>[
WidgetSpan(
alignment: ui.PlaceholderAlignment.middle,
child: Container(
padding: EdgeInsets.only(
left: 4.w,
right: 4.w,
top: 1,
bottom: 1),
decoration: BoxDecoration(
color: HexColor.fromHex(
providers.providerBgColor),
borderRadius:
BorderRadius.circular(2.5)),
child: Text(
good.providerName ?? "",
style: TextStyle(
color: HexColor.fromHex(
providers.providerNameColor,
),
fontSize: 18.sp),
),
)),
WidgetSpan(
child: SizedBox(
width: 4.h,
)),
TextSpan(
text: good.goodTitle,
style: TextStyle(
color: HexColor.fromHex(
styleModel.titleColor ?? ""),
fontSize: 30.sp))
])),

/// 优惠券
Row( Row(
children: <Widget>[ children: <Widget>[
good.coupon == "" good.coupon == ""
@@ -170,6 +167,8 @@ class HotRankingGoods extends StatelessWidget {
), ),
], ],
), ),

/// 价格
Padding( Padding(
padding: const EdgeInsets.only(top: 4, bottom: 4), padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Row( child: Row(
@@ -209,6 +208,8 @@ class HotRankingGoods extends StatelessWidget {
], ],
), ),
), ),

/// 热抢
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(


+ 3
- 1
lib/widgets/team/input/team_input_widget.dart View File

@@ -160,8 +160,10 @@ class _TeamInputWidgetState extends State<TeamInputWidget> {
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () => _onSearchClick(), onTap: () => _onSearchClick(),
child: Container( child: Container(
height: double.infinity,
alignment: Alignment.center,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: HexColor.fromHex(widget?.styleModel?.searchBarBtnBgColor ?? '#FF4242')), decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: HexColor.fromHex(widget?.styleModel?.searchBarBtnBgColor ?? '#FF4242')),
padding: const EdgeInsets.only(left: 15, right: 15, bottom: 6.5, top: 6.5),
padding: const EdgeInsets.only(left: 15, right: 15, ),
child: Text( child: Text(
widget?.styleModel?.searchBarBtnText ?? '搜索', widget?.styleModel?.searchBarBtnText ?? '搜索',
style: TextStyle(color: HexColor.fromHex(widget?.styleModel?.searchBarBtnTextColor ?? '#FFFFFF'), fontSize: 11), style: TextStyle(color: HexColor.fromHex(widget?.styleModel?.searchBarBtnTextColor ?? '#FFFFFF'), fontSize: 11),


Loading…
Cancel
Save