package com.example.aason.gouwuche1.model;
import com.example.aason.gouwuche1.api.CartApi;
import com.example.aason.gouwuche1.contract.CartContract;
import com.example.aason.gouwuche1.net.OkhttpCallBack;
import com.example.aason.gouwuche1.net.OkhttpUtils;
import java.util.HashMap;
public class CartModel implements CartContract.ICartModel {
@Override
public void getCart(HashMap<String, String> map, final CartModelCallBack cartModelCallBack) {
OkhttpUtils.getmInstance().doGET(CartApi.Cart_Api, new OkhttpCallBack() {
@Override
public void success(String result) {
cartModelCallBack.suuccess(result);
}
@Override
public void fail(String msg) {
cartModelCallBack.fail(msg);
}
});
}
public interface CartModelCallBack{
public void suuccess(String result);
public void fail(String msg);
}
}