修改测试问题,shouye ytuijian

This commit is contained in:
18401019693 2022-08-10 23:49:46 +08:00
parent 743f06115d
commit b1b5be9976
2 changed files with 23 additions and 2 deletions

View File

@ -93,7 +93,7 @@ public class SearchRecommendFragment extends BaseFragment {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSearchRecommendEvent(SearchRecommendEvent event) {
loadData();
// loadData();
}
}

View File

@ -9,12 +9,20 @@ import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
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.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.ToastUtil;
import com.yunbao.main.R;
import com.yunbao.main.adapter.SearchRecommendBodyAdapter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 搜索推荐页头部搜索历史信息
@ -34,7 +42,20 @@ public class SearchRecommendBodyViewHolder extends RecyclerView.ViewHolder {
changeBatch.setOnClickListener(new View.OnClickListener() {
@Override
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);
}
});
}
});
}