feat: fixbug
Some checks failed
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
Build Windows / build (push) Has been cancelled
Some checks failed
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
Build Windows / build (push) Has been cancelled
This commit is contained in:
parent
2b80fcba0d
commit
cf297caf09
@ -28,7 +28,7 @@ import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_control
|
|||||||
import 'package:kaer_with_panels/app/modules/kr_home/models/kr_home_views_status.dart';
|
import 'package:kaer_with_panels/app/modules/kr_home/models/kr_home_views_status.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:kaer_with_panels/app/utils/kr_init_log_collector.dart';
|
// import 'package:kaer_with_panels/app/utils/kr_init_log_collector.dart';
|
||||||
|
|
||||||
class KRSplashController extends GetxController {
|
class KRSplashController extends GetxController {
|
||||||
// 🔧 新增:初始化日志收集器
|
// 🔧 新增:初始化日志收集器
|
||||||
|
|||||||
@ -25,6 +25,9 @@ abstract class Api {
|
|||||||
/// 删除账号
|
/// 删除账号
|
||||||
static const String kr_deleteAccount = "/v1/public/user/delete_account";
|
static const String kr_deleteAccount = "/v1/public/user/delete_account";
|
||||||
|
|
||||||
|
/// 忘记密码-设置新密码
|
||||||
|
static const String kr_setNewPsdByForgetPsd = "/v1/app/auth/reset_password";
|
||||||
|
|
||||||
/// 忘记密码-邮箱重置密码
|
/// 忘记密码-邮箱重置密码
|
||||||
static const String kr_resetPassword = "/v1/auth/reset";
|
static const String kr_resetPassword = "/v1/auth/reset";
|
||||||
|
|
||||||
|
|||||||
@ -76,6 +76,26 @@ class KRAuthApi {
|
|||||||
return right(subscription.isFullySubscribed);
|
return right(subscription.isFullySubscribed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 忘记密码-设置新密码(仅支持邮箱)
|
||||||
|
Future<Either<HttpError, String>> kr_setNewPsdByForgetPsd(
|
||||||
|
String email, String code, String password) async {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['email'] = email;
|
||||||
|
data['password'] = password;
|
||||||
|
data["code"] = code;
|
||||||
|
data["identifier"] = KRDeviceInfoService().deviceId ?? 'unknown';
|
||||||
|
|
||||||
|
BaseResponse<KRLoginData> baseResponse = await HttpUtil.getInstance()
|
||||||
|
.request<KRLoginData>(Api.kr_setNewPsdByForgetPsd, data,
|
||||||
|
method: HttpMethod.POST, isShowLoading: true);
|
||||||
|
if (!baseResponse.isSuccess) {
|
||||||
|
return left(
|
||||||
|
HttpError(msg: baseResponse.retMsg, code: baseResponse.retCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
return right(baseResponse.model.kr_token.toString());
|
||||||
|
}
|
||||||
|
|
||||||
/// 注册(仅支持邮箱+密码,验证码和邀请码可选)
|
/// 注册(仅支持邮箱+密码,验证码和邀请码可选)
|
||||||
Future<Either<HttpError, String>> kr_register(
|
Future<Either<HttpError, String>> kr_register(
|
||||||
String email,
|
String email,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user