update 联系方式
update 女神说
This commit is contained in:
@@ -16,6 +16,7 @@ public class BannerBean {
|
||||
private int type;
|
||||
private String name;
|
||||
private int activityId=0;
|
||||
private int mIconRes;
|
||||
|
||||
private StarChallengeStatusModel model;
|
||||
|
||||
@@ -100,6 +101,14 @@ public class BannerBean {
|
||||
this.activityId = activityId;
|
||||
}
|
||||
|
||||
public int getIconRes() {
|
||||
return mIconRes;
|
||||
}
|
||||
|
||||
public void setIconRes(int mIconRes) {
|
||||
this.mIconRes = mIconRes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BannerBean{" +
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
public class LiveUserMailBoxModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("uid")
|
||||
private int uid;
|
||||
@SerializedName("liveuid")
|
||||
private int liveUid;
|
||||
@SerializedName("is_read")
|
||||
private int isRead;
|
||||
@SerializedName("content")
|
||||
private String content;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
@SerializedName("gift_id")
|
||||
private int giftId;
|
||||
@SerializedName("userName")
|
||||
private String userName;
|
||||
@SerializedName("anchorName")
|
||||
private String anchorName;
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
|
||||
public LiveUserMailBoxModel() {
|
||||
}
|
||||
|
||||
public LiveUserMailBoxModel(int id, int uid, int liveUid, String content, String createTime, int giftId, String userName, String anchorName) {
|
||||
this.id = id;
|
||||
this.uid = uid;
|
||||
this.liveUid = liveUid;
|
||||
this.content = content;
|
||||
this.createTime = createTime;
|
||||
this.giftId = giftId;
|
||||
this.userName = userName;
|
||||
this.anchorName = anchorName;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getLiveUid() {
|
||||
return liveUid;
|
||||
}
|
||||
|
||||
public void setLiveUid(int liveUid) {
|
||||
this.liveUid = liveUid;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public int getGiftId() {
|
||||
return giftId;
|
||||
}
|
||||
|
||||
public void setGiftId(int giftId) {
|
||||
this.giftId = giftId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getAnchorName() {
|
||||
return anchorName;
|
||||
}
|
||||
|
||||
public void setAnchorName(String anchorName) {
|
||||
this.anchorName = anchorName;
|
||||
}
|
||||
|
||||
public int getIsRead() {
|
||||
return isRead;
|
||||
}
|
||||
|
||||
public void setIsRead(int isRead) {
|
||||
this.isRead = isRead;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
if (StringUtil.isEmpty(url)) {
|
||||
url = "http://www.baidu.com";
|
||||
} else {
|
||||
if (!url.startsWith("http")) {
|
||||
url = CommonAppConfig.HOST + "/" + url;
|
||||
}
|
||||
if (url.contains("?")) {
|
||||
url += "&";
|
||||
} else {
|
||||
url += "?";
|
||||
}
|
||||
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token="
|
||||
+ CommonAppConfig.getInstance().getToken();
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveUserMailBoxModel{" +
|
||||
"id=" + id +
|
||||
", uid=" + uid +
|
||||
", liveUid=" + liveUid +
|
||||
", isRead=" + isRead +
|
||||
", content='" + content + '\'' +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", giftId=" + giftId +
|
||||
", userName='" + userName + '\'' +
|
||||
", anchorName='" + anchorName + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
||||
public void showDialog() {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||
builder.isDestroyOnDismiss(true);
|
||||
builder.enableDrag(false);
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.LiveTaskModel;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
@@ -595,7 +596,7 @@ public interface PDLiveApi {
|
||||
*
|
||||
*/
|
||||
@GET("/api/public/?service=Live.setLivePreview")
|
||||
Observable<ResponseModel<HttpCallbackModel>> setLivePreviewInfo(
|
||||
Observable<ResponseModel<String>> setLivePreviewInfo(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("isShow") int isShow,
|
||||
@Query("content") String content,
|
||||
@@ -623,5 +624,16 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<LiveAnchorCallMeModel>> getContactInfo(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取收件箱信息
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getContactMsg")
|
||||
Observable<ResponseModel<List<LiveUserMailBoxModel>>> getContactMsg();
|
||||
/**
|
||||
* 删除联系方式信件
|
||||
*/
|
||||
@GET("/api/public/?service=Live.delContactMsg")
|
||||
Observable<ResponseModel<String>> delContactMsg(
|
||||
@Query("msgId") int msgId
|
||||
);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.LiveTaskModel;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
@@ -1167,14 +1168,14 @@ public class LiveNetManager {
|
||||
/**
|
||||
* 设置女神说
|
||||
*
|
||||
* @param isShow 是否显示
|
||||
* @param content 内容
|
||||
* @param isShow 是否显示
|
||||
* @param content 内容
|
||||
* @param styleImage 女神说底图地址
|
||||
*/
|
||||
public void setLivePreviewInfo(String liveUid,
|
||||
int isShow,
|
||||
String content,
|
||||
String styleImage, HttpCallback<HttpCallbackModel> callback) {
|
||||
int isShow,
|
||||
String content,
|
||||
String styleImage, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setLivePreviewInfo(liveUid, isShow, content, styleImage)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -1192,8 +1193,9 @@ public class LiveNetManager {
|
||||
|
||||
/**
|
||||
* 设置主播联系方式
|
||||
* @param liveUid 直播间id
|
||||
* @param callMe 载体
|
||||
*
|
||||
* @param liveUid 直播间id
|
||||
* @param callMe 载体
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void setAnchorCallMe(String liveUid,
|
||||
@@ -1219,6 +1221,28 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收件箱信息
|
||||
*
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void getContactMsg(HttpCallback<List<LiveUserMailBoxModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getContactMsg()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主播联系方式
|
||||
*
|
||||
@@ -1240,6 +1264,29 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除联系方式信件
|
||||
*
|
||||
* @param msgId 信息id
|
||||
* @param callback 回调
|
||||
*/
|
||||
public void delContactInfo(int msgId, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.delContactMsg(msgId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,9 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final String SELECT_CLARITY = "selectClarity";
|
||||
private final String CLARITY = "clarity";
|
||||
private final String xiaJBG = "xiaJBG";
|
||||
private final String STATUS_ANCHOR_SAY = "anchorSay";
|
||||
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
|
||||
|
||||
|
||||
public void setXiaJBG(boolean xjbg) {
|
||||
put(xiaJBG, xjbg);
|
||||
@@ -84,6 +87,34 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取女神说设置状态
|
||||
*/
|
||||
public int getAnchorSayStatus() {
|
||||
return getInt(STATUS_ANCHOR_SAY, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联系主播方式设置状态
|
||||
*/
|
||||
public int getAnchorCallStatus() {
|
||||
return getInt(STATUS_ANCHOR_CALL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置女神说设置状态
|
||||
*/
|
||||
public void setAnchorSayStatus(int status) {
|
||||
put(STATUS_ANCHOR_SAY, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置联系主播方式设置状态
|
||||
*/
|
||||
public void setAnchorCallMeStatus(int status) {
|
||||
put(STATUS_ANCHOR_CALL, status);
|
||||
}
|
||||
|
||||
public boolean isHint() {
|
||||
return 1 == getInt(IS_HINT, 0);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
//房间类型
|
||||
private LiveRoomTypeBean liveRoomTypeBean;
|
||||
|
||||
private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot;
|
||||
private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot, textSay, textCall;
|
||||
|
||||
private int status_say, status_call;
|
||||
|
||||
public LiveOpenCustomPopup setClassBean(LiveClassBean classBean) {
|
||||
this.classBean = classBean;
|
||||
@@ -65,6 +67,8 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
textLiveClass = findViewById(R.id.text_live_class);
|
||||
textLiveWishlist = findViewById(R.id.text_live_wishlist);
|
||||
textRobot = findViewById(R.id.text_robot);
|
||||
textSay = findViewById(R.id.text_say);
|
||||
textCall = findViewById(R.id.text_call);
|
||||
if (classBean != null) {
|
||||
textLiveClass.setText(classBean.getName());
|
||||
}
|
||||
@@ -114,6 +118,24 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
}
|
||||
}
|
||||
});
|
||||
//设置女神说
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_say), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (callBack != null) {
|
||||
callBack.openAnchorSay();
|
||||
}
|
||||
}
|
||||
});
|
||||
//设置联系方式
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_call), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (callBack != null) {
|
||||
callBack.openCallMe();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setSelectClarity(int selectClarity) {
|
||||
@@ -130,7 +152,27 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
}
|
||||
}
|
||||
|
||||
public void setSayStatus(boolean isShow) {
|
||||
textSay.setText(isShow ? R.string.do_set : R.string.not_set);
|
||||
}
|
||||
|
||||
public void setCallMeStatus(boolean isShow) {
|
||||
textCall.setText(isShow ? R.string.robot_yes : R.string.robot_no);
|
||||
}
|
||||
|
||||
public LiveOpenCustomPopup setSayStatus(int status) {
|
||||
this.status_say = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveOpenCustomPopup setCallMeStatus(int status) {
|
||||
this.status_call = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void initDate() {
|
||||
textSay.setText(status_say == 1 ? R.string.do_set : R.string.not_set);
|
||||
textCall.setText(status_call == 1 ? R.string.robot_yes : R.string.robot_no);
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveStetUpStatus(String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getId()),
|
||||
new HttpCallback<LiveStetUpStatusModel>() {
|
||||
@@ -142,7 +184,7 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -174,5 +216,11 @@ public class LiveOpenCustomPopup extends CenterPopupView {
|
||||
|
||||
//打開心願單
|
||||
void openWishlist();
|
||||
|
||||
//设置女神说
|
||||
void openAnchorSay();
|
||||
|
||||
//设置联系方式
|
||||
void openCallMe();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,48 @@
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/live_tool_anchor_say"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/ic_live_fun_anchor_say" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/live_fun_anchor_say"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/live_tool_call_me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/ic_live_fun_anchor_letter" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/live_fun_call_me"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="340dp"
|
||||
android:layout_height="440dp"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="16dp">
|
||||
@@ -206,6 +206,80 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_say"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fun_anchor_say"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_say"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_call"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="29dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="29dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fun_call_me"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_call"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clarity"
|
||||
android:textColor="#FFC621"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@mipmap/icon_more_open" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_letter.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_letter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_say.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_say.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -734,6 +734,8 @@
|
||||
<string name="live_mic">語音連麥</string>
|
||||
<string name="live_wks">周星榜</string>
|
||||
<string name="live_zslk">暫時離開</string>
|
||||
<string name="live_fun_call_me">聯繫方式</string>
|
||||
<string name="live_fun_anchor_say">女神說</string>
|
||||
<string name="live_zslk1">恢復直播</string>
|
||||
<string name="live_set_wishlist_num">請輸入數字</string>
|
||||
<string name="guard_tip_day">您是當前主播的周守護\n守護日期截止到</string>
|
||||
|
||||
Reference in New Issue
Block a user