master
王亚玲 2 years ago
parent e7e2163692
commit 7034f87a75

@ -51,14 +51,14 @@ class _LoginPageState extends State<LoginPage> {
_phoneController = TextEditingController(); _phoneController = TextEditingController();
_smsCodeController = TextEditingController(); _smsCodeController = TextEditingController();
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
var env = const String.fromEnvironment('ENV', defaultValue: 'dev'); // var env = const String.fromEnvironment('ENV', defaultValue: 'dev');
if (kDebugMode) { // if (kDebugMode) {
print('env :$env'); // print('env :$env');
} // }
DevEV.instance.setEnvironment( // DevEV.instance.setEnvironment(
context, // context,
environment: env == 'dev', // environment: env == 'dev',
); // );
} }
@override @override
@ -130,7 +130,7 @@ class _LoginPageState extends State<LoginPage> {
BotToast.showText(text: "请同意并勾选隐私政策"); BotToast.showText(text: "请同意并勾选隐私政策");
}else{ }else{
if(_lastTap != null &&DateTime.now().difference(_lastTap!).inSeconds < 2){ if(_lastTap != null &&DateTime.now().difference(_lastTap!).inSeconds < 2){
BotToast.showText(text: "过快"); // BotToast.showText(text: "过快");
return ; return ;
} }
_lastTap = DateTime.now(); _lastTap = DateTime.now();

@ -1,4 +1,5 @@
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/base/base_style.dart';
@ -7,6 +8,7 @@ import 'package:project_telephony/ui/widget/plone_back_button.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/ui/widget/putup_widget.dart'; import 'package:project_telephony/ui/widget/putup_widget.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/utils/user_tool.dart';
import 'package:tobias/tobias.dart'; import 'package:tobias/tobias.dart';
import 'package:fluwx/fluwx.dart' as fluwx; import 'package:fluwx/fluwx.dart' as fluwx;
@ -106,7 +108,8 @@ class _MembersPageState extends State<MembersPage> {
} }
}, },
textColor: const Color(0xFF333333), textColor: const Color(0xFF333333),
text: "立即开通", text: UserTool.userProvider.userInfo.isVip!=1?"立即开通":"立即续费",
color1: const Color(0xFFFFF6D8), color1: const Color(0xFFFFF6D8),
color2: const Color(0xFFFFEAB0), color2: const Color(0xFFFFEAB0),
) )
@ -159,7 +162,7 @@ class _MembersPageState extends State<MembersPage> {
_getVip(), _getVip(),
18.hb, 18.hb,
Text( Text(
"解锁全部功能", UserTool.userProvider.userInfo.name,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: BaseStyle.fontSize32, fontSize: BaseStyle.fontSize32,
@ -167,7 +170,7 @@ class _MembersPageState extends State<MembersPage> {
), ),
16.hb, 16.hb,
Text( Text(
"暂未开通会员", UserTool.userProvider.userInfo.isVip!=1?"暂未开通会员":"${DateUtil.formatDateMs(UserTool.userProvider.userInfo.end * 1000, format: DateFormats.y_mo_d)}到期",
style: TextStyle(color: Colors.white, fontSize: BaseStyle.fontSize24), style: TextStyle(color: Colors.white, fontSize: BaseStyle.fontSize24),
), ),
], ],
@ -194,9 +197,9 @@ class _MembersPageState extends State<MembersPage> {
color: const Color(0xFFFFEAB0), color: const Color(0xFFFFEAB0),
), ),
), ),
const Text( Text(
"未开通会员", UserTool.userProvider.userInfo.isVip!=1?"未开通会员":"已成为会员",
style: TextStyle( style: const TextStyle(
color: Color( color: Color(
0xFFFFEAB0, 0xFFFFEAB0,
), ),

@ -59,7 +59,8 @@ class _UserPageState extends State<UserPage> {
if ( UserTool.userProvider.isLogin) { if ( UserTool.userProvider.isLogin) {
print(UserTool.userProvider.userInfo.end*1000); print(UserTool.userProvider.userInfo.end*1000);
print(DateTime.now().millisecondsSinceEpoch); print(DateTime.now().millisecondsSinceEpoch);
if (UserTool.userProvider.userInfo.end*1000<=DateTime.now().millisecondsSinceEpoch ) { // UserTool.userProvider.userInfo.end*1000<=DateTime.now().millisecondsSinceEpoch
if (UserTool.userProvider.userInfo.isVip!=1) {
isVip = false; isVip = false;
vle=false; vle=false;
} else { } else {

Loading…
Cancel
Save