Android 京东首页,购物车

------------------model-------------------

-------------------Addcart------------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Shopbean;



public interface Addcart {
    void addcartlisteneter(Shopbean shopbean);
}

----------------Getcartjson----------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Showcartbean;
import java.util.List;


public interface Getcartjson {
    void getcartjsonlisteneter( List<Showcartbean.DataBean> data);
}

------------------Getshop------------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Shopbean;

import java.util.List;



public interface Getshop {
    void getshopBean(List<Shopbean.DataBean> data );
}

-------------------Getshouyejson-----------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Shouyebean;


public interface Getshouyejson {
    void getShouye(Shouyebean shouyebean);
}

-------------------Imode-----------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Showcartbean;
import java.util.List;
import java.util.Map;



public interface Imode {
    void getshouyejsonbean(Getshouyejson getshouyejson);

    void getshopbean(Map<String,String> map,Getshop getshop);

    void getaddcart(Map<String,String> map,Addcart addcart);

    void getcartbean(Getcartjson getcartjson);

    double jisuan(List<Showcartbean.DataBean> data);
}

---------------------Mymode--------------------

package com.example.yuekaomoni.mode;

import com.example.yuekaomoni.bean.Shopbean;
import com.example.yuekaomoni.bean.Shouyebean;
import com.example.yuekaomoni.bean.Showcartbean;
import com.example.yuekaomoni.util.Getnet;
import com.example.yuekaomoni.util.Util;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;

public class Mymode implements Imode{

    /**
     * 获取首页的数据
     * */
    @Override
    public void getshouyejsonbean(final Getshouyejson getshouyejson) {
        Observable<Shouyebean> getshouye = Util.getmInstance().getnetjson(Getnet.net).getshouye();
        getshouye.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<Shouyebean>() {
                    @Override
                    public void accept(Shouyebean shouyebean) throws Exception {
                            getshouyejson.getShouye(shouyebean);
                    }
                });

    }

    /**
     * 获取商品的数据
     * */
    @Override
    public void getshopbean(Map<String, String> map,final Getshop getshop) {
        Observable<Shopbean> getshopjson = Util.getmInstance().getnetjson(Getnet.net).getshopjson(map);
        getshopjson.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<Shopbean>() {
                    @Override
                    public void accept(Shopbean shopbean) throws Exception {
                        List<Shopbean.DataBean> data = shopbean.getData();
                        getshop.getshopBean(data);
                    }
                });
    }

    @Override
    public void getaddcart(Map<String, String> map, final Addcart addcart) {
        Observable<Shopbean> addcart1 = Util.getmInstance().getnetjson(Getnet.net).addcart(map);
        addcart1.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<Shopbean>() {
                    @Override
                    public void accept(Shopbean shopbean) throws Exception {
                        addcart.addcartlisteneter(shopbean);
                    }
                });
    }

    @Override
    public void getcartbean(final Getcartjson getcartjson) {
        Observable<Showcartbean> getcart = Util.getmInstance().getnetjson(Getnet.net).getcart();
        getcart.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Consumer<Showcartbean>() {
                    @Override
                    public void accept(Showcartbean showcart) throws Exception {
                        List<Showcartbean.DataBean> data = showcart.getData();
                        getcartjson.getcartjsonlisteneter(data);
                    }
                });
    }

    //购物车计算总价的方法
    @Override
    public double jisuan(List<Showcartbean.DataBean> data) {
        double he=0;
        for (int i = 0; i <data.size() ; i++) {
            List<Showcartbean.Mybean> list = data.get(i).getList();
            for (int j = 0; j <list.size(); j++) {
                if (list.get(j).isChildflog()){
                    //获取价格
                    double price1 = list.get(j).getPrice();
                    //获取数量
                    double selected = list.get(j).getSelected();
                    //selected+1  必须加1
                    double mul = mul(price1, selected+1);
                    he= add(he, mul);

                }
            }
        }

        return he;

    }

    public static double add(double v1, double v2) {
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.add(b2).doubleValue();
    }

    public static double mul(double v1, double v2) {
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.multiply(b2).doubleValue();
    }
}

------------------view------------------

--------------------MainActivity---------------------

package com.example.yuekaomoni.view;

import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.fragment.Faxianfragment;
import com.example.yuekaomoni.fragment.Shangpinfragment;
import com.example.yuekaomoni.fragment.Shouyefragment;
import butterknife.BindView;

public class MainActivity extends Baseactivity {
   @BindView(R.id.rg)
    RadioGroup rg;
   @BindView(R.id.shouye)
   RadioButton shouye;
    @BindView(R.id.shangpin)
    RadioButton shangpin;
    @BindView(R.id.faxian)
    RadioButton faxian;

    private Shouyefragment shouyefragment;
    private Shangpinfragment shangpinfragment;
    private Faxianfragment faxianfragment;

    @Override
    int getContentView() {
        return R.layout.activity_main;
    }

    @Override
    void initdata() {
        shouyefragment = new Shouyefragment();
        getSupportFragmentManager().beginTransaction().add(R.id.frag,shouyefragment).commit();
        //点击按钮  显示的方法
        rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                hidefragment();
                FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
                switch (checkedId) {
                         case R.id.shouye:
                                beginTransaction.show(shouyefragment).commit();
                            break;
                    case R.id.shangpin:
                       if (shangpinfragment==null){
                           shangpinfragment = new Shangpinfragment();
                           beginTransaction.add(R.id.frag,shangpinfragment).commit();
                       }else {
                          beginTransaction.show(shangpinfragment).commit();
                       }

                        break;
                    case R.id.faxian:
                        if (faxianfragment==null){
                            faxianfragment = new Faxianfragment();
                            beginTransaction.add(R.id.frag, faxianfragment).commit();
                        }else {
                            beginTransaction.show(faxianfragment).commit();
                        }

                        break;

                         }
            }
        });

    }

    /**
     * fragment隐藏的方法
     * */
    private void hidefragment() {
    if (shouyefragment!=null&&shouyefragment.isAdded()){
        getSupportFragmentManager().beginTransaction().hide(shouyefragment).commit();
    }
        if (shangpinfragment!=null&&shangpinfragment.isAdded()){
            getSupportFragmentManager().beginTransaction().hide(shangpinfragment).commit();
        }

        if (faxianfragment!=null&&faxianfragment.isAdded()){
            getSupportFragmentManager().beginTransaction().hide(faxianfragment).commit();
        }
    }

    @Override
    void btonclick() {

    }

    @Override
    public void onClick(View v) {

    }
}

------------------Baseactivity-------------------

package com.example.yuekaomoni.view;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;
import butterknife.ButterKnife;



public abstract class Baseactivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getContentView());
        ButterKnife.bind(this);
        getSupportActionBar().hide();
        initdata();
        btonclick();
    }

    abstract int getContentView();
    abstract void initdata();
    abstract void btonclick();


    public void mytost(String s){
        Toast.makeText(this,s,Toast.LENGTH_SHORT).show();
    }

    public void jump(Class<?> c){
        startActivity(new Intent(this,c));
    }

}

---------------Iaddcart------------------

package com.example.yuekaomoni.view;


public interface Iaddcart {
     int getcid();
    void chenggong(String s);
    void shiabai(String shibai);
}

---------------------Ishop---------------------

package com.example.yuekaomoni.view;

import android.content.Context;

import com.example.yuekaomoni.bean.Shopbean;

import java.util.List;



public interface Ishop {
    void setmyadapter(Context context,List<Shopbean.DataBean> data);

    void jiazaigengduo(List<Shopbean.DataBean> data);
}

-----------------Ishowcart------------------

package com.example.yuekaomoni.view;

import android.content.Context;

import com.example.yuekaomoni.bean.Showcartbean;

import java.util.List;

public interface Ishowcart {
    void setmyadapter(Context context, List<Showcartbean.DataBean> data);

    void setzongjia(double he);
}

--------------------Iview---------------------

package com.example.yuekaomoni.view;

import android.content.Context;

import com.example.yuekaomoni.bean.Shouyebean;


public interface Iview  {
    void setmyadapter(Context context,Shouyebean shouyebean);
}

--------------------Shangpinxaingqing--------------------

package com.example.yuekaomoni.view;

import android.content.Intent;
import android.graphics.Paint;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Shopxiangqingbean;
import com.example.yuekaomoni.mode.Mymode;
import com.example.yuekaomoni.myview.Banner;
import com.example.yuekaomoni.presenter.Mypresenter;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;

public class Shangpinxaingqing extends Baseactivity implements Iaddcart {
   @BindView(R.id.xiangqing_banner)
    Banner xiangqing_banner;
   @BindView(R.id.title)
   TextView title;
   @BindView(R.id.price)
   TextView price;
    @BindView(R.id.price_you)
    TextView price_you;
    @BindView(R.id.add)
    TextView add;
    @BindView(R.id.show)
    TextView show;
    List<String> list=new ArrayList<>();
    private Shopxiangqingbean shop;

    @Override
    int getContentView() {
        return R.layout.activity_shangpinxaingqing;
    }

    @Override
    void initdata() {
        Intent intent = getIntent();
        shop = (Shopxiangqingbean) intent.getSerializableExtra("shop");
        String image = shop.getImage();
        String[] split = image.split("\\|");
        for (int i = 0; i <split.length ; i++) {
            list.add(split[i]);
        }
        xiangqing_banner.loadData(list).display();
        xiangqing_banner.setBannerClicklistener(new Banner.BannerClicklistener() {
            @Override
            public void onClickListener(int pos) {

                Toast.makeText(Shangpinxaingqing.this, "pos====" + pos, Toast.LENGTH_SHORT).show();
            }
        });
        title.setText(shop.getTitle());
        price.setText(shop.getPrice()+"");
        price_you.setText(shop.getPrice_you()+"");
        price.setPaintFlags(price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
    }

    @Override
    void btonclick() {
        add.setOnClickListener(this);
        show.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
   switch (v.getId()) {
         case R.id.add:
                Mypresenter mypresenter=new Mypresenter();
                mypresenter.addcart(new Mymode(),this);
            break;
        case R.id.show:
           startActivity(new Intent(this,Showcart.class));
            break;
         }
    }

    @Override
    public int getcid() {
        return shop.getPid();
    }

    @Override
    public void chenggong(String s) {
        Toast.makeText(this, s, Toast.LENGTH_SHORT).show();
        startActivity(new Intent(this,Showcart.class));
    }

    @Override
    public void shiabai(String shibai) {
        Toast.makeText(this, shibai, Toast.LENGTH_SHORT).show();
    }
}

----------------------Showcart-------------------

package com.example.yuekaomoni.view;

import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ExpandableListView;
import android.widget.TextView;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.adapter.Showcartadapter;
import com.example.yuekaomoni.bean.Showcartbean;
import com.example.yuekaomoni.mode.Mymode;
import com.example.yuekaomoni.presenter.Mypresenter;

import java.util.List;

import butterknife.BindView;

public class Showcart extends Baseactivity implements Ishowcart{
     @BindView(R.id.bianji)
    TextView bianji;
     @BindView(R.id.edlist)
    ExpandableListView edlist;
     @BindView(R.id.heji)
     TextView heji;
     @BindView(R.id.jiesuan)
     Button jiesuan;
     @BindView(R.id.quanxuan)
    CheckBox quanxuan;
     @BindView(R.id.shanchu)
    Button shanchu;

    List<Showcartbean.DataBean> data;
    private Mypresenter mypresenter;
    private Showcartadapter showcartadapter;
    boolean flog=true;
    @Override
    int getContentView() {
        return R.layout.activity_showcart;
    }

    @Override
    void initdata() {
        mypresenter = new Mypresenter();
        mypresenter.showcart(this,new Mymode(),this);
        shanchu.setVisibility(View.GONE);
    }

    @Override
    void btonclick() {
        //全选的点击事件
        quanxuan.setOnClickListener(this);
        //编辑的点击事件
        bianji.setOnClickListener(this);
        //删除的点击事件
        shanchu.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
   switch (v.getId()) {
       //全选的逻辑
         case R.id.quanxuan:
                for (int i = 0; i <data.size() ; i++) {
                    data.get(i).setPrenterflog(!data.get(i).isPrenterflog());
                    List<Showcartbean.Mybean> list = data.get(i).getList();
                    for (int j = 0; j <list.size() ; j++) {
                        list.get(j).setChildflog(!list.get(j).isChildflog());
                    }
                }
                mypresenter.jisuan(this,new Mymode(),data);
                showcartadapter.notifyDataSetChanged();
                break;
                //编辑的逻辑
        case R.id.bianji:
            if (flog){
                shanchu.setVisibility(View.VISIBLE);
                heji.setVisibility(View.GONE);
                jiesuan.setVisibility(View.GONE);
                bianji.setText("完成");
                flog=false;
            }else {
                jiesuan.setVisibility(View.VISIBLE);
                heji.setVisibility(View.VISIBLE);
                shanchu.setVisibility(View.GONE);
                bianji.setText("编辑");
                flog=true;
            }
            break;
            //删除的逻辑
        case R.id.shanchu:

            for (int i = 0; i <data.size() ; i++) {
                List<Showcartbean.Mybean> list = data.get(i).getList();

                for (int j = 0; j <list.size() ; j++) {

                    if (list.get(j).isChildflog()){
                        list.remove(j);
                    }
                    if (list.size()==0){
                        data.remove(i);
                    }
                }
            }
            //调用p层里面计算的方法
            mypresenter.jisuan(this,new Mymode(),data);
            //刷新适配器
            showcartadapter.notifyDataSetChanged();

            break;

         }
    }


    @Override
    public void setmyadapter(Context context, List<Showcartbean.DataBean> data) {
        this.data=data;
        //设置适配器
        showcartadapter = new Showcartadapter(context, data,this);
        edlist.setAdapter(showcartadapter);
    }

    @Override
    public void setzongjia(double he) {
        //设置总价
        heji.setText("总价:"+he);
    }
}

--------------------presenter---------------

------------------Ipresenter-----------------

package com.example.yuekaomoni.presenter;

import android.content.Context;
import com.example.yuekaomoni.bean.Showcartbean;
import com.example.yuekaomoni.mode.Imode;
import com.example.yuekaomoni.view.Iaddcart;
import com.example.yuekaomoni.view.Ishop;
import com.example.yuekaomoni.view.Ishowcart;
import com.example.yuekaomoni.view.Iview;
import java.util.List;


public interface Ipresenter {
    void getmv(Context context, Imode imode, Iview iview);

    void getshopmv(Context context, Imode imode, Ishop ishop);

    void xialajiazai(Imode imode, Ishop ishop);

    void addcart(Imode imode, Iaddcart iaddcart);

    void showcart(Context context, Imode imode, Ishowcart ishowcart);

    void jisuan(Ishowcart ishowcart,Imode imode,List<Showcartbean.DataBean> data);
}

------------------Mypresenter------------------

package com.example.yuekaomoni.presenter;

import android.content.Context;
import android.util.Log;

import com.example.yuekaomoni.bean.Shopbean;
import com.example.yuekaomoni.bean.Shouyebean;
import com.example.yuekaomoni.bean.Showcartbean;
import com.example.yuekaomoni.mode.Addcart;
import com.example.yuekaomoni.mode.Getcartjson;
import com.example.yuekaomoni.mode.Getshop;
import com.example.yuekaomoni.mode.Getshouyejson;
import com.example.yuekaomoni.mode.Imode;
import com.example.yuekaomoni.view.Iaddcart;
import com.example.yuekaomoni.view.Ishop;
import com.example.yuekaomoni.view.Ishowcart;
import com.example.yuekaomoni.view.Iview;

import java.util.HashMap;
import java.util.List;
import java.util.Map;



public class Mypresenter implements Ipresenter {

    /**
     * 把首页的数据传到v层
     * */
    @Override
    public void getmv(final Context context, final Imode imode, final Iview iview) {
        imode.getshouyejsonbean(new Getshouyejson() {
            @Override
            public void getShouye(Shouyebean shouyebean) {
                iview.setmyadapter(context,shouyebean);
            }
        });
    }

    int i;
    @Override
    public void getshopmv(final Context context, final Imode imode, final Ishop ishop) {
        i=1;
        Map<String,String> map=new HashMap<>();
        map.put("page",""+i);
        imode.getshopbean(map, new Getshop() {
            @Override
            public void getshopBean(List<Shopbean.DataBean> data) {
                ishop.setmyadapter(context,data);
            }
        });
    }

    /**
     * 下拉加载更多的方法
     * */
    @Override
    public void xialajiazai(Imode imode, final Ishop ishop) {
        i++;
        Map<String,String> map=new HashMap<>();
        map.put("page",""+i);
        imode.getshopbean(map, new Getshop() {
            @Override
            public void getshopBean(List<Shopbean.DataBean> data) {
                ishop.jiazaigengduo(data);
            }
        });
    }

    @Override
    public void addcart(Imode imode, final Iaddcart iaddcart) {
        int pid = iaddcart.getcid();
        Log.d("哈哈", "addcart: "+pid);
        Map<String,String> map=new HashMap<>();
        map.put("pid",pid+"");
        imode.getaddcart(map, new Addcart() {
            @Override
            public void addcartlisteneter(Shopbean shopbean) {
                if (shopbean.getCode().equals("0")){
                    iaddcart.chenggong("加购成功");
                }else {
                    iaddcart.shiabai("加购失败");
                }
            }
        });

    }

    @Override
    public void showcart(final Context context, Imode imode, final Ishowcart ishowcart) {
        imode.getcartbean(new Getcartjson() {
            @Override
            public void getcartjsonlisteneter(List<Showcartbean.DataBean> data) {
                ishowcart.setmyadapter(context,data);
            }
        });
    }

    //购物车计算的方法   购物车v层接口   m层接口    购物车父类集合
    @Override
    public void jisuan(Ishowcart ishowcart, Imode imode, List<Showcartbean.DataBean> data) {
        double jisuan = imode.jisuan(data);
        ishowcart.setzongjia(jisuan);
    }
}

---------------------adapter---------------------

----------------Miaoshaadapter-----------------

package com.example.yuekaomoni.adapter;

import android.content.Context;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Shouyebean;
import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

/**
 * 秒杀的适配器
 * */

public class Miaoshaadapter extends RecyclerView.Adapter<Miaoshaadapter.Mymiaosha> {
  private Context context;
  private List<Shouyebean.MiaoshaBean.ListBeanX> list;
    private Itemclick item;

    public Miaoshaadapter(Context context, List<Shouyebean.MiaoshaBean.ListBeanX> list) {
        this.context = context;
        this.list = list;
    }

    @Override
    public Mymiaosha onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = View.inflate(context, R.layout.shouye_miaosha_zi, null);
        Mymiaosha mymiaosha=new Mymiaosha(view);
        return mymiaosha;
    }

    @Override
    public void onBindViewHolder(final Mymiaosha holder, final int position) {
        String images = list.get(position).getImages();
        String[] split = images.split(".jpg");
        holder.sd.setImageURI(Uri.parse(split[0]+".jpg"));
        if (item!=null){
            //holder为Myhodler holder的参数
            holder.itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    //调用接口的方法
                    item.itemclick(holder.itemView,position);
                }
            });

    }
    }

    @Override
    public int getItemCount() {
        return list.size();
    }

    class Mymiaosha extends RecyclerView.ViewHolder{
        public SimpleDraweeView sd;
        public Mymiaosha(View itemView) {
            super(itemView);
            this.sd=itemView.findViewById(R.id.sd);
        }
    }

    //定义接口
    public interface Itemclick{
        void itemclick(View view,int position);
    }

    //定义方法   参数1为接口  2为接口的变量名
    public void huidiao(Itemclick item){
        this.item=item;
    }
}

----------------Shopadapter----------------

package com.example.yuekaomoni.adapter;

import android.content.Context;
import android.graphics.Paint;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Shopbean;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;

/**
 * 商品的适配器
 */

public class Shopadapter extends RecyclerView.Adapter<Shopadapter.Shophodler> {
    private Context context;
    private List<Shopbean.DataBean> data;
    private Itemclick item;

    public Shopadapter(Context context, List<Shopbean.DataBean> data) {
        this.context = context;
        this.data = data;
    }

    public List<Shopbean.DataBean> getData() {
        return data;
    }

    public void setData(List<Shopbean.DataBean> data) {
        this.data = data;
    }

    @Override
    public Shophodler onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = View.inflate(context, R.layout.shangpin_zi_xrc,null);
        Shophodler shophodler=new Shophodler(view);
        return shophodler;
    }

    @Override
    public void onBindViewHolder(final Shophodler holder, final int position) {
        String images = data.get(position).getImages();
        String[] split = images.split(".jpg");
        holder.sd.setImageURI(Uri.parse(split[0]+".jpg"));
        holder.title.setText(data.get(position).getTitle());
        holder.price.setPaintFlags(holder.price.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
        holder.price.setText("原价:"+data.get(position).getSalenum()+"");
        holder.price_you.setText("优惠价:"+data.get(position).getPrice()+"");
        if (item!=null){
            //holder为Myhodler holder的参数
            holder.itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    //调用接口的方法
                    item.itemclick(holder.itemView,position);
                }
            });
        }
    }

    @Override
    public int getItemCount() {
        return data.size();
    }

    class Shophodler extends RecyclerView.ViewHolder{
        public SimpleDraweeView sd;
        public TextView title;
        public TextView price;
        public TextView price_you;
        public Shophodler(View itemView) {
            super(itemView);
            this.sd=itemView.findViewById(R.id.sd);
            this.title=itemView.findViewById(R.id.title);
            this.price=itemView.findViewById(R.id.price);
            this.price_you=itemView.findViewById(R.id.price_you);
        }
    }

    //定义接口
    public interface Itemclick{
        void itemclick(View view,int position);
    }

    //定义方法   参数1为接口  2为接口的变量名
    public void huidiao(Itemclick item){
        this.item=item;
    }
}

------------------Shouyeadapter----------------

package com.example.yuekaomoni.adapter;

import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Shopxiangqingbean;
import com.example.yuekaomoni.bean.Shouyebean;
import com.example.yuekaomoni.view.Shangpinxaingqing;

import java.util.List;

/**
 * Created by Administrator on 2018/3/3.
 * 首页的适配器   多条目加载
 */

public class Shouyeadapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
    private Context context;
    private Shouyebean shouyebean;
    private final List<Shouyebean.MiaoshaBean.ListBeanX> list;
    private final List<Shouyebean.TuijianBean.ListBean> tuijian;
    private Handler timeHandler;

    public Shouyeadapter(Context context,Shouyebean shouyebean) {
        this.context = context;
        this.shouyebean = shouyebean;
        list = shouyebean.getMiaosha().getList();
        tuijian = shouyebean.getTuijian().getList();

    }


    private long mHour = 02;
    private long mMin = 15;
    private long mSecond = 36;
    private boolean isRun = true;

    //定义常量  确定多条目加载类型
    final static int TYPE_ONE=1;
    final static int TYPE_TWO=2;

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
           switch (viewType) {
                 case TYPE_ONE:
                        View inflate = View.inflate(context, R.layout.shouye_miaosha, null);
                       Miaoshahodler miaoshahodler=new Miaoshahodler(inflate);
                        return miaoshahodler;
                case TYPE_TWO:
                    View inflate1 = View.inflate(context, R.layout.shouye_tuijian, null);
                   Tuijianhodler tuijianhodler=new Tuijianhodler(inflate1);
                    return tuijianhodler;

                 }
        return null;
    }

    @Override
    public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
       if(holder instanceof Miaoshahodler){
           Miaoshaadapter miaoshaadapter=new Miaoshaadapter(context,list);
         ((Miaoshahodler) holder).rc.setAdapter(miaoshaadapter);

        ((Miaoshahodler) holder).rc.setLayoutManager(new LinearLayoutManager(context));
        ((Miaoshahodler) holder).rc.setLayoutManager(new GridLayoutManager(context,1,GridLayoutManager.HORIZONTAL,false));
           startRun();
        timeHandler = new Handler() {
               @Override
               public void handleMessage(Message msg) {
                   super.handleMessage(msg);
                   if (msg.what==1) {
                       computeTime();
                       if (mHour<10){
                           ((Miaoshahodler) holder).miaosha_time_hour.setText("0"+mHour+"");
                       }else {
                           ((Miaoshahodler) holder).miaosha_time_hour.setText("0"+mHour+"");
                       }
                       if (mMin<10){
                           ((Miaoshahodler) holder).miaosha_time_minute.setText("0"+mMin+"");
                       }else {
                           ((Miaoshahodler) holder).miaosha_time_minute.setText(mMin+"");
                       }
                       if (mSecond<10){
                           ((Miaoshahodler) holder).miaosha_time_seconds.setText("0"+mSecond+"");
                       }else {
                           ((Miaoshahodler) holder).miaosha_time_seconds.setText(mSecond+"");
                       }
                   }
               }
           };
           miaoshaadapter.huidiao(new Miaoshaadapter.Itemclick() {
               @Override
               public void itemclick(View view, int position) {
                   String images = list.get(position).getImages();
                   String title = list.get(position).getTitle();
                   int salenum = (int) list.get(position).getSalenum();
                   int price = (int) list.get(position).getPrice();
                   int pid = (int) list.get(position).getPid();
                   Shopxiangqingbean shopxiangqingbean=new Shopxiangqingbean(images,title,salenum,price,pid);
                   Intent intent = new Intent(context, Shangpinxaingqing.class);
                   intent.putExtra("shop",shopxiangqingbean);
                   context.startActivity(intent);
               }
           });

       }
       
       if (holder instanceof Tuijianhodler){
           Tuijianadapter tuijianadapter=new Tuijianadapter(context,tuijian);
           ((Tuijianhodler) holder).tuijian_rc.setAdapter(tuijianadapter);
           ((Tuijianhodler) holder).tuijian_rc.setLayoutManager(new GridLayoutManager(context,2));
           tuijianadapter.huidiao(new Tuijianadapter.Itemclick() {
               @Override
               public void itemclick(View view, int position) {
                   String images = tuijian.get(position).getImages();
                   String title = tuijian.get(position).getTitle();
                   int salenum = (int) tuijian.get(position).getSalenum();
                   int price = (int) tuijian.get(position).getPrice();
                   int pid = (int) tuijian.get(position).getPid();
                   Shopxiangqingbean shopxiangqingbean=new Shopxiangqingbean(images,title,salenum,price,pid);
                   Intent intent = new Intent(context, Shangpinxaingqing.class);
                   intent.putExtra("shop",shopxiangqingbean);
                   context.startActivity(intent);
               }
           });
       }
    }

    @Override
    public int getItemCount() {
        return 2;
    }

    @Override
    public int getItemViewType(int position) {
        if (position==0){
            return TYPE_ONE;
        }
        if (position==1){
            return TYPE_TWO;
        }
        return 0;
    }
    
    class Tuijianhodler extends RecyclerView.ViewHolder{
         public  RecyclerView tuijian_rc;
        public Tuijianhodler(View itemView) {
            super(itemView);
            this.tuijian_rc=itemView.findViewById(R.id.tuijian_rc);
        }
    }
    class Miaoshahodler extends RecyclerView.ViewHolder{
        public TextView miaosha_time_hour;
        public TextView miaosha_time_minute;
        public TextView miaosha_time_seconds;
        public RecyclerView rc;
        public Miaoshahodler(View itemView) {
            super(itemView);
            this.miaosha_time_hour=itemView.findViewById(R.id.miaosha_time_hour);
            this.miaosha_time_minute=itemView.findViewById(R.id.miaosha_time_minute);
            this.miaosha_time_seconds=itemView.findViewById(R.id.miaosha_time_seconds);
            this.rc=itemView.findViewById(R.id.rc);
        }
    }

    /**
     * 开启倒计时
     */
    private void startRun() {
        new Thread(new Runnable() {

            @Override
            public void run() {
                // TODO Auto-generated method stub
                while (isRun) {
                    try {
                        Thread.sleep(1000); // sleep 1000ms
                        Message message = Message.obtain();
                        message.what = 1;
                        timeHandler.sendMessage(message);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }).start();
    }


    /**
     * 倒计时计算
     */
    private void computeTime() {
        mSecond--;
        if (mSecond < 0) {
            mMin--;
            mSecond = 59;
            if (mMin < 0) {
                mMin = 59;
                mHour--;
            }
        }
    }


}

--------------------Showcartadapter-----------------

package com.example.yuekaomoni.adapter;

import android.content.Context;
import android.net.Uri;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Showcartbean;
import com.example.yuekaomoni.mode.Mymode;
import com.example.yuekaomoni.myview.Jiajian;
import com.example.yuekaomoni.presenter.Mypresenter;
import com.example.yuekaomoni.view.Ishowcart;
import com.facebook.drawee.view.SimpleDraweeView;
import java.util.List;


public class Showcartadapter extends BaseExpandableListAdapter {
  private Context context;
  private List<Showcartbean.DataBean> data;
  private Ishowcart ishowcart;


    public Showcartadapter(Context context, List<Showcartbean.DataBean> data, Ishowcart ishowcart) {
        this.context = context;
        this.data = data;
        this.ishowcart = ishowcart;
    }

    @Override
    public int getGroupCount() {
        return data.size();
    }

    @Override
    public int getChildrenCount(int groupPosition) {
        return data.get(groupPosition).getList().size();
    }

    @Override
    public Object getGroup(int groupPosition) {
        return data.get(groupPosition);
    }

    @Override
    public Object getChild(int groupPosition, int childPosition) {
        return data.get(groupPosition).getList().get(childPosition);
    }

    @Override
    public long getGroupId(int groupPosition) {
        return groupPosition;
    }

    @Override
    public long getChildId(int groupPosition, int childPosition) {
        return childPosition;
    }

    @Override
    public boolean hasStableIds() {
        return false;
    }

    @Override
    public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
        //优化类
        Myprenterhodler myprenterhodler=null;
        if (convertView==null){
            convertView = View.inflate(context, R.layout.cart_prenter, null);
            CheckBox prenter_cb = convertView.findViewById(R.id.prenter_cb);
            TextView present_tv = convertView.findViewById(R.id.present_tv);
            myprenterhodler=new Myprenterhodler(prenter_cb,present_tv);
            convertView.setTag(myprenterhodler);
        }else {
            myprenterhodler = (Myprenterhodler) convertView.getTag();
        }
        //设置自定义属性的布尔值
        myprenterhodler.prenter_cb.setChecked(data.get(groupPosition).isPrenterflog());
        myprenterhodler.present_tv.setText(data.get(groupPosition).getSellerName());

        //父类的CheckBox点击事件
        myprenterhodler.prenter_cb.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //获取父类集合的布尔值
                Showcartbean.DataBean dataBean = data.get(groupPosition);
                boolean isflog = dataBean.isPrenterflog();
                //设置父类取反
                isflog=!isflog;
                //设置父类布尔值
                dataBean.setPrenterflog(isflog);
                //获取子类集合
                List<Showcartbean.Mybean> list = dataBean.getList();
                for (int j = 0; j <list.size() ; j++) {
                    //设置子控件和父父控件相同的布尔值
                       list.get(j).setChildflog(isflog);

                       //调用p层计算的方法
                    Mypresenter mypresenter=new Mypresenter();
                    mypresenter.jisuan(ishowcart,new Mymode(),data);
                    //刷新适配器
                    notifyDataSetChanged();
                    }


            }
        });
        return convertView;
    }

    @Override
    public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
       //子类的优化类
        Mychildhodler mychildhodler=null;
        if (convertView==null){
            convertView = View.inflate(context, R.layout.cart_child, null);
            CheckBox child_ck = convertView.findViewById(R.id.child_ck);
            SimpleDraweeView sd = convertView.findViewById(R.id.sd);
            TextView child_tv= convertView.findViewById(R.id.child_tv);
            TextView child_tv1 = convertView.findViewById(R.id.child_tv1);
            Jiajian jiajian = convertView.findViewById(R.id.jiajian);
            mychildhodler=new Mychildhodler(child_ck,sd,child_tv,child_tv1,jiajian);
            convertView.setTag(mychildhodler);
        }else {
            mychildhodler = (Mychildhodler) convertView.getTag();
        }
        //获取子类的数据
        final Showcartbean.Mybean mybean = data.get(groupPosition).getList().get(childPosition);
        mychildhodler.child_ck.setChecked(mybean.isChildflog());
        mychildhodler.child_tv.setText(mybean.getTitle());
        mychildhodler.child_tv1.setText(""+mybean.getPrice());
        String images = mybean.getImages();
        String[] split = images.split(".jpg");
        mychildhodler.sd.setImageURI(Uri.parse(split[0]+".jpg"));


        //子类的CheckBox点击事件
        mychildhodler.child_ck.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //获取子类的数据
                 Showcartbean.Mybean mybean = data.get(groupPosition).getList().get(childPosition);
                //获取自定义子控件的布尔值
                boolean isflog = mybean.isChildflog();
                //取反
                isflog=!isflog;
                //给子控件复选框赋值  目的为了记录复选框的值
                mybean.setChildflog(isflog);
                //定义标识位
                boolean flog=true;
                //当前类名调出  子控件的集合
                List<Showcartbean.Mybean> list = Showcartadapter.this.data.get(groupPosition).getList();
                //遍历子控件的集合
                for (int i = 0; i <list.size() ; i++) {
                    //如果子控件有一个的值为false时  父控件的值为false  否则不走if判断  父控件为true
                    if (!list.get(i).isChildflog()){
                        flog=false;
                    }
                }
                //设置父控件的值
                data.get(groupPosition).setPrenterflog(flog);
                //调用p层计算的方法    把购车车对象传过去  便于获取数据
                //计算的逻辑在m层做  返回一个double  在p层调用v层的方法把m层计算好的值赋值给textview
                Mypresenter mypresenter=new Mypresenter();
                mypresenter.jisuan(ishowcart,new Mymode(),data);
                //通知改变
                notifyDataSetChanged();

                notifyDataSetChanged();
            }
        });

        mychildhodler.jiajian.setNumberlistener(new Jiajian.NumberLisner() {


            @Override
            public void callBack(int couint) {
                //设置子控件的加减数量为  couint-1
                mybean.setSelected(couint-1);

                //调用p层计算的方法
                Mypresenter mypresenter=new Mypresenter();
                mypresenter.jisuan(ishowcart,new Mymode(),data);
                //刷新适配器
                notifyDataSetChanged();
            }
        });
        return convertView;
    }

    @Override
    public boolean isChildSelectable(int groupPosition, int childPosition) {
        return false;
    }

    class Mychildhodler{
        public CheckBox child_ck;
        public SimpleDraweeView sd;
        public TextView child_tv;
        public TextView child_tv1;
        public Jiajian jiajian;

        public Mychildhodler(CheckBox child_ck, SimpleDraweeView sd, TextView child_tv, TextView child_tv1,Jiajian jiajian) {
            this.child_ck = child_ck;
            this.sd = sd;
            this.child_tv = child_tv;
            this.child_tv1 = child_tv1;
            this.jiajian=jiajian;
        }
    }

    class Myprenterhodler{
        public CheckBox prenter_cb;
        public TextView present_tv;

        public Myprenterhodler(CheckBox prenter_cb, TextView present_tv) {
            this.prenter_cb = prenter_cb;
            this.present_tv = present_tv;
        }
    }
}

------------------Tuijianadapter--------------

package com.example.yuekaomoni.adapter;

import android.content.Context;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.yuekaomoni.R;
import com.example.yuekaomoni.bean.Shouyebean;
import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

/**
 * 
 * 推荐的适配器
 */

public class Tuijianadapter extends RecyclerView.Adapter<Tuijianadapter.Tuijian> {
    private Context context;
    private List<Shouyebean.TuijianBean.ListBean> tuijian;
    private Itemclick item;

    public Tuijianadapter(Context context, List<Shouyebean.TuijianBean.ListBean> tuijian) {
        this.context = context;
        this.tuijian = tuijian;
    }

    @Override
    public Tuijian onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = View.inflate(context, R.layout.shouye_tuijian_zi, null);
        Tuijian tuijian=new Tuijian(view);
        return tuijian;
    }

    @Override
    public void onBindViewHolder(final Tuijian holder, final int position) {
        String images = tuijian.get(position).getImages();
        String[] split = images.split(".jpg");
        holder.sd.setImageURI(Uri.parse(split[0]+".jpg"));
        holder.tuijian_tv.setText(tuijian.get(position).getTitle());
        if (item!=null){
            //holder为Myhodler holder的参数
            holder.itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    //调用接口的方法
                    item.itemclick(holder.itemView,position);
                }
            });
        }
    }

    @Override
    public int getItemCount() {
        return tuijian.size();
    }

    class Tuijian extends RecyclerView.ViewHolder{
        public SimpleDraweeView sd;
        public TextView tuijian_tv;
        public Tuijian(View itemView) {
            super(itemView);
            this.sd=itemView.findViewById(R.id.sd);
            this.tuijian_tv=itemView.findViewById(R.id.tuijian_tv);
        }
    }
    //定义接口
    public interface Itemclick{
        void itemclick(View view,int position);
    }

    //定义方法   参数1为接口  2为接口的变量名
    public void huidiao(Itemclick item){
        this.item=item;
    }
}

----------------------bean---------------------

------------------Addcart----------------

package com.example.yuekaomoni.bean;


public class Addcart {

    /**
     * msg : 加购成功
     * code : 0
     */

    private String msg;
    private String code;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}

---------------------Shopbean-------------------

package com.example.yuekaomoni.bean;

import java.util.List;



public class Shopbean {


    /**
     * msg : 请求成功
     * code : 0
     * data : [{"bargainPrice":99,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/4345173.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t6037/35/2944615848/95178/6cd6cff0/594a3a10Na4ec7f39.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6607/258/1025744923/75738/da120a2d/594a3a12Ne3e6bc56.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6370/292/1057025420/64655/f87644e3/594a3a12N5b900606.jpg!q70.jpg","itemtype":1,"pid":45,"price":2999,"pscid":39,"salenum":4666,"sellerid":1,"subhead":"高清双摄,就是清晰!2000+1600万高清摄像头,6GB大内存+高通骁龙835处理器,性能怪兽!","title":"一加手机5 (A5000) 6GB+64GB 月岩灰 全网通 双卡双待 移动联通电信4G手机"},{"bargainPrice":6666,"createtime":"2017-10-10T16:01:31","detailUrl":"https://item.m.jd.com/product/5089273.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8284/363/1326459580/71585/6d3e8013/59b857f2N6ca75622.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9346/182/1406837243/282106/68af5b54/59b8480aNe8af7f5c.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8434/54/1359766007/56140/579509d9/59b85801Nfea207db.jpg!q70.jpg","itemtype":0,"pid":46,"price":234,"pscid":39,"salenum":868,"sellerid":2,"subhead":"【iPhone新品上市】新一代iPhone,让智能看起来更不一样","title":"Apple iPhone 8 Plus (A1864) 64GB 金色 移动联通电信4G手机"},{"bargainPrice":1599,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/1993026402.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t5863/302/8961270302/97126/41feade1/5981c81cNc1b1fbef.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7003/250/1488538438/195825/53bf31ba/5981c57eN51e95176.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5665/100/8954482513/43454/418611a9/5981c57eNd5fc97ba.jpg!q70.jpg","itemtype":2,"pid":47,"price":111,"pscid":39,"salenum":757,"sellerid":3,"subhead":"碳黑色 32GB 全网通 官方标配 1件","title":"锤子 坚果Pro 特别版 巧克力色 酒红色 全网通 移动联通电信4G手机 双卡双待 碳黑色 32GB 全网通"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":48,"price":222,"pscid":39,"salenum":656,"sellerid":4,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":1999,"createtime":"2017-10-10T16:09:02","detailUrl":"https://item.m.jd.com/product/5025971.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t7210/232/3738666823/232298/9004583e/59c3a9a7N8de42e15.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8356/82/2107423621/109733/c019b8c6/59c3a9a6Ne9a4bdd7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t10219/74/25356012/171379/7d55e296/59c3a9a8N82fa6e02.jpg!q70.jpg","itemtype":0,"pid":49,"price":333,"pscid":39,"salenum":123,"sellerid":5,"subhead":"vivo X20 带你开启全面屏时代!逆光也清晰,照亮你的美!","title":"vivo X20 全面屏手机 全网通 4GB+64GB 金色 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":2,"pid":50,"price":444,"pscid":39,"salenum":54,"sellerid":6,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":51,"price":555,"pscid":39,"salenum":424,"sellerid":7,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":52,"price":666,"pscid":39,"salenum":212,"sellerid":8,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":2999,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/2385655.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t2068/298/2448145915/157953/7be197df/56d51a42Nd86f1c8e.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2437/128/1687178395/117431/bcc190c1/56d3fcbaNb2963d21.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2467/222/2263160610/95597/927b8a2f/56d3eafeNdecebeb6.jpg!q70.jpg","itemtype":2,"pid":53,"price":777,"pscid":39,"salenum":0,"sellerid":9,"subhead":"Super AMOLED三星双曲面2K 屏,支持无线充电!","title":"三星 Galaxy S7 edge(G9350)4GB+32GB 铂光金 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":54,"price":888,"pscid":39,"salenum":7575,"sellerid":10,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"}]
     * page : 1
     */

    private String msg;
    private String code;
    private String page;
    private List<DataBean> data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * bargainPrice : 99
         * createtime : 2017-10-14T21:38:26
         * detailUrl : https://item.m.jd.com/product/4345173.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends
         * images : https://m.360buyimg.com/n0/jfs/t6037/35/2944615848/95178/6cd6cff0/594a3a10Na4ec7f39.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6607/258/1025744923/75738/da120a2d/594a3a12Ne3e6bc56.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6370/292/1057025420/64655/f87644e3/594a3a12N5b900606.jpg!q70.jpg
         * itemtype : 1
         * pid : 45
         * price : 2999
         * pscid : 39
         * salenum : 4666
         * sellerid : 1
         * subhead : 高清双摄,就是清晰!2000+1600万高清摄像头,6GB大内存+高通骁龙835处理器,性能怪兽!
         * title : 一加手机5 (A5000) 6GB+64GB 月岩灰 全网通 双卡双待 移动联通电信4G手机
         */

        private int bargainPrice;
        private String createtime;
        private String detailUrl;
        private String images;
        private int itemtype;
        private int pid;
        private int price;
        private int pscid;
        private int salenum;
        private int sellerid;
        private String subhead;
        private String title;

        public int getBargainPrice() {
            return bargainPrice;
        }

        public void setBargainPrice(int bargainPrice) {
            this.bargainPrice = bargainPrice;
        }

        public String getCreatetime() {
            return createtime;
        }

        public void setCreatetime(String createtime) {
            this.createtime = createtime;
        }

        public String getDetailUrl() {
            return detailUrl;
        }

        public void setDetailUrl(String detailUrl) {
            this.detailUrl = detailUrl;
        }

        public String getImages() {
            return images;
        }

        public void setImages(String images) {
            this.images = images;
        }

        public int getItemtype() {
            return itemtype;
        }

        public void setItemtype(int itemtype) {
            this.itemtype = itemtype;
        }

        public int getPid() {
            return pid;
        }

        public void setPid(int pid) {
            this.pid = pid;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public int getPscid() {
            return pscid;
        }

        public void setPscid(int pscid) {
            this.pscid = pscid;
        }

        public int getSalenum() {
            return salenum;
        }

        public void setSalenum(int salenum) {
            this.salenum = salenum;
        }

        public int getSellerid() {
            return sellerid;
        }

        public void setSellerid(int sellerid) {
            this.sellerid = sellerid;
        }

        public String getSubhead() {
            return subhead;
        }

        public void setSubhead(String subhead) {
            this.subhead = subhead;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }
    }
}

-----------------Shopxiangqingbean-----------------

package com.example.yuekaomoni.bean;

import java.io.Serializable;


public class Shopxiangqingbean implements Serializable{
    private String image;
    private String title;
    private int price;
    private int price_you;
    private int pid;

    public Shopxiangqingbean(String image, String title, int price, int price_you, int pid) {
        this.image = image;
        this.title = title;
        this.price = price;
        this.price_you = price_you;
        this.pid = pid;
    }

    public String getImage() {
        return image;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getPrice_you() {
        return price_you;
    }

    public void setPrice_you(int price_you) {
        this.price_you = price_you;
    }
}

--------------------Shouyebean-------------------

package com.example.yuekaomoni.bean;

import java.util.List;


public class Shouyebean {

    /**
     * msg :
     * code : 0
     * data : [{"aid":1,"createtime":"2017-12-26T21:49:44","icon":"https://www.zhaoapi.cn/images/quarter/ad1.png","productId":null,"title":"第十三界瑞丽模特大赛","type":0,"url":"http://m.mv14449315.icoc.bz/index.jsp"},{"aid":2,"createtime":"2017-12-26T21:49:44","icon":"https://www.zhaoapi.cn/images/quarter/ad2.png","productId":null,"title":"文化艺术节","type":0,"url":"http://m.mv14449315.icoc.bz/index.jsp"},{"aid":3,"createtime":"2017-12-26T21:49:44","icon":"https://www.zhaoapi.cn/images/quarter/ad3.png","productId":null,"title":"直播封面标准","type":0,"url":"http://m.mv14449315.icoc.bz/index.jsp"},{"aid":4,"createtime":"2017-12-26T21:49:44","icon":"https://www.zhaoapi.cn/images/quarter/ad4.png","productId":"1","title":"人气谁最高,金主谁最豪气","type":1,"url":""}]
     * tuijian : {"list":[{"bargainPrice":11800,"createtime":"2017-10-10T17:33:37","detailUrl":"https://item.m.jd.com/product/4338107.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t6700/155/2098998076/156185/6cf95035/595dd5a5Nc3a7dab5.jpg!q70.jpg","itemtype":0,"pid":57,"price":5199,"pscid":40,"salenum":4343,"sellerid":1,"subhead":"【i5 MX150 2G显存】全高清窄边框 8G内存 256固态硬盘 支持指纹识别 预装WIN10系统","title":"小米(MI)Air 13.3英寸全金属轻薄笔记本(i5-7200U 8G 256G PCle SSD MX150 2G独显 FHD 指纹识别 Win10)银 "},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/5025518.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8830/106/1760940277/195595/5cf9412f/59bf2ef5N5ab7dc16.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5428/70/1520969931/274676/b644dd0d/591128e7Nd2f70da0.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5566/365/1519564203/36911/620c750c/591128eaN54ac3363.jpg!q70.jpg","itemtype":1,"pid":58,"price":6399,"pscid":40,"salenum":545,"sellerid":2,"subhead":"升级4G大显存!Nvme协议Pcie SSD,速度快人一步】GTX1050Ti就选拯救者!专业游戏键盘&新模具全新设计!","title":"联想(Lenovo)拯救者R720 15.6英寸游戏笔记本电脑(i5-7300HQ 8G 1T+128G SSD GTX1050Ti 4G IPS 黑)"},{"bargainPrice":5599,"createtime":"2017-10-10T17:30:32","detailUrl":"https://item.m.jd.com/product/4824715.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n12/jfs/t7768/184/1153704394/148460/f42e1432/599a930fN8a85626b.jpg!q70.jpg","itemtype":0,"pid":59,"price":5599,"pscid":40,"salenum":675,"sellerid":3,"subhead":"游戏本选择4G独显,拒绝掉帧】升级版IPS全高清防眩光显示屏,WASD方向键颜色加持,三大出风口立体散热!","title":"戴尔DELL灵越游匣15PR-6648B GTX1050 15.6英寸游戏笔记本电脑(i5-7300HQ 8G 128GSSD+1T 4G独显 IPS)黑"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":60,"price":13888,"pscid":40,"salenum":466,"sellerid":4,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":61,"price":14999,"pscid":40,"salenum":5535,"sellerid":5,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":62,"price":15999,"pscid":40,"salenum":43,"sellerid":6,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":63,"price":10000,"pscid":40,"salenum":3232,"sellerid":7,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:43:53","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":64,"price":11000,"pscid":40,"salenum":0,"sellerid":8,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":65,"price":12000,"pscid":40,"salenum":868,"sellerid":9,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":66,"price":13000,"pscid":40,"salenum":7676,"sellerid":10,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":67,"price":14000,"pscid":40,"salenum":757,"sellerid":11,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":68,"price":15000,"pscid":40,"salenum":656,"sellerid":12,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":69,"price":16999,"pscid":40,"salenum":6645,"sellerid":13,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":70,"price":17999,"pscid":40,"salenum":545,"sellerid":14,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":71,"price":32999,"pscid":40,"salenum":4242,"sellerid":15,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":72,"price":33999,"pscid":40,"salenum":535,"sellerid":16,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":73,"price":34999,"pscid":40,"salenum":242,"sellerid":17,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":74,"price":35999,"pscid":40,"salenum":656,"sellerid":18,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":75,"price":36999,"pscid":40,"salenum":5454,"sellerid":19,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":76,"price":37999.99,"pscid":40,"salenum":6868,"sellerid":20,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":77,"price":38999.99,"pscid":40,"salenum":7757,"sellerid":21,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":78,"price":999,"pscid":40,"salenum":656,"sellerid":22,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":79,"price":888,"pscid":40,"salenum":5454,"sellerid":23,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":80,"price":777,"pscid":40,"salenum":776,"sellerid":1,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"}],"name":"为你推荐"}
     * miaosha : {"list":[{"bargainPrice":99,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/4345173.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t6037/35/2944615848/95178/6cd6cff0/594a3a10Na4ec7f39.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6607/258/1025744923/75738/da120a2d/594a3a12Ne3e6bc56.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6370/292/1057025420/64655/f87644e3/594a3a12N5b900606.jpg!q70.jpg","itemtype":1,"pid":45,"price":2999,"pscid":39,"salenum":4666,"sellerid":1,"subhead":"高清双摄,就是清晰!2000+1600万高清摄像头,6GB大内存+高通骁龙835处理器,性能怪兽!","title":"一加手机5 (A5000) 6GB+64GB 月岩灰 全网通 双卡双待 移动联通电信4G手机"},{"bargainPrice":6666,"createtime":"2017-10-10T16:01:31","detailUrl":"https://item.m.jd.com/product/5089273.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8284/363/1326459580/71585/6d3e8013/59b857f2N6ca75622.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9346/182/1406837243/282106/68af5b54/59b8480aNe8af7f5c.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8434/54/1359766007/56140/579509d9/59b85801Nfea207db.jpg!q70.jpg","itemtype":0,"pid":46,"price":234,"pscid":39,"salenum":868,"sellerid":2,"subhead":"【iPhone新品上市】新一代iPhone,让智能看起来更不一样","title":"Apple iPhone 8 Plus (A1864) 64GB 金色 移动联通电信4G手机"},{"bargainPrice":1599,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/1993026402.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t5863/302/8961270302/97126/41feade1/5981c81cNc1b1fbef.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7003/250/1488538438/195825/53bf31ba/5981c57eN51e95176.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5665/100/8954482513/43454/418611a9/5981c57eNd5fc97ba.jpg!q70.jpg","itemtype":2,"pid":47,"price":111,"pscid":39,"salenum":757,"sellerid":3,"subhead":"碳黑色 32GB 全网通 官方标配 1件","title":"锤子 坚果Pro 特别版 巧克力色 酒红色 全网通 移动联通电信4G手机 双卡双待 碳黑色 32GB 全网通"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":48,"price":222,"pscid":39,"salenum":656,"sellerid":4,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":1999,"createtime":"2017-10-10T16:09:02","detailUrl":"https://item.m.jd.com/product/5025971.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t7210/232/3738666823/232298/9004583e/59c3a9a7N8de42e15.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8356/82/2107423621/109733/c019b8c6/59c3a9a6Ne9a4bdd7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t10219/74/25356012/171379/7d55e296/59c3a9a8N82fa6e02.jpg!q70.jpg","itemtype":0,"pid":49,"price":333,"pscid":39,"salenum":123,"sellerid":5,"subhead":"vivo X20 带你开启全面屏时代!逆光也清晰,照亮你的美!","title":"vivo X20 全面屏手机 全网通 4GB+64GB 金色 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":2,"pid":50,"price":444,"pscid":39,"salenum":54,"sellerid":6,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":51,"price":555,"pscid":39,"salenum":424,"sellerid":7,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":52,"price":666,"pscid":39,"salenum":212,"sellerid":8,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":2999,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/2385655.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t2068/298/2448145915/157953/7be197df/56d51a42Nd86f1c8e.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2437/128/1687178395/117431/bcc190c1/56d3fcbaNb2963d21.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2467/222/2263160610/95597/927b8a2f/56d3eafeNdecebeb6.jpg!q70.jpg","itemtype":2,"pid":53,"price":777,"pscid":39,"salenum":0,"sellerid":9,"subhead":"Super AMOLED三星双曲面2K 屏,支持无线充电!","title":"三星 Galaxy S7 edge(G9350)4GB+32GB 铂光金 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":54,"price":888,"pscid":39,"salenum":7575,"sellerid":10,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":55,"price":5999,"pscid":39,"salenum":788,"sellerid":11,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":56,"price":99,"pscid":39,"salenum":757,"sellerid":12,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"}],"name":"京东秒杀","time":7200000}
     */

    private String msg;
    private String code;
    private TuijianBean tuijian;
    private MiaoshaBean miaosha;
    private List<DataBean> data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public TuijianBean getTuijian() {
        return tuijian;
    }

    public void setTuijian(TuijianBean tuijian) {
        this.tuijian = tuijian;
    }

    public MiaoshaBean getMiaosha() {
        return miaosha;
    }

    public void setMiaosha(MiaoshaBean miaosha) {
        this.miaosha = miaosha;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class TuijianBean {
        /**
         * list : [{"bargainPrice":11800,"createtime":"2017-10-10T17:33:37","detailUrl":"https://item.m.jd.com/product/4338107.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t6700/155/2098998076/156185/6cf95035/595dd5a5Nc3a7dab5.jpg!q70.jpg","itemtype":0,"pid":57,"price":5199,"pscid":40,"salenum":4343,"sellerid":1,"subhead":"【i5 MX150 2G显存】全高清窄边框 8G内存 256固态硬盘 支持指纹识别 预装WIN10系统","title":"小米(MI)Air 13.3英寸全金属轻薄笔记本(i5-7200U 8G 256G PCle SSD MX150 2G独显 FHD 指纹识别 Win10)银 "},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/5025518.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8830/106/1760940277/195595/5cf9412f/59bf2ef5N5ab7dc16.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5428/70/1520969931/274676/b644dd0d/591128e7Nd2f70da0.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5566/365/1519564203/36911/620c750c/591128eaN54ac3363.jpg!q70.jpg","itemtype":1,"pid":58,"price":6399,"pscid":40,"salenum":545,"sellerid":2,"subhead":"升级4G大显存!Nvme协议Pcie SSD,速度快人一步】GTX1050Ti就选拯救者!专业游戏键盘&新模具全新设计!","title":"联想(Lenovo)拯救者R720 15.6英寸游戏笔记本电脑(i5-7300HQ 8G 1T+128G SSD GTX1050Ti 4G IPS 黑)"},{"bargainPrice":5599,"createtime":"2017-10-10T17:30:32","detailUrl":"https://item.m.jd.com/product/4824715.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n12/jfs/t7768/184/1153704394/148460/f42e1432/599a930fN8a85626b.jpg!q70.jpg","itemtype":0,"pid":59,"price":5599,"pscid":40,"salenum":675,"sellerid":3,"subhead":"游戏本选择4G独显,拒绝掉帧】升级版IPS全高清防眩光显示屏,WASD方向键颜色加持,三大出风口立体散热!","title":"戴尔DELL灵越游匣15PR-6648B GTX1050 15.6英寸游戏笔记本电脑(i5-7300HQ 8G 128GSSD+1T 4G独显 IPS)黑"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":60,"price":13888,"pscid":40,"salenum":466,"sellerid":4,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":61,"price":14999,"pscid":40,"salenum":5535,"sellerid":5,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":62,"price":15999,"pscid":40,"salenum":43,"sellerid":6,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":63,"price":10000,"pscid":40,"salenum":3232,"sellerid":7,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:43:53","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":64,"price":11000,"pscid":40,"salenum":0,"sellerid":8,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":65,"price":12000,"pscid":40,"salenum":868,"sellerid":9,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":66,"price":13000,"pscid":40,"salenum":7676,"sellerid":10,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":67,"price":14000,"pscid":40,"salenum":757,"sellerid":11,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":68,"price":15000,"pscid":40,"salenum":656,"sellerid":12,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":69,"price":16999,"pscid":40,"salenum":6645,"sellerid":13,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":70,"price":17999,"pscid":40,"salenum":545,"sellerid":14,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":71,"price":32999,"pscid":40,"salenum":4242,"sellerid":15,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":72,"price":33999,"pscid":40,"salenum":535,"sellerid":16,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":73,"price":34999,"pscid":40,"salenum":242,"sellerid":17,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":74,"price":35999,"pscid":40,"salenum":656,"sellerid":18,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":75,"price":36999,"pscid":40,"salenum":5454,"sellerid":19,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":76,"price":37999.99,"pscid":40,"salenum":6868,"sellerid":20,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:48:08","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":2,"pid":77,"price":38999.99,"pscid":40,"salenum":7757,"sellerid":21,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":78,"price":999,"pscid":40,"salenum":656,"sellerid":22,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":0,"pid":79,"price":888,"pscid":40,"salenum":5454,"sellerid":23,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"},{"bargainPrice":11800,"createtime":"2017-10-14T21:38:26","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","itemtype":1,"pid":80,"price":777,"pscid":40,"salenum":776,"sellerid":1,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"}]
         * name : 为你推荐
         */

        private String name;
        private List<ListBean> list;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean {
            /**
             * bargainPrice : 11800
             * createtime : 2017-10-10T17:33:37
             * detailUrl : https://item.m.jd.com/product/4338107.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends
             * images : https://m.360buyimg.com/n0/jfs/t6700/155/2098998076/156185/6cf95035/595dd5a5Nc3a7dab5.jpg!q70.jpg
             * itemtype : 0
             * pid : 57
             * price : 5199
             * pscid : 40
             * salenum : 4343
             * sellerid : 1
             * subhead : 【i5 MX150 2G显存】全高清窄边框 8G内存 256固态硬盘 支持指纹识别 预装WIN10系统
             * title : 小米(MI)Air 13.3英寸全金属轻薄笔记本(i5-7200U 8G 256G PCle SSD MX150 2G独显 FHD 指纹识别 Win10)银
             */

            private double bargainPrice;
            private String createtime;
            private String detailUrl;
            private String images;
            private double itemtype;
            private double pid;
            private double price;
            private double pscid;
            private double salenum;
            private double sellerid;
            private String subhead;
            private String title;

            public double getBargainPrice() {
                return bargainPrice;
            }

            public void setBargainPrice(double bargainPrice) {
                this.bargainPrice = bargainPrice;
            }

            public String getCreatetime() {
                return createtime;
            }

            public void setCreatetime(String createtime) {
                this.createtime = createtime;
            }

            public String getDetailUrl() {
                return detailUrl;
            }

            public void setDetailUrl(String detailUrl) {
                this.detailUrl = detailUrl;
            }

            public String getImages() {
                return images;
            }

            public void setImages(String images) {
                this.images = images;
            }

            public double getItemtype() {
                return itemtype;
            }

            public void setItemtype(double itemtype) {
                this.itemtype = itemtype;
            }

            public double getPid() {
                return pid;
            }

            public void setPid(double pid) {
                this.pid = pid;
            }

            public double getPrice() {
                return price;
            }

            public void setPrice(double price) {
                this.price = price;
            }

            public double getPscid() {
                return pscid;
            }

            public void setPscid(double pscid) {
                this.pscid = pscid;
            }

            public double getSalenum() {
                return salenum;
            }

            public void setSalenum(double salenum) {
                this.salenum = salenum;
            }

            public double getSellerid() {
                return sellerid;
            }

            public void setSellerid(double sellerid) {
                this.sellerid = sellerid;
            }

            public String getSubhead() {
                return subhead;
            }

            public void setSubhead(String subhead) {
                this.subhead = subhead;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }
        }
    }

    public static class MiaoshaBean {
        /**
         * list : [{"bargainPrice":99,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/4345173.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t6037/35/2944615848/95178/6cd6cff0/594a3a10Na4ec7f39.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6607/258/1025744923/75738/da120a2d/594a3a12Ne3e6bc56.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6370/292/1057025420/64655/f87644e3/594a3a12N5b900606.jpg!q70.jpg","itemtype":1,"pid":45,"price":2999,"pscid":39,"salenum":4666,"sellerid":1,"subhead":"高清双摄,就是清晰!2000+1600万高清摄像头,6GB大内存+高通骁龙835处理器,性能怪兽!","title":"一加手机5 (A5000) 6GB+64GB 月岩灰 全网通 双卡双待 移动联通电信4G手机"},{"bargainPrice":6666,"createtime":"2017-10-10T16:01:31","detailUrl":"https://item.m.jd.com/product/5089273.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8284/363/1326459580/71585/6d3e8013/59b857f2N6ca75622.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9346/182/1406837243/282106/68af5b54/59b8480aNe8af7f5c.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8434/54/1359766007/56140/579509d9/59b85801Nfea207db.jpg!q70.jpg","itemtype":0,"pid":46,"price":234,"pscid":39,"salenum":868,"sellerid":2,"subhead":"【iPhone新品上市】新一代iPhone,让智能看起来更不一样","title":"Apple iPhone 8 Plus (A1864) 64GB 金色 移动联通电信4G手机"},{"bargainPrice":1599,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/1993026402.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t5863/302/8961270302/97126/41feade1/5981c81cNc1b1fbef.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7003/250/1488538438/195825/53bf31ba/5981c57eN51e95176.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5665/100/8954482513/43454/418611a9/5981c57eNd5fc97ba.jpg!q70.jpg","itemtype":2,"pid":47,"price":111,"pscid":39,"salenum":757,"sellerid":3,"subhead":"碳黑色 32GB 全网通 官方标配 1件","title":"锤子 坚果Pro 特别版 巧克力色 酒红色 全网通 移动联通电信4G手机 双卡双待 碳黑色 32GB 全网通"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":48,"price":222,"pscid":39,"salenum":656,"sellerid":4,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":1999,"createtime":"2017-10-10T16:09:02","detailUrl":"https://item.m.jd.com/product/5025971.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t7210/232/3738666823/232298/9004583e/59c3a9a7N8de42e15.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8356/82/2107423621/109733/c019b8c6/59c3a9a6Ne9a4bdd7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t10219/74/25356012/171379/7d55e296/59c3a9a8N82fa6e02.jpg!q70.jpg","itemtype":0,"pid":49,"price":333,"pscid":39,"salenum":123,"sellerid":5,"subhead":"vivo X20 带你开启全面屏时代!逆光也清晰,照亮你的美!","title":"vivo X20 全面屏手机 全网通 4GB+64GB 金色 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":2,"pid":50,"price":444,"pscid":39,"salenum":54,"sellerid":6,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":51,"price":555,"pscid":39,"salenum":424,"sellerid":7,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":52,"price":666,"pscid":39,"salenum":212,"sellerid":8,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":2999,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/2385655.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t2068/298/2448145915/157953/7be197df/56d51a42Nd86f1c8e.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2437/128/1687178395/117431/bcc190c1/56d3fcbaNb2963d21.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t2467/222/2263160610/95597/927b8a2f/56d3eafeNdecebeb6.jpg!q70.jpg","itemtype":2,"pid":53,"price":777,"pscid":39,"salenum":0,"sellerid":9,"subhead":"Super AMOLED三星双曲面2K 屏,支持无线充电!","title":"三星 Galaxy S7 edge(G9350)4GB+32GB 铂光金 移动联通电信4G手机 双卡双待"},{"bargainPrice":3455,"createtime":"2017-10-03T23:53:28","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":0,"pid":54,"price":888,"pscid":39,"salenum":7575,"sellerid":10,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":55,"price":5999,"pscid":39,"salenum":788,"sellerid":11,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"},{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","itemtype":1,"pid":56,"price":99,"pscid":39,"salenum":757,"sellerid":12,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"}]
         * name : 京东秒杀
         * time : 7200000
         */

        private String name;
        private double time;
        private List<ListBeanX> list;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public double getTime() {
            return time;
        }

        public void setTime(double time) {
            this.time = time;
        }

        public List<ListBeanX> getList() {
            return list;
        }

        public void setList(List<ListBeanX> list) {
            this.list = list;
        }

        public static class ListBeanX {
            /**
             * bargainPrice : 99
             * createtime : 2017-10-14T21:38:26
             * detailUrl : https://item.m.jd.com/product/4345173.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends
             * images : https://m.360buyimg.com/n0/jfs/t6037/35/2944615848/95178/6cd6cff0/594a3a10Na4ec7f39.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6607/258/1025744923/75738/da120a2d/594a3a12Ne3e6bc56.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t6370/292/1057025420/64655/f87644e3/594a3a12N5b900606.jpg!q70.jpg
             * itemtype : 1
             * pid : 45
             * price : 2999
             * pscid : 39
             * salenum : 4666
             * sellerid : 1
             * subhead : 高清双摄,就是清晰!2000+1600万高清摄像头,6GB大内存+高通骁龙835处理器,性能怪兽!
             * title : 一加手机5 (A5000) 6GB+64GB 月岩灰 全网通 双卡双待 移动联通电信4G手机
             */

            private double bargainPrice;
            private String createtime;
            private String detailUrl;
            private String images;
            private double itemtype;
            private double pid;
            private double price;
            private double pscid;
            private double salenum;
            private double sellerid;
            private String subhead;
            private String title;

            public double getBargainPrice() {
                return bargainPrice;
            }

            public void setBargainPrice(double bargainPrice) {
                this.bargainPrice = bargainPrice;
            }

            public String getCreatetime() {
                return createtime;
            }

            public void setCreatetime(String createtime) {
                this.createtime = createtime;
            }

            public String getDetailUrl() {
                return detailUrl;
            }

            public void setDetailUrl(String detailUrl) {
                this.detailUrl = detailUrl;
            }

            public String getImages() {
                return images;
            }

            public void setImages(String images) {
                this.images = images;
            }

            public double getItemtype() {
                return itemtype;
            }

            public void setItemtype(double itemtype) {
                this.itemtype = itemtype;
            }

            public double getPid() {
                return pid;
            }

            public void setPid(double pid) {
                this.pid = pid;
            }

            public double getPrice() {
                return price;
            }

            public void setPrice(double price) {
                this.price = price;
            }

            public double getPscid() {
                return pscid;
            }

            public void setPscid(double pscid) {
                this.pscid = pscid;
            }

            public double getSalenum() {
                return salenum;
            }

            public void setSalenum(double salenum) {
                this.salenum = salenum;
            }

            public double getSellerid() {
                return sellerid;
            }

            public void setSellerid(double sellerid) {
                this.sellerid = sellerid;
            }

            public String getSubhead() {
                return subhead;
            }

            public void setSubhead(String subhead) {
                this.subhead = subhead;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }
        }
    }

    public static class DataBean {
        /**
         * aid : 1
         * createtime : 2017-12-26T21:49:44
         * icon : https://www.zhaoapi.cn/images/quarter/ad1.png
         * productId : null
         * title : 第十三界瑞丽模特大赛
         * type : 0
         * url : http://m.mv14449315.icoc.bz/index.jsp
         */

        private double aid;
        private String createtime;
        private String icon;
        private Object productId;
        private String title;
        private double type;
        private String url;

        public double getAid() {
            return aid;
        }

        public void setAid(double aid) {
            this.aid = aid;
        }

        public String getCreatetime() {
            return createtime;
        }

        public void setCreatetime(String createtime) {
            this.createtime = createtime;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public Object getProductId() {
            return productId;
        }

        public void setProductId(Object productId) {
            this.productId = productId;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public double getType() {
            return type;
        }

        public void setType(double type) {
            this.type = type;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}

---------------------Showcartbean-----------------

package com.example.yuekaomoni.bean;

import java.util.List;

/**
 * Created by Administrator on 2018/3/4.
 */

public class Showcartbean {

    /**
     * msg : 请求成功
     * code : 0
     * data : [{"list":[],"sellerName":"","sellerid":"0"},{"list":[{"bargainPrice":6666,"createtime":"2017-10-10T16:01:31","detailUrl":"https://item.m.jd.com/product/5089273.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t8284/363/1326459580/71585/6d3e8013/59b857f2N6ca75622.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9346/182/1406837243/282106/68af5b54/59b8480aNe8af7f5c.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8434/54/1359766007/56140/579509d9/59b85801Nfea207db.jpg!q70.jpg","num":1,"pid":46,"price":234,"pscid":39,"selected":0,"sellerid":2,"subhead":"【iPhone新品上市】新一代iPhone,让智能看起来更不一样","title":"Apple iPhone 8 Plus (A1864) 64GB 金色 移动联通电信4G手机"}],"sellerName":"商家2","sellerid":"2"},{"list":[{"bargainPrice":1599,"createtime":"2017-10-14T21:48:08","detailUrl":"https://item.m.jd.com/product/1993026402.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t5863/302/8961270302/97126/41feade1/5981c81cNc1b1fbef.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7003/250/1488538438/195825/53bf31ba/5981c57eN51e95176.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5665/100/8954482513/43454/418611a9/5981c57eNd5fc97ba.jpg!q70.jpg","num":1,"pid":47,"price":111,"pscid":39,"selected":0,"sellerid":3,"subhead":"碳黑色 32GB 全网通 官方标配 1件","title":"锤子 坚果Pro 特别版 巧克力色 酒红色 全网通 移动联通电信4G手机 双卡双待 碳黑色 32GB 全网通"}],"sellerName":"商家3","sellerid":"3"},{"list":[{"bargainPrice":3455,"createtime":"2017-10-14T21:38:26","detailUrl":"https://item.m.jd.com/product/12224420750.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9106/106/1785172479/537280/253bc0ab/59bf78a7N057e5ff7.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8461/5/1492479653/68388/7255e013/59ba5e84N91091843.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8803/356/1478945529/489755/2a163ace/59ba5e84N7bb9a666.jpg!q70.jpg","num":1,"pid":48,"price":222,"pscid":39,"selected":0,"sellerid":4,"subhead":"【现货新品抢购】全面屏2.0震撼来袭,骁龙835处理器,四曲面陶瓷机","title":"小米(MI) 小米MIX2 手机 黑色 全网通 (6GB+64GB)【标配版】"}],"sellerName":"商家4","sellerid":"4"},{"list":[{"bargainPrice":111.99,"createtime":"2017-10-03T23:43:53","detailUrl":"https://item.m.jd.com/product/4719303.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9004/210/1160833155/647627/ad6be059/59b4f4e1N9a2b1532.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7504/338/63721388/491286/f5957f53/598e95f1N7f2adb87.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7441/10/64242474/419246/adb30a7d/598e95fbNd989ba0a.jpg!q70.jpg","num":4,"pid":12,"price":256,"pscid":1,"selected":0,"sellerid":5,"subhead":"每个中秋都不能简单,无论身在何处,你总需要一块饼让生活更圆满,京东月饼让爱更圆满京东自营,闪电配送,更多惊喜,快用手指戳一下","title":"北京稻香村 稻香村中秋节月饼 老北京月饼礼盒655g"}],"sellerName":"商家5","sellerid":"5"},{"list":[{"bargainPrice":11800,"createtime":"2017-10-03T23:53:28","detailUrl":"https://mitem.jd.hk/ware/view.action?wareId=1988853309&cachekey=1acb07a701ece8d2434a6ae7fa6870a1","images":"https://m.360buyimg.com/n0/jfs/t6130/97/1370670410/180682/1109582a/593276b1Nd81fe723.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5698/110/2617517836/202970/c9388feb/593276b7Nbd94ef1f.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5815/178/2614671118/51656/7f52d137/593276c7N107b725a.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t5878/60/2557817477/30873/4502b606/593276caN5a7d6357.jpg!q70.jpg","num":4,"pid":71,"price":32999,"pscid":40,"selected":0,"sellerid":15,"subhead":"购买电脑办公部分商品满1元返火车票5元优惠券(返完即止)","title":"全球购 新款Apple MacBook Pro 苹果笔记本电脑 银色VP2新13英寸Bar i5/8G/256G"}],"sellerName":"商家15","sellerid":"15"},{"list":[{"bargainPrice":111.99,"createtime":"2017-10-14T21:39:05","detailUrl":"https://item.m.jd.com/product/4719303.html?utm_source=androidapp&utm_medium=appshare&utm_campaign=t_335139774&utm_term=QQfriends","images":"https://m.360buyimg.com/n0/jfs/t9004/210/1160833155/647627/ad6be059/59b4f4e1N9a2b1532.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7504/338/63721388/491286/f5957f53/598e95f1N7f2adb87.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t7441/10/64242474/419246/adb30a7d/598e95fbNd989ba0a.jpg!q70.jpg","num":2,"pid":1,"price":118,"pscid":1,"selected":0,"sellerid":17,"subhead":"每个中秋都不能简单,无论身在何处,你总需要一块饼让生活更圆满,京东月饼让爱更圆满京东自营,闪电配送,更多惊喜,快用手指戳一下","title":"北京稻香村 稻香村中秋节月饼 老北京月饼礼盒655g"}],"sellerName":"商家17","sellerid":"17"}]
     */

    private String msg;
    private String code;
    private List<DataBean> data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * list : []
         * sellerName :
         * sellerid : 0
         */
        private boolean prenterflog;
        private String sellerName;
        private String sellerid;
        private List<Mybean> list;

        public boolean isPrenterflog() {
            return prenterflog;
        }

        public void setPrenterflog(boolean prenterflog) {
            this.prenterflog = prenterflog;
        }

        public String getSellerName() {
            return sellerName;
        }

        public void setSellerName(String sellerName) {
            this.sellerName = sellerName;
        }

        public String getSellerid() {
            return sellerid;
        }

        public void setSellerid(String sellerid) {
            this.sellerid = sellerid;
        }

        public List<Mybean> getList() {
            return list;
        }

        public void setList(List<Mybean> list) {
            this.list = list;
        }
    }
   public class Mybean{

       /**
        * bargainPrice : 6666
        * createtime : 2017-10-10T16:01:31
        * detailUrl : https://item.m.jd.com/product/5089273.html?utm#_source=androidapp&utm#_medium=appshare&utm#_campaign=t#_335139774&utm#_term=QQfriends
        * images : https://m.360buyimg.com/n0/jfs/t8284/363/1326459580/71585/6d3e8013/59b857f2N6ca75622.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t9346/182/1406837243/282106/68af5b54/59b8480aNe8af7f5c.jpg!q70.jpg|https://m.360buyimg.com/n0/jfs/t8434/54/1359766007/56140/579509d9/59b85801Nfea207db.jpg!q70.jpg
        * num : 1
        * pid : 46
        * price : 234
        * pscid : 39
        * selected : 0
        * sellerid : 2
        * subhead : 【iPhone新品上市】新一代iPhone,让智能看起来更不一样
        * title : Apple iPhone 8 Plus (A1864) 64GB 金色 移动联通电信4G手机
        */
       private boolean childflog;
       private double bargainPrice;
       private String createtime;
       private String detailUrl;
       private String images;
       private int num;
       private double pid;
       private double price;
       private double pscid;
       private int selected;
       private double sellerid;
       private String subhead;
       private String title;

       public boolean isChildflog() {
           return childflog;
       }

       public void setChildflog(boolean childflog) {
           this.childflog = childflog;
       }

       public double getBargainPrice() {
           return bargainPrice;
       }

       public void setBargainPrice(double bargainPrice) {
           this.bargainPrice = bargainPrice;
       }

       public String getCreatetime() {
           return createtime;
       }

       public void setCreatetime(String createtime) {
           this.createtime = createtime;
       }

       public String getDetailUrl() {
           return detailUrl;
       }

       public void setDetailUrl(String detailUrl) {
           this.detailUrl = detailUrl;
       }

       public String getImages() {
           return images;
       }

       public void setImages(String images) {
           this.images = images;
       }

       public int getNum() {
           return num;
       }

       public void setNum(int num) {
           this.num = num;
       }

       public double getPid() {
           return pid;
       }

       public void setPid(double pid) {
           this.pid = pid;
       }

       public double getPrice() {
           return price;
       }

       public void setPrice(double price) {
           this.price = price;
       }

       public double getPscid() {
           return pscid;
       }

       public void setPscid(double pscid) {
           this.pscid = pscid;
       }

       public int getSelected() {
           return selected;
       }

       public void setSelected(int selected) {
           this.selected = selected;
       }

       public double getSellerid() {
           return sellerid;
       }

       public void setSellerid(double sellerid) {
           this.sellerid = sellerid;
       }

       public String getSubhead() {
           return subhead;
       }

       public void setSubhead(String subhead) {
           this.subhead = subhead;
       }

       public String getTitle() {
           return title;
       }

       public void setTitle(String title) {
           this.title = title;
       }
   }
}

--------------------fragment--------------------------

--------------------Faxianfragment-------------------

package com.example.yuekaomoni.fragment;

import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.yuekaomoni.R;
import com.example.yuekaomoni.myview.GramophoneView;


public class Faxianfragment extends Fragment {

    private MediaPlayer player;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.faxian, container, false);
        player = MediaPlayer.create(getContext(), R.raw.li);
        final GramophoneView gramophoneView = (GramophoneView)view.findViewById(R.id.gramophone_view);
        final Button button = (Button)view.findViewById(R.id.btn_play_pause);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if(gramophoneView.getPlaying()){
                    button.setText("点击播放");
                    player.pause();

                }else{
                    button.setText("点击暂停");
                    player.start();

                }
                gramophoneView.setPlaying(!gramophoneView.getPlaying());
            }
        });

        return view;
    }
}

---------------Shangpinfragment---------------

package com.example.yuekaomoni.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import com.example.yuekaomoni.R;
import com.example.yuekaomoni.adapter.Shopadapter;
import com.example.yuekaomoni.bean.Shopbean;
import com.example.yuekaomoni.bean.Shopxiangqingbean;
import com.example.yuekaomoni.mode.Mymode;
import com.example.yuekaomoni.presenter.Mypresenter;
import com.example.yuekaomoni.view.Ishop;
import com.example.yuekaomoni.view.Shangpinxaingqing;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;


public class Shangpinfragment extends Fragment implements Ishop{
    @BindView(R.id.xiangqing_xrc)
    XRecyclerView xiangqing_xrc;
    private Mypresenter mypresenter;
    private Shopadapter shouyeadapter;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.shangpin, container, false);
        ButterKnife.bind(this,view);
        mypresenter = new Mypresenter();
        mypresenter.getshopmv(getContext(),new Mymode(),this);
        return view;
    }

    @Override
    public void setmyadapter(Context context, final List<Shopbean.DataBean> data) {
        shouyeadapter = new Shopadapter(context,data);
        xiangqing_xrc.setAdapter(shouyeadapter);
        xiangqing_xrc.setLayoutManager(new LinearLayoutManager(context));
        xiangqing_xrc.setLoadingListener(new XRecyclerView.LoadingListener() {
            @Override
            public void onRefresh() {
                mypresenter.getshopmv(getContext(),new Mymode(),Shangpinfragment.this);
                xiangqing_xrc.refreshComplete();
            }

            @Override
            public void onLoadMore() {
                mypresenter.xialajiazai(new Mymode(),Shangpinfragment.this);
                xiangqing_xrc.refreshComplete();
            }
        });
        shouyeadapter.huidiao(new Shopadapter.Itemclick() {
            @Override
            public void itemclick(View view, int position) {
                String images = data.get(position).getImages();
                String title = data.get(position).getTitle();
                int salenum = data.get(position).getSalenum();
                int price = data.get(position).getPrice();
                int pid = data.get(position).getPid();
                Shopxiangqingbean shopxiangqingbean=new Shopxiangqingbean(images,title,salenum,price,pid);
                Intent intent = new Intent(getContext(), Shangpinxaingqing.class);
                intent.putExtra("shop",shopxiangqingbean);
                startActivity(intent);
            }
        });

    }

    @Override
    public void jiazaigengduo(List<Shopbean.DataBean> data) {
        if (data.size()==0){
            Toast.makeText(getContext(),"没有数据了",Toast.LENGTH_SHORT).show();
        }

        List<Shopbean.DataBean> data1 = shouyeadapter.getData();
        data1.addAll(data);
        shouyeadapter.notifyDataSetChanged();
    }
}

--------------------Shouyefragment-----------------

package com.example.yuekaomoni.fragment;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import com.example.yuekaomoni.R;
import com.example.yuekaomoni.adapter.Shouyeadapter;
import com.example.yuekaomoni.bean.Shouyebean;
import com.example.yuekaomoni.mode.Mymode;
import com.example.yuekaomoni.myview.Banner;
import com.example.yuekaomoni.presenter.Mypresenter;
import com.example.yuekaomoni.view.Iview;
import com.jcodecraeer.xrecyclerview.XRecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;


public class Shouyefragment extends Fragment implements Iview{
   @BindView(R.id.xrc)
    XRecyclerView xrc;
    private Banner banner;
    List<String> list=new ArrayList<>();
    float ratio=502/185f;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.shouye, container, false);
        ButterKnife.bind(this,view);
        Mypresenter mypresenter=new Mypresenter();
        mypresenter.getmv(getContext(),new Mymode(),this);
        //添加头部   为自定义轮播图
        View inflate = View.inflate(getContext(), R.layout.shouye_title, null);
        xrc.addHeaderView(inflate);
        banner = inflate.findViewById(R.id.banner);
        return view;
    }

    @Override
    public void setmyadapter(Context context, Shouyebean shouyebean) {
        List<Shouyebean.DataBean> data = shouyebean.getData();
        //取出数据给Banner设置图片
        for (int i = 0; i <data.size() ; i++) {
            list.add(data.get(i).getIcon());
        }
        banner.loadData(list).display();


        Shouyeadapter shouyeadapter=new Shouyeadapter(getContext(),shouyebean);
        //设置不能下拉加载
        xrc.setLoadingMoreEnabled(false);
        xrc.setAdapter(shouyeadapter);
        xrc.setLayoutManager(new LinearLayoutManager(getContext()));
        //下拉刷新  关闭
        xrc.setLoadingListener(new XRecyclerView.LoadingListener() {
            @Override
            public void onRefresh() {
                xrc.refreshComplete();
            }

            @Override
            public void onLoadMore() {
                xrc.refreshComplete();
            }
        });

        //设置banner适配屏幕
        ViewGroup.LayoutParams layoutParams = banner.getLayoutParams();
        layoutParams.width = getResources().getDisplayMetrics().widthPixels;
       layoutParams.height= (int) (layoutParams.width/ratio);
        banner.setLayoutParams(layoutParams);
        banner.setBannerClicklistener(new Banner.BannerClicklistener() {
            @Override
            public void onClickListener(int pos) {

                Toast.makeText(getContext(), "pos====" + pos, Toast.LENGTH_SHORT).show();
            }
        });
    }
}

-----------------------myview--------------------

-----------------Banner---------------

package com.example.yuekaomoni.myview;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Handler;
import android.support.annotation.AttrRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.Glide;
import com.example.yuekaomoni.R;

import java.util.ArrayList;
import java.util.List;

public class Banner extends FrameLayout implements ViewPager.OnPageChangeListener {

    private final int DELAY_TIME = 3000;//自动轮播时间

    private List<String> mUrls;
    private List<ImageView> mViewpagerViews;

    private List<ImageView> mDotImageviews;
    private Context context;
    private int size;//圆点的大小
    private int margin;//圆点的间距

    private int count;//viewpager中view的数量
    private ViewPager mViewPager;
    private LinearLayout mDotlayout;//圆点布局
    private MyPager mPagerAdapter;

    private int currentItem;//当前viewpager索引


    private Handler handler = new Handler();


    private BannerClicklistener mBannerClicklistener;


    public Banner(@NonNull Context context) {
        super(context);

        init(context, null);
    }

    public Banner(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        init(context, attrs);
    }

    public Banner(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }


    /**
     * 初始化数据
     *
     * @param context
     * @param attrs
     */
    private void init(Context context, AttributeSet attrs) {
        this.context = context;
        mUrls = new ArrayList<>();
        mViewpagerViews = new ArrayList<>();
        mDotImageviews = new ArrayList<>();
        //拿到自定义的属性数组
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.Banner);
        //得到数组里的自定义的size(圆点大小)
        size = typedArray.getDimensionPixelSize(R.styleable.Banner_size, 10);
        //得到数组里的自定义的margin(圆点间距)
        margin = typedArray.getDimensionPixelSize(R.styleable.Banner_margin, 10);

        typedArray.recycle();//通知jvm的垃圾回收器,当你回收对象的时候,一定要把我回收了


        View view = LayoutInflater.from(context).inflate(R.layout.banner_layout, this, true);
//        addView(view);
//        View child = LayoutInflater.from(context).inflate(R.layout.banner_layout,null);
//        addView(child);
        mViewPager = view.findViewById(R.id.viewpager);
        mDotlayout = view.findViewById(R.id.layout_dot);

        //添加viewpager页面改变监听
        mViewPager.addOnPageChangeListener(this);


    }

    /**
     * 绘制自定义view的所有元素
     */
    public void display() {
        //绘制viewpager
        drawViewpager();
        //绘制圆点
        drawDots();
        //设置自动滚动
        setAuto();

    }

    /**
     * 设置自动滚动
     */
    private void setAuto() {
        handler.postDelayed(mTask, DELAY_TIME);
    }

    /**
     * 定时任务
     */
    Runnable mTask = new Runnable() {
        @Override
        public void run() {
            currentItem++;
            if (currentItem >= count) {
                currentItem = 0;
            }
            mViewPager.setCurrentItem(currentItem);
            handler.postDelayed(this, DELAY_TIME);
        }
    };

    /**
     * 传urls
     *
     * @param urls
     */
    public Banner loadData(List<String> urls) {
        this.mUrls = urls;
        this.count = urls.size();
        return this;
    }

    /**
     * 绘制圆点
     */
    private void drawDots() {

        for (int i = 0; i < count; i++) {

            ImageView iv = new ImageView(context);

            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(size, size);
            params.leftMargin = margin;
            params.rightMargin = margin;
            iv.setLayoutParams(params);

            mDotImageviews.add(iv);

            if (i == 0) {

                iv.setImageResource(R.drawable.dot_selected);
            } else {
                iv.setImageResource(R.drawable.dot_normal);
            }

            mDotlayout.addView(iv);
        }


    }


    private void drawViewpager() {
        for (int i = 0; i < count; i++) {
            ImageView iv = new ImageView(context);
            iv.setScaleType(ImageView.ScaleType.CENTER_CROP);
            mViewpagerViews.add(iv);
        }
        if (mViewpagerViews != null) {
            mPagerAdapter = new MyPager();
            mViewPager.setAdapter(mPagerAdapter);
        }
    }

    @Override
    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

    }

    /**
     * 切换页面的监听
     * @param position
     */
    @Override
    public void onPageSelected(int position) {

        for (int i = 0; i < count; i++) {
            if (i == position) {
                mDotImageviews.get(i).setImageResource(R.drawable.dot_selected);
            } else {
                mDotImageviews.get(i).setImageResource(R.drawable.dot_normal);
            }

        }

    }

    @Override
    public void onPageScrollStateChanged(int state) {

    }


    class MyPager extends PagerAdapter {

        @Override
        public int getCount() {
            return mViewpagerViews.size();
        }

        @Override
        public boolean isViewFromObject(View view, Object object) {
            return view == object;
        }

        @Override
        public Object instantiateItem(ViewGroup container, final int position) {

            ImageView view = mViewpagerViews.get(position);
            container.addView(view);

            view.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View view) {

                    //实现点击逻辑

                    mBannerClicklistener.onClickListener(position);
                }
            });

            System.out.println("urls:"+mUrls.get(position));

            // ImageLoader.getInstance().displayImage(mUrls.get(position), view);
            Glide.with(context)
                    .load(mUrls.get(position))
                    .into(view);
            return view;
        }

        @Override
        public void destroyItem(ViewGroup container, int position, Object object) {
            container.removeView((View) object);
        }
    }

    /**
     * 处理自动轮播和手动滑动的冲突
     *
     * @param ev
     * @return
     */
    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        int action = ev.getAction();
        if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_MOVE) {
            stopAuto();
        } else if (action == MotionEvent.ACTION_UP) {
            setAuto();
        }
        return super.dispatchTouchEvent(ev);
    }

    /**
     * 取消自动轮播任务
     */
    private void stopAuto() {
        handler.removeCallbacks(mTask);//取消任务
    }

    /**
     * 供外部调用者调用的接口类
     */
    public interface BannerClicklistener {
        void onClickListener(int pos);
    }

    /**
     * 供外部调用者初始化接口对象
     */
    public void setBannerClicklistener(BannerClicklistener bannerClicklistener) {
        this.mBannerClicklistener = bannerClicklistener;
    }

    //取消轮播任务
    public void cancel(){
        handler.removeCallbacks(mTask);
    }
}

-------------------GramophoneView------------------

package com.example.yuekaomoni.myview;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;

import com.example.yuekaomoni.R;


public class GramophoneView extends View {

    /**
     * 尺寸计算设计说明:
     * 1、唱片有两个主要尺寸:中间图片的半径、黑色圆环的宽度。
     *    黑色圆环的宽度 = 图片半径的一半。
     * 2、唱针分为“手臂”和“头”,手臂分两段,一段长的一段短的,头也是一段长的一段短的。
     *    唱针四个部分的尺寸求和 = 唱片中间图片的半径+黑色圆环的宽度
     *    唱针各部分长度 比例——长的手臂:短的手臂:长的头:短的头 = 8:4:2:1
     * 3、唱片黑色圆环顶部到唱针顶端的距离 = 唱针长的手臂的长度。
     */

    private int halfMeasureWidth;
    // 绘制唱片相关变量
    // 中间图片默认半径
    private static final int DEFAULT_PICTURE_RADIUS = 400;
    // 唱片旋转默认速度,其实是通过每次旋转叠加的角度来控制速度
    private static final float DEFAULT_DISK_ROTATE_SPEED = 0.3f;
    private int pictureRadius;    // 中间图片的半径
    private int ringWidth;        // 黑色圆环宽度
    private float diskRotateSpeed;// 唱片旋转速度
    private Paint discPaint;      // 唱片画笔
    private Path clipPath;        // 裁剪图片的路径
    private Bitmap bitmap;        // 图片
    private Rect srcRect;         // 图片被裁减范围
    private Rect dstRect;         // 图片被绘制范围

    // 绘制唱针相关变量
    private static final int PLAY_DEGREE = -15;  // 播放状态时唱针的旋转角度
    private static final int PAUSE_DEGREE = -45; // 暂停状态时唱针的旋转角度
    private int smallCircleRadius = 20;          // 唱针顶部小圆半径
    private int bigCircleRadius;    // 唱针顶部大圆半径
    private int longArmLength;      // 唱针手臂,较长那段的长度
    private int shortArmLength;     // 唱针手臂,较短那段的长度
    private int longHeadLength;     // 唱针的头,较长那段的长度
    private int shortHeadLength;    // 唱针的头,较短那段的长度
    private Paint needlePaint;      // 唱针画笔

    // 状态控制相关变量
    private boolean isPlaying;            // 是否处于播放状态
    private int needleDegreeCounter;      // 唱针旋转角度计数器
    private float diskDegreeCounter;      // 唱片旋转角度计数器

    public GramophoneView(Context context) {
        this(context, null);
    }

    public GramophoneView(Context context, AttributeSet attrs) {
        super(context, attrs);

        // 读取xml文件属性
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.GramophoneView);
        pictureRadius = (int)typedArray.getDimension(R.styleable.GramophoneView_picture_radius, DEFAULT_PICTURE_RADIUS);
        diskRotateSpeed = typedArray.getFloat(R.styleable.GramophoneView_disk_rotate_speed, DEFAULT_DISK_ROTATE_SPEED);
        Drawable drawable = typedArray.getDrawable(R.styleable.GramophoneView_src);
        if(drawable == null){
            //为图片
            bitmap = BitmapFactory.decodeResource(getContext().getResources(), R.mipmap.ic_launcher);
        } else{
            bitmap = ((BitmapDrawable)drawable).getBitmap();
        }
        typedArray.recycle();

        // 初始化唱片变量
        ringWidth = pictureRadius>>1;
        discPaint = new Paint();
        discPaint.setColor(Color.BLACK);
        discPaint.setStyle(Paint.Style.STROKE);
        discPaint.setStrokeWidth(ringWidth);
        srcRect = new Rect();
        dstRect = new Rect();
        setBitmapRect(srcRect, dstRect);
        clipPath = new Path();
        clipPath.addCircle(0, 0, pictureRadius, Path.Direction.CW);
        diskDegreeCounter = 0;

        // 初始化唱针变量
        bigCircleRadius = smallCircleRadius<<1;
        shortHeadLength = (pictureRadius + ringWidth)/15;
        longHeadLength = shortHeadLength<<1;
        shortArmLength = longHeadLength<<1;
        longArmLength = shortArmLength<<1;
        needlePaint = new Paint();
        needleDegreeCounter = PAUSE_DEGREE;
    }

    /**
     * 根据加载的图片资源尺寸和设置的唱片中间图片直径,
     * 为canvas.drawBitmap()方法设置源Rect和目标Rect,
     * 以宽度为例,假设图片资源宽度为width,唱片中间图片直径为diameter
     * 如果width <= diameter,则截取宽度为整张图片宽度。
     * 如果width > diameter,则截取宽度为图片资源横向中间长度为diameter的区域。
     * 高度的截取方法与宽度相同。
     * @param src 源矩形
     * @param dst 目标矩形
     */
    private void setBitmapRect(Rect src, Rect dst){
//        这种处理方式意义好像不大,暂时注释
//        int bitmapWidth = bitmap.getWidth();
//        int bitmapHeight = bitmap.getHeight();
//        // 唱片里的图片直径,也就是唱片里的图片的外接正方形边长
//        int diameter = pictureRadius<<1;
//        // 图片宽度小于唱片图片直径
//        if(bitmapWidth <= diameter){
//            src.left = 0;
//            src.right = bitmapWidth;
//        } else {
//            src.left = (bitmap.getWidth()-diameter)/2;
//            src.right = bitmap.getWidth()/2+diameter;
//        }
//        // 图片高度小于唱片图片直径
//        if(bitmapHeight <= diameter){
//            src.top = 0;
//            src.bottom = bitmapHeight;
//        } else {
//            src.top = (bitmap.getHeight()-diameter)/2;
//            src.bottom = bitmap.getHeight()/2+diameter;
//        }
        src.set(0, 0, bitmap.getWidth(), bitmap.getHeight());
        dst.set(-pictureRadius, -pictureRadius, pictureRadius, pictureRadius);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        /**
         * wrap_content属性下View的宽高设计:
         * 宽度:等于唱片直径,即图片半径+圆环宽度求和再乘以2。
         * 高度:等于唱片直径+唱针较长的手臂
         */
        int width = (pictureRadius+ringWidth)*2;
        int height = (pictureRadius+ringWidth)*2+longArmLength;
        int measuredWidth = resolveSize(width, widthMeasureSpec);
        int measuredHeight = resolveSize(height, heightMeasureSpec);
        setMeasuredDimension(measuredWidth, measuredHeight);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        halfMeasureWidth = getMeasuredWidth()>>1;
        drawDisk(canvas);
        drawNeedle(canvas);
        if(needleDegreeCounter > PAUSE_DEGREE){
            invalidate();
        }
    }

    // 绘制唱片(胶片)
    private void drawDisk(Canvas canvas){
        diskDegreeCounter = diskDegreeCounter%360+diskRotateSpeed;
        drawDisk(canvas, diskDegreeCounter);
    }

    // 绘制旋转了制定角度的唱片
    private void drawDisk(Canvas canvas, float degree){
        // 绘制圆环,注意理解平移的圆心距离和圆环半径是怎么计算的
        canvas.save();
        canvas.translate(halfMeasureWidth, pictureRadius+ringWidth+longArmLength);
        canvas.rotate(degree);
        canvas.drawCircle(0, 0, pictureRadius+ringWidth/2, discPaint);
        // 绘制图片
        canvas.clipPath(clipPath);
        canvas.drawBitmap(bitmap, srcRect, dstRect, discPaint);
        canvas.restore();
    }

    // 绘制唱针
    private void drawNeedle(Canvas canvas){
        // 由于PLAY_DEGREE和PAUSE_DEGREE之间的差值是30,所以每次增/减值应当是30的约数即可
        if(isPlaying){
            if(needleDegreeCounter < PLAY_DEGREE){
                needleDegreeCounter+=3;
            }
        } else {
            if(needleDegreeCounter > PAUSE_DEGREE){
                needleDegreeCounter-=3;
            }
        }
        drawNeedle(canvas, needleDegreeCounter);
    }

    // 绘制旋转了指定角度的唱针
    private void drawNeedle(Canvas canvas, int degree){
        // 移动坐标到水平中点
        canvas.save();
        canvas.translate(halfMeasureWidth, 0);
        // 绘制唱针手臂
        needlePaint.setStrokeWidth(20);
        needlePaint.setColor(Color.parseColor("#C0C0C0"));
        // 绘制第一段臂
        canvas.rotate(degree);
        canvas.drawLine(0, 0, 0, longArmLength, needlePaint);
        // 绘制第二段臂
        canvas.translate(0, longArmLength);
        canvas.rotate(-30);
        canvas.drawLine(0, 0, 0, shortArmLength, needlePaint);
        // 绘制唱针头
        // 绘制第一段唱针头
        canvas.translate(0, shortArmLength);
        needlePaint.setStrokeWidth(40);
        canvas.drawLine(0, 0, 0, longHeadLength, needlePaint);
        // 绘制第二段唱针头
        canvas.translate(0, longHeadLength);
        needlePaint.setStrokeWidth(60);
        canvas.drawLine(0, 0, 0, shortHeadLength, needlePaint);
        canvas.restore();

        // 两个重叠的圆形
        canvas.save();
        canvas.translate(halfMeasureWidth, 0);
        needlePaint.setStyle(Paint.Style.FILL);
        needlePaint.setColor(Color.parseColor("#C0C0C0"));
        canvas.drawCircle(0, 0, bigCircleRadius, needlePaint);
        needlePaint.setColor(Color.parseColor("#8A8A8A"));
        canvas.drawCircle(0, 0, smallCircleRadius, needlePaint);
        canvas.restore();
    }

    /**
     * 设置是否处于播放状态
     * @param isPlaying true:播放,false:暂停
     */
    public void setPlaying(boolean isPlaying){
        this.isPlaying = isPlaying;
        invalidate();
    }

    /**
     * 获取播放状态
     * @return true:播放,false:暂停
     */
    public boolean getPlaying(){
        return isPlaying;
    }

    /**
     * 获取图片半径
     * @return 图片半径
     */
    public int getPictureRadius() {
        return pictureRadius;
    }

    /**
     * 设置图片半径
     * @param pictureRadius 图片半径
     */
    public void setPictureRadius(int pictureRadius) {
        this.pictureRadius = pictureRadius;
    }

    /**
     * 获取唱片旋转速度
     * @return 唱片旋转速度
     */
    public float getDiskRotateSpeed() {
        return diskRotateSpeed;
    }

    /**
     * 设置唱片旋转速度
     * @param diskRotateSpeed 旋转速度
     */
    public void setDiskRotateSpeed(float diskRotateSpeed) {
        this.diskRotateSpeed = diskRotateSpeed;
    }

    /**
     * 设置图片资源id
     * @param resId 图片资源id
     */
    public void setPictureRes(int resId){
        bitmap = BitmapFactory.decodeResource(getContext().getResources(), resId);
        setBitmapRect(srcRect, dstRect);
        invalidate();
    }
}

-------------------Jiajian--------------------

package com.example.yuekaomoni.myview;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.example.yuekaomoni.R;

public class Jiajian extends LinearLayout implements View.OnClickListener {

    private Button tvDecrease;
    private Button tvIncrease;
    private Button etNumber;
    private Context context;

    //定一个商品默认数量
    private int count=1;
    //定义一个变量规范这个商品数量的最大值
    private int max=1000;
    //定义默认颜色
    private int defaultColor= Color.parseColor("#ffffff");
    public Jiajian(Context context) {
        this(context,null);
    }

    public Jiajian(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs,0);
    }

    public Jiajian(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context=context;
        //将自定义属性与当前的这个自定组合控件进行关联
        TypedArray ta = context.getTheme().obtainStyledAttributes(attrs, R.styleable.Jiajian, defStyleAttr, 0);

        //得到集合中的背景颜色属性,如果没有,用默认的颜色

        int color=ta.getColor(R.styleable.Jiajian_bgcolor,defaultColor);

        View view=View.inflate(context, R.layout.jiajianbuju,this);
        tvDecrease = view.findViewById(R.id.tvDecrease);
        tvIncrease = view.findViewById(R.id.tvIncrease);
        etNumber = view.findViewById(R.id.etNumber);

        //设置点击事件
        tvDecrease.setOnClickListener(this);
        tvIncrease.setOnClickListener(this);

        //初始两个按钮的颜色
        tvDecrease.setBackgroundColor(color);
        tvIncrease.setBackgroundColor(color);
    }




    public interface NumberLisner{
        void callBack(int couint);
    }

    private  NumberLisner numberLisner;


    public void setNumberlistener(NumberLisner numberLisner){
        this.numberLisner = numberLisner;
    }

    //定义一个方法,给调用者设置最大商品数量
    public  void setGoodsMax(int max){
        this.max=max;
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.tvDecrease://减商品的数量
            {
                if(count>1){
                    count--;
                    etNumber.setText(""+count);

                    numberLisner.callBack(Integer.parseInt(etNumber.getText().toString()));
                }else {
                    Toast.makeText(context,"已经为1了不能再减了",Toast.LENGTH_SHORT).show();
                }
            }
            break;

            case R.id.tvIncrease:
            {
                if(count<max){
                    count++;

                    etNumber.setText(""+count);
                    numberLisner.callBack(Integer.parseInt(etNumber.getText().toString()));
                }
            }
            break;
        }
    }
}

--------------------util-------------------

---------------Getnet-----------------

package com.example.yuekaomoni.util;


public interface Getnet {
    public static String net="https://www.zhaoapi.cn/";
}

--------------Myapp--------------

package com.example.yuekaomoni.util;

import android.app.Application;

import com.facebook.drawee.backends.pipeline.Fresco;



public class Myapp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Fresco.initialize(this);
    }
}

-------------------Testservice------------

package com.example.yuekaomoni.util;

import com.example.yuekaomoni.bean.Shopbean;
import com.example.yuekaomoni.bean.Shouyebean;
import com.example.yuekaomoni.bean.Showcartbean;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;



public interface Testservice {
    @GET("ad/getAd")
    Observable<Shouyebean> getshouye();

    @POST("product/getProducts?pscid=39")@FormUrlEncoded
    Observable<Shopbean> getshopjson(@FieldMap Map<String,String> map);

    @POST("product/addCart?source=android&uid=71")@FormUrlEncoded
    Observable<Shopbean> addcart(@FieldMap Map<String,String> map);

    @GET("product/getCarts?source=android&uid=71")
    Observable<Showcartbean> getcart();

}

-----------------Util---------------

package com.example.yuekaomoni.util;

import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;


public class Util {
    private volatile static Util util=null;
    private Util(){

    }
    public static Util getmInstance(){
        if (util==null){
            synchronized (Util.class){
                if (util==null){
                    util=new Util();
                }
            }
        }
        return util;
    }
    //ok拦截日志
    OkHttpClient httpClient = new OkHttpClient.Builder().
            addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
            .build();

    public Testservice getnetjson(String uri) {
        Retrofit retrofit = new Retrofit.Builder().baseUrl(uri)
                .addConverterFactory(GsonConverterFactory.create())
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .client(httpClient)//添加拦截器时用

                .build();

        Testservice testservive = retrofit.create(Testservice.class);
        return testservive;

    }
    }
----------------布局-------------------

-------------------activity_main.xml------------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.yuekaomoni.view.MainActivity">
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="0px"
         android:layout_weight="1"
         android:id="@+id/frag"></FrameLayout>
    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/rg"
        android:orientation="horizontal">
        <RadioButton
            android:checked="true"
            android:textSize="50px"
            android:background="@drawable/bg"
            android:gravity="center"
            android:button="@null"
            android:text="首页"
            android:layout_width="0px"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:id="@+id/shouye"/>

        <RadioButton
            android:textSize="50px"
            android:background="@drawable/bg"
            android:gravity="center"
            android:button="@null"
            android:text="商品"
            android:layout_width="0px"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:id="@+id/shangpin"/>

        <RadioButton
            android:textSize="50px"
            android:background="@drawable/bg"
            android:gravity="center"
            android:button="@null"
            android:text="发现"
            android:layout_width="0px"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:id="@+id/faxian"/>

    </RadioGroup>


</LinearLayout>

------------------activity_shangpinxaingqing.xml------------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.yuekaomoni.view.Shangpinxaingqing">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="50px"
        android:gravity="center"
        android:text="商品详情"/>


    <com.example.yuekaomoni.myview.Banner
        android:layout_marginTop="30px"
        android:layout_width="match_parent"
        android:layout_height="600px"
        android:id="@+id/xiangqing_banner"></com.example.yuekaomoni.myview.Banner>

      <TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textSize="40px"
          android:text="你猜"
          android:layout_marginTop="40px"
          android:id="@+id/title"/>


    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="40px"
        android:text="你猜"
        android:layout_marginTop="30px"
        android:id="@+id/price"/>

    <TextView
        android:textColor="#ff0000"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_weight="1"
        android:textSize="40px"
        android:text="你猜"
        android:layout_marginTop="30px"
        android:id="@+id/price_you"/>
<!--    <View
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="#DFDCD7"></View>-->

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
       <TextView
           android:textSize="40px"
           android:gravity="center"
           android:id="@+id/add"
           android:layout_width="0px"
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:text="加入购物车"/>
     <!--  <View
            android:layout_width="1px"
            android:layout_height="wrap_content"
            android:background="#DFDCD7"></View>-->

        <TextView
            android:textSize="40px"
            android:gravity="center"
            android:id="@+id/show"
           android:layout_width="0px"
           android:layout_weight="1"
           android:layout_height="wrap_content"
           android:text="查看购物车"/>
    </LinearLayout>

</LinearLayout>

------------------activity_showcart.xml--------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.yuekaomoni.view.Showcart">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
    <TextView
        android:layout_width="0px"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textSize="50px"
        android:text="购物车"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="编辑"
            android:id="@+id/bianji"
            android:textSize="50px"
            />

    </LinearLayout>
    <View
        android:layout_marginTop="20px"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="#CFCAC4"></View>

    <ExpandableListView
        android:groupIndicator="@null"
        android:layout_marginTop="20px"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_weight="1"
        android:id="@+id/edlist"></ExpandableListView>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <CheckBox
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/quanxuan"
            android:textSize="40px"
            android:text="全选/反选"/>

        <TextView
            android:layout_marginLeft="20px"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/heji"
            android:textSize="40px"
            android:textColor="#ff0000"
            android:text="总价"/>

        <Button
            android:layout_marginLeft="20px"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/jiesuan"
            android:textColor="#ff0000"
            android:textSize="40px"
            android:text="去结算"/>

        <Button
            android:layout_marginLeft="50px"
            android:text="删除"
            android:textSize="40px"
            android:id="@+id/shanchu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </LinearLayout>
</LinearLayout>

---------------banner_layout.xml-----------------

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"></android.support.v4.view.ViewPager>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="bottom"
        android:gravity="center"
        android:id="@+id/layout_dot"
        android:paddingBottom="10dp"></LinearLayout>

</FrameLayout>

---------------------cart_child.xml----------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <CheckBox
            android:layout_gravity="center_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/child_ck"/>

        <com.facebook.drawee.view.SimpleDraweeView
            android:layout_marginLeft="30px"
            android:layout_width="150px"
            android:layout_height="150px"
            android:id="@+id/sd"></com.facebook.drawee.view.SimpleDraweeView>

        <LinearLayout
            android:layout_marginLeft="50px"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <TextView
                android:layout_marginTop="30px"
                android:text="你猜"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/child_tv"/>
           <LinearLayout
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:orientation="horizontal">
            <TextView
                android:textColor="#ff0000"
                android:layout_marginTop="20px"
                android:text="你好啊"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/child_tv1"/>
               <com.example.yuekaomoni.myview.Jiajian
                   android:layout_marginTop="20px"
                   android:layout_marginLeft="40px"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:id="@+id/jiajian"></com.example.yuekaomoni.myview.Jiajian>

           </LinearLayout>
        </LinearLayout>

    </LinearLayout>

</LinearLayout>

------------------cart_prenter.xml-------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="horizontal"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <CheckBox
        android:focusable="false"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/prenter_cb"/>

    <TextView
        android:textSize="40px"
        android:layout_marginLeft="20px"
        android:text="你猜"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/present_tv"/>

</LinearLayout>

------------------faxian.xml--------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <com.example.yuekaomoni.myview.GramophoneView
        android:id="@+id/gramophone_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        app:picture_radius="100dp"
        app:disk_rotate_speed="0.2"
        app:src="@drawable/a"/>

    <Button
        android:id="@+id/btn_play_pause"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="点击播放"
        android:textSize="16sp"/>
</LinearLayout>

--------------------jiajianbuju.xml------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="horizontal"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Button
        android:gravity="center_horizontal"
        android:id="@+id/tvDecrease"
        android:layout_width="45px"
        android:layout_height="45px"
        android:layout_weight="1"
        android:text="-"
        />

    <Button
        android:id="@+id/etNumber"
        android:layout_width="45px"
        android:layout_height="45px"
        android:layout_weight="1"
        android:background="#ffffff"
        android:text="1"
        />

    <Button
        android:gravity="center_horizontal"
        android:id="@+id/tvIncrease"
        android:layout_width="45px"
        android:layout_height="45px"
        android:layout_weight="1"
        android:text="+"
        />
</LinearLayout>

----------------shangpin.xml-------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textSize="50px"
        android:text="商品列表"
        />

    <View
        android:layout_marginTop="20px"
        android:layout_width="match_parent"
        android:layout_height="1px"
        android:background="#E0DCD9"></View>

    <com.jcodecraeer.xrecyclerview.XRecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/xiangqing_xrc"></com.jcodecraeer.xrecyclerview.XRecyclerView>

</LinearLayout>

------------------shangpin_zi_xrc.xml-------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">
    <com.facebook.drawee.view.SimpleDraweeView
        android:layout_width="300px"
        android:layout_height="300px"
        android:id="@+id/sd"></com.facebook.drawee.view.SimpleDraweeView>
    <LinearLayout
        android:layout_marginLeft="50px"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <TextView
            android:layout_marginTop="70px"
            android:text="你猜"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/title"/>
        <TextView
            android:layout_marginTop="20px"
            android:text="价格"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/price"/>

        <TextView
            android:textColor="#ff0000"
            android:layout_marginTop="20px"
            android:text="优惠价格"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/price_you"/>

    </LinearLayout>

</LinearLayout>
</LinearLayout>

--------------------shouye.xml-----------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.jcodecraeer.xrecyclerview.XRecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/xrc"></com.jcodecraeer.xrecyclerview.XRecyclerView>

</LinearLayout>

----------------------shouye_miaosha.xml-------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <TextView
            android:textSize="40px"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="京东秒杀:"/>


        <TextView
            android:textSize="20px"
            android:layout_marginLeft="30px"
            android:background="#000000"
            android:textColor="#ffffff"
            android:layout_gravity="center_vertical"
            android:id="@+id/miaosha_time_hour"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="11"
            />

        <TextView
            android:gravity="center"
            android:layout_gravity="center_vertical"
            android:layout_width="8dp"
            android:layout_height="match_parent"
            android:text=":"
            />
        <TextView
            android:textSize="20px"
            android:background="#000000"
            android:textColor="#ffffff"
            android:layout_gravity="center_vertical"
            android:id="@+id/miaosha_time_minute"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="11"
            />
        <TextView
            android:gravity="center"
            android:layout_gravity="center_vertical"
            android:layout_width="8dp"
            android:layout_height="match_parent"
            android:text=":"
            />
        <TextView
            android:background="#000000"
            android:textColor="#ffffff"
            android:layout_gravity="center_vertical"
            android:id="@+id/miaosha_time_seconds"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="20px"
            android:text="11"
            />

    </LinearLayout>
    <android.support.v7.widget.RecyclerView
        android:layout_marginTop="50px"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/rc"></android.support.v7.widget.RecyclerView>

</LinearLayout>

----------------shouye_miaosha_zi.xml----------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.facebook.drawee.view.SimpleDraweeView
        android:layout_width="150px"
        android:layout_height="150px"
        android:id="@+id/sd"></com.facebook.drawee.view.SimpleDraweeView>

</LinearLayout>

-------------------shouye_title.xml----------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextView
        android:background="#FF9800"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="50px"
        android:text="首页"/>

    <com.example.yuekaomoni.myview.Banner
        android:layout_width="match_parent"
        android:layout_height="200px"
        android:id="@+id/banner"></com.example.yuekaomoni.myview.Banner>

</LinearLayout>

-------------------shouye_tuijian.xml------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
   <TextView
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:textSize="50px"
       android:gravity="center"
       android:text="为你推荐"/>
    <android.support.v7.widget.RecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/tuijian_rc"></android.support.v7.widget.RecyclerView>
</LinearLayout>

----------------------shouye_tuijian_zi.xml---------------------

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    android:layout_height="match_parent">
  <com.facebook.drawee.view.SimpleDraweeView
      android:layout_width="300px"
      android:layout_height="300px"
      android:id="@+id/sd"></com.facebook.drawee.view.SimpleDraweeView>
    <TextView
        android:textSize="30px"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/tuijian_tv"/>
</LinearLayout>

-------------------<  ----->res----->drawable     >---------------------

------------------bg.xml---------------------

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@color/red"></item>
<item  android:drawable="@color/bai"></item>
</selector>

--------------------dot_normal.xml------------------

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/bai"></solid>
    <size android:height="40dp" android:width="10dp"></size>
</shape>

----------------------dot_selected.xml-------------------

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
    <solid android:color="@color/colorAccent"></solid>
    <size android:height="10dp" android:width="10dp"></size>
</shape>

---------------------<       -->res------> values    >------------------------

-----------------attrs.xml----------------

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="Banner">
        <attr name="size" format="dimension"></attr>
        <attr name="margin" format="dimension"></attr>
    </declare-styleable>

    <declare-styleable name="GramophoneView">
        <!--图片半径-->
        <attr name="picture_radius" format="dimension"/>
        <!--图片资源id-->
        <attr name="src" format="reference"/>
        <!--唱片旋转速度-->
        <attr name="disk_rotate_speed" format="float"/>
    </declare-styleable>


        <!--声明自己的属性-->
        <declare-styleable name="Jiajian">
            <attr name="bgcolor" format="color"/>
        </declare-styleable>

</resources>

----------------colors.xml-------------

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#3F51B5</color>
    <color name="colorPrimaryDark">#303F9F</color>
    <color name="colorAccent">#FF4081</color>
    <color name="red">#FF0000</color>
    <color name="bai">#ffffff</color>
</resources>

猜你喜欢

转载自blog.csdn.net/qq_40116418/article/details/79456665