状态初始化

master
戴余标 2 years ago
parent e2063d83d5
commit db379a3bda

@ -35,6 +35,10 @@ class UserProvider extends ChangeNotifier {
_isLogin = true; _isLogin = true;
apiClient.setToken(token); apiClient.setToken(token);
await updateUserInfo(); await updateUserInfo();
updateConSms();
updateRefSms();
updateCallSms();
updateIdleSms();
return true; return true;
} else { } else {
_isLogin = false; _isLogin = false;
@ -70,7 +74,6 @@ class UserProvider extends ChangeNotifier {
updateIdleSms(); updateIdleSms();
viewLoading(); viewLoading();
getExclude(); getExclude();
} }
Future logout() async { Future logout() async {

@ -75,9 +75,9 @@ void onStart(ServiceInstance service) async {
if (!(noNumberList.contains(phoneNum))) { if (!(noNumberList.contains(phoneNum))) {
if (flag > 0) { if (flag > 0) {
// print("来电拒接/未接"); // print("来电拒接/未接");
print("${phoneNum!}:${ref!}"); // print("${phoneNum!}:${ref!}");
Telephony.backgroundInstance Telephony.backgroundInstance
.sendSms(to: phoneNum!, message: ref); .sendSms(to: phoneNum!, message: ref!);
// print("发送成功"); // print("发送成功");
} else if (flag == -1) { } else if (flag == -1) {
print("来电接听"); print("来电接听");

Loading…
Cancel
Save