|
|
|
@ -1423,28 +1423,29 @@ class _HomePageState extends BaseStoreState<HomePage>
|
|
|
|
|
|
|
|
|
|
//抽奖功能
|
|
|
|
|
_userLottery() async {
|
|
|
|
|
ResultData resultData = await HttpManager.post(
|
|
|
|
|
UserApi.user_lottery,
|
|
|
|
|
{'userID': UserManager.instance.user.info.id},
|
|
|
|
|
);
|
|
|
|
|
if (resultData.data != null && resultData.data['data'] != null) {
|
|
|
|
|
if (resultData.data['data']['result'] == 0) {
|
|
|
|
|
ResultData lottery = await HttpManager.post(UserApi.user_do_lottery,
|
|
|
|
|
{'userID': UserManager.instance.user.info.id});
|
|
|
|
|
await Future.delayed(Duration(milliseconds: 500));
|
|
|
|
|
await Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
PageRouteBuilder(
|
|
|
|
|
opaque: false,
|
|
|
|
|
pageBuilder: (BuildContext context, Animation<double> animation,
|
|
|
|
|
Animation<double> secondaryAnimation) {
|
|
|
|
|
return LotteryPage(
|
|
|
|
|
cardIndex: lottery.data['data']['result'],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//TODO 暂时移除抽奖功能(大概率以后用不到)
|
|
|
|
|
// ResultData resultData = await HttpManager.post(
|
|
|
|
|
// UserApi.user_lottery,
|
|
|
|
|
// {'userID': UserManager.instance.user.info.id},
|
|
|
|
|
// );
|
|
|
|
|
// if (resultData.data != null && resultData.data['data'] != null) {
|
|
|
|
|
// if (resultData.data['data']['result'] == 0) {
|
|
|
|
|
// ResultData lottery = await HttpManager.post(UserApi.user_do_lottery,
|
|
|
|
|
// {'userID': UserManager.instance.user.info.id});
|
|
|
|
|
// await Future.delayed(Duration(milliseconds: 500));
|
|
|
|
|
// await Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
// PageRouteBuilder(
|
|
|
|
|
// opaque: false,
|
|
|
|
|
// pageBuilder: (BuildContext context, Animation<double> animation,
|
|
|
|
|
// Animation<double> secondaryAnimation) {
|
|
|
|
|
// return LotteryPage(
|
|
|
|
|
// cardIndex: lottery.data['data']['result'],
|
|
|
|
|
// );
|
|
|
|
|
// }),
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//店铺角色变动
|
|
|
|
|
|
|
|
|
@ -1553,6 +1554,8 @@ class _HomePageState extends BaseStoreState<HomePage>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_userCardNoticeList() async {
|
|
|
|
|
await Future.delayed(Duration(milliseconds: 300));
|
|
|
|
|
|
|
|
|
|
ResultData resultData =
|
|
|
|
|
await HttpManager.post(APIV2.userAPI.userCardNoticeList, {});
|
|
|
|
|
if (resultData.data != null && resultData.data['data'] != null) {
|
|
|
|
@ -1604,7 +1607,8 @@ class _HomePageState extends BaseStoreState<HomePage>
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)));
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|