1:修改网络初始化的时候,放在点击了弹框后在进行

2:添加礼物墙展示用户信息功能
This commit is contained in:
2026-01-23 11:48:44 +08:00
parent d07ca522ab
commit 9f8f8137d1
20 changed files with 471 additions and 14 deletions

View File

@@ -63,17 +63,20 @@ public class GiftRoomAdapter extends BaseAdapter {
*/
@Override
public int getCount() {
return mDatas.size() > (curIndex + 1) * pageSize ? pageSize : (mDatas.size() - curIndex * pageSize);
return mDatas !=null ? mDatas.size() : 0;
// return mDatas.size() > (curIndex + 1) * pageSize ? pageSize : (mDatas.size() - curIndex * pageSize);
}
@Override
public RoonGiftModel getItem(int position) {
return mDatas.get(position + curIndex * pageSize);
return mDatas.get(position);
// return mDatas.get(position + curIndex * pageSize);
}
@Override
public long getItemId(int position) {
return position + (long) curIndex * pageSize;
return position;
// return position + (long) curIndex * pageSize;
}
private static class MyGestureDetector extends GestureDetector {

View File

@@ -0,0 +1,22 @@
package com.xscm.moduleutil.bean
import java.util.ArrayList
/**
* 项目名称:羽声语音
* 时间2026/1/23 9:59
* 用途:礼物墙用户列表
*/
class GiftWallUserBean {
var count : Int = 0
var users :List<GiftWallUserItemBean> = ArrayList()
class GiftWallUserItemBean {
var avatar : String = ""
var nickname : String = ""
var user_id : String = ""
var count : Int = 0
}
}

View File

@@ -40,6 +40,10 @@ public interface ApiServer {
@POST(Constants.MODIFY_MOBILE)
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code,@Field("new_sms_code") String new_sms_code);
@FormUrlEncoded
@POST(Constants.POST_GIFT_WALL_USER_LIST) //礼物墙礼物用户列表
Call<BaseModel<GiftWallUserBean>> giftWallUserList( @Field("user_id") String user_id,@Field("gift_id")String gift_id,@Field("page") int page);
@FormUrlEncoded
@POST(Constants.SET_PIT_TIME)
Call<BaseModel<String>> setPitTime(@Field("room_id") String roomId, @Field("time") String time);

View File

@@ -329,6 +329,33 @@ public class RetrofitClient {
});
}
public void giftWallUserList(String user_id,String gift_id,int page,BaseObserver<GiftWallUserBean> observer) {
sApiServer.giftWallUserList(user_id,gift_id,page).enqueue(new Callback<BaseModel<GiftWallUserBean>>() {
@Override
public void onResponse(Call<BaseModel<GiftWallUserBean>> call, Response<BaseModel<GiftWallUserBean>> response) {
if (response.code() == 200) {
BaseModel<GiftWallUserBean> body = response.body();
if (body.getCode() == 1)
observer.onNext(body.getData());
else if (body.getCode() == 0) {
ToastUtils.showLong(body.getMsg());
}else if (body.getCode() == 301) {
setCode301(body.getMsg());
}
}else {
ToastUtils.showLong("请求礼物用户错误", response.code());
LogUtils.e("giftWallUserList", response.message());
}
}
@Override
public void onFailure(Call<BaseModel<GiftWallUserBean>> call, Throwable t) {
LogUtils.e("giftWallUserList", t.toString());
}
});
}
public void mobileView(String mobile, String new_mobile, String sms_code, String new_sms_code, BaseObserver<String> observer) {
sApiServer.mobileView(mobile, new_mobile, sms_code, new_sms_code).enqueue(new Callback<BaseModel<String>>() {
@Override

View File

@@ -467,6 +467,7 @@ public class Constants {
// public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobiles";//手机换绑
public static final String POST_GIFT_WALL_USER_LIST = "/api/User/gift_wall_user_list";//礼物墙礼物用户列表
public static final String SET_PIT_TIME = "/api/BarRoom/set_pit_time";//房间麦位时长设置
public static final String BIND_MOBILE = "/api/UserData/bind_mobile";//手机绑定
public static final String GET_FESTIVAL_THEME = "/api/Theme/get_festival_theme";//节日主题接口

View File

@@ -42,7 +42,7 @@ public class GiftWallActivity extends BaseMvpActivity<GiftWallPresenter, Activit
// 在获取到数据后调用此方法初始化 ViewPager
private void setupViewPagerWithData(GiftUserWallBean data) {
sectionsPagerAdapter = new SectionsGifPagerAdapter(this, data);
sectionsPagerAdapter = new SectionsGifPagerAdapter(this, data,userId+"");
ViewPager2 viewPager = mBinding.viewPager;
viewPager.setAdapter(sectionsPagerAdapter);
TabLayout tabs = mBinding.tabs;

View File

@@ -11,9 +11,11 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.blankj.utilcode.util.ActivityUtils;
import com.xscm.modulemain.activity.user.PageViewModel;
import com.xscm.modulemain.adapter.GiftWallAdapter;
import com.xscm.modulemain.databinding.FragmentGiftWallBinding;
import com.xscm.modulemain.dialog.GiftWallListDialog;
import com.xscm.moduleutil.bean.GiftUserWallBean;
import org.jetbrains.annotations.NotNull;
@@ -35,6 +37,8 @@ public class PlaceholderGiftFragment extends Fragment {
private GiftWallAdapter mGiftWallAdapter;
private String userId;
public static PlaceholderGiftFragment newInstance(int index) {
PlaceholderGiftFragment fragment = new PlaceholderGiftFragment();
// Bundle bundle = new Bundle();
@@ -63,6 +67,7 @@ public class PlaceholderGiftFragment extends Fragment {
pageViewModel.setNoLiangDataList(giftList);
}
}
userId=getArguments().getString("userId");
}
pageViewModel.setIndex(index);
@@ -72,7 +77,9 @@ public class PlaceholderGiftFragment extends Fragment {
@Override
public void onUserClick(GiftUserWallBean.GiftWallBean emotion) {
// 处理用户点击事件
GiftWallListDialog giftWallListDialog = new GiftWallListDialog(ActivityUtils.getTopActivity());
giftWallListDialog.show(userId,emotion.getGift_id()+"", emotion.getGift_name(),emotion.getTop_users_count());
}
});
}

View File

@@ -11,6 +11,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.LogUtils;
import com.xscm.modulemain.R;
import com.xscm.moduleutil.bean.CombinedGiftBean;
import com.xscm.moduleutil.bean.GiftUserWallBean;
@@ -96,7 +97,9 @@ public class GiftWallAdapter extends BaseAdapter {
public void onClick(View v) {
if (item.is_liang()) {
if (mOnUserClickListener != null) {
mOnUserClickListener.onUserClick(item);
if (item.getTop_users() != null && item.getTop_users().size() > 0) {
mOnUserClickListener.onUserClick(item);
}
}
}
}

View File

@@ -0,0 +1,25 @@
package com.xscm.modulemain.adapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.xscm.modulemain.R
import com.xscm.moduleutil.bean.GiftWallUserBean
import com.xscm.moduleutil.bean.GroupBean
import com.xscm.moduleutil.utils.ImageUtils
/**
* 项目名称:羽声语音
* 时间2026/1/23 10:35
* 用途:礼物墙用户显示列表
*/
class GiftWallListAdapter : BaseQuickAdapter<GiftWallUserBean.GiftWallUserItemBean, BaseViewHolder>(R.layout.item_gift_wall_details) {
override fun convert(
helper: BaseViewHolder,
item: GiftWallUserBean.GiftWallUserItemBean?
) {
helper.setText(R.id.tv_gift_wheat_name, item?.nickname)
ImageUtils.loadHead(item?.avatar, helper.getView(R.id.riv_gift_wheat_head))
helper.setText(R.id.tv_gift_wheat_count, item?.count.toString())
}
}

View File

@@ -25,16 +25,19 @@ public class SectionsGifPagerAdapter extends FragmentStateAdapter {
private final Context mContext;
private GiftUserWallBean giftData; // 添加数据字段
private String userId;
// public SectionsPagerAdapter(Context context, FragmentManager fm, GiftUserWallBean giftData) {
// super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
// this.mContext = context;
// this.giftData = giftData;
// }
public SectionsGifPagerAdapter(@NonNull FragmentActivity fragmentActivity, GiftUserWallBean giftData) {
public SectionsGifPagerAdapter(@NonNull FragmentActivity fragmentActivity, GiftUserWallBean giftData, String userId) {
super(fragmentActivity);
this.mContext = fragmentActivity;
this.giftData = giftData;
this.userId = userId;
}
@NonNull
@@ -55,6 +58,7 @@ public class SectionsGifPagerAdapter extends FragmentStateAdapter {
}
}
args.putInt("section_number", position+1);
args.putString("userId", userId);
fragment.setArguments(args);
return fragment;
}

View File

@@ -0,0 +1,151 @@
package com.xscm.modulemain.dialog
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import android.view.ViewGroup
import com.blankj.utilcode.util.ScreenUtils
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
import com.xscm.modulemain.R
import com.xscm.modulemain.adapter.GiftWallListAdapter
import com.xscm.modulemain.databinding.DialogEmotionPickerBinding
import com.xscm.modulemain.databinding.DialogGiftWallListBinding
import com.xscm.moduleutil.bean.GiftWallUserBean
import com.xscm.moduleutil.http.BaseObserver
import com.xscm.moduleutil.http.RetrofitClient
import com.xscm.moduleutil.widget.dialog.BaseDialog
import io.reactivex.disposables.Disposable
/**
* 项目名称:羽声语音
* 时间2026/1/22 18:55
* 用途:礼物墙展示人员信息
*/
class GiftWallListDialog(
context: Context
) : Dialog(context, com.xscm.moduleutil.R.style.BaseDialogStyleH) {
var page: Int = 1
var userId: String = ""
var giftId: String = ""
var giftName: String = ""
var userSize: Int = 0
private var mBinding: DialogGiftWallListBinding =
DialogGiftWallListBinding.inflate(LayoutInflater.from(context))
init {
setContentView(mBinding.root)
// 设置对话框从底部弹出
window?.setGravity(Gravity.CENTER)
// 设置对话框的宽度为屏幕宽度
window?.setLayout(
(ScreenUtils.getScreenWidth() * 348f / 375).toInt(),
ViewGroup.LayoutParams.WRAP_CONTENT
)
// 添加动画效果
window?.setWindowAnimations(com.xscm.moduleutil.R.style.DialogAnimationt)
setCancelable(false)
setCanceledOnTouchOutside(false)
}
private fun initView() {
mBinding.ivClose.setOnClickListener {
dismiss()
}
mBinding.tvTitle.text = giftName
mBinding.tvName.text = giftName
mBinding.tvUserNum.text = userSize.toString()
mBinding.rvGiftWall.adapter = GiftWallListAdapter()
}
private fun initData() {
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(object :
OnRefreshLoadMoreListener {
override fun onRefresh(refreshLayout: RefreshLayout) {
page = 1
setHttp(page)
}
override fun onLoadMore(refreshLayout: RefreshLayout) {
page++
setHttp(page)
}
})
setHttp(page)
}
private fun setAdapterDetails(giftWallUserItemBean: List<GiftWallUserBean.GiftWallUserItemBean>) {
if (page == 1) {
(mBinding.rvGiftWall.adapter as GiftWallListAdapter).setNewData(giftWallUserItemBean)
} else {
val adapter = mBinding.rvGiftWall.adapter as GiftWallListAdapter
val currentData = adapter.data
// 过滤掉重复的数据
val newData = giftWallUserItemBean.filter { newItem ->
currentData.none { existingItem ->
// 假设GiftWallUserItemBean有id字段用于比较
existingItem.user_id == newItem.user_id
}
}
// 只有当有新数据时才添加
if (newData.isNotEmpty()) {
adapter.addData(newData)
} else {
page = 1
}
}
}
private fun setHttp(page: Int) {
RetrofitClient.getInstance()
.giftWallUserList(userId, giftId, page, object : BaseObserver<GiftWallUserBean>() {
override fun onSubscribe(d: Disposable) {
}
override fun onNext(t: GiftWallUserBean) {
mBinding.tvNum.text = t.count.toString()
if (t.users.isNotEmpty()) {
setAdapterDetails(t.users)
}
}
})
mBinding.smartRefreshLayout.finishRefresh()
mBinding.smartRefreshLayout.finishLoadMore()
}
fun show(
userId: String,
giftId: String,
giftName: String,
userSize: Int
) {
this.userSize = userSize
this.userId = userId
this.giftId = giftId
this.giftName = giftName
super.show()
initView()
initData()
}
}

View File

@@ -34,6 +34,7 @@ import com.xscm.modulemain.activity.WebViewActivity;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.base.WebUrlConstants;
import com.xscm.moduleutil.bean.BlindBoxStatus;
import com.xscm.moduleutil.bean.GiftLabelBean;
import com.xscm.moduleutil.dialog.ConfirmDialog;
import com.xscm.moduleutil.event.EffectEvent;
import com.xscm.moduleutil.event.FloatingScreenEvent;
@@ -899,6 +900,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
(giftBagId == 12 && filteredList.get(j).getChildren().get(k).getType() == RoomSettingBean.QXRoomSettingTypeRoomTimeSpace)) {
if (status != 1) {
filteredList.get(j).getChildren().remove(k);
}else {
if (SpUtil.getShelf() == 1) {
filteredList.get(j).getChildren().remove(k);
}
}
}
}

View File

@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_400"
android:background="@mipmap/gift_wall_bj">
<RelativeLayout
android:id="@+id/rl_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
tools:text="黄金游轮"
android:textColor="@color/white"
android:textSize="@dimen/sp_18"
android:textStyle="bold" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="@dimen/dp_23"
android:layout_height="@dimen/dp_23"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dp_15"
android:src="@mipmap/gb"
android:tint="@color/color_FF999999" />
</RelativeLayout>
<TextView
android:id="@+id/tv_ts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="— 历史累计集卡详情 —"
android:textColor="#a6ffffff"
android:textSize="@dimen/sp_12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rl_title" />
<RelativeLayout
android:id="@+id/rl_gift_wall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_ts">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:textColor="@color/white"
android:textSize="@dimen/sp_14"
tools:text="黄金游轮" />
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_2"
android:layout_toRightOf="@+id/tv_name"
android:fontFamily="@font/semibold"
android:textColor="#FFFF59"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
tools:text="100" />
<TextView
android:id="@+id/tv_user_ts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_16"
android:layout_toRightOf="@+id/tv_num"
android:text="人数"
android:textColor="@color/white"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tv_user_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_2"
android:layout_toRightOf="@+id/tv_user_ts"
android:fontFamily="@font/semibold"
android:textColor="#FFFF59"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
tools:text="100" />
</RelativeLayout>
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/smart_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/rl_gift_wall"
app:srlEnableLoadMore="true"
app:srlEnableRefresh="true">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_gift_wall"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="@dimen/dp_16"
android:paddingVertical="@dimen/dp_20"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="4"
tools:listitem="@layout/item_gift_wall_details" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_marginVertical="@dimen/dp_16"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.xscm.moduleutil.widget.CircularImage
android:id="@+id/riv_gift_wheat_head"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:src="@mipmap/default_avatar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:riv_oval="true" />
<TextView
android:id="@+id/tv_gift_wheat_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_12"
android:fontFamily="@font/semibold"
android:textStyle="bold"
android:textColor="#FFFF93"
tools:text="x1000"
app:layout_constraintEnd_toEndOf="@+id/riv_gift_wheat_head"
app:layout_constraintBottom_toBottomOf="@id/riv_gift_wheat_head"
/>
<TextView
android:id="@+id/tv_gift_wheat_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_6"
android:textSize="@dimen/sp_12"
android:textColor="@color/white"
tools:text="用户名"
app:layout_constraintTop_toBottomOf="@id/riv_gift_wheat_head"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,7 +4,7 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.xscm.moduleutil.widget.GifAvatarOvalView
<com.xscm.moduleutil.widget.CircularImage
android:layout_width="@dimen/dp_12"
android:layout_height="@dimen/dp_12"
app:layout_constraintTop_toTopOf="parent"

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@@ -25,6 +25,7 @@ import com.tencent.qgame.animplayer.AnimConfig;
import com.tencent.qgame.animplayer.inter.IAnimListener;
import com.xscm.modulemain.BaseMvpActivity;
import com.xscm.modulemain.activity.WebViewActivity;
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
import com.xscm.moduleutil.activity.IPresenter;
import com.xscm.moduleutil.activity.IView;
import com.xscm.moduleutil.base.AppStateListener;
@@ -73,7 +74,7 @@ import io.reactivex.disposables.Disposable;
* 别人笑我忒疯癫,我笑自己命太贱;
* 不见满街漂亮妹,哪个归得程序员?
*/
public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaunchPageBinding> implements IView<Activity> {
public class LaunchPageActivity extends BaseAppCompatActivity<ActivityLaunchPageBinding> {
private Handler handler;
private PolicyDialog policyDialog;
private AppStateListener appStateListener;
@@ -82,7 +83,7 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
setHttpTheme();
// setHttpTheme();
if (CommonAppContext.getInstance().isLogout){
startActivity(new Intent(this, PasswordLoginActivity.class));
finish();
@@ -189,10 +190,6 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
super.onDestroy();
}
@Override
protected IPresenter bindPresenter() {
return null;
}
private void setHttpTheme() {
RetrofitClient.getInstance().getFestivalTheme(new BaseObserver<FestivalThemeBean>() {
@@ -372,6 +369,7 @@ public class LaunchPageActivity extends BaseMvpActivity<IPresenter, ActivityLaun
policyDialog = null;
}
setViodeo();
setHttpTheme();
}
@Override

View File

@@ -39,8 +39,11 @@ import com.xscm.modulemain.activity.login.present.LoginContacter;
import com.xscm.modulemain.activity.login.present.LoginPresenter;
import com.xscm.modulemain.activity.main.activity.MainActivity;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.FestivalThemeBean;
import com.xscm.moduleutil.bean.ThemeBean;
import com.xscm.moduleutil.bean.UserBean;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.http.RetrofitClient;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.BarUtils;
import com.xscm.moduleutil.utils.PreferencesUtils;
@@ -53,6 +56,9 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import io.reactivex.disposables.Disposable;
public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, ActivityPasswordLoginBinding> implements LoginContacter.View, View.OnClickListener {
private CountDownTimer mTimer;
@@ -142,6 +148,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
protected void initView() {
super.initView();
MvpPre.getThemeData();
setHttpTheme();
initQuickLogin();
checkOnePass();
@@ -197,7 +204,22 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
}
}
private void setHttpTheme() {
RetrofitClient.getInstance().getFestivalTheme(new BaseObserver<FestivalThemeBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(FestivalThemeBean festivalThemeBean) {
if (festivalThemeBean != null) {
CommonAppContext.getInstance().is_open = festivalThemeBean.is_open();
}
}
});
}
private void initQuickLogin() {
tokenResultListener = new TokenResultListener() {
@Override