游戏列表,搜索添加字段
This commit is contained in:
parent
54aa5fee67
commit
b60031d2d0
@ -113,7 +113,7 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
@Override
|
@Override
|
||||||
public void loadData(int p, HttpCallback callback) {
|
public void loadData(int p, HttpCallback callback) {
|
||||||
page = p;
|
page = p;
|
||||||
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, p - 1, callback);
|
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, "1",p - 1, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,7 +31,6 @@ import com.yunbao.common.utils.Bus;
|
|||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.views.FlowLayout;
|
import com.yunbao.common.views.FlowLayout;
|
||||||
import com.yunbao.common.views.LiveSudGamePopup;
|
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -54,6 +53,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
super(context);
|
super(context);
|
||||||
this.isHome = isHome;
|
this.isHome = isHome;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
Bus.getOff(this);
|
Bus.getOff(this);
|
||||||
@ -172,7 +172,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
private void search(String value) {
|
private void search(String value) {
|
||||||
|
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
|
.searchRoomList("0", "0,0", "0", value, "1", 0, new HttpCallback<List<SudRoomListModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<SudRoomListModel> data) {
|
public void onSuccess(List<SudRoomListModel> data) {
|
||||||
if (data.size() > 0) {
|
if (data.size() > 0) {
|
||||||
@ -234,10 +234,12 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
super.onDismiss();
|
super.onDismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
|
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onSudGameListEvent(SudRoomListModelEvent event) {
|
public void onSudGameListEvent(SudRoomListModelEvent event) {
|
||||||
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||||
|
@ -970,12 +970,13 @@ public class LiveHttpUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid,int page,HttpCallback callback ) {
|
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid,String currencyType,int page,HttpCallback callback ) {
|
||||||
HttpClient.getInstance().get("Sudgameserver.getRoomList", "Sudgameserver.getRoomList")
|
HttpClient.getInstance().get("Sudgameserver.getRoomList", "Sudgameserver.getRoomList")
|
||||||
.params("sud_game_id",sudGameId)
|
.params("sud_game_id",sudGameId)
|
||||||
.params("threshold",threshold)
|
.params("threshold",threshold)
|
||||||
.params("room_holder_type",roomHolderType)
|
.params("room_holder_type",roomHolderType)
|
||||||
.params("liveuid",liveUid)
|
.params("liveuid",liveUid)
|
||||||
|
.params("currency_type ",currencyType )
|
||||||
.params("page",page)
|
.params("page",page)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
@ -1010,6 +1010,7 @@ public interface PDLiveApi {
|
|||||||
@Query("threshold") String threshold,
|
@Query("threshold") String threshold,
|
||||||
@Query("room_holder_type") String roomHolderType,
|
@Query("room_holder_type") String roomHolderType,
|
||||||
@Query("liveuid") String liveUid,
|
@Query("liveuid") String liveUid,
|
||||||
|
@Query("currency_type ") String currencyType,
|
||||||
@Query("page") int page
|
@Query("page") int page
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1023,6 +1024,7 @@ public interface PDLiveApi {
|
|||||||
@Query("room_holder_type") String roomHolderType,
|
@Query("room_holder_type") String roomHolderType,
|
||||||
@Query("liveuid") String liveUid,
|
@Query("liveuid") String liveUid,
|
||||||
@Query("search") String search,
|
@Query("search") String search,
|
||||||
|
@Query("currency_type ") String currencyType,
|
||||||
@Query("page") int page
|
@Query("page") int page
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
|||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
import io.reactivex.functions.Consumer;
|
import io.reactivex.functions.Consumer;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2343,9 +2344,9 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType , int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getRoomList(sudGameId, threshold, roomHolderType, liveUid, page)
|
.getRoomList(sudGameId, threshold, roomHolderType, liveUid,currencyType, page)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
||||||
@ -2365,9 +2366,9 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, int page, HttpCallback<List<SudRoomListModel>> callback) {
|
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, String currencyType ,int page, HttpCallback<List<SudRoomListModel>> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search, page)
|
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search,currencyType, page)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
|
||||||
|
@ -109,7 +109,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadData(int p, com.yunbao.common.http.HttpCallback callback) {
|
public void loadData(int p, com.yunbao.common.http.HttpCallback callback) {
|
||||||
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", p - 1, callback);
|
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", "1", p - 1, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user