Commit dce1c2ae6dd8f6e94cdb6b3d94ee01dc666ea2c2

Authored by wdn127929
1 parent f8d666e3

7天倒计时提醒

... ... @@ -301,7 +301,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
await collectStoreProvider.getSellerVersion(context);
if (collectStoreProvider.sellerSimple) {
//极速版
App.sp.remove('sellerEdate');
App.sp.remove('sellerEdate');
App.sp.remove('sellerEdateModule');
NavigatorUtil.goHomePageSim(context); //跳转到极速版 页面
} else {
if (collectStoreProvider.sellerVersionList != null &&
... ... @@ -624,72 +625,72 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
}
_showSellerAlert(String day, DateTime edate) {
if (App.sp.containsKey('sellerEdate')) {
//已经存进去过数据
List<String> data = App.sp.getStringList('sellerEdate');
if (!data.contains(day)) {
data.add(day);
App.sp.setStringList("sellerEdate", data);
//过期差ji天,提醒一次s
if (day == '-1') {
DialogUtil.cupertinoAlertSellerHasEdateDialog(
context,
title: '温馨提示',
isBold: true,
lCallback: () {
NavigatorUtil.goHomePage(context, initialIndex: 4);
},
rCallback: () {
//立即续费
},
);
} else {
DialogUtil.cupertinoAlertSellerEdateDialog(
context,
title: '温馨提示',
isBold: true,
content: DateUtil.formatDate(
edate,
format: DateFormats.full,
),
rCallback: () {
//立即续费
},
);
}
}
} else {
App.sp.setStringList("sellerEdate", [day]);
//过期差ji天,提醒一次s
if (day == '-1') {
DialogUtil.cupertinoAlertSellerHasEdateDialog(
context,
title: '温馨提示',
isBold: true,
lCallback: () {
NavigatorUtil.goHomePage(context, initialIndex: 4);
},
rCallback: () {
//立即续费
},
);
} else {
DialogUtil.cupertinoAlertSellerEdateDialog(
context,
title: '温馨提示',
isBold: true,
content: DateUtil.formatDate(
edate,
format: DateFormats.full,
),
rCallback: () {
//立即续费
},
);
}
}
}
// _showSellerAlert(String day, DateTime edate) {
// if (App.sp.containsKey('sellerEdate')) {
// //已经存进去过数据
// List<String> data = App.sp.getStringList('sellerEdate');
// if (!data.contains(day)) {
// data.add(day);
// App.sp.setStringList("sellerEdate", data);
// //过期差ji天,提醒一次s
// if (day == '-1') {
// DialogUtil.cupertinoAlertSellerHasEdateDialog(
// context,
// title: '温馨提示',
// isBold: true,
// lCallback: () {
// NavigatorUtil.goHomePage(context, initialIndex: 4);
// },
// rCallback: () {
// //立即续费
// },
// );
// } else {
// DialogUtil.cupertinoAlertSellerEdateDialog(
// context,
// title: '温馨提示',
// isBold: true,
// content: DateUtil.formatDate(
// edate,
// format: DateFormats.full,
// ),
// rCallback: () {
// //立即续费
// },
// );
// }
// }
// } else {
// App.sp.setStringList("sellerEdate", [day]);
// //过期差ji天,提醒一次s
// if (day == '-1') {
// DialogUtil.cupertinoAlertSellerHasEdateDialog(
// context,
// title: '温馨提示',
// isBold: true,
// lCallback: () {
// NavigatorUtil.goHomePage(context, initialIndex: 4);
// },
// rCallback: () {
// //立即续费
// },
// );
// } else {
// DialogUtil.cupertinoAlertSellerEdateDialog(
// context,
// title: '温馨提示',
// isBold: true,
// content: DateUtil.formatDate(
// edate,
// format: DateFormats.full,
// ),
// rCallback: () {
// //立即续费
// },
// );
// }
// }
// }
_getCustomerActivityBaseinfo() async {
Map<String, String> params = {
... ...
... ... @@ -235,6 +235,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
if (collectStoreProvider.sellerSimple) {
//极速版
App.sp.remove('sellerEdate');
App.sp.remove('sellerEdateModule');
NavigatorUtil.goHomePageSim(context, initialIndex: 3); //跳转到极速版 我的 页面
} else {
if (collectStoreProvider.sellerNormal) {
... ... @@ -266,7 +268,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
} else {
outDay = '0';
}
setState(() {});
// setState(() {});
} else {
outDay = '0';
}
... ...
... ... @@ -332,7 +332,22 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
}
if (showData != null && showData.length > 0) {
DialogUtil.showSellerVersionEdateDialog(context, showData, (object) {});
DateTime edate = DateTime.fromMillisecondsSinceEpoch(1716307200000);
// DateTime edate =
// DateTime.fromMillisecondsSinceEpoch(int.parse(showData[0].edate) * 1000);
DialogUtil.cupertinoAlertSellerEdateDialogSim(
context,
title: '温馨提示',
isBold: true,
content: DateUtil.formatDate(
edate,
format: DateFormats.full,
),
rCallback: () {
//立即续费
},
);
// DialogUtil.showSellerVersionEdateDialog(context, showData, (object) {});
}
//通过showdata 弹窗
... ... @@ -344,15 +359,23 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
// });
return true;
} else {
if (_currIndex != 3) {
if (App.sp.containsKey('sellerEdate')) {
List<String> data = App.sp.getStringList('sellerEdate');
if (data.contains('-1')) {
//已经弹过过期弹窗,默认我的
_currIndex = 3;
if (collectStoreProvider.sellerVersionList != null &&
collectStoreProvider.sellerVersionList.length > 0) {
App.sp.remove("sellerEdate");
App.sp.remove("sellerEdateModule'");
NavigatorUtil.goHomePage(context); //跳转至正常版本
} else {
//过期提醒
if (_currIndex != 3) {
if (App.sp.containsKey('sellerEdate')) {
List<String> data = App.sp.getStringList('sellerEdate');
if (data.contains('-1')) {
//已经弹过过期弹窗,默认我的
_currIndex = 3;
}
}
NavigatorUtil.goHomePageSim(context, initialIndex: _currIndex);
}
NavigatorUtil.goHomePageSim(context, initialIndex: _currIndex);
}
return false;
... ... @@ -544,8 +567,9 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
//店铺过期提醒
// 计算时间差
//店铺过期日期
DateTime edate = DateTime.fromMillisecondsSinceEpoch(
int.parse(sellerVersionSunModel.edate) * 1000);
// DateTime edate = DateTime.fromMillisecondsSinceEpoch(
// int.parse(sellerVersionSunModel.edate) * 1000);
DateTime edate = DateTime.fromMillisecondsSinceEpoch(1716307200000);
//当前日期
final datenow = DateTime.now();
... ... @@ -1819,7 +1843,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
currentIndex: _currIndex,
onTap: (int index) {
if (_currIndex != index) {
if (App.sp.containsKey('sellerEdate')) {
if (App.sp.containsKey('sellerEdate')) {
List<String> data = App.sp.getStringList('sellerEdate');
if (data.contains('-1')) {
DialogUtil.cupertinoAlertSellerHasEdateDialog(
... ...
... ... @@ -264,6 +264,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver {
if (collectStoreProvider.sellerVersionList != null &&
collectStoreProvider.sellerVersionList.length > 0) {
App.sp.remove("sellerEdate");
App.sp.remove("sellerEdateModule'");
NavigatorUtil.goHomePage(context); //跳转至正常版本
} else {
//过期提醒
... ... @@ -271,8 +272,6 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver {
}
}
setState(() {});
}
... ...