Browse Source

Merge branch 'dev' into wr_2023_business

wr_2023_business
wurong 2 years ago
parent
commit
1d5074c874
  1. 7
      lib/community/community_view/course_banner.dart
  2. 7
      lib/community/headlines/headlines_banner.dart
  3. 22
      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 { bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) { switch (bannerData.contentType) {
case 1: case 1:
@ -110,6 +110,11 @@ class _CourseBanner extends State<CourseBanner> {
"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;
} }
} }
} }

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

22
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 { 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;
} }
} }
} }

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

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

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

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 { jumpClick(ActivityPos activityPos) async {
switch (activityPos.jumpType) { switch (activityPos.jumpType) {
case 1: case 1:
Navigator.of(context).pushNamed('/router/integral_store_page', Navigator.of(context).popAndPushNamed('/router/integral_store_page',
arguments: {"goodsId": widget.activityPos.jumpUrl}); arguments: {"goodsId": widget.activityPos.jumpUrl});
break; break;
case 2: case 2:
Navigator.of(context).pushNamed('/router/web_page', arguments: { Navigator.of(context).popAndPushNamed('/router/web_page', arguments: {
"activityId": widget.activityPos.jumpUrl, "activityId": widget.activityPos.jumpUrl,
}); });
break; break;
case 3: case 3:
Navigator.of(context).pushNamed('/router/web_page', arguments: { Navigator.of(context).popAndPushNamed('/router/web_page', arguments: {
"articleId": widget.activityPos.jumpUrl, "articleId": widget.activityPos.jumpUrl,
}); });
break; break;
@ -121,16 +121,21 @@ class _ActivityPoster extends State<ActivityPoster> {
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).popAndPushNamed(router.substring(0,router.indexOf("?")), arguments: map);
} else { } else {
Navigator.of(context).pushNamed(router); Navigator.of(context).popAndPushNamed(router);
} }
break; break;
case 5: case 5:
Navigator.of(context).pushNamed('/router/class_details', arguments: { Navigator.of(context).popAndPushNamed('/router/class_details', arguments: {
"id": widget.activityPos.jumpUrl, "id": widget.activityPos.jumpUrl,
}); });
break; 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