更改隐私政策

hmxc
张萌 3 years ago
parent 32258020e6
commit 39a57b9534

@ -54,4 +54,6 @@
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- 读取手机IMEI的设备权限 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
</manifest>

@ -17,8 +17,105 @@ class _PrivacyPageState extends State<PrivacyPage> {
padding: EdgeInsets.all(16.sp),
child: Text(
'''
APP广APP便使使
20209
2020V2
使APP 使APP使 使使 //()
1.1
使使
2.1
APP线
2.2
2.2.1 使
2.2.2 iOSandroid
2.3
2.3.1 使使
2.3.2 使使
3.1
3.2 使
4.1
4.2
4.3
4.4 使
5.1
5.2
5.3 使
6.1
6.2 使使使
6.3
6.4 访使
6.5
7.1 使
7.1.1 使使 7.1.2 使使使使 7.1.3 怀使
7.2
7.2.1 使
7.2.2
7.2.2.1
7.2.2.2
7.2.2.3 使
7.2.3 使
7.2.3.1
7.2.3.2
7.2.3.3 使访
7.2.3.4
7.2.3.5 线线
7.2.4 14
7.2.5 ;
7.3
7.3.1 使
8.1
8.1.1
8.1.1.1
8.1.1.2
8.1.1.3
8.1.1.4 广
8.1.1.5
8.2 使
使
8.2.1
8.2.2
8.2.3 使
8.2.4 使/
8.2.5
8.2.6 使
8.2.7
8.2.8
8.3
使
8.3.1
8.3.2
8.3.3
8.3.4
8.3.5 广广
8.3.6
8.3.7
8.3.8
8.4
使
8.5
8.5.1 使
8.5.2
8.5.3
9.1 9.2
10.1 访使 10.2 使 10.3 使 10.4 10.5
11.1 使使使 11.2 使使 11.3 使
12.1 APP---APP 1APP 2/ 使访使
12.20574-87760023
便使使
1.
2.使
3.
@ -27,95 +124,119 @@ class _PrivacyPageState extends State<PrivacyPage> {
6.
7.
8.
1.
1.1
APP使APP便访
APP使APP便访
1.2
APPAPP使APP使
APP使使APPAPP使APP
使使
使
/ 使使
使使
使使使
访 使访访访访访访访访访访
使使使
使
使使使
/ 使
使
使
/ 使
使
使
使
使使
使
使使
/ 使使使
使,
使,
使,
访使
访使
使访
使访
使访
使访
使访
使访
使访
使访
使访
使访
使访
访
访
访
访
访
(iOS) 访
/ 使访
APPAPP使APP使 APP使使APPAPP使APP 使使
使
/
使使
使使
使使使
访
使访访访访访访访访访访
使使使
使
使使使
/
使
使
使使使
使
/
使
使
使
使
ETC
使ETC
使使 使使
使
使,
访使
访使 使访 使访 使访 使访 使访 使访 使访 使访 使访 使访 访 访 访 访 访
1.3
APPAPP
使访
APPAPP 使访
1.4
1.5
便使APPID访
便使APPID访
2.使
2.1 
2.2 APP使使使APPAPP使
2.1
2.2 APP使使使APPAPP使
3.
3.1 
3.2 
3.1
3.2
4.
便
广 app
便 app
5.
访使APP
APP
使
线APP
访使APP APP 使 线APP
6.
6.1 APP访
6.2 
6.1 APP访
6.2
7.
APP18使APPAPP使8
APP18使APPAPP使8
8.
johnson.yang@akuhome.com
广
20201020
xin@akuhome.com
9.使
9.1. 使使/使
9.2. 使//使/使
9.3. //使/使
9.4. 使
9.4.1
1 使/
2 使
9.4.2
1 使
10.
访使
10.1. 访
10.1.1 访
10.1.2 使使稿
10.1.3 访
10.2. /
//
10.3. /////-
10.4. 使线///
3.
3.1
3.2
1
2 使
3
4
5
4.
使App/
5.
线使使
使/APP-
''',
style: TextStyle(
fontSize: 30.w,

@ -1,25 +1,9 @@
import 'dart:async';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
import 'package:flustars/flustars.dart' show TextUtil;
import 'package:flustars/flustars.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Response;
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/extensions/num_ext.dart';
import 'package:aku_community/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:aku_community/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:aku_community/pages/sign/sign_func.dart';
import 'package:aku_community/pages/sign/sign_up/sign_up_set_nickname_page.dart';
import 'package:aku_community/pages/tab_navigator.dart';
@ -28,6 +12,18 @@ import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/widget/bee_back_button.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
import 'package:flustars/flustars.dart' show TextUtil;
import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Response;
import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class SignInPage extends StatefulWidget {
SignInPage({Key? key}) : super(key: key);
@ -41,6 +37,7 @@ class _SignInPageState extends State<SignInPage> {
TextEditingController _code = new TextEditingController();
Timer? _timer;
bool get validPhone => RegexUtil.isMobileSimple(_phone.text);
bool get _canGetCode {
@ -59,30 +56,6 @@ class _SignInPageState extends State<SignInPage> {
);
}
Future<bool?> _showLoginVerify() async {
return await showCupertinoDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text('点击登录即表示您已阅读并同意'),
content: Text(
'''点击登录即表示您已阅读并同意《小蜜蜂用户协议》《小蜜蜂隐私政策》(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。'''),
actions: [
CupertinoDialogAction(
child: Text('同意'),
onPressed: () => Get.back(result: true),
),
CupertinoDialogAction(
child: Text('拒绝'),
onPressed: () => Get.back(result: false),
),
],
);
},
);
}
_parseLogin(bool result) async {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
final signUpProvider =
@ -120,8 +93,9 @@ class _SignInPageState extends State<SignInPage> {
else if (TextUtil.isEmpty(_code.text))
BotToast.showText(text: '验证码不能为空');
else {
bool? result = await _showLoginVerify();
if (result != null) _parseLogin(result);
// bool? result = await _showLoginVerify();
// if (result != null) _parseLogin(result);
_parseLogin(true);
}
},
height: 89.w,
@ -277,34 +251,34 @@ class _SignInPageState extends State<SignInPage> {
SizedBox(height: 59.w),
_inkWellLogin(),
10.hb,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MaterialButton(
shape: StadiumBorder(),
padding: EdgeInsets.zero,
onPressed: () => Get.to(() => AgreementPage()),
child: Text(
'《小蜜蜂用户协议》',
style: TextStyle(
color: Colors.lightBlue,
),
),
),
SizedBox(width: 15.w),
MaterialButton(
shape: StadiumBorder(),
padding: EdgeInsets.zero,
onPressed: () => Get.to(() => PrivacyPage()),
child: Text(
'《小蜜蜂隐私政策》',
style: TextStyle(
color: Colors.lightBlue,
),
),
),
],
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// MaterialButton(
// shape: StadiumBorder(),
// padding: EdgeInsets.zero,
// onPressed: () => Get.to(() => AgreementPage()),
// child: Text(
// '《小蜜蜂用户协议》',
// style: TextStyle(
// color: Colors.lightBlue,
// ),
// ),
// ),
// SizedBox(width: 15.w),
// MaterialButton(
// shape: StadiumBorder(),
// padding: EdgeInsets.zero,
// onPressed: () => Get.to(() => PrivacyPage()),
// child: Text(
// '《小蜜蜂隐私政策》',
// style: TextStyle(
// color: Colors.lightBlue,
// ),
// ),
// ),
// ],
// ),
],
)),
),

@ -1,8 +1,18 @@
import 'dart:io';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:aku_community/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/utils/developer_util.dart';
import 'package:aku_community/utils/hive_store.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:hive_flutter/hive_flutter.dart';
@ -11,13 +21,6 @@ import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/utils/developer_util.dart';
import 'package:aku_community/utils/hive_store.dart';
class SplashPage extends StatefulWidget {
SplashPage({Key? key}) : super(key: key);
@ -26,23 +29,19 @@ class SplashPage extends StatefulWidget {
}
class _SplashPageState extends State<SplashPage> {
TapGestureRecognizer _agreementRecognizer = TapGestureRecognizer();
TapGestureRecognizer _privacyRecognizer = TapGestureRecognizer();
///
Future _originOp() async {
//HiveStore
await Hive.initFlutter();
await HiveStore.init();
//AMap
// await AmapLocation.instance.init(iosKey: 'ios key');
if (Platform.isAndroid || Platform.isIOS) {
await Permission.locationWhenInUse.request();
}
}
Future _initOp() async {
//ensure call _originOp first.
try {
await _originOp();
final userProvider = Provider.of<UserProvider>(context, listen: false);
final appProvider = Provider.of<AppProvider>(context, listen: false);
appProvider.initApplications();
@ -55,6 +54,55 @@ class _SplashPageState extends State<SplashPage> {
}
}
Future<bool?> _showLoginVerify() async {
return await showCupertinoDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text('隐私政策和用户协议'),
content: RichText(
text: TextSpan(
text: '点击登录即表示您已阅读并同意',
style: TextStyle(color: Colors.black),
children: [
TextSpan(
text: '《用户协议》',
style: TextStyle(color: Colors.blue),
recognizer: _agreementRecognizer
..onTap = () {
Get.to(() => AgreementPage());
}),
TextSpan(
text: '《隐私政策》',
style: TextStyle(color: Colors.blue),
recognizer: _privacyRecognizer
..onTap = () {
Get.to(() => PrivacyPage());
}),
TextSpan(
style: TextStyle(color: Colors.black),
text:
'(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。')
]),
),
// ),
actions: [
CupertinoDialogAction(
child: Text('同意'),
onPressed: () => Get.back(result: true),
),
CupertinoDialogAction(
child: Text('拒绝'),
onPressed: () => Get.back(result: false),
),
],
);
},
);
}
@override
void initState() {
super.initState();
@ -63,6 +111,22 @@ class _SplashPageState extends State<SplashPage> {
debug: DeveloperUtil.dev,
);
Future.delayed(Duration(milliseconds: 1000), () async {
await _originOp();
var agreement = await HiveStore.appBox?.get('agreement') ?? false;
if (!agreement) {
var result = await _showLoginVerify();
if (result == null || !result) {
SystemNavigator.pop();
HiveStore.appBox!.put('agreement', false);
} else {
HiveStore.appBox!.put('agreement', true);
}
}
//AMap
// await AmapLocation.instance.init(iosKey: 'ios key');
if (Platform.isAndroid || Platform.isIOS) {
await Permission.locationWhenInUse.request();
}
await _initOp();
Get.offAll(() => TabNavigator());
});

@ -2,7 +2,7 @@ name: aku_community
description: A new Flutter project.
publish_to: "none"
version: 1.7.0-dev+43
version: 1.8.1-dev+45
environment:
sdk: ">=2.12.0 <3.0.0"

Loading…
Cancel
Save