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