diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index b8b6487..3add551 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -31,6 +31,7 @@
+
@@ -41,5 +42,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/providers/user_provider.dart b/lib/providers/user_provider.dart
index 071d523..fe62bf8 100644
--- a/lib/providers/user_provider.dart
+++ b/lib/providers/user_provider.dart
@@ -52,8 +52,8 @@ class UserProvider extends ChangeNotifier {
_isLogin = true;
//每次打开app更新用户信息
await updateUserInfo();
- await updateConSms();
- await updateRefSms();
+ // await updateConSms();
+ // await updateRefSms();
}
Future logout() async {
diff --git a/lib/ui/login/login_page.dart b/lib/ui/login/login_page.dart
index dfa594f..8129962 100644
--- a/lib/ui/login/login_page.dart
+++ b/lib/ui/login/login_page.dart
@@ -51,14 +51,14 @@ class _LoginPageState extends State {
_phoneController = TextEditingController();
_smsCodeController = TextEditingController();
final userProvider = Provider.of(context, listen: false);
- // var env = const String.fromEnvironment('ENV', defaultValue: 'dev');
- // if (kDebugMode) {
- // print('env :$env');
- // }
- // DevEV.instance.setEnvironment(
- // context,
- // environment: env == 'dev',
- // );
+ var env = const String.fromEnvironment('ENV', defaultValue: 'dev');
+ if (kDebugMode) {
+ print('env :$env');
+ }
+ DevEV.instance.setEnvironment(
+ context,
+ environment: env == 'dev',
+ );
}
@override
@@ -121,6 +121,7 @@ class _LoginPageState extends State {
border: _phoneController.text.length != 11,
opacity: _phoneController.text.length == 11 ? 1 : 0.4,
onTap: () async{
+ // DateTime? _lastTap;
if (_phoneController.text.length < 11) {
BotToast.showText(text: "请输入手机号");
}else if(_smsCodeController.text.length < 6){
@@ -131,14 +132,23 @@ class _LoginPageState extends State {
var base = await apiClient.request(API.app.login,
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
if (base.code == 0) {
- print(base.data['token']);
- await UserTool.userProvider.setToken(base.data['token']);
- Get.offAll(() => const TabNavigator());
- } else {
+ print("123123${base.data['token']}");
+ await UserTool.userProvider.setToken(base.data['token']);
+ Get.offAll(const TabNavigator());
+ }
+ else {
CloudToast.show(base.msg);
}
- }
- },
+ // if(_lastTap != null && DateTime.now().difference(_lastTap!).inSeconds < 2){
+ // BotToast.showText(text: "点太快");
+ // return;
+ // }
+ // _lastTap = DateTime.now();
+
+ }
+
+ },
+
text: "立即登录",
),
32.hb,
diff --git a/lib/ui/user/privacy_rights_page.dart b/lib/ui/user/privacy_rights_page.dart
index d849bde..5531e1a 100644
--- a/lib/ui/user/privacy_rights_page.dart
+++ b/lib/ui/user/privacy_rights_page.dart
@@ -16,7 +16,7 @@ class PrivacyRightsPage extends StatefulWidget {
@override
_PrivacyRightsPageState createState() => _PrivacyRightsPageState();
}
-final Uri _url = Uri.parse('http://www.dxbs.vip/explain.html');
+final Uri _url = Uri.parse('https://www.dxbs.vip/explain.html');
// final Telephony telephony = Telephony.instance;
// late final bool permissionsGranted;
// String body = "";
@@ -62,7 +62,7 @@ class _PrivacyRightsPageState extends State {
body: _getRights(),
bottomNavigationBar: GestureDetector(
onTap:()async{
- // await _launchUrl();
+ await _launchUrl();
// await launchUrlString("tel:13111111111");
} ,
// onTap: () async{