更改隐私政策

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"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- 读取手机IMEI的设备权限 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
</manifest> </manifest>

@ -17,8 +17,105 @@ class _PrivacyPageState extends State<PrivacyPage> {
padding: EdgeInsets.all(16.sp), padding: EdgeInsets.all(16.sp),
child: Text( 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. 1.
2.使 2.使
3. 3.
@ -27,95 +124,119 @@ class _PrivacyPageState extends State<PrivacyPage> {
6. 6.
7. 7.
8. 8.
1. 1.
1.1 1.1
APP使APP便访 APP使APP便访
1.2 1.2
APPAPP使APP使 APPAPP使APP使 APP使使APPAPP使APP 使使
APP使使APPAPP使APP
使使
使
使 /
/ 使使 使使
使使
使使使 使使
访 使访访访访访访访访访访
使使使 使使使
使 访
使使使 使访访访访访访访访访访
/ 使
使 使使使
使
/ 使 使
使
使 使使使
使 /
使使 使
使
使使 使
/ 使使使
使, 使使使
使,
使, 使
访使 /
访使 使
使访
使访 使
使访
使访 使
使访
使访 使
使访 ETC
使访 使ETC
使访
使访 使使 使使
使访
使
使,
访 访使
访 访使 使访 使访 使访 使访 使访 使访 使访 使访 使访 使访 访 访 访 访 访
访
访
访
(iOS) 访
/ 使访
1.3 1.3
APPAPP APPAPP 使访
使访
1.4 1.4
1.5 1.5
便使APPID访 便使APPID访
2.使 2.使
2.1  2.1
2.2 APP使使使APPAPP使 2.2 APP使使使APPAPP使
3. 3.
3.1  3.1
3.2  3.2
4. 4.
便 便 app
广 app
5. 5.
访使APP 访使APP APP 使 线APP
APP
使
线APP
6. 6.
6.1 APP访 6.1 APP访
6.2  6.2
7. 7.
APP18使APPAPP使8 APP18使APPAPP使8
8. 8.
johnson.yang@akuhome.com xin@akuhome.com
广
20201020 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( style: TextStyle(
fontSize: 30.w, fontSize: 30.w,

@ -1,25 +1,9 @@
import 'dart:async'; import 'dart:async';
import 'dart:ui'; 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/base/base_style.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/extensions/num_ext.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_func.dart';
import 'package:aku_community/pages/sign/sign_up/sign_up_set_nickname_page.dart'; import 'package:aku_community/pages/sign/sign_up/sign_up_set_nickname_page.dart';
import 'package:aku_community/pages/tab_navigator.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/utils/headers.dart';
import 'package:aku_community/widget/bee_back_button.dart'; import 'package:aku_community/widget/bee_back_button.dart';
import 'package:aku_community/widget/bee_scaffold.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 { class SignInPage extends StatefulWidget {
SignInPage({Key? key}) : super(key: key); SignInPage({Key? key}) : super(key: key);
@ -41,6 +37,7 @@ class _SignInPageState extends State<SignInPage> {
TextEditingController _code = new TextEditingController(); TextEditingController _code = new TextEditingController();
Timer? _timer; Timer? _timer;
bool get validPhone => RegexUtil.isMobileSimple(_phone.text); bool get validPhone => RegexUtil.isMobileSimple(_phone.text);
bool get _canGetCode { 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 { _parseLogin(bool result) async {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false); final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
final signUpProvider = final signUpProvider =
@ -120,8 +93,9 @@ class _SignInPageState extends State<SignInPage> {
else if (TextUtil.isEmpty(_code.text)) else if (TextUtil.isEmpty(_code.text))
BotToast.showText(text: '验证码不能为空'); BotToast.showText(text: '验证码不能为空');
else { else {
bool? result = await _showLoginVerify(); // bool? result = await _showLoginVerify();
if (result != null) _parseLogin(result); // if (result != null) _parseLogin(result);
_parseLogin(true);
} }
}, },
height: 89.w, height: 89.w,
@ -277,34 +251,34 @@ class _SignInPageState extends State<SignInPage> {
SizedBox(height: 59.w), SizedBox(height: 59.w),
_inkWellLogin(), _inkWellLogin(),
10.hb, 10.hb,
Row( // Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
MaterialButton( // MaterialButton(
shape: StadiumBorder(), // shape: StadiumBorder(),
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
onPressed: () => Get.to(() => AgreementPage()), // onPressed: () => Get.to(() => AgreementPage()),
child: Text( // child: Text(
'《小蜜蜂用户协议》', // '《小蜜蜂用户协议》',
style: TextStyle( // style: TextStyle(
color: Colors.lightBlue, // color: Colors.lightBlue,
), // ),
), // ),
), // ),
SizedBox(width: 15.w), // SizedBox(width: 15.w),
MaterialButton( // MaterialButton(
shape: StadiumBorder(), // shape: StadiumBorder(),
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
onPressed: () => Get.to(() => PrivacyPage()), // onPressed: () => Get.to(() => PrivacyPage()),
child: Text( // child: Text(
'《小蜜蜂隐私政策》', // '《小蜜蜂隐私政策》',
style: TextStyle( // style: TextStyle(
color: Colors.lightBlue, // color: Colors.lightBlue,
), // ),
), // ),
), // ),
], // ],
), // ),
], ],
)), )),
), ),

@ -1,8 +1,18 @@
import 'dart:io'; 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/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import 'package:hive_flutter/hive_flutter.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:provider/provider.dart';
import 'package:velocity_x/velocity_x.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 { class SplashPage extends StatefulWidget {
SplashPage({Key? key}) : super(key: key); SplashPage({Key? key}) : super(key: key);
@ -26,23 +29,19 @@ class SplashPage extends StatefulWidget {
} }
class _SplashPageState extends State<SplashPage> { class _SplashPageState extends State<SplashPage> {
TapGestureRecognizer _agreementRecognizer = TapGestureRecognizer();
TapGestureRecognizer _privacyRecognizer = TapGestureRecognizer();
/// ///
Future _originOp() async { Future _originOp() async {
//HiveStore //HiveStore
await Hive.initFlutter(); await Hive.initFlutter();
await HiveStore.init(); await HiveStore.init();
//AMap
// await AmapLocation.instance.init(iosKey: 'ios key');
if (Platform.isAndroid || Platform.isIOS) {
await Permission.locationWhenInUse.request();
}
} }
Future _initOp() async { Future _initOp() async {
//ensure call _originOp first. //ensure call _originOp first.
try { try {
await _originOp();
final userProvider = Provider.of<UserProvider>(context, listen: false); final userProvider = Provider.of<UserProvider>(context, listen: false);
final appProvider = Provider.of<AppProvider>(context, listen: false); final appProvider = Provider.of<AppProvider>(context, listen: false);
appProvider.initApplications(); 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 @override
void initState() { void initState() {
super.initState(); super.initState();
@ -63,6 +111,22 @@ class _SplashPageState extends State<SplashPage> {
debug: DeveloperUtil.dev, debug: DeveloperUtil.dev,
); );
Future.delayed(Duration(milliseconds: 1000), () async { 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(); await _initOp();
Get.offAll(() => TabNavigator()); Get.offAll(() => TabNavigator());
}); });

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

Loading…
Cancel
Save