|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
@ -49,13 +51,15 @@ class _UserPageState extends State<UserPage> {
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
if ( UserTool.userProvider.isLogin) {
|
|
|
|
|
if (UserTool.userProvider.userInfo.end<=DateTime.now().millisecondsSinceEpoch ) {
|
|
|
|
|
Timer.periodic(Duration(seconds: 1), (timer) {
|
|
|
|
|
if (UserTool.userProvider.userInfo.isVip==1 && UserTool.userProvider.userInfo.end>=DateTime.now().millisecondsSinceEpoch ) {
|
|
|
|
|
isVip = false;
|
|
|
|
|
vle =false;
|
|
|
|
|
} else {
|
|
|
|
|
vle =true;
|
|
|
|
|
isVip = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
endDate=DateUtil.formatDateMs(UserTool.userProvider.userInfo.end * 1000, format: DateFormats.y_mo_d);
|
|
|
|
|
}else{
|
|
|
|
|
vle = false;
|
|
|
|
@ -295,7 +299,7 @@ class _UserPageState extends State<UserPage> {
|
|
|
|
|
// await prefs.setBool("kg", value);
|
|
|
|
|
// print("这是数据${prefs.getBool("kg")}");
|
|
|
|
|
setState(() {
|
|
|
|
|
if(isVip){
|
|
|
|
|
if(!isVip){
|
|
|
|
|
vle=value;
|
|
|
|
|
|
|
|
|
|
// prefs.setBool("kg", vle);
|
|
|
|
|