|
|
@@ -11,6 +11,7 @@ import 'package:poetry/utils/hex_color.dart';
|
|
|
import 'package:poetry/utils/rgb_color.dart';
|
|
|
import 'package:sp_util/sp_util.dart';
|
|
|
import 'package:umeng_common_sdk/umeng_common_sdk.dart';
|
|
|
+import 'package:universal_platform/universal_platform.dart';
|
|
|
|
|
|
import '../config/env_config.dart';
|
|
|
import '../constant/color_constant.dart';
|
|
|
@@ -18,6 +19,7 @@ import '../constant/um_constant.dart';
|
|
|
import '../constant/wx_constant.dart';
|
|
|
import '../module/app_service.dart';
|
|
|
import '../routers/app_routers.dart';
|
|
|
+import '../utils/app_event.dart';
|
|
|
|
|
|
class MainCtrl extends GetxController {
|
|
|
|
|
|
@@ -52,9 +54,7 @@ class MainCtrl extends GetxController {
|
|
|
return;
|
|
|
}
|
|
|
else {
|
|
|
- UmengCommonSdk.initCommon(UmConstant.androidAppKey,
|
|
|
- UmConstant.iOSAppKey, EnvConfig.appChannel);
|
|
|
- UmengCommonSdk.setPageCollectionModeAuto();
|
|
|
+ _initUmeng();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -86,6 +86,16 @@ class MainCtrl extends GetxController {
|
|
|
print("main on ready");
|
|
|
}
|
|
|
|
|
|
+ void _initUmeng() {
|
|
|
+ UmengCommonSdk.initCommon(UmConstant.androidAppKey,
|
|
|
+ UmConstant.iOSAppKey, EnvConfig.appChannel);
|
|
|
+ // // 自动采集页面信息
|
|
|
+ // UmengCommonSdk.setPageCollectionModeAuto();
|
|
|
+
|
|
|
+ // 手动采集页面信息
|
|
|
+ UmengCommonSdk.setPageCollectionModeManual();
|
|
|
+ }
|
|
|
+
|
|
|
void showHintDialog() async {
|
|
|
var result = await showDialog(
|
|
|
barrierDismissible: false,
|
|
|
@@ -96,7 +106,7 @@ class MainCtrl extends GetxController {
|
|
|
borderRadius: BorderRadius.all(Radius.circular(16.w))),
|
|
|
child: Container(
|
|
|
width: 314.w,
|
|
|
- height: 280.w,
|
|
|
+ height: 270.w,
|
|
|
decoration: BoxDecoration(
|
|
|
color: Colors.white,
|
|
|
borderRadius: BorderRadius.all(Radius.circular(16.w)),
|
|
|
@@ -109,7 +119,10 @@ class MainCtrl extends GetxController {
|
|
|
Text(
|
|
|
"提示",
|
|
|
style: TextStyle(
|
|
|
- fontSize: 18.w, color: ColorConstant.textMain),
|
|
|
+ fontSize: 18.sp,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ color: HexColor("#000000").withOpacity(0.87)
|
|
|
+ ),
|
|
|
),
|
|
|
SizedBox(
|
|
|
height: 16.w,
|
|
|
@@ -120,7 +133,11 @@ class MainCtrl extends GetxController {
|
|
|
TextSpan(
|
|
|
text: "我们非常重视您的个人信息和隐私保护。为了更好的保障您的个人权益,您在点击同意",
|
|
|
style: TextStyle(
|
|
|
- fontSize: 16.w, color: ColorConstant.textMain)),
|
|
|
+ fontSize: 16.w,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: HexColor("#808080")
|
|
|
+ )
|
|
|
+ ),
|
|
|
TextSpan(
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
..onTap = () {
|
|
|
@@ -129,11 +146,18 @@ class MainCtrl extends GetxController {
|
|
|
text: "《用户协议》",
|
|
|
style: TextStyle(
|
|
|
fontSize: 16.w,
|
|
|
- color: ColorConstant.primaryColor)),
|
|
|
+ color: ColorConstant.primaryColor,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ )
|
|
|
+ ),
|
|
|
TextSpan(
|
|
|
text: "及",
|
|
|
style: TextStyle(
|
|
|
- fontSize: 16.w, color: ColorConstant.textMain)),
|
|
|
+ fontSize: 16.w,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: HexColor("#808080")
|
|
|
+ )
|
|
|
+ ),
|
|
|
TextSpan(
|
|
|
recognizer: TapGestureRecognizer()
|
|
|
..onTap = () {
|
|
|
@@ -142,57 +166,79 @@ class MainCtrl extends GetxController {
|
|
|
text: "《隐私政策》",
|
|
|
style: TextStyle(
|
|
|
fontSize: 16.w,
|
|
|
- color: ColorConstant.primaryColor)),
|
|
|
+ color: ColorConstant.primaryColor,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ )
|
|
|
+ ),
|
|
|
TextSpan(
|
|
|
text: "前,请务必审慎阅读,并充分理解协议条款内容。",
|
|
|
style: TextStyle(
|
|
|
- fontSize: 16.w, color: ColorConstant.textMain)),
|
|
|
+ fontSize: 16.w,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: HexColor("#808080")
|
|
|
+ )
|
|
|
+ ),
|
|
|
])),
|
|
|
),
|
|
|
- SizedBox(
|
|
|
- height: 24.w,
|
|
|
- ),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
- MaterialButton(
|
|
|
- height: 48.w,
|
|
|
- minWidth: 125.w,
|
|
|
- onPressed: () {
|
|
|
- _doQuit();
|
|
|
- },
|
|
|
- shape: StadiumBorder(),
|
|
|
- color: Color(0xFFD7D7D7),
|
|
|
- textColor: Color(0xFF9E9E9E),
|
|
|
- disabledTextColor: Color(0xFFD7D7D7),
|
|
|
- child: Text(
|
|
|
- "拒绝",
|
|
|
- style: TextStyle(fontSize: 16.w),
|
|
|
+ // SizedBox(
|
|
|
+ // height: 24.w,
|
|
|
+ // ),
|
|
|
+ Spacer(),
|
|
|
+ Container(
|
|
|
+ height: 48.w,
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ InkWell(
|
|
|
+ child: Container(
|
|
|
+ width: 150.w,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ child: Text(
|
|
|
+ "拒绝",
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 16,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: HexColor("#666666")
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ onTap: (){
|
|
|
+ _doQuit();
|
|
|
+ },
|
|
|
),
|
|
|
- ),
|
|
|
- SizedBox(
|
|
|
- width: 16.w,
|
|
|
- ),
|
|
|
- MaterialButton(
|
|
|
- height: 48.w,
|
|
|
- minWidth: 125.w,
|
|
|
- onPressed: () {
|
|
|
- Navigator.pop(context);
|
|
|
- AppService().setAgreeAgreement();
|
|
|
- UmengCommonSdk.initCommon(UmConstant.androidAppKey,
|
|
|
- UmConstant.iOSAppKey, EnvConfig.appChannel);
|
|
|
- UmengCommonSdk.setPageCollectionModeAuto();
|
|
|
- },
|
|
|
- shape: StadiumBorder(),
|
|
|
- color: ColorConstant.primaryColor,
|
|
|
- textColor: Colors.white,
|
|
|
- disabledTextColor: ColorConstant.primaryColor,
|
|
|
- child: Text(
|
|
|
- "同意",
|
|
|
- style: TextStyle(fontSize: 16.w),
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(top: 9),
|
|
|
+ width: 1,
|
|
|
+ height: 24,
|
|
|
+ color: HexColor("#EFEFEF"),
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
+ InkWell(
|
|
|
+ child: Container(
|
|
|
+ width: 150.w,
|
|
|
+ alignment: Alignment.center,
|
|
|
+ child: Text(
|
|
|
+ "同意",
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 16,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ color: HexColor("#FCA14C")
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ onTap: (){
|
|
|
+ Navigator.pop(context);
|
|
|
+ AppService().setAgreeAgreement();
|
|
|
+ if (UniversalPlatform.isIOS){
|
|
|
+ AppEvent.getInstance()?.fire(FirstInstallReloadDataEvent());
|
|
|
+ }
|
|
|
+ _initUmeng();
|
|
|
+ },
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ SizedBox(
|
|
|
+ height: 10.w,
|
|
|
)
|
|
|
],
|
|
|
),
|