更改提交

master
王亚玲 2 years ago
parent 18ec70981d
commit 1905c750f2

@ -113,9 +113,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
if(!(sms && plone && callLog && kg)){ if(!(sms && plone && callLog && kg)){
if(!kg){ if(!(sms && plone && callLog )){
BotToast.showText(text: '功能开关未开启'); BotToast.showText(text: '功能开关未开启');
Get.to(()=>const TabNavigator(index: 1,)); // Get.to(()=>const TabNavigator(index: 1,));
}else{ }else{
Get.to(()=>const PrivacyRightsPage(name: "权限说明")); Get.to(()=>const PrivacyRightsPage(name: "权限说明"));
} }
@ -125,8 +125,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
}, },
child: child:
Container( Container(
// width: 622.w, width: 622.w,
margin: EdgeInsets.only(left:!kg? 200.w:64.w,right: 64.w), margin: EdgeInsets.symmetric(horizontal: 64.w),
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 20.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 20.w),
height: 88.w, height: 88.w,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -142,17 +142,17 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
), ),
16.wb, 16.wb,
Text( Text(
!kg ? "功能开关未开启":"必须权限没有授予本APP无法正常使用", !(sms && plone && callLog ) ? "必须权限没有授予本APP无法正常使用":"功能开关未开启,请到我的页面开启",
style: style:
TextStyle(color: const Color(0xFFFF3F3F), fontSize: 24.sp), TextStyle(color: const Color(0xFFFF3F3F), fontSize: 24.sp),
), ),
32.wb, !(sms && plone && callLog ) ?32.wb: 0.wb,
Image( !(sms && plone && callLog )? Image(
image: AssetImage(Assets.icons.right.path), image: AssetImage(Assets.icons.right.path),
width: 28.w, width: 28.w,
height: 28.w, height: 28.w,
fit: BoxFit.fill, fit: BoxFit.fill,
) ):const SizedBox()
], ],
), ),
), ),

@ -308,7 +308,8 @@ class _LoginPageState extends State<LoginPage> {
final TapGestureRecognizer recognizer = TapGestureRecognizer(); final TapGestureRecognizer recognizer = TapGestureRecognizer();
recognizer.onTap = () { recognizer.onTap = () {
if (kDebugMode) { if (kDebugMode) {
print("点击协议了"); Get.to(()=>const ContentAuthorityPage());
// print("点击协议了");
} }
/// ///
}; };
@ -336,9 +337,7 @@ class _LoginPageState extends State<LoginPage> {
size: 18, color: Colors.blue), size: 18, color: Colors.blue),
), ),
GestureDetector(onTap: (){ RichText(
Get.to(()=>const ContentAuthorityPage());
},child: RichText(
text: TextSpan( text: TextSpan(
text: "我已阅读并同意", text: "我已阅读并同意",
style: TextStyle( style: TextStyle(
@ -354,11 +353,10 @@ class _LoginPageState extends State<LoginPage> {
// color: BaseStyle.colorcccccc, fontSize: 12 * 2.sp), // color: BaseStyle.colorcccccc, fontSize: 12 * 2.sp),
// ), // ),
TextSpan( TextSpan(
text: '隐私协议》', text: '短信帮手隐私协议》',
style: TextStyle(color: kPrimaryColor, fontSize: 12 * 2.sp), style: TextStyle(color: kPrimaryColor, fontSize: 12 * 2.sp),
recognizer: _recognizer(context, 1)), recognizer: _recognizer(context, 1)),
])),) ]))
,
], ],
), ),
); );

@ -45,12 +45,8 @@ class _UserPageState extends State<UserPage> {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false); final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
bool isVip = false; bool isVip = false;
String? endDate; String? endDate;
final service = FlutterBackgroundService();
late bool vle = false; late bool vle = false;
final service = FlutterBackgroundService();
final EasyRefreshController _easyRefreshController = EasyRefreshController(); final EasyRefreshController _easyRefreshController = EasyRefreshController();
@override @override
@ -59,15 +55,36 @@ class _UserPageState extends State<UserPage> {
super.dispose(); super.dispose();
} }
// _load() async { // _load() async {
// // print("123123131313131231231231231313123131232311313131231231");
// vle = await service.isRunning(); // vle = await service.isRunning();
// } // }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
UserTool.userProvider.updateUserInfo(); // _easyRefreshController.callRefresh();
Future.delayed( // UserTool.userProvider.updateUserInfo();
const Duration(milliseconds: 0),
() => setState(() async{ }
@override
Widget build(BuildContext context) {
return CloudScaffold(
systemStyle: const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
// systemNavigationBarColor: Colors.white,
),
path: Assets.images.bg.path,
bodyColor: Colors.white,
extendBody: true,
body: Expanded(child: Column(
children: [
Expanded(
child:EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
onRefresh: () async {
// _load();
// await UserTool.userProvider.updateUserInfo();
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);
@ -79,27 +96,14 @@ class _UserPageState extends State<UserPage> {
vle = await service.isRunning(); vle = await service.isRunning();
} }
//service.isRunning() as bool; //service.isRunning() as bool;
endDate = DateUtil.formatDateMs( // endDate = DateUtil.formatDateMs(
UserTool.userProvider.userInfo.end * 1000, // UserTool.userProvider.userInfo.end * 1000,
format: DateFormats.y_mo_d); // format: DateFormats.y_mo_d);
} else { } else {
vle = false; vle = false;
} }
})); setState(() {});
} },child:ListView(children: [
@override
Widget build(BuildContext context) {
return CloudScaffold(
systemStyle: const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
// systemNavigationBarColor: Colors.white,
),
path: Assets.images.bg.path,
bodyColor: Colors.white,
extendBody: true,
body: Column(
children: [
_getUser(), _getUser(),
72.hb, 72.hb,
_getBanner(), _getBanner(),
@ -128,9 +132,13 @@ class _UserPageState extends State<UserPage> {
color2: const Color(0xFFEBF5FF), color2: const Color(0xFFEBF5FF),
text: "退出登录", text: "退出登录",
) )
: const SizedBox() : const SizedBox()],) )
],
),
),],
),)
); );
} }
@ -270,7 +278,7 @@ class _UserPageState extends State<UserPage> {
_getVip(), _getVip(),
16.hb, 16.hb,
Text( Text(
isVip ? "$endDate到期" : "解锁全部功能", isVip ? "${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),
) )
], ],

Loading…
Cancel
Save