Commit dce1c2ae6dd8f6e94cdb6b3d94ee01dc666ea2c2

Authored by wdn127929
1 parent f8d666e3

7天倒计时提醒

@@ -301,7 +301,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -301,7 +301,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
301 await collectStoreProvider.getSellerVersion(context); 301 await collectStoreProvider.getSellerVersion(context);
302 if (collectStoreProvider.sellerSimple) { 302 if (collectStoreProvider.sellerSimple) {
303 //极速版 303 //极速版
304 - App.sp.remove('sellerEdate'); 304 + App.sp.remove('sellerEdate');
  305 + App.sp.remove('sellerEdateModule');
305 NavigatorUtil.goHomePageSim(context); //跳转到极速版 页面 306 NavigatorUtil.goHomePageSim(context); //跳转到极速版 页面
306 } else { 307 } else {
307 if (collectStoreProvider.sellerVersionList != null && 308 if (collectStoreProvider.sellerVersionList != null &&
@@ -624,72 +625,72 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -624,72 +625,72 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
624 } 625 }
625 } 626 }
626 627
627 - _showSellerAlert(String day, DateTime edate) {  
628 - if (App.sp.containsKey('sellerEdate')) {  
629 - //已经存进去过数据  
630 - List<String> data = App.sp.getStringList('sellerEdate');  
631 - if (!data.contains(day)) {  
632 - data.add(day);  
633 - App.sp.setStringList("sellerEdate", data);  
634 - //过期差ji天,提醒一次s  
635 - if (day == '-1') {  
636 - DialogUtil.cupertinoAlertSellerHasEdateDialog(  
637 - context,  
638 - title: '温馨提示',  
639 - isBold: true,  
640 - lCallback: () {  
641 - NavigatorUtil.goHomePage(context, initialIndex: 4);  
642 - },  
643 - rCallback: () {  
644 - //立即续费  
645 - },  
646 - );  
647 - } else {  
648 - DialogUtil.cupertinoAlertSellerEdateDialog(  
649 - context,  
650 - title: '温馨提示',  
651 - isBold: true,  
652 - content: DateUtil.formatDate(  
653 - edate,  
654 - format: DateFormats.full,  
655 - ),  
656 - rCallback: () {  
657 - //立即续费  
658 - },  
659 - );  
660 - }  
661 - }  
662 - } else {  
663 - App.sp.setStringList("sellerEdate", [day]);  
664 - //过期差ji天,提醒一次s  
665 - if (day == '-1') {  
666 - DialogUtil.cupertinoAlertSellerHasEdateDialog(  
667 - context,  
668 - title: '温馨提示',  
669 - isBold: true,  
670 - lCallback: () {  
671 - NavigatorUtil.goHomePage(context, initialIndex: 4);  
672 - },  
673 - rCallback: () {  
674 - //立即续费  
675 - },  
676 - );  
677 - } else {  
678 - DialogUtil.cupertinoAlertSellerEdateDialog(  
679 - context,  
680 - title: '温馨提示',  
681 - isBold: true,  
682 - content: DateUtil.formatDate(  
683 - edate,  
684 - format: DateFormats.full,  
685 - ),  
686 - rCallback: () {  
687 - //立即续费  
688 - },  
689 - );  
690 - }  
691 - }  
692 - } 628 + // _showSellerAlert(String day, DateTime edate) {
  629 + // if (App.sp.containsKey('sellerEdate')) {
  630 + // //已经存进去过数据
  631 + // List<String> data = App.sp.getStringList('sellerEdate');
  632 + // if (!data.contains(day)) {
  633 + // data.add(day);
  634 + // App.sp.setStringList("sellerEdate", data);
  635 + // //过期差ji天,提醒一次s
  636 + // if (day == '-1') {
  637 + // DialogUtil.cupertinoAlertSellerHasEdateDialog(
  638 + // context,
  639 + // title: '温馨提示',
  640 + // isBold: true,
  641 + // lCallback: () {
  642 + // NavigatorUtil.goHomePage(context, initialIndex: 4);
  643 + // },
  644 + // rCallback: () {
  645 + // //立即续费
  646 + // },
  647 + // );
  648 + // } else {
  649 + // DialogUtil.cupertinoAlertSellerEdateDialog(
  650 + // context,
  651 + // title: '温馨提示',
  652 + // isBold: true,
  653 + // content: DateUtil.formatDate(
  654 + // edate,
  655 + // format: DateFormats.full,
  656 + // ),
  657 + // rCallback: () {
  658 + // //立即续费
  659 + // },
  660 + // );
  661 + // }
  662 + // }
  663 + // } else {
  664 + // App.sp.setStringList("sellerEdate", [day]);
  665 + // //过期差ji天,提醒一次s
  666 + // if (day == '-1') {
  667 + // DialogUtil.cupertinoAlertSellerHasEdateDialog(
  668 + // context,
  669 + // title: '温馨提示',
  670 + // isBold: true,
  671 + // lCallback: () {
  672 + // NavigatorUtil.goHomePage(context, initialIndex: 4);
  673 + // },
  674 + // rCallback: () {
  675 + // //立即续费
  676 + // },
  677 + // );
  678 + // } else {
  679 + // DialogUtil.cupertinoAlertSellerEdateDialog(
  680 + // context,
  681 + // title: '温馨提示',
  682 + // isBold: true,
  683 + // content: DateUtil.formatDate(
  684 + // edate,
  685 + // format: DateFormats.full,
  686 + // ),
  687 + // rCallback: () {
  688 + // //立即续费
  689 + // },
  690 + // );
  691 + // }
  692 + // }
  693 + // }
693 694
694 _getCustomerActivityBaseinfo() async { 695 _getCustomerActivityBaseinfo() async {
695 Map<String, String> params = { 696 Map<String, String> params = {
@@ -235,6 +235,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -235,6 +235,8 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
235 if (collectStoreProvider.sellerSimple) { 235 if (collectStoreProvider.sellerSimple) {
236 //极速版 236 //极速版
237 App.sp.remove('sellerEdate'); 237 App.sp.remove('sellerEdate');
  238 + App.sp.remove('sellerEdateModule');
  239 +
238 NavigatorUtil.goHomePageSim(context, initialIndex: 3); //跳转到极速版 我的 页面 240 NavigatorUtil.goHomePageSim(context, initialIndex: 3); //跳转到极速版 我的 页面
239 } else { 241 } else {
240 if (collectStoreProvider.sellerNormal) { 242 if (collectStoreProvider.sellerNormal) {
@@ -266,7 +268,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -266,7 +268,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
266 } else { 268 } else {
267 outDay = '0'; 269 outDay = '0';
268 } 270 }
269 - setState(() {}); 271 + // setState(() {});
270 } else { 272 } else {
271 outDay = '0'; 273 outDay = '0';
272 } 274 }
@@ -332,7 +332,22 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { @@ -332,7 +332,22 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
332 } 332 }
333 333
334 if (showData != null && showData.length > 0) { 334 if (showData != null && showData.length > 0) {
335 - DialogUtil.showSellerVersionEdateDialog(context, showData, (object) {}); 335 + DateTime edate = DateTime.fromMillisecondsSinceEpoch(1716307200000);
  336 + // DateTime edate =
  337 + // DateTime.fromMillisecondsSinceEpoch(int.parse(showData[0].edate) * 1000);
  338 + DialogUtil.cupertinoAlertSellerEdateDialogSim(
  339 + context,
  340 + title: '温馨提示',
  341 + isBold: true,
  342 + content: DateUtil.formatDate(
  343 + edate,
  344 + format: DateFormats.full,
  345 + ),
  346 + rCallback: () {
  347 + //立即续费
  348 + },
  349 + );
  350 + // DialogUtil.showSellerVersionEdateDialog(context, showData, (object) {});
336 } 351 }
337 //通过showdata 弹窗 352 //通过showdata 弹窗
338 353
@@ -344,15 +359,23 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { @@ -344,15 +359,23 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
344 // }); 359 // });
345 return true; 360 return true;
346 } else { 361 } else {
347 - if (_currIndex != 3) {  
348 - if (App.sp.containsKey('sellerEdate')) {  
349 - List<String> data = App.sp.getStringList('sellerEdate');  
350 - if (data.contains('-1')) {  
351 - //已经弹过过期弹窗,默认我的  
352 - _currIndex = 3; 362 + if (collectStoreProvider.sellerVersionList != null &&
  363 + collectStoreProvider.sellerVersionList.length > 0) {
  364 + App.sp.remove("sellerEdate");
  365 + App.sp.remove("sellerEdateModule'");
  366 + NavigatorUtil.goHomePage(context); //跳转至正常版本
  367 + } else {
  368 + //过期提醒
  369 + if (_currIndex != 3) {
  370 + if (App.sp.containsKey('sellerEdate')) {
  371 + List<String> data = App.sp.getStringList('sellerEdate');
  372 + if (data.contains('-1')) {
  373 + //已经弹过过期弹窗,默认我的
  374 + _currIndex = 3;
  375 + }
353 } 376 }
  377 + NavigatorUtil.goHomePageSim(context, initialIndex: _currIndex);
354 } 378 }
355 - NavigatorUtil.goHomePageSim(context, initialIndex: _currIndex);  
356 } 379 }
357 380
358 return false; 381 return false;
@@ -544,8 +567,9 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { @@ -544,8 +567,9 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
544 //店铺过期提醒 567 //店铺过期提醒
545 // 计算时间差 568 // 计算时间差
546 //店铺过期日期 569 //店铺过期日期
547 - DateTime edate = DateTime.fromMillisecondsSinceEpoch(  
548 - int.parse(sellerVersionSunModel.edate) * 1000); 570 + // DateTime edate = DateTime.fromMillisecondsSinceEpoch(
  571 + // int.parse(sellerVersionSunModel.edate) * 1000);
  572 + DateTime edate = DateTime.fromMillisecondsSinceEpoch(1716307200000);
549 573
550 //当前日期 574 //当前日期
551 final datenow = DateTime.now(); 575 final datenow = DateTime.now();
@@ -1819,7 +1843,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { @@ -1819,7 +1843,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver {
1819 currentIndex: _currIndex, 1843 currentIndex: _currIndex,
1820 onTap: (int index) { 1844 onTap: (int index) {
1821 if (_currIndex != index) { 1845 if (_currIndex != index) {
1822 - if (App.sp.containsKey('sellerEdate')) { 1846 + if (App.sp.containsKey('sellerEdate')) {
1823 List<String> data = App.sp.getStringList('sellerEdate'); 1847 List<String> data = App.sp.getStringList('sellerEdate');
1824 if (data.contains('-1')) { 1848 if (data.contains('-1')) {
1825 DialogUtil.cupertinoAlertSellerHasEdateDialog( 1849 DialogUtil.cupertinoAlertSellerHasEdateDialog(
@@ -264,6 +264,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { @@ -264,6 +264,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver {
264 if (collectStoreProvider.sellerVersionList != null && 264 if (collectStoreProvider.sellerVersionList != null &&
265 collectStoreProvider.sellerVersionList.length > 0) { 265 collectStoreProvider.sellerVersionList.length > 0) {
266 App.sp.remove("sellerEdate"); 266 App.sp.remove("sellerEdate");
  267 + App.sp.remove("sellerEdateModule'");
267 NavigatorUtil.goHomePage(context); //跳转至正常版本 268 NavigatorUtil.goHomePage(context); //跳转至正常版本
268 } else { 269 } else {
269 //过期提醒 270 //过期提醒
@@ -271,8 +272,6 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { @@ -271,8 +272,6 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver {
271 } 272 }
272 } 273 }
273 274
274 -  
275 -  
276 setState(() {}); 275 setState(() {});
277 } 276 }
278 277