点唱房功能
This commit is contained in:
@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
//设置mqtt环境 false 测试环境 true 正式环境
|
||||
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
||||
//设置http环境 false 测试环境 true 正式环境
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
|
||||
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
||||
|
||||
|
||||
|
||||
@@ -97,6 +97,9 @@ public class RoomMessageEvent {
|
||||
|
||||
private EmotionDeatils emoji;
|
||||
private String is_pk;//是否是pk
|
||||
|
||||
private SingerInfo.SongInfo song_info;
|
||||
private SingerInfo.SongInfo next_song_info;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.xscm.moduleutil.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SingerInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private SongInfo song_info;
|
||||
private SongInfo next_song_info;
|
||||
|
||||
@Data
|
||||
public static class SongInfo implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*"id": 29,
|
||||
"room_id": 6001,
|
||||
"user_id": 20001,
|
||||
"singer_song_id": 9,
|
||||
"status": 1,
|
||||
"sort": 0,
|
||||
"createtime": 1763435086,
|
||||
"boss_user_id": 20001,
|
||||
"boss_nickname": "高兴的小海腾",
|
||||
"boss_avatar": "https://yusheng-1369267578.cos.ap-guangzhou.myqcloud.com/images/ios_images/1761615690733.jpeg",
|
||||
"boss_dress": "",
|
||||
"boss_mic_cycle": "https://cos.xscmmidi.site/admin/ripple3695_17627709565119.svga",
|
||||
"singer_user_id": 20000,
|
||||
"singer_nickname": "坚定的故事",
|
||||
"singer_avatar": "https://yusheng-1369267578.cos.ap-guangzhou.myqcloud.com/images/android_images/4ead5077435f1da7b8aae1a878bb5ac9.jpg",
|
||||
"singer_dress": "",
|
||||
"singer_mic_cycle": "https://cos.xscmmidi.site/admin/ripple3695_17627709565119.svga",
|
||||
"song_name": "公敌"*/
|
||||
private int id = 0;
|
||||
private int room_id = 0;
|
||||
private int user_id = 0;
|
||||
private int singer_song_id = 0;
|
||||
private int status = 0;
|
||||
private int sort = 0;
|
||||
private long createtime = 0;
|
||||
private int boss_user_id = 0;
|
||||
private String boss_nickname = "";
|
||||
private String boss_avatar = "";
|
||||
private String boss_dress = "";
|
||||
private String boss_mic_cycle = "";
|
||||
private int singer_user_id = 0;
|
||||
private String singer_nickname = "";
|
||||
private String singer_avatar = "";
|
||||
private String singer_dress = "";
|
||||
private String singer_mic_cycle = "";
|
||||
private String song_name = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
/**
|
||||
* SingerSongCount 类,用于存储歌手和歌曲数量信息
|
||||
* 这个类可能用于统计或展示每位歌手的歌曲数量
|
||||
*/
|
||||
class SingerSongCount {
|
||||
// 类定义结束,这里可以添加属性和方法来存储和操作歌手及其歌曲数量
|
||||
|
||||
var total: Int = 0
|
||||
var today: Int = 0
|
||||
var yesterday: Int = 0
|
||||
var week: Int = 0
|
||||
var month: Int = 0
|
||||
var already: Int = 0
|
||||
|
||||
/* total
|
||||
string
|
||||
总数
|
||||
必需
|
||||
today
|
||||
string
|
||||
今天
|
||||
必需
|
||||
yesterday
|
||||
string
|
||||
昨天
|
||||
必需
|
||||
week
|
||||
string
|
||||
本周
|
||||
必需
|
||||
month
|
||||
string
|
||||
本月
|
||||
必需
|
||||
already
|
||||
string
|
||||
已点*/
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
class SongPlaylist {
|
||||
|
||||
var count: Int = 0
|
||||
var lists: List<SongPlaylistBean> = ArrayList()
|
||||
|
||||
class SongPlaylistBean {
|
||||
|
||||
var id: Int = 0
|
||||
var room_id :String =""
|
||||
var user_id: String = ""
|
||||
var singer_song_id: String = ""
|
||||
var status:String =""
|
||||
var sort: Int = 0
|
||||
var boss_nickname: String = ""
|
||||
var song_name: String = ""
|
||||
var gift_id: String = ""
|
||||
var gift_num: String = ""
|
||||
var createtime: String = ""
|
||||
var gift_name: String = ""
|
||||
var gift_price: String = ""
|
||||
var base_image: String = ""
|
||||
var singer_nickname: String = ""
|
||||
|
||||
}
|
||||
|
||||
/* id
|
||||
string 列表ID
|
||||
|
||||
user_id
|
||||
string
|
||||
歌手ID
|
||||
|
||||
song_name
|
||||
string
|
||||
歌曲名
|
||||
|
||||
gift_id
|
||||
string
|
||||
礼物ID
|
||||
|
||||
gift_num
|
||||
string
|
||||
礼物数量
|
||||
|
||||
createtime
|
||||
string
|
||||
添加时间
|
||||
|
||||
gift_name
|
||||
string
|
||||
礼物名称
|
||||
|
||||
gift_price
|
||||
string
|
||||
礼物价格
|
||||
|
||||
base_image
|
||||
string
|
||||
礼物图片
|
||||
|
||||
nickname
|
||||
string
|
||||
歌手昵称*/
|
||||
|
||||
}
|
||||
@@ -80,7 +80,8 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
|
||||
private String enter_image;//爵位飘屏的背景
|
||||
private String enter_text;//爵位飘屏的文字
|
||||
|
||||
private int singer_status;//歌手认证状态0-待审核,1-通过,2-拒绝 -1:未认证
|
||||
private int singer_level;//歌手等级
|
||||
|
||||
|
||||
// @Data
|
||||
|
||||
@@ -117,6 +117,15 @@ public class EMMessageInfo implements MultiItemEntity {
|
||||
///移除红包
|
||||
public static final int QXRoomMessageTypeQXRoomMessageRedRemove = 1061;
|
||||
|
||||
///点歌房当前歌曲发生变化
|
||||
public static final int QXRoomMessageTypeSingerRoomCurrentSongDidChanged=1070;
|
||||
|
||||
///点歌房下一首歌曲发生变化
|
||||
public static final int QXRoomMessageTypeSingerRoomNextSongDidChanged=1071;
|
||||
|
||||
//已点歌曲数量
|
||||
public static final int QXRoomMessageTypeSongerNum = 1072;
|
||||
|
||||
///房间内换麦
|
||||
public static final int QXRoomMessageTypehm = 1039;
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.xscm.moduleutil.bean.NobilitDeatils;
|
||||
import com.xscm.moduleutil.bean.SingerInfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -34,6 +36,8 @@ public class RoomInfoResp implements Serializable {
|
||||
private int hour_ranking_open;//1:开启 0:关闭
|
||||
private NobilitDeatils.NobilityInfo nobility_info;
|
||||
|
||||
private SingerInfo singer_info;
|
||||
|
||||
|
||||
//弹出麦位操作弹出
|
||||
public boolean isWheatManager() {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class RoomPitBean implements Serializable {
|
||||
*/
|
||||
|
||||
private String id;//id
|
||||
private String pit_number = "";//麦位号
|
||||
private String pit_number="";//麦位号
|
||||
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
||||
private int is_lock;//0未锁麦 1锁麦
|
||||
private int is_mute;//0未禁麦 1禁麦
|
||||
@@ -69,4 +69,8 @@ public class RoomPitBean implements Serializable {
|
||||
private String nickname_color;//昵称颜色
|
||||
private String mic_cycle;//麦圈
|
||||
|
||||
|
||||
private boolean occupied;
|
||||
private boolean imageType;//是否是演唱者
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,10 @@ public enum QXRoomSeatViewType {
|
||||
* 拍卖麦位
|
||||
*/
|
||||
AUCTION(2, "拍卖麦位"),
|
||||
|
||||
|
||||
/**
|
||||
* 点唱
|
||||
*/
|
||||
JUKEBOX(9,"点唱麦位"),
|
||||
|
||||
/**
|
||||
* 小黑屋麦位
|
||||
@@ -30,6 +32,8 @@ public enum QXRoomSeatViewType {
|
||||
*/
|
||||
FRIEND(7, "交友房麦位");
|
||||
|
||||
|
||||
|
||||
private final int value;
|
||||
private final String description;
|
||||
|
||||
|
||||
@@ -14,8 +14,10 @@ enum class RoomType(
|
||||
AUCTION("拍卖(真爱拍小黑屋)", 2),
|
||||
DATING("交友", 1,3, 4, 8), // 1、3、4、8 均对应交友
|
||||
BLACK_ROOM("小黑屋", 6),
|
||||
JUKEBOX("点唱", 9),
|
||||
MUTUAL_ENTERTAINMENT("互娱", 7);
|
||||
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 根据 type_id 字符串获取对应的枚举实例
|
||||
|
||||
@@ -31,6 +31,4 @@ public class RoomGiftGiveEvent extends BaseEvent {
|
||||
this.heart_id = heart_id;
|
||||
this.auction_id = auction_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -128,6 +128,46 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_TEMP_KEY)
|
||||
Call<BaseModel<TempKeyBean>> getTempKey();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_AUTH)
|
||||
Call<BaseModel<String>> singerAuth(@Field("song") String song);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_GET_SONG)
|
||||
Call<BaseModel<SongPlaylist>> getSong(@Field("user_id") String user_id,@Field("room_id") String room_id,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_CUT)
|
||||
Call<BaseModel<String>> singerSongCut(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_TOP)
|
||||
Call<BaseModel<String>> singerSongTop(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_COUNT)
|
||||
Call<BaseModel<SingerSongCount>> singerSongCount(@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG)
|
||||
Call<BaseModel<String>> singerSong(@Field("song_id") String song_id,@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_LIST)
|
||||
Call<BaseModel<SongPlaylist>> singerSongList(@Field("room_id") String room_id,@Field("type") String type,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_DELETE_SONG)
|
||||
Call<BaseModel<String>> deleteSong(@Field("id") String song_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_ADD_SONG)
|
||||
Call<BaseModel<String>> singerAddSong(@Field("song_name") String song_name,@Field("gift_id") String gift_id,@Field("gift_num") String gift_num);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_UPDATE_SONG)
|
||||
Call<BaseModel<String>> singerUpdateSong(@Field("id") String is,@Field("song_name") String song_name,@Field("gift_id") String gift_id,@Field("gift_num") String gift_num);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RANK)
|
||||
Call<BaseModel<List<CharmRankingResp>>> getRoomRank(@Field("room_id") String room_id, @Field("type") String type, @Field("time_type") String time_type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@@ -510,6 +510,236 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void singerAuth(String url, BaseObserver<String> observer) {
|
||||
sApiServer.singerAuth(url).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1)
|
||||
observer.onNext(baseModel.getMsg());
|
||||
else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
observer.onNext(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("认证失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void getSong(String userid, String roomId, String page, String pagaeSice, BaseObserver<SongPlaylist> observer) {
|
||||
sApiServer.getSong(userid, roomId, page, pagaeSice).enqueue(new Callback<BaseModel<SongPlaylist>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SongPlaylist>> call, Response<BaseModel<SongPlaylist>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SongPlaylist> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SongPlaylist>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongCut(String id,BaseObserver<String> observer) {
|
||||
sApiServer.singerSongCut(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongTop(String id,BaseObserver<String> observer){
|
||||
sApiServer.singerSongTop(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
observer.onNext(baseModel.getMsg());
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongCount(String roomId,BaseObserver<SingerSongCount> observer){
|
||||
sApiServer.singerSongCount(roomId).enqueue(new Callback<BaseModel<SingerSongCount>>(){
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SingerSongCount>> call, Response<BaseModel<SingerSongCount>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SingerSongCount> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SingerSongCount>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲数量失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSong(String songId, String roomId, BaseObserver<String> observer) {
|
||||
sApiServer.singerSong(songId, roomId).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("singerSong", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongList(String room_id, String type, String page, String page_limit, BaseObserver<SongPlaylist> observer) {
|
||||
sApiServer.singerSongList(room_id, type, page, page_limit).enqueue(new Callback<BaseModel<SongPlaylist>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SongPlaylist>> call, Response<BaseModel<SongPlaylist>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SongPlaylist> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SongPlaylist>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteSong(String songId, BaseObserver<String> observer) {
|
||||
sApiServer.deleteSong(songId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void getTempKey(BaseObserver<TempKeyBean> observer) {
|
||||
sApiServer.getTempKey().enqueue(new Callback<BaseModel<TempKeyBean>>() {
|
||||
@Override
|
||||
@@ -610,10 +840,9 @@ public class RetrofitClient {
|
||||
sApiServer.roomRanking(type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
} else if (ranking_type.equals("1") || ranking_type.equals("2")) {
|
||||
sApiServer.wealthRanking(ranking_type, type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}else if (ranking_type.equals("3")) {
|
||||
} else if (ranking_type.equals("3")) {
|
||||
sApiServer.loveRanking(type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
else if (ranking_type.equals("4")) {
|
||||
} else if (ranking_type.equals("4")) {
|
||||
sApiServer.guildRanking().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
}
|
||||
@@ -1420,7 +1649,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getBanners(String s,BaseObserver<List<BannerModel>> observer) {
|
||||
public void getBanners(String s, BaseObserver<List<BannerModel>> observer) {
|
||||
sApiServer.getBanners(s).enqueue(new Callback<BaseModel<List<BannerModel>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<BannerModel>>> call, Response<BaseModel<List<BannerModel>>> response) {
|
||||
@@ -1569,6 +1798,70 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<RoonGiftModel>>> call, Throwable t) {
|
||||
t.fillInStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerUpdateSong(String songId, String song_name, String gift_id, String gift_num, BaseObserver<String> observer) {
|
||||
sApiServer.singerUpdateSong(songId, song_name, gift_id, gift_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(null);
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerAddSong(String song_name, String gift_id, String gift_num, BaseObserver<String> observer) {
|
||||
sApiServer.singerAddSong(song_name, gift_id, gift_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(null);
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -1928,7 +2221,7 @@ public class RetrofitClient {
|
||||
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
||||
MessageListenerSingleton.getInstance().quitGroup(roomId);
|
||||
CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
observer.onError( t);
|
||||
observer.onError(t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2144,8 +2437,8 @@ public class RetrofitClient {
|
||||
// });
|
||||
}
|
||||
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id,String nobility_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id,nobility_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id, String nobility_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id, nobility_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||
if (response.code() == 200) {
|
||||
@@ -2963,8 +3256,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void setLockPit(String roomId, String pitNumber, String
|
||||
isLock, BaseObserver<String> observer) {
|
||||
public void setLockPit(String roomId, String pitNumber, String isLock, BaseObserver<String> observer) {
|
||||
sApiServer.setLockPit(roomId, pitNumber, isLock).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3020,11 +3312,13 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void agreeSong(String room_id, String type, BaseObserver<String> observer) {
|
||||
sApiServer.agreeSong(room_id, type).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
LogUtils.e("练歌房","练歌房:"+response.body().toString());
|
||||
LogUtils.e("练歌房", "练歌房:" + response.body().toString());
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@@ -3401,7 +3695,8 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getModifyHideStatus(String hide_status, BaseObserver<String> observer ){
|
||||
|
||||
public void getModifyHideStatus(String hide_status, BaseObserver<String> observer) {
|
||||
sApiServer.getModifyHideStatus(hide_status).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3414,6 +3709,7 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getPostData(String new_password, String mobile, String code, String userId, BaseObserver<String> observer) {
|
||||
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
@@ -3755,7 +4051,7 @@ public class RetrofitClient {
|
||||
if (string != null) {
|
||||
int code = string.getCode();
|
||||
if (code == 1) {
|
||||
observer.onNext(string.getMsg()!= null ? string.getMsg() : "");
|
||||
observer.onNext(string.getMsg() != null ? string.getMsg() : "");
|
||||
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
@@ -3815,22 +4111,22 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
|
||||
public void sendAppLog(String logName,String logPath,BaseObserver<String> observer) {
|
||||
sApiServer.postSendAppLog(logName,logPath).enqueue(new Callback<BaseModel<String>>() {
|
||||
public void sendAppLog(String logName, String logPath, BaseObserver<String> observer) {
|
||||
sApiServer.postSendAppLog(logName, logPath).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
int code = response.body().getCode();
|
||||
if (code == 1) {
|
||||
observer.onNext("成功");
|
||||
}else if (code == 301){
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(response.body().getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogUtils.e( e.toString());
|
||||
LogUtils.e(e.toString());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
observer.onNext("失败");
|
||||
}
|
||||
}
|
||||
@@ -3996,7 +4292,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityDetail(BaseObserver<NobilitDeatils> observer){
|
||||
public void getNobilityDetail(BaseObserver<NobilitDeatils> observer) {
|
||||
sApiServer.getNobilityDetail().enqueue(new Callback<BaseModel<NobilitDeatils>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilitDeatils>> call, Response<BaseModel<NobilitDeatils>> response) {
|
||||
@@ -4004,9 +4300,9 @@ public class RetrofitClient {
|
||||
BaseModel<NobilitDeatils> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
@@ -4015,6 +4311,7 @@ public class RetrofitClient {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<NobilitDeatils>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
@@ -4023,7 +4320,7 @@ public class RetrofitClient {
|
||||
|
||||
}
|
||||
|
||||
public void getNobilityList(BaseObserver<List<NobilitList>> observer){
|
||||
public void getNobilityList(BaseObserver<List<NobilitList>> observer) {
|
||||
sApiServer.getNobilityList().enqueue(new Callback<BaseModel<List<NobilitList>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<NobilitList>>> call, Response<BaseModel<List<NobilitList>>> response) {
|
||||
@@ -4031,9 +4328,9 @@ public class RetrofitClient {
|
||||
BaseModel<List<NobilitList>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
@@ -4050,7 +4347,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityPrice(String id, BaseObserver<NobilityPrice> observer){
|
||||
public void getNobilityPrice(String id, BaseObserver<NobilityPrice> observer) {
|
||||
sApiServer.getNobilityPrice(id).enqueue(new Callback<BaseModel<NobilityPrice>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilityPrice>> call, Response<BaseModel<NobilityPrice>> response) {
|
||||
@@ -4058,9 +4355,9 @@ public class RetrofitClient {
|
||||
BaseModel<NobilityPrice> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
|
||||
@@ -411,6 +411,16 @@ public class Constants {
|
||||
public static final String GET_NOBILITY_DETAIL = "/api/Nobility/get_nobility_detail";//爵位详情
|
||||
public static final String GET_NOBILITY_LIST = "/api/Nobility/get_nobility_list";//爵位列表
|
||||
public static final String GET_NOBILITY_PRICE = "/api/Nobility/get_nobility_price";//爵位购买价格
|
||||
public static final String POST_SINGER_AUTH = "/api/SingerSong/singerAuth";//歌手认证
|
||||
public static final String POST_GET_SONG = "/api/SingerSong/getSong";//获取用户的歌单
|
||||
public static final String POST_SINGER_SONG = "/api/SingerSong/singerSong";//点歌
|
||||
public static final String POST_SINGER_SONG_TOP = "/api/SingerSong/singerSongTop";//歌曲置顶
|
||||
public static final String POST_SINGER_SONG_COUNT = "/api/SingerSong/singerSongCount";//点歌各类型各个总数
|
||||
public static final String POST_SINGER_SONG_LIST = "/api/SingerSong/singerSongList";//点歌列表
|
||||
public static final String POST_SINGER_SONG_CUT = "/api/SingerSong/singerSongCut";//切歌
|
||||
public static final String POST_SINGER_ADD_SONG = "/api/SingerSong/singerAddSong";//歌手添加歌曲
|
||||
public static final String POST_SINGER_DELETE_SONG = "/api/SingerSong/singerDelSong";//歌手删除 歌曲
|
||||
public static final String POST_SINGER_UPDATE_SONG = "/api/SingerSong/singerEditSong";//歌手修改歌曲
|
||||
public static final String POST_SEND_LOG = "api/Report/android_log_report";//上传log信息
|
||||
|
||||
|
||||
|
||||
10
BaseModule/src/main/res/drawable/bg_r14_1b1926.xml
Normal file
10
BaseModule/src/main/res/drawable/bg_r14_1b1926.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ff1b1926" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="14dp"
|
||||
android:topRightRadius="14dp" />
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r16_2b2935.xml
Normal file
6
BaseModule/src/main/res/drawable/bg_r16_2b2935.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#2B2935"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r16_3abc6d.xml
Normal file
6
BaseModule/src/main/res/drawable/bg_r16_3abc6d.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#3ABC6D"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r34_3abc6d.xml
Normal file
6
BaseModule/src/main/res/drawable/bg_r34_3abc6d.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#3ABC6D" />
|
||||
<corners android:radius="@dimen/dp_34"/>
|
||||
</shape>
|
||||
10
BaseModule/src/main/res/drawable/bg_r53_73040404.xml
Normal file
10
BaseModule/src/main/res/drawable/bg_r53_73040404.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#73040404" />
|
||||
<corners
|
||||
android:bottomLeftRadius="53dp"
|
||||
android:bottomRightRadius="53dp"
|
||||
android:topLeftRadius="53dp"
|
||||
android:topRightRadius="53dp" />
|
||||
</shape>
|
||||
10
BaseModule/src/main/res/drawable/bg_r8_262431.xml
Normal file
10
BaseModule/src/main/res/drawable/bg_r8_262431.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#262431" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="14dp"
|
||||
android:topRightRadius="14dp" />
|
||||
</shape>
|
||||
@@ -21,7 +21,7 @@
|
||||
android:gravity="center|left"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="全部评论(56)"
|
||||
tools:text="全部评论(56)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -325,6 +325,11 @@
|
||||
<!-- 流光次数-->
|
||||
<attr name="shineCount" format="integer" />
|
||||
</declare-styleable>
|
||||
<style name="TabLayoutTextStyle" parent="TextAppearance.Design.Tab">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user