6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-14 17:40:52 +08:00
parent defb5fdd02
commit 0ea9ffc2e8
3 changed files with 27 additions and 18 deletions

View File

@ -22,6 +22,8 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.VideoBean;
import com.yunbao.common.bean.VideoListBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
@ -568,4 +570,21 @@ public class JavascriptInterfaceUtils {
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0,isAnchor==1);
}
@JavascriptInterface
public void wearOrCancelFanMedal(){
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
IMLoginManager.get(mContext).upDataUserInfo(info[0]);
JSONObject obj = JSON.parseObject(info[0]);
UserBean bean = JSON.toJavaObject(obj, UserBean.class);
CommonAppConfig.getInstance().setUserBean(bean);
}
}
});
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="524dp"
android:layout_gravity="bottom"
@ -7,17 +7,20 @@
android:orientation="vertical">
<ImageView
android:id="@+id/close_btn"
android:layout_width="8dp"
android:layout_height="14dp"
android:layout_width="18dp"
android:layout_height="24dp"
android:layout_margin="13dp"
android:padding="5dp"
android:src="@mipmap/icon_regular_black" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/live_codex"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="40dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingBottom="15dp" />
</LinearLayout>
</FrameLayout>

View File

@ -251,20 +251,7 @@ public class LiveAudienceActivity extends LiveActivity {
* 初始化数据
*/
private void initData() {
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
IMLoginManager.get(mContext).upDataUserInfo(info[0]);
JSONObject obj = JSON.parseObject(info[0]);
UserBean bean = JSON.toJavaObject(obj, UserBean.class);
CommonAppConfig.getInstance().setUserBean(bean);
}
}
});
String json = GsonUtils.toJson(mLiveBean);
AnchorRecommendItemModel model = GsonUtils.fromJson(json, AnchorRecommendItemModel.class);
itemModelList.add(0, model);