|
|
|
@ -98,20 +98,20 @@ class _ActivityPoster extends State<ActivityPoster> {
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,4:页面跳转,5:课程) |
|
|
|
|
/// contentType 跳转类型(0:不跳转,1:积分商品,2:活动,3:文章,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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|