pull/1/head
张萌 3 years ago
parent e182005713
commit d30613391b

@ -60,7 +60,7 @@ class _Good {
String get brand => '/app/user/shop/brand/list'; String get brand => '/app/user/shop/brand/list';
/// ///
String get recommend => '查询综合推荐商品列表'; String get recommend => '/app/user/shop/goods/findRecommendGoodsList';
/// ///
String get goodDetail => '/app/user/shop/goods/findGoodsDetail'; String get goodDetail => '/app/user/shop/goods/findGoodsDetail';
@ -81,5 +81,5 @@ class _Home {
class _Rotation { class _Rotation {
///app ///app
String get rotation => '/app/user/rotation/shop/list'; String get rotation => '/app/user/shop/rotation/list';
} }

@ -1,6 +1,5 @@
part 'profile_api.dart';
part 'market_api.dart'; part 'market_api.dart';
part 'profile_api.dart';
class SARSAPI { class SARSAPI {
///HOST ///HOST
@ -16,12 +15,16 @@ class SARSAPI {
static String file(String? path) => '$resource$path'; static String file(String? path) => '$resource$path';
static const int networkTimeOut = 10000; static const int networkTimeOut = 10000;
///
static _City city = _City(); static _City city = _City();
static _ProfileApi profile = _ProfileApi();
static _MarketApi market = _MarketApi();
static _Login login = _Login(); static _Login login = _Login();
static _User user = _User(); static _User user = _User();
static _House house = _House(); static _House house = _House();
///
static _ProfileApi profile = _ProfileApi();
static _MarketApi market = _MarketApi();
} }
class _City { class _City {

@ -474,6 +474,7 @@ class _MarketPageState extends State<MarketPage>
); );
} }
//
Widget _integralMarket() { Widget _integralMarket() {
return Container( return Container(
width: 720.w, width: 720.w,
@ -823,7 +824,7 @@ class _MarketPageState extends State<MarketPage>
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
width: 88.w, width: 88.w,
height: 88.w, height: 88.w,
image: API.image(item.imgUrls.first), image: item.imgUrls.isNotEmpty ? item.imgUrls.first : '',
imageErrorBuilder: (context, error, stackTrace) { imageErrorBuilder: (context, error, stackTrace) {
return Image.asset( return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP, R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
@ -957,7 +958,9 @@ class _MarketPageState extends State<MarketPage>
key: UniqueKey(), key: UniqueKey(),
child: FadeInImage.assetNetwork( child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: _goodsPopularModelList[index].mainPhoto ?? '', image: _goodsPopularModelList.isEmpty
? ''
: _goodsPopularModelList[index].mainPhoto ?? '',
imageErrorBuilder: (context, error, stackTrace) { imageErrorBuilder: (context, error, stackTrace) {
return Image.asset( return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP, R.ASSETS_IMAGES_PLACEHOLDER_WEBP,

Loading…
Cancel
Save