接口
//轮播
@GET("ad/getAd")
Observable<News> getLunbo();
//九宫格
@GET("product/getCatagory")
Observable<News2> getJiugongge();
//商品推荐
@GET("home/getHome?")
Observable<News3> getTuijian();
//动态搜索
@GET("product/searchProducts?")
Observable<Sousuo> getShou(@Query("keywords")String keywords);
//购物车
@GET("product/getCarts")
Observable<ResponseBody> getshop(@Query("uid")int uid,@Query("tooken")String token);
//分类左侧
@GET("product/getCatagory")
Observable<Zuo> getZuob();
//右侧子分类
@GET("product/getProductCatagory")
Observable<You> getYoub(@Query("cid")int id);
//登录
@GET("user/login")
Observable<Login> getlogin(@Query("mobile") String mobile, @Query("password") String password);
//注册
@GET("user/reg")
Observable<Regin> getregin(@Query("mobile") String mobile, @Query("password") String password);
//商品详情
@GET("product/getProductDetail")
Observable<Xiangqing> getxiangqing(@Query("pid")int pid);
//加入购物车
@GET("product/addCart")
Observable<AddShopCartBean> addsp(@Query("uid") int uid,@Query("pid")int pid);
依赖
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.recker.flybanner:flybanner:1.3'
implementation 'com.google.code.gson:gson:2.8.5'
// 其他依赖
implementation 'com.facebook.fresco:fresco:0.12.0'
// 在 API < 14 上的机器支持 WebP 时,需要添加
implementation 'com.facebook.fresco:animated-base-support:0.12.0'
// 支持 GIF 动图,需要添加
implementation 'com.facebook.fresco:animated-gif:0.12.0'
// 支持