修改退出登录时DeviceID为可选项,没有时传空

This commit is contained in:
Daisy 2024-04-03 13:41:46 +08:00
parent 90777d28ec
commit 066ddf9f71

View File

@ -51,10 +51,12 @@ class MineSetLogic extends BaseGetXController {
//退
Future<void> userLogoutRequest() async {
var getPushDeviceID = await Storage.getString(pushDeviceID);
var getPushDeviceID = '';
await Storage.getString(pushDeviceID).then((value) {
getPushDeviceID = value!;
});
LoginEntity entity =
await ApiRepository.to.userLogout(deviceld: getPushDeviceID!);
await ApiRepository.to.userLogout(deviceld: getPushDeviceID);
if (entity.errorCode!.codeIsSuccessful) {
UdpHelp().closeUDP();
logOut();