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

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

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

@ -59,7 +59,8 @@ class _UserPageState extends State<UserPage> {
if ( UserTool.userProvider.isLogin) {
print(UserTool.userProvider.userInfo.end*1000);
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;
vle=false;
} else {

Loading…
Cancel
Save