master
王亚玲 2 years ago
parent da9a2a5549
commit 375cba91ec

@ -6,19 +6,13 @@ class API {
///HOST
static String get host {
if (DevEV.instance.dev) {
return 'http://10.0.2.2:8088';
return 'http://api.dxbs.vip';
} else {
return 'https://api.yunyunwenche.com';
}
}
static String get imageHost {
if (DevEV.instance.dev) {
return 'http://10.0.2.2:8088';
} else {
return 'https://static.yunyunwenche.com';
}
}
static const int networkTimeOut = 10000;
static String get baseURL => host;

@ -51,7 +51,7 @@ class UserProvider extends ChangeNotifier {
_userInfo = UserInfoModel.fromJson(base.data);
} else {
CloudToast.show(base.msg);
_userInfo = UserInfoModel.fail;
_userInfo = UserInfoModel.fromJson(base.data);
}
notifyListeners();
}

@ -2,7 +2,6 @@
import 'package:call_log/call_log.dart';
import 'package:flutter/material.dart';
import 'package:flutter_sms/flutter_sms.dart';
import 'package:project_telephony/base/base_style.dart';
import 'package:project_telephony/ui/home/content_details_page.dart';
@ -73,32 +72,6 @@ class _ContentPageState extends State<ContentPage> {
} else {
final Iterable<CallLogEntry> result = await CallLog.query();
phoneNum = result.first.number!;
await sendSMS(message:content, recipients: [phoneNum], sendDirect: true);
// bool? permissionsGranted = await telephony.requestPhonePermissions;
// print(permissionsGranted);
// if(permissionsGranted!){
// print(content);
// // sendSms(content);
// telephony.sendSms(
// to: "13395740386",
// message: content,
// );
// }else{
// print(content);
// }
// print(content);
// // sendSms(content);
// telephony.sendSms(
// to: "13395740386",
// message: content,
// isMultipart: true
// );
// List<String> recipents=[
// phoneNum
// ];
// _sendSMS(content,recipents);
// String phoneNumber = await GetPhoneNumber().get();
// print('getPhoneNumber result: $phoneNumber');
}
setState(() {});
// print("这是数据" + textList[_s lect]);

@ -39,7 +39,7 @@ class _LoginPageState extends State<LoginPage> {
int _countDownNum = 59;
late TextEditingController _phoneController;
late TextEditingController _smsCodeController;
late FocusNode _phoneFocusNode;
late FocusNode _phoneFocusNode ;
late FocusNode _smsCodeFocusNode;
bool _cantSelected = false;
@ -63,8 +63,8 @@ class _LoginPageState extends State<LoginPage> {
@override
void dispose() {
_phoneFocusNode.dispose();
_smsCodeFocusNode.dispose();
_phoneFocusNode.unfocus();
_smsCodeFocusNode.unfocus();
_phoneController.dispose();
_smsCodeController.dispose();
super.dispose();
@ -132,7 +132,7 @@ class _LoginPageState extends State<LoginPage> {
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
if (base.code == 0) {
await UserTool.userProvider.setToken(base.data['token']);
Get.to(() => const TabNavigator());
Get.offAll(() => const TabNavigator());
} else {
CloudToast.show(base.msg);
}

@ -274,7 +274,7 @@ class _UserPageState extends State<UserPage> {
onChanged: (value) async{
vle=value;
if(vle) {
Telephony.backgroundInstance.sendSms(to: "13395740386", message: "啦啦啦啦啦");
// Telephony.backgroundInstance.sendSms(to: "13395740386", message: "啦啦啦啦啦");
// Workmanager().registerOneOffTask("task-identifier", "simpleTask");
}
setState((){});

@ -405,13 +405,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "5.5.3+2"
flutter_sms:
dependency: "direct main"
description:
name: flutter_sms
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
flutter_test:
dependency: "direct dev"
description: flutter
@ -1087,62 +1080,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher:
dependency: transitive
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
vector_math:
dependency: transitive
description:

@ -37,13 +37,11 @@ dependencies:
telephony:
git:
url: https://git.oa00.com/wylyl22/telephony.git
## 获取来电状态
# provider: ^6.0.3
# 获取通话记录
call_log: ^4.0.0
permission_handler: ^10.0.0
# 后台设置
flutter_background_service: ^2.1.3
flutter_background_service_android: ^2.0.3
device_info_plus: any
@ -75,16 +73,13 @@ dependencies:
permission_handler_platform_interface: ^3.7.0
provider: ^6.0.3
equatable: any
#日志输出
power_logger: ^1.2.2
# 短信
flutter_sms: ^2.3.3
get_phone_number: ^2.0.1
# 存取数据
shared_preferences: ^2.0.15
# flutter_telephony: any
# # jdk
# jverify: ^2.2.5

Loading…
Cancel
Save