|
|
|
@ -58,7 +58,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
isLogin() async { |
|
|
|
|
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); |
|
|
|
|
|
|
|
|
|
if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || !sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
if (sharedPreferences.getBool("isShowPrivacyPolicy") == null || |
|
|
|
|
!sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
showAlertDialog(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -160,12 +161,14 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
|
|
|
|
|
_sendCode() async { |
|
|
|
|
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); |
|
|
|
|
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || !sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || |
|
|
|
|
!sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
showAlertDialog(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!checkStatus) { |
|
|
|
|
SmartDialog.showToast(S.of(context).gouxuanxieyi, alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(S.of(context).gouxuanxieyi, |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var mobile = _controllerPhone.text; |
|
|
|
@ -185,7 +188,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
{ |
|
|
|
|
btnText = S.of(context).send_code, |
|
|
|
|
_sendCodeStatus = 0, |
|
|
|
|
SmartDialog.showToast("${value.msg}", alignment: Alignment.center), |
|
|
|
|
SmartDialog.showToast("${value.msg}", |
|
|
|
|
alignment: Alignment.center), |
|
|
|
|
refresh() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -230,12 +234,14 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); |
|
|
|
|
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || !sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") || |
|
|
|
|
!sharedPreferences.getBool("isShowPrivacyPolicy")) { |
|
|
|
|
showAlertDialog(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!checkStatus) { |
|
|
|
|
SmartDialog.showToast(S.of(context).gouxuanxieyi, alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(S.of(context).gouxuanxieyi, |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var mobile = _controllerPhone.text; |
|
|
|
@ -932,9 +938,10 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).xieyitanchuang, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xff4D4D4D), |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.bold,), |
|
|
|
|
color: Color(0xff4D4D4D), |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text.rich( |
|
|
|
@ -955,7 +962,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
color: Color(0xff32A060)), |
|
|
|
|
recognizer: TapGestureRecognizer() |
|
|
|
|
..onTap = () { |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/treaty_page'); |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.popAndPushNamed('/router/treaty_page'); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
]), |
|
|
|
@ -984,6 +992,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
// Navigator.of(context).pop(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
height: 40.h, |
|
|
|
@ -1011,22 +1020,23 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
child: RoundButton( |
|
|
|
|
text: S.of(context).tongyibingjixu, |
|
|
|
|
textColor: Colors.white, |
|
|
|
|
fontSize: 12, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
callback: () { |
|
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
|
value.setBool("isShowPrivacyPolicy", true); |
|
|
|
|
}); |
|
|
|
|
SharesdkPlugin.uploadPrivacyPermissionStatus( |
|
|
|
|
1, |
|
|
|
|
(success) => { |
|
|
|
|
Navigator.of(context).pop(), |
|
|
|
|
}); |
|
|
|
|
1, (success) => { |
|
|
|
|
Navigator.of(context).pop(), |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
top: 10.h, |
|
|
|
|
bottom: 10.h, |
|
|
|
|
left: 21.5.w, |
|
|
|
|
right: 21.5.w), |
|
|
|
|
top: 10.h, |
|
|
|
|
bottom: 10.h, |
|
|
|
|
left: 21.5.w, |
|
|
|
|
right: 21.5.w, |
|
|
|
|
), |
|
|
|
|
backgroup: Color(0xff32A060), |
|
|
|
|
radius: 23, |
|
|
|
|
), |
|
|
|
|