You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
887 B
35 lines
887 B
package com.community.pocket.data.login;
|
|
|
|
|
|
import com.community.pocket.R;
|
|
import com.community.pocket.data.model.Token;
|
|
import com.community.pocket.ui.login.LoginResponse;
|
|
|
|
/**
|
|
* 登陆请求接口
|
|
* TODO 完善逻辑
|
|
*/
|
|
public class LoginRequest {
|
|
private static volatile LoginRequest instance;
|
|
|
|
private LoginRequest() {
|
|
}
|
|
|
|
public static LoginRequest getInstance() {
|
|
if (instance == null) {
|
|
instance = new LoginRequest();
|
|
}
|
|
return instance;
|
|
}
|
|
|
|
public LoginResponse login(String username, String password) {
|
|
Token token = new Token();
|
|
token.setTime(System.currentTimeMillis());
|
|
token.setToken("123");
|
|
|
|
LoginResponse loginResponse = new LoginResponse();
|
|
loginResponse.setSuccess(R.string.login_ok, username);
|
|
loginResponse.setBody(token);
|
|
return loginResponse;
|
|
}
|
|
}
|
|
|