retrofit不同接口拼接

public class Api {
    //http://gank.io/api/data/%E7%A6%8F%E5%88%A9/10/1
    public static final String wealUrl ="http://gank.io/api/";

    //http://www.93.gov.cn/93app/data.do?channelId=1&startNum=1
    public static final String newsUrl="http://www.93.gov.cn/93app/";

    //http://172.17.8.100/small/user/v1/login
    public static final String LoginUrl="http://172.17.8.100/";
}

public interface ApiService {
    //http://gank.io/api/data/%E7%A6%8F%E5%88%A9/10/1
    @GET("data/%E7%A6%8F%E5%88%A9/10/{page}")
    CallgetWeal(@Path("page")int page);

    //http://www.93.gov.cn/93app/data.do?channelId=1&startNum=1
    @GET("data.do")
    Call getNews(@Query("channelId")int channelId,@Query("startNum")int startNum);

    //http://172.17.8.100/small/user/v1/login
    @POST("small/user/v1/login")
    @FormUrlEncoded
    Call getLogin(@Field("phone")String phonr,@Field("pwd")String pwd);
}

你可能感兴趣的:(资讯)