fix bugs 55 2
This commit is contained in:
@@ -14,9 +14,11 @@ import com.alibaba.sdk.android.oss.internal.OSSAsyncTask;
|
|||||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||||
import com.blankj.utilcode.util.FileUtils;
|
import com.blankj.utilcode.util.FileUtils;
|
||||||
|
import com.blankj.utilcode.util.SPUtils;
|
||||||
import com.blankj.utilcode.util.ThreadUtils;
|
import com.blankj.utilcode.util.ThreadUtils;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.utils.Md5Utils;
|
import com.xscm.moduleutil.utils.Md5Utils;
|
||||||
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.utils.TimeUtils;
|
import com.xscm.moduleutil.utils.TimeUtils;
|
||||||
import com.xscm.moduleutil.utils.logger.Logger;
|
import com.xscm.moduleutil.utils.logger.Logger;
|
||||||
|
|
||||||
@@ -85,7 +87,7 @@ public class OSSOperUtils {
|
|||||||
if (file.getName().contains(".")) {
|
if (file.getName().contains(".")) {
|
||||||
suffix = file.getName().substring(file.getName().lastIndexOf("."));
|
suffix = file.getName().substring(file.getName().lastIndexOf("."));
|
||||||
}
|
}
|
||||||
return AppLog + fileMD5 + TimeUtils.getCurrentDate2() + suffix;
|
return AppLog+ SpUtil.getUserInfo().getNickname()+"_"+SpUtil.getUserInfo().getUser_id() +"_"+ TimeUtils.getCurrentDate2() +"_" + fileMD5+ suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OSSOperUtils newInstance() {
|
public static OSSOperUtils newInstance() {
|
||||||
|
|||||||
@@ -2518,6 +2518,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||||
}
|
}
|
||||||
} else if (id == R.id.rl_gift) { //礼物
|
} else if (id == R.id.rl_gift) { //礼物
|
||||||
|
LogUtils.e("RoomGiftDialogFragment_RoomActivity");
|
||||||
val fragment = RoomGiftDialogFragment.show(
|
val fragment = RoomGiftDialogFragment.show(
|
||||||
mRoomInfoResp, null, roomId, 0, "",
|
mRoomInfoResp, null, roomId, 0, "",
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
|
|||||||
@@ -33,10 +33,12 @@ import io.reactivex.schedulers.Schedulers;
|
|||||||
|
|
||||||
public class SettingPresenter extends BasePresenter<SettingConacts.View> implements SettingConacts.IMePre {
|
public class SettingPresenter extends BasePresenter<SettingConacts.View> implements SettingConacts.IMePre {
|
||||||
private SettingConacts.View mView;
|
private SettingConacts.View mView;
|
||||||
|
|
||||||
public SettingPresenter(SettingConacts.View view, Context context) {
|
public SettingPresenter(SettingConacts.View view, Context context) {
|
||||||
super(view, context);
|
super(view, context);
|
||||||
mView = view;
|
mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearLoginInfo() {
|
public void clearLoginInfo() {
|
||||||
api.clearLoginInfo(new BaseObserver<String>() {
|
api.clearLoginInfo(new BaseObserver<String>() {
|
||||||
@@ -150,6 +152,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
|||||||
public void onFailure(Exception e) {
|
public void onFailure(Exception e) {
|
||||||
ToastUtils.showLong("上传失败");
|
ToastUtils.showLong("上传失败");
|
||||||
LogUtils.e("上传失败", e.toString());
|
LogUtils.e("上传失败", e.toString());
|
||||||
|
if (MvpRef == null) {
|
||||||
|
MvpRef = new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().disLoadings();
|
MvpRef.get().disLoadings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +168,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
|||||||
} else {
|
} else {
|
||||||
ToastUtils.showLong("上传失败");
|
ToastUtils.showLong("上传失败");
|
||||||
LogUtils.e("压缩失败");
|
LogUtils.e("压缩失败");
|
||||||
|
if (MvpRef == null) {
|
||||||
|
MvpRef = new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().disLoadings();
|
MvpRef.get().disLoadings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
import com.blankj.utilcode.util.GsonUtils;
|
import com.blankj.utilcode.util.GsonUtils;
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.xscm.modulemain.R;
|
import com.xscm.modulemain.R;
|
||||||
import com.xscm.modulemain.databinding.DialogGiftLotteryBinding;
|
import com.xscm.modulemain.databinding.DialogGiftLotteryBinding;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
@@ -371,6 +372,15 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
|
|
||||||
private void onClisk(View view) {
|
private void onClisk(View view) {
|
||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
|
// 通过 ID 获取资源名称
|
||||||
|
String viewName = "";
|
||||||
|
try {
|
||||||
|
viewName = view.getContext().getResources().getResourceEntryName(id);
|
||||||
|
} catch (Exception e) {
|
||||||
|
viewName = "未知View ID: " + id;
|
||||||
|
}
|
||||||
|
LogUtils.e("GiftLotteryDFragment","点击了" + viewName );
|
||||||
|
|
||||||
if (id == R.id.ll_one) {
|
if (id == R.id.ll_one) {
|
||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static RoomGiftDialogFragment show(RoomInfoResp roomInfoResp, UserInfo userInfo, String roomId, int jingp, String heart_id, FragmentManager fragmentManager) {
|
public static RoomGiftDialogFragment show(RoomInfoResp roomInfoResp, UserInfo userInfo, String roomId, int jingp, String heart_id, FragmentManager fragmentManager) {
|
||||||
|
if (roomInfoResp == null && userInfo == null) {
|
||||||
|
LogUtils.e("RoomGiftDialogFragment_show", "roomInfoResp and userInfo is null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
RoomGiftDialogFragment dialogFragment = new RoomGiftDialogFragment();
|
RoomGiftDialogFragment dialogFragment = new RoomGiftDialogFragment();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putSerializable("roomInfoResp", roomInfoResp);
|
args.putSerializable("roomInfoResp", roomInfoResp);
|
||||||
@@ -812,7 +816,6 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
if (mBinding.tvBbQs != null) {
|
if (mBinding.tvBbQs != null) {
|
||||||
mBinding.tvBbQs.setVisibility(View.GONE);
|
mBinding.tvBbQs.setVisibility(View.GONE);
|
||||||
mBinding.cz.setVisibility(View.VISIBLE);
|
mBinding.cz.setVisibility(View.VISIBLE);
|
||||||
MvpPre.wallet();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user