LoginRegisterApi.java
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.shunzhi.parent.api;
import com.google.gson.JsonObject;
import com.shunzhi.parent.AppConfig;
import com.shunzhi.parent.bean.UserInfo;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
/**
* Created by Administrator on 2018/3/7 0007.
*/
public interface LoginRegisterApi {
// String url="http://campus.myjxt.com/";
String url= AppConfig.BASE_URL;
@FormUrlEncoded
@POST("Token")
Observable<JsonObject> loginResult(
@Field("grant_type") String grant_type, @Field("username") String username
, @Field("password") String password);
@FormUrlEncoded
@POST("/api/ParentHelper/ParentRegister")
Observable<JsonObject> registerResult(
@Field("mobile") String username, @Field("captcha") String idCode,@Field("password") String password);
@GET("/api/Account/ReSetpass")
Observable<JsonObject> reSetpassResult(
@Field("mobile") String username, @Field("captcha") String idCode,@Field("pass") String password);
@GET("api/Account/ChangePhoneCaptcha")
Observable<JsonObject> getidCodeResult(
@Query("mobile") String username);
@FormUrlEncoded
@POST("/api/ParentHelper/GetParentInfo")
Observable<UserInfo> getUserInfo(@Field("mobile") String mobile, @Field("school_id") int school_id, @Field("captcha") String captcha);
@GET("api/ParentHelper/ParentJudge")
Observable<JsonObject> getParentJudge(@Query("mobile") String mobile);
}