forgetPassword static method

Future<DataResult> forgetPassword(
  1. String? email,
  2. String? password,
  3. String? token
)

忘记密码

Implementation

static Future<DataResult> forgetPassword(
    String? email, String? password, String? token) async {
  String? encode =
      await BaseDao.encryptToBase64(password!, NetConfig.encryptDesPass);
  Map other = {'email': email, 'newPwd': encode, 'token': token};
  var res = await BaseDao.fromBaseJson(other, Address.forgetPassword());
  if (res.result) {
    var entity = TokenEntity.fromJson(res.data);
    return DataResult(entity, true);
  }
  return res;
}