提交更改

master
王亚玲 2 years ago
parent 124a48712e
commit 027ee79f96

@ -31,6 +31,7 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- 互联网权限-->
<uses-permission android:name="android.permission.SEND_SMS"/>
@ -41,5 +42,18 @@
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
<!-- If your app checks for SMS support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
</queries>
</manifest>

@ -52,8 +52,8 @@ class UserProvider extends ChangeNotifier {
_isLogin = true;
//app
await updateUserInfo();
await updateConSms();
await updateRefSms();
// await updateConSms();
// await updateRefSms();
}
Future logout() async {

@ -51,14 +51,14 @@ class _LoginPageState extends State<LoginPage> {
_phoneController = TextEditingController();
_smsCodeController = TextEditingController();
final userProvider = Provider.of<UserProvider>(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<LoginPage> {
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<LoginPage> {
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,

@ -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<PrivacyRightsPage> {
body: _getRights(),
bottomNavigationBar: GestureDetector(
onTap:()async{
// await _launchUrl();
await _launchUrl();
// await launchUrlString("tel:13111111111");
} ,
// onTap: () async{

Loading…
Cancel
Save