|
|
@ -72,7 +72,7 @@ class _HomeBanner extends State<HomeBanner> { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,4:页面跳转,5:课程) |
|
|
|
/// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,4:页面跳转,5:课程,7:门店跳转) |
|
|
|
bannerClick(BannerData bannerData) async { |
|
|
|
bannerClick(BannerData bannerData) async { |
|
|
|
switch (bannerData.contentType) { |
|
|
|
switch (bannerData.contentType) { |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
@ -80,14 +80,12 @@ class _HomeBanner extends State<HomeBanner> { |
|
|
|
arguments: {"goodsId": bannerData.content}); |
|
|
|
arguments: {"goodsId": bannerData.content}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
case 2: |
|
|
|
Navigator.of(context) |
|
|
|
Navigator.of(context).pushNamed('/router/web_page', arguments: { |
|
|
|
.pushNamed('/router/web_page', arguments: { |
|
|
|
|
|
|
|
"activityId": bannerData.content, |
|
|
|
"activityId": bannerData.content, |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
case 3: |
|
|
|
Navigator.of(context) |
|
|
|
Navigator.of(context).pushNamed('/router/web_page', arguments: { |
|
|
|
.pushNamed('/router/web_page', arguments: { |
|
|
|
|
|
|
|
"articleId": bannerData.content, |
|
|
|
"articleId": bannerData.content, |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -95,19 +93,25 @@ class _HomeBanner extends State<HomeBanner> { |
|
|
|
String router = bannerData.content; |
|
|
|
String router = bannerData.content; |
|
|
|
// String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; |
|
|
|
// String router = "/router/store_order?{\"id\":\"1512378184161558528\",\"tenant\":\"1188\",\"storeName\":\"农场煮意\"}"; |
|
|
|
if (router.contains("?")) { |
|
|
|
if (router.contains("?")) { |
|
|
|
String params = router.substring(router.indexOf("?")+1); |
|
|
|
String params = router.substring(router.indexOf("?") + 1); |
|
|
|
Map map = jsonDecode(params); |
|
|
|
Map map = jsonDecode(params); |
|
|
|
Navigator.of(context).pushNamed(router.substring(0,router.indexOf("?")), arguments: map); |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
|
|
|
router.substring(0, router.indexOf("?")), |
|
|
|
|
|
|
|
arguments: map); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Navigator.of(context).pushNamed(router); |
|
|
|
Navigator.of(context).pushNamed(router); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
case 5: |
|
|
|
Navigator.of(context) |
|
|
|
Navigator.of(context).pushNamed('/router/class_details', arguments: { |
|
|
|
.pushNamed('/router/class_details', arguments: { |
|
|
|
|
|
|
|
"id": bannerData.content, |
|
|
|
"id": bannerData.content, |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case 7: |
|
|
|
|
|
|
|
String params = bannerData.content.substring(bannerData.content.indexOf("?")+1); |
|
|
|
|
|
|
|
Map map = jsonDecode(params); |
|
|
|
|
|
|
|
Navigator.of(context).pushNamed(bannerData.content.substring(0,bannerData.content.indexOf("?")), arguments: map); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|