From 4f11e316dc54e10a9928087644154b203dc2b461 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Fri, 27 Nov 2020 13:51:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=A6=96=E9=A1=B5=E7=9A=84=E7=A9=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=202=E3=80=81=E9=A6=96=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainActivity.java | 10 +- example/lib/main.dart | 5 +- lib/pages/custom_page/custom_item_page.dart | 5 +- lib/pages/launch_page/launch_page.dart | 8 +- lib/register.dart | 2 +- .../footer/goods_details_footer_widget.dart | 28 ++- .../goods_detail_commend_creater.dart | 28 ++- .../recommend/goods_detail_commend_list.dart | 4 +- .../home/home_goods/home_goods_item.dart | 24 +-- .../home_goods/home_goods_item_single.dart | 26 ++- .../models/home_goods_list_style_model.dart | 186 ++++++++++++------ 11 files changed, 213 insertions(+), 113 deletions(-) diff --git a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java index 6cc5176..67db9d6 100644 --- a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java +++ b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java @@ -1,5 +1,6 @@ package cn.zhios.zhiying_base_widget_example; +import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Build; @@ -38,6 +39,13 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN } + @Override + protected void onNewIntent(@NonNull Intent intent) { + super.onNewIntent(intent); + setIntent(intent); + MobLink.updateNewIntent(getIntent(), this); + } + @Override public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine); @@ -82,7 +90,7 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN Map map = new HashMap(); map.put("domain", "http://inapi.izhyin.cn"); //"http://120.76.175.204:8989"); // map.put("domain", "http://192.168.0.113:5000"); - map.put("master_id", "123456"); + map.put("master_id", "template_database"); map.put("secret_key", "123456"); // map.put("token", "123465"); return map; diff --git a/example/lib/main.dart b/example/lib/main.dart index a31fa4b..c763839 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -61,6 +61,9 @@ class _MyAppState extends State { ChangeNotifierProvider.value(value: UserInfoNotifier()), ], child: MaterialApp( + routes: { + '/homePage': (BuildContext context) => HomePage() , + }, navigatorKey: navigatorKey, localizationsDelegates: [ RefreshLocalizations.delegate, @@ -86,7 +89,7 @@ class _MyAppState extends State { } }, child: LaunchPage( - builder: (context) => HomePage(), + // builder: (context) => HomePage(), ), ), ), diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart index fd3134e..9d813e8 100644 --- a/lib/pages/custom_page/custom_item_page.dart +++ b/lib/pages/custom_page/custom_item_page.dart @@ -3,6 +3,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:provider/provider.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart'; +import 'package:zhiying_base_widget/widgets/empty/empty_widget.dart'; import 'package:zhiying_base_widget/widgets/refresh/refresh_footer/refresh_footer.dart'; import 'package:zhiying_base_widget/widgets/refresh/refresh_header/refresh_header.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; @@ -178,7 +179,9 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit /// 空数据 Widget _buildEmptyWidget() { - return Container(); + return Container( + child: EmptyWidget(), + ); } /// 骨架图 diff --git a/lib/pages/launch_page/launch_page.dart b/lib/pages/launch_page/launch_page.dart index e46a385..b17b519 100644 --- a/lib/pages/launch_page/launch_page.dart +++ b/lib/pages/launch_page/launch_page.dart @@ -46,11 +46,11 @@ class _LaunchPageState extends State { if (widget.builder != null) { - Navigator.of(context) - .pushReplacement(CupertinoPageRoute(builder: widget.builder)); + Navigator.of(context).pushReplacement(CupertinoPageRoute(builder: widget.builder)); } else { - Navigator.of(context).pushReplacement( - CupertinoPageRoute(builder: (context) => HomePage())); + // Navigator.of(context).pushReplacement( + // CupertinoPageRoute(builder: (context) => HomePage())); + Navigator.of(context).pushReplacementNamed('/homePage'); } }).catchError((err) { Logger.error(err); diff --git a/lib/register.dart b/lib/register.dart index 581a275..37ddddf 100644 --- a/lib/register.dart +++ b/lib/register.dart @@ -141,7 +141,7 @@ class BaseWidgetRegister { // 注册页面 static void registPage() { PageFactory.regist('LaunchPage', (model) => LaunchPage()); - PageFactory.regist('homePage', (model) => HomePage()); + // PageFactory.regist('homePage', (model) => HomePage()); PageFactory.regist('pub.flutter.index', (model) => MainPage(model)); PageFactory.regist('pub.flutter.profile', (model) => MainPage(model)); PageFactory.regist( diff --git a/lib/widgets/goods_details/footer/goods_details_footer_widget.dart b/lib/widgets/goods_details/footer/goods_details_footer_widget.dart index b0f2ed8..e394335 100644 --- a/lib/widgets/goods_details/footer/goods_details_footer_widget.dart +++ b/lib/widgets/goods_details/footer/goods_details_footer_widget.dart @@ -30,7 +30,7 @@ class GoodsDetailsFooterWidget extends StatelessWidget { child: BlocProvider( create: (_) => GoodsDetailsFooterBloc(repository: GoodsDetailsFooterRepository()), //..add(GoodsDetailsFooterInitEvent(model: model)), - child: GooddsDetailsFooterContainer( + child: _GoodsDetailsFooterContainer( model, key: UniqueKey(), ), @@ -39,16 +39,16 @@ class GoodsDetailsFooterWidget extends StatelessWidget { } } -class GooddsDetailsFooterContainer extends StatefulWidget { +class _GoodsDetailsFooterContainer extends StatefulWidget { final Map model; - const GooddsDetailsFooterContainer(this.model, {Key key}) : super(key: key); + const _GoodsDetailsFooterContainer(this.model, {Key key}) : super(key: key); @override - _GooddsDetailsFooterContainerState createState() => _GooddsDetailsFooterContainerState(); + _GoodsDetailsFooterContainerState createState() => _GoodsDetailsFooterContainerState(); } -class _GooddsDetailsFooterContainerState extends State { +class _GoodsDetailsFooterContainerState extends State<_GoodsDetailsFooterContainer> { UserInfoModel _user; @override @@ -65,11 +65,19 @@ class _GooddsDetailsFooterContainerState extends State PageFactory.create('homePage', null)), - (Route route) => false, - ); + // Navigator.pushAndRemoveUntil( + // context, + // CupertinoPageRoute(builder: (BuildContext context) => PageFactory.create('homePage', null)), + // (Route route) => false, + // ); + + // Navigator.popUntil( + // context, + // CupertinoPageRoute(builder: (BuildContext context) => PageFactory.create('homePage', null)), + // (Route route) => false, + // ); + + RouterUtil.goBackHomePage(context); } /// 收藏 diff --git a/lib/widgets/goods_details/recommend/goods_detail_commend_creater.dart b/lib/widgets/goods_details/recommend/goods_detail_commend_creater.dart index 9198f34..88ea5d7 100644 --- a/lib/widgets/goods_details/recommend/goods_detail_commend_creater.dart +++ b/lib/widgets/goods_details/recommend/goods_detail_commend_creater.dart @@ -11,7 +11,7 @@ import 'package:zhiying_comm/util/base_bloc.dart'; import 'package:zhiying_comm/zhiying_comm.dart'; class GoodsDetailCommendCreater extends WidgetCreater { - final EventBus _eventBus = EventBus(); + // final EventBus _eventBus = EventBus(); @override List createWidgets(Map model) { @@ -25,13 +25,37 @@ class GoodsDetailCommendCreater extends WidgetCreater { // child: HomeGoodsHeader(model, _eventBus), // ); + String provider = 'taobao'; + Map json = convert.jsonDecode(model['data']); + bool haveProvider = false; + try{ + haveProvider = json.containsKey('provider') && !EmptyUtil.isEmpty(json['provider']); + if(haveProvider){ + provider = json['provider']; + } + }catch(e, s){ + provider = 'taobao'; + Logger.error(e,s); + } + + try { + if(!haveProvider) { + var listStyle = json['list_style']; + provider = listStyle['product_type']?.toString() ?? 'taobao'; + } + } catch (e, s) { + provider = 'taobao'; + Logger.error(e, s); + } + Logger.warn(model?.toString()); + return [ SliverToBoxAdapter( child: GoodsDetailsRecommendWidget(model), ), GoodsDetailCommendList( model, - provider: 'taobao', // 猜你喜欢数据源暂无数据 + provider: provider, // 猜你喜欢数据源暂无数据 ), ]; } diff --git a/lib/widgets/goods_details/recommend/goods_detail_commend_list.dart b/lib/widgets/goods_details/recommend/goods_detail_commend_list.dart index 904c8d0..c2b44d7 100644 --- a/lib/widgets/goods_details/recommend/goods_detail_commend_list.dart +++ b/lib/widgets/goods_details/recommend/goods_detail_commend_list.dart @@ -3,7 +3,7 @@ import 'dart:convert' as convert; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:zhiying_base_widget/pages/goods_details_page/notifier/goods_details_page_notifier.dart'; +import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart'; import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_bloc.dart'; import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_item.dart'; @@ -86,7 +86,7 @@ class _GoodsDetailCommendListContainerState extends State<_GoodsDetailCommendLis } List goods = snapshot.data; - int column = 2; + int column = int.parse(_style?.listStyle?.listColumn ?? '2') ; int count = ((goods?.length ?? 0) / column).ceil(); return SliverList( delegate: SliverChildBuilderDelegate( diff --git a/lib/widgets/home/home_goods/home_goods_item.dart b/lib/widgets/home/home_goods/home_goods_item.dart index 8568a63..9e065f5 100644 --- a/lib/widgets/home/home_goods/home_goods_item.dart +++ b/lib/widgets/home/home_goods/home_goods_item.dart @@ -161,18 +161,18 @@ class HomeGoodsItem extends StatelessWidget { Widget _createCupone() { List widgets = List(); if (goods.coupon != null && goods.coupon != '') { - var couponDe = style?.listStyle?.couponCommission?.coupon?.isImg == '1' + var couponDe = style?.listStyle?.couponCommission?.coupon?.bgType == 'img' ? BoxDecoration( image: DecorationImage( image: CachedNetworkImageProvider( - style?.listStyle?.couponCommission?.coupon?.couponBgImg ?? + style?.listStyle?.couponCommission?.coupon?.bgImg ?? ''), ), borderRadius: BorderRadius.circular(2.5), ) : BoxDecoration( color: HexColor.fromHex( - style?.listStyle?.couponCommission?.coupon?.couponBgColor), + style?.listStyle?.couponCommission?.coupon?.bgColor), borderRadius: BorderRadius.circular(2.5), ); @@ -204,17 +204,17 @@ class HomeGoodsItem extends StatelessWidget { height: 1, fontSize: 11, color: HexColor.fromHex(style - ?.listStyle?.couponCommission?.coupon?.couponFontColor), + ?.listStyle?.couponCommission?.coupon?.fontColor), ), children: [ TextSpan( text: - '${style?.listStyle?.couponCommission?.coupon?.couonText ?? '元劵'}', + '${style?.listStyle?.couponCommission?.coupon?.text ?? '元劵'}', style: TextStyle( height: 1, fontSize: 11, color: HexColor.fromHex(style - ?.listStyle?.couponCommission?.coupon?.couponFontColor), + ?.listStyle?.couponCommission?.coupon?.fontColor), ), ) ]), @@ -224,18 +224,18 @@ class HomeGoodsItem extends StatelessWidget { if (goods.commission != null || goods.commission != '') { var commissionDe = - style?.listStyle?.couponCommission?.commission?.isImg == '1' + style?.listStyle?.couponCommission?.commission?.bgType == 'img' ? BoxDecoration( image: DecorationImage( image: CachedNetworkImageProvider(style?.listStyle - ?.couponCommission?.commission?.commissionBgImg ?? + ?.couponCommission?.commission?.bgImg ?? ''), ), borderRadius: BorderRadius.circular(2.5), ) : BoxDecoration( color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionBgColor), + ?.commission?.bgColor), borderRadius: BorderRadius.circular(2.5), ); @@ -252,12 +252,12 @@ class HomeGoodsItem extends StatelessWidget { textAlign: TextAlign.center, text: TextSpan( text: - '${style?.listStyle?.couponCommission?.commission?.commissionText ?? ''}', + '${style?.listStyle?.couponCommission?.commission?.text ?? ''}', style: TextStyle( height: 1, fontSize: 11, color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionFontColor), + ?.commission?.fontColor), ), children: [ TextSpan( @@ -266,7 +266,7 @@ class HomeGoodsItem extends StatelessWidget { height: 1, fontSize: 11, color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionFontColor), + ?.commission?.fontColor), ), ) ]), diff --git a/lib/widgets/home/home_goods/home_goods_item_single.dart b/lib/widgets/home/home_goods/home_goods_item_single.dart index 48bf7fe..2ce1318 100644 --- a/lib/widgets/home/home_goods/home_goods_item_single.dart +++ b/lib/widgets/home/home_goods/home_goods_item_single.dart @@ -167,18 +167,18 @@ class HomeGoodsItemSingle extends StatelessWidget { Widget _createCupone() { List widgets = List(); if (goods.coupon != null && goods.coupon != '') { - var couponDe = style?.listStyle?.couponCommission?.coupon?.isImg == '1' + var couponDe = style?.listStyle?.couponCommission?.coupon?.bgImg == 'img' ? BoxDecoration( image: DecorationImage( image: CachedNetworkImageProvider( - style?.listStyle?.couponCommission?.coupon?.couponBgImg ?? + style?.listStyle?.couponCommission?.coupon?.bgImg ?? ''), ), borderRadius: BorderRadius.circular(2.5), ) : BoxDecoration( color: HexColor.fromHex( - style?.listStyle?.couponCommission?.coupon?.couponBgColor), + style?.listStyle?.couponCommission?.coupon?.bgColor), borderRadius: BorderRadius.circular(2.5), ); @@ -211,17 +211,17 @@ class HomeGoodsItemSingle extends StatelessWidget { height: 1, fontSize: 11, color: HexColor.fromHex(style - ?.listStyle?.couponCommission?.coupon?.couponFontColor), + ?.listStyle?.couponCommission?.coupon?.fontColor), ), children: [ TextSpan( text: - '${style?.listStyle?.couponCommission?.coupon?.couonText ?? '元劵'}', + '${style?.listStyle?.couponCommission?.coupon?.text ?? '元劵'}', style: TextStyle( height: 1, fontSize: 11, color: HexColor.fromHex(style - ?.listStyle?.couponCommission?.coupon?.couponFontColor), + ?.listStyle?.couponCommission?.coupon?.fontColor), ), ) ]), @@ -231,18 +231,18 @@ class HomeGoodsItemSingle extends StatelessWidget { if (goods.commission != null || goods.commission != '') { var commissionDe = - style?.listStyle?.couponCommission?.commission?.isImg == '1' + style?.listStyle?.couponCommission?.commission?.bgType == 'img' ? BoxDecoration( image: DecorationImage( image: CachedNetworkImageProvider(style?.listStyle - ?.couponCommission?.commission?.commissionBgImg ?? + ?.couponCommission?.commission?.bgImg ?? ''), ), borderRadius: BorderRadius.circular(2.5), ) : BoxDecoration( color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionBgColor), + ?.commission?.bgColor), borderRadius: BorderRadius.circular(2.5), ); @@ -271,12 +271,11 @@ class HomeGoodsItemSingle extends StatelessWidget { textAlign: TextAlign.center, text: TextSpan( text: - '${style?.listStyle?.couponCommission?.commission?.commissionText ?? ''}', + '${style?.listStyle?.couponCommission?.commission?.text ?? ''}', style: TextStyle( height: 1, fontSize: 11, - color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionFontColor), + color: HexColor.fromHex(style?.listStyle?.couponCommission?.commission?.fontColor), ), children: [ TextSpan( @@ -284,8 +283,7 @@ class HomeGoodsItemSingle extends StatelessWidget { style: TextStyle( height: 1, fontSize: 11, - color: HexColor.fromHex(style?.listStyle?.couponCommission - ?.commission?.commissionFontColor), + color: HexColor.fromHex(style?.listStyle?.couponCommission?.commission?.fontColor), ), ) ]), diff --git a/lib/widgets/home/home_goods/models/home_goods_list_style_model.dart b/lib/widgets/home/home_goods/models/home_goods_list_style_model.dart index 8fd6b63..38d528e 100644 --- a/lib/widgets/home/home_goods/models/home_goods_list_style_model.dart +++ b/lib/widgets/home/home_goods/models/home_goods_list_style_model.dart @@ -12,6 +12,7 @@ class HomeGoodsListStyleModel { String shopIcon; HomeGoodsStyleModelCouponCommission couponCommission; HomeGoodsStyleModelHotRank hotRank; + String listColumn; HomeGoodsListStyleModel( {this.hotRankIconList, @@ -26,11 +27,14 @@ class HomeGoodsListStyleModel { this.saleCountText, this.shopIcon, this.couponCommission, - this.hotRank}); + this.hotRank, + this.listColumn, + }); HomeGoodsListStyleModel.fromJson(Map json) { hotRankIconList = json['hot_rank_icon_list'].cast(); topMargin = json['top_margin']; + listColumn = json['list_column']; leftRighMargin = json['left_righ_margin']; if (json['providers'] != null) { providers = new List(); @@ -57,6 +61,7 @@ class HomeGoodsListStyleModel { Map toJson() { final Map data = new Map(); data['hot_rank_icon_list'] = this.hotRankIconList; + data['list_column'] = this.listColumn; data['top_margin'] = this.topMargin; data['left_righ_margin'] = this.leftRighMargin; if (this.providers != null) { @@ -103,18 +108,14 @@ class HomeGoodsStyleModelProviders { } class HomeGoodsStyleModelCouponCommission { - HomeGoodsStyleModelCoupon coupon; - HomeGoodsStyleModelCommission commission; + Left coupon; + Left commission; HomeGoodsStyleModelCouponCommission({this.coupon, this.commission}); HomeGoodsStyleModelCouponCommission.fromJson(Map json) { - coupon = json['left'] != null - ? new HomeGoodsStyleModelCoupon.fromJson(json['left']) - : null; - commission = json['right'] != null - ? new HomeGoodsStyleModelCommission.fromJson(json['right']) - : null; + coupon = json['left'] != null ? new Left.fromJson(json['left']) : null; + commission = json['right'] != null ? new Left.fromJson(json['right']) : null; } Map toJson() { @@ -129,72 +130,127 @@ class HomeGoodsStyleModelCouponCommission { } } -class HomeGoodsStyleModelCoupon { - String couonText; - String couponFontColor; - String couponBgColor; - String couponBgImg; - String isImg; - - HomeGoodsStyleModelCoupon( - {this.couonText, - this.couponFontColor, - this.couponBgColor, - this.couponBgImg, - this.isImg}); - - HomeGoodsStyleModelCoupon.fromJson(Map json) { - couonText = json['couon_text']?.toString(); - couponFontColor = json['coupon_font_color']?.toString(); - couponBgColor = json['coupon_bg_color']?.toString(); - couponBgImg = json['coupon_bg_img']?.toString(); - isImg = json['is_img']?.toString(); - } +class Left { + String text; + String fontColor; + String bgType; + String bgColor; + String bgImg; - Map toJson() { - final Map data = new Map(); - data['couon_text'] = this.couonText; - data['coupon_font_color'] = this.couponFontColor; - data['coupon_bg_color'] = this.couponBgColor; - data['coupon_bg_img'] = this.couponBgImg; - data['is_img'] = this.isImg; - return data; - } -} + Left({this.text, this.fontColor, this.bgType, this.bgColor, this.bgImg}); -class HomeGoodsStyleModelCommission { - String commissionText; - String commissionFontColor; - String commissionBgColor; - String commissionBgImg; - String isImg; - - HomeGoodsStyleModelCommission( - {this.commissionText, - this.commissionFontColor, - this.commissionBgColor, - this.commissionBgImg, - this.isImg}); - - HomeGoodsStyleModelCommission.fromJson(Map json) { - commissionText = json['commission_text']?.toString(); - commissionFontColor = json['commission_font_color']?.toString(); - commissionBgColor = json['commission_bg_color']?.toString(); - commissionBgImg = json['commission_bg_img']?.toString(); - isImg = json['is_img']?.toString(); + Left.fromJson(Map json) { + text = json['text']; + fontColor = json['font_color']; + bgType = json['bg_type']; + bgColor = json['bg_color']; + bgImg = json['bg_img']; } Map toJson() { final Map data = new Map(); - data['commission_text'] = this.commissionText; - data['commission_font_color'] = this.commissionFontColor; - data['commission_bg_color'] = this.commissionBgColor; - data['commission_bg_img'] = this.commissionBgImg; - data['is_img'] = this.isImg; + data['text'] = this.text; + data['font_color'] = this.fontColor; + data['bg_type'] = this.bgType; + data['bg_color'] = this.bgColor; + data['bg_img'] = this.bgImg; return data; } } +// class HomeGoodsStyleModelCouponCommission { +// HomeGoodsStyleModelCoupon coupon; +// HomeGoodsStyleModelCommission commission; +// +// HomeGoodsStyleModelCouponCommission({this.coupon, this.commission}); +// +// HomeGoodsStyleModelCouponCommission.fromJson(Map json) { +// coupon = json['left'] != null +// ? new HomeGoodsStyleModelCoupon.fromJson(json['left']) +// : null; +// commission = json['right'] != null +// ? new HomeGoodsStyleModelCommission.fromJson(json['right']) +// : null; +// } +// +// Map toJson() { +// final Map data = new Map(); +// if (this.coupon != null) { +// data['left'] = this.coupon.toJson(); +// } +// if (this.commission != null) { +// data['right'] = this.commission.toJson(); +// } +// return data; +// } +// } + +// class HomeGoodsStyleModelCoupon { +// String couonText; +// String couponFontColor; +// String couponBgColor; +// String couponBgImg; +// String isImg; +// +// HomeGoodsStyleModelCoupon( +// {this.couonText, +// this.couponFontColor, +// this.couponBgColor, +// this.couponBgImg, +// this.isImg}); +// +// HomeGoodsStyleModelCoupon.fromJson(Map json) { +// couonText = json['couon_text']?.toString(); +// couponFontColor = json['coupon_font_color']?.toString(); +// couponBgColor = json['coupon_bg_color']?.toString(); +// couponBgImg = json['coupon_bg_img']?.toString(); +// isImg = json['is_img']?.toString(); +// } +// +// Map toJson() { +// final Map data = new Map(); +// data['couon_text'] = this.couonText; +// data['coupon_font_color'] = this.couponFontColor; +// data['coupon_bg_color'] = this.couponBgColor; +// data['coupon_bg_img'] = this.couponBgImg; +// data['is_img'] = this.isImg; +// return data; +// } +// } + +// class HomeGoodsStyleModelCommission { +// String commissionText; +// String commissionFontColor; +// String commissionBgColor; +// String commissionBgImg; +// String isImg; +// +// HomeGoodsStyleModelCommission( +// {this.commissionText, +// this.commissionFontColor, +// this.commissionBgColor, +// this.commissionBgImg, +// this.isImg}); +// +// HomeGoodsStyleModelCommission.fromJson(Map json) { +// commissionText = json['commission_text']?.toString(); +// commissionFontColor = json['commission_font_color']?.toString(); +// commissionBgColor = json['commission_bg_color']?.toString(); +// commissionBgImg = json['commission_bg_img']?.toString(); +// isImg = json['is_img']?.toString(); +// } +// +// Map toJson() { +// final Map data = new Map(); +// data['commission_text'] = this.commissionText; +// data['commission_font_color'] = this.commissionFontColor; +// data['commission_bg_color'] = this.commissionBgColor; +// data['commission_bg_img'] = this.commissionBgImg; +// data['is_img'] = this.isImg; +// return data; +// } +// } + class HomeGoodsStyleModelHotRank { String isOpen; String bgColor;