修复
This commit is contained in:
parent
6b7a98dbc3
commit
dd4172fc3d
@ -20,7 +20,6 @@ import com.yunbao.common.bean.ListInfoMessageModel;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
@ -38,9 +37,9 @@ import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
@ -820,4 +819,14 @@ public interface PDLiveApi {
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.startRedPacketRobot")
|
||||
Observable<ResponseModel<Object>> startRedPacketRobot(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
}
|
||||
|
@ -1622,9 +1622,9 @@ public class LiveNetManager {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if(objectResponseModel.getData().getCode()==0){
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
}else {
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
@ -1772,6 +1772,30 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void startRedPacketRobot(String liveUid, String stream, String redPacketId, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.startRedPacketRobot(liveUid, stream, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
@ -1247,6 +1247,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="red_too_bad2">Miss the red envelope</string>
|
||||
<string name="check_out_your_luck">Check out your luck</string>
|
||||
<string name="lucky_red_envelope">%s drew %s in the lucky red envelope</string>
|
||||
<string name="lucky_red_envelope_amount">number</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -1242,4 +1242,5 @@
|
||||
<string name="red_too_bad2">與紅包擦肩而過</string>
|
||||
<string name="check_out_your_luck">查看大家手氣</string>
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
</resources>
|
||||
|
@ -1241,4 +1241,5 @@
|
||||
<string name="red_too_bad2">與紅包擦肩而過</string>
|
||||
<string name="check_out_your_luck">查看大家手氣</string>
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
</resources>
|
||||
|
@ -1242,6 +1242,7 @@
|
||||
<string name="red_too_bad2">與紅包擦肩而過</string>
|
||||
<string name="check_out_your_luck">查看大家手氣</string>
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -1248,4 +1248,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="red_too_bad2">Miss the red envelope</string>
|
||||
<string name="check_out_your_luck">Check out your luck</string>
|
||||
<string name="lucky_red_envelope">%s drew %s in the lucky red envelope</string>
|
||||
<string name="lucky_red_envelope_amount">number</string>
|
||||
</resources>
|
||||
|
@ -19,8 +19,8 @@ org.gradle.configureondemand=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
systemProp.http.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyPort=10809
|
||||
systemProp.http.proxyPort=10809
|
||||
#systemProp.http.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=10809
|
||||
#systemProp.http.proxyPort=10809
|
||||
#android.enableR8.fullMode=true
|
@ -135,7 +135,7 @@ public class SendRendPacketPopup extends CenterPopupView {
|
||||
if (numberInt >= 1 && numberInt <= 100) {
|
||||
totalConsumptionOfDrill.setText(String.format(getContext().getString(R.string.total_consumption_of_drill), String.valueOf((rillInt * numberInt))));
|
||||
} else {
|
||||
ToastUtil.show(getContext().getString(R.string.drill) + String.format(getContext().getString(R.string.range_range_is), "1~100"));
|
||||
ToastUtil.show(getContext().getString(R.string.lucky_red_envelope_amount) + String.format(getContext().getString(R.string.range_range_is), "1~100"));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1414,6 +1414,20 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mCountdown = mCountdown - 1;
|
||||
anchorTimeHandler.postDelayed(anchorTimeRunnable, 1000);
|
||||
Log.e("主播倒计时", String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(mCountdown)));
|
||||
if (mCountdown == 180) {
|
||||
LiveNetManager.get(mContext).
|
||||
startRedPacketRobot(mLiveUid, mStream, mRedPacketModel.getRedPacketId(), new com.yunbao.common.http.base.HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
redPacket.setVisibility(View.GONE);
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
|
Loading…
Reference in New Issue
Block a user