状态初始化

master
戴余标 2 years ago
parent e2063d83d5
commit db379a3bda

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

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

Loading…
Cancel
Save