修改测试问题,shouye ytuijian
This commit is contained in:
parent
743f06115d
commit
b1b5be9976
@ -93,7 +93,7 @@ public class SearchRecommendFragment extends BaseFragment {
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onSearchRecommendEvent(SearchRecommendEvent event) {
|
public void onSearchRecommendEvent(SearchRecommendEvent event) {
|
||||||
loadData();
|
// loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,20 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
|
import com.yunbao.common.bean.SearchRecommendModel;
|
||||||
import com.yunbao.common.event.SearchRecommendEvent;
|
import com.yunbao.common.event.SearchRecommendEvent;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.main.MainNetManager;
|
||||||
|
import com.yunbao.common.manager.SearchHistoryRecordManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.adapter.SearchRecommendBodyAdapter;
|
import com.yunbao.main.adapter.SearchRecommendBodyAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索推荐页头部搜索历史信息
|
* 搜索推荐页头部搜索历史信息
|
||||||
@ -34,7 +42,20 @@ public class SearchRecommendBodyViewHolder extends RecyclerView.ViewHolder {
|
|||||||
changeBatch.setOnClickListener(new View.OnClickListener() {
|
changeBatch.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Bus.get().post(new SearchRecommendEvent());
|
// Bus.get().post(new SearchRecommendEvent());
|
||||||
|
MainNetManager.get((Activity) itemView.getContext())
|
||||||
|
.anchorRecommend("10", new HttpCallback<AnchorRecommendModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(AnchorRecommendModel data) {
|
||||||
|
showData(data.getList());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user