Browse Source

海报跳转新增类型7:门店跳转;

new_revision_app
wurong 2 years ago
parent
commit
a69f95b004
  1. 7
      lib/community/community_view/course_banner.dart
  2. 7
      lib/community/headlines/headlines_banner.dart
  3. 20
      lib/home/home_view/home_banner.dart
  4. 7
      lib/home/huixiang_view/huixiang_banner.dart
  5. 7
      lib/home/points_mall_view/points_mall_banner.dart
  6. 7
      lib/store/shopping/shopping_home/shopping_home_banner.dart
  7. 19
      lib/view_widget/activity_poster.dart

7
lib/community/community_view/course_banner.dart

@ -74,7 +74,7 @@ class _CourseBanner extends State<CourseBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:,7
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -110,6 +110,11 @@ class _CourseBanner extends State<CourseBanner> {
"id": bannerData.content,
});
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;
}
}
}

7
lib/community/headlines/headlines_banner.dart

@ -71,7 +71,7 @@ class _HeadlinesBanner extends State<HeadlinesBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -107,6 +107,11 @@ class _HeadlinesBanner extends State<HeadlinesBanner> {
"id": bannerData.content,
});
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;
}
}
}

20
lib/home/home_view/home_banner.dart

@ -72,7 +72,7 @@ class _HomeBanner extends State<HomeBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -80,14 +80,12 @@ class _HomeBanner extends State<HomeBanner> {
arguments: {"goodsId": bannerData.content});
break;
case 2:
Navigator.of(context)
.pushNamed('/router/web_page', arguments: {
Navigator.of(context).pushNamed('/router/web_page', arguments: {
"activityId": bannerData.content,
});
break;
case 3:
Navigator.of(context)
.pushNamed('/router/web_page', arguments: {
Navigator.of(context).pushNamed('/router/web_page', arguments: {
"articleId": bannerData.content,
});
break;
@ -97,17 +95,23 @@ class _HomeBanner extends State<HomeBanner> {
if (router.contains("?")) {
String params = router.substring(router.indexOf("?") + 1);
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 {
Navigator.of(context).pushNamed(router);
}
break;
case 5:
Navigator.of(context)
.pushNamed('/router/class_details', arguments: {
Navigator.of(context).pushNamed('/router/class_details', arguments: {
"id": bannerData.content,
});
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;
}
}
}

7
lib/home/huixiang_view/huixiang_banner.dart

@ -65,7 +65,7 @@ class _HuiXiangBanner extends State<HuiXiangBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -101,6 +101,11 @@ class _HuiXiangBanner extends State<HuiXiangBanner> {
"id": bannerData.content,
});
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;
}
}

7
lib/home/points_mall_view/points_mall_banner.dart

@ -69,7 +69,7 @@ class _PointMallBanner extends State<PointMallBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7:
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -105,6 +105,11 @@ class _PointMallBanner extends State<PointMallBanner> {
"id": bannerData.content,
});
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;
}
}

7
lib/store/shopping/shopping_home/shopping_home_banner.dart

@ -72,7 +72,7 @@ class _ShoppingHomeBanner extends State<ShoppingHomeBanner> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7:
bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) {
case 1:
@ -108,6 +108,11 @@ class _ShoppingHomeBanner extends State<ShoppingHomeBanner> {
"id": bannerData.content,
});
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;
}
}
}

19
lib/view_widget/activity_poster.dart

@ -98,20 +98,20 @@ class _ActivityPoster extends State<ActivityPoster> {
);
}
/// contentType 0123,4:,5:
/// contentType 0123,4:,5:7
jumpClick(ActivityPos activityPos) async {
switch (activityPos.jumpType) {
case 1:
Navigator.of(context).pushNamed('/router/integral_store_page',
Navigator.of(context).popAndPushNamed('/router/integral_store_page',
arguments: {"goodsId": widget.activityPos.jumpUrl});
break;
case 2:
Navigator.of(context).pushNamed('/router/web_page', arguments: {
Navigator.of(context).popAndPushNamed('/router/web_page', arguments: {
"activityId": widget.activityPos.jumpUrl,
});
break;
case 3:
Navigator.of(context).pushNamed('/router/web_page', arguments: {
Navigator.of(context).popAndPushNamed('/router/web_page', arguments: {
"articleId": widget.activityPos.jumpUrl,
});
break;
@ -121,16 +121,21 @@ class _ActivityPoster extends State<ActivityPoster> {
if (router.contains("?")) {
String params = router.substring(router.indexOf("?")+1);
Map map = jsonDecode(params);
Navigator.of(context).pushNamed(router.substring(0,router.indexOf("?")), arguments: map);
Navigator.of(context).popAndPushNamed(router.substring(0,router.indexOf("?")), arguments: map);
} else {
Navigator.of(context).pushNamed(router);
Navigator.of(context).popAndPushNamed(router);
}
break;
case 5:
Navigator.of(context).pushNamed('/router/class_details', arguments: {
Navigator.of(context).popAndPushNamed('/router/class_details', arguments: {
"id": widget.activityPos.jumpUrl,
});
break;
case 7:
String params = widget.activityPos.jumpUrl.substring(widget.activityPos.jumpUrl.indexOf("?")+1);
Map map = jsonDecode(params);
Navigator.of(context).popAndPushNamed(widget.activityPos.jumpUrl.substring(0,widget.activityPos.jumpUrl.indexOf("?")), arguments: map);
break;
}
}
}

Loading…
Cancel
Save