feat : 麦位皮肤 提交
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
public class RoomLevelDressBase {
|
||||
public boolean isSelect;
|
||||
}
|
@@ -11,14 +11,17 @@ public class RoomLevelInfo {
|
||||
public int currentLevel;
|
||||
public String currentLevelIcon;
|
||||
|
||||
public List<RoomLevelMicEffects> micEffects;
|
||||
public List<RoomLevelMicSkins> micSkins;
|
||||
public List<RoomMicDress> micEffects;
|
||||
public List<RoomMicDress> micSkins;
|
||||
|
||||
public double nextLevelExp;
|
||||
public int nextLevel;
|
||||
public double roomVal;
|
||||
public int userMicEffectsId;
|
||||
public int userMicSkinsId;
|
||||
public int usedMicEffectId;
|
||||
public int usedMicSkinId;
|
||||
|
||||
public int managerLimitNum; //管理员上限
|
||||
public int currentManagerNum; //当前管理员数量
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,10 +0,0 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
public class RoomLevelMicEffects extends RoomLevelDressBase{
|
||||
public int dressId;
|
||||
public int dressType;
|
||||
public String dressUrl;
|
||||
public int id;
|
||||
public int reachLevel;
|
||||
public int status;
|
||||
}
|
@@ -1,10 +0,0 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
public class RoomLevelMicSkins extends RoomLevelDressBase{
|
||||
public int dressId;
|
||||
public int dressType;
|
||||
public String dressUrl;
|
||||
public int id;
|
||||
public int reachLevel;
|
||||
public int status;
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
public class RoomLevelMicType extends RoomLevelDressBase{
|
||||
public int dressType;
|
||||
public int dressId;
|
||||
public int dressUrl;
|
||||
public int dressUrl_S;
|
||||
public String iconRes;
|
||||
public int id;
|
||||
public int type;
|
||||
public int reachLevel;
|
||||
public int status;
|
||||
}
|
23
core/src/main/java/com/chwl/core/gift/bean/RoomMicDress.java
Normal file
23
core/src/main/java/com/chwl/core/gift/bean/RoomMicDress.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.chwl.core.gift.bean;
|
||||
|
||||
|
||||
public class RoomMicDress {
|
||||
public int id;
|
||||
public int dressType;
|
||||
public int normalRes;
|
||||
public int selectRes;
|
||||
public int reachLevel;
|
||||
public String normalMicUrl;
|
||||
public String normalMicLockUrl;
|
||||
public String bossMicUrl;
|
||||
public String bossMicLockUrl;
|
||||
public boolean isSelect;
|
||||
|
||||
public @interface RoomDressType{
|
||||
int T_Skin = 1;
|
||||
int T_Effects = 2 ;
|
||||
int T_Type = 100 ; //特殊, 代表房间类型
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package com.chwl.core.home.bean;
|
||||
|
||||
import com.chwl.core.gift.bean.RoomMicDress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ClientResource {
|
||||
|
||||
public List<RoomMicDress> roomMicDressList;
|
||||
|
||||
}
|
@@ -6,6 +6,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.LiveData;
|
||||
|
||||
import com.chwl.core.base.IModel;
|
||||
import com.chwl.core.home.bean.ClientResource;
|
||||
import com.chwl.core.home.bean.ConfigInfo;
|
||||
import com.chwl.core.home.bean.MainTabInfo;
|
||||
import com.chwl.core.initial.bean.FairyOpenInfo;
|
||||
@@ -53,4 +54,6 @@ public interface IInitialModel extends IModel {
|
||||
String getPublicChatSessionId();
|
||||
|
||||
Single<ConfigInfo> loadConfig();
|
||||
|
||||
Single<ClientResource> clientResource();
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ import com.chwl.core.auth.event.LogoutEvent;
|
||||
import com.chwl.core.base.BaseModel;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.certification.CertificationModel;
|
||||
import com.chwl.core.home.bean.ClientResource;
|
||||
import com.chwl.core.home.bean.ConfigInfo;
|
||||
import com.chwl.core.home.bean.MainTabInfo;
|
||||
import com.chwl.core.home.bean.MainTabType;
|
||||
@@ -398,6 +399,13 @@ public class InitialModel extends BaseModel implements IInitialModel {
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ClientResource> clientResource() {
|
||||
return api.clientResource()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
private List<MainTabInfo> getDefaultMainTab() {
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
new MainTabInfo(
|
||||
@@ -548,5 +556,15 @@ public class InitialModel extends BaseModel implements IInitialModel {
|
||||
@FormUrlEncoded
|
||||
Single<ServiceResult<Long>> regionCheck(@Field("lang") String lang, @Field("mcc") String mcc);
|
||||
|
||||
|
||||
/**
|
||||
* 资源接口 :
|
||||
* 房间资源信息 , 麦位皮肤,麦位光圈
|
||||
*
|
||||
* @return -
|
||||
*/
|
||||
@GET("/client/resource")
|
||||
Single<ServiceResult<ClientResource>> clientResource();
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -162,7 +162,10 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
// 总流水
|
||||
private double serialValue;
|
||||
|
||||
private String roomLevelIcon;
|
||||
private String roomLevelIcon; //房间等级icon
|
||||
|
||||
private int usedMicSkinId; // 正在使用的麦位皮肤id
|
||||
private int usedMicEffectId; // 正在使用的麦位光圈特效id
|
||||
|
||||
public RightBottomIconConfig rightBottomIconConfig;
|
||||
|
||||
|
@@ -138,6 +138,32 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
}
|
||||
});
|
||||
}
|
||||
public Single<RoomInfo> updateRoomInfoEx(RoomInfo roomInfo) {
|
||||
return mRoomSettingService.updateRoomInfoEx(roomInfo.getType(), roomInfo.getUsedMicSkinId(), roomInfo.getUsedMicEffectId(),
|
||||
roomInfo.getRoomId(),
|
||||
null,
|
||||
roomInfo.getTitle(),
|
||||
roomInfo.getAvatar(),
|
||||
roomInfo.getRoomDesc(),
|
||||
roomInfo.getIntroduction(),
|
||||
roomInfo.roomPwd,
|
||||
roomInfo.getRoomTag(),
|
||||
roomInfo.tagId,
|
||||
AuthModel.get().getCurrentUid(),
|
||||
roomInfo.isHasAnimationEffect(),
|
||||
roomInfo.getAudioQuality(),
|
||||
roomInfo.getLimitType(),
|
||||
roomInfo.isPureMode()
|
||||
)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
.onErrorResumeNext(this.<RoomInfo>getSingleCommonExceptionFunction())
|
||||
.flatMap(this.<RoomInfo>getSingleFunction())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnSuccess(roomInfoData -> {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -305,6 +331,27 @@ public class RoomSettingModel extends BaseMvpModel {
|
||||
@Field("type") int type,
|
||||
@Field("mgId") long gameId,
|
||||
@Field("singleRoomSortId") Long singleRoomSortId);
|
||||
@FormUrlEncoded
|
||||
@POST("room/update")
|
||||
Single<ServiceResult<RoomInfo>> updateRoomInfoEx(@Field("type") int type,
|
||||
@Field("usedMicSkinId") int usedMicSkinId,
|
||||
@Field("usedMicEffectId") int usedMicEffectId,
|
||||
|
||||
@Field("mgId") Long gameId,
|
||||
@Field("singleRoomSortId") Long singleRoomSortId,
|
||||
@Field("title") String title,
|
||||
@Field("avatar") String avatar,
|
||||
@Field("roomDesc") String desc,
|
||||
@Field("introduction") String introduction,
|
||||
@Field("roomPwd") String pwd,
|
||||
@Field("roomTag") String label,
|
||||
@Field("tagId") Integer tagId,
|
||||
@Field("uid") Long uid,
|
||||
@Field("hasAnimationEffect") Boolean hasAnimationEffect,
|
||||
@Field("audioQuality") Integer audioQuality,
|
||||
@Field("limitType") String limitType,
|
||||
@Field("isPureMode") Boolean isPureMode
|
||||
);
|
||||
|
||||
/**
|
||||
* 更新房间设置信息 - 主题背景
|
||||
|
@@ -308,9 +308,7 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
*/
|
||||
@Override
|
||||
public Single<UserInfo> getUserInfoFromServerUpdate(final long userId,boolean isRef) {
|
||||
return api.requestUserInfo(
|
||||
String.valueOf(userId)
|
||||
)
|
||||
return api.requestUserInfo(String.valueOf(userId))
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(userInfoServiceResult -> {
|
||||
|
||||
|
Reference in New Issue
Block a user