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.PutObjectResult;
|
||||
import com.blankj.utilcode.util.FileUtils;
|
||||
import com.blankj.utilcode.util.SPUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.utils.Md5Utils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.utils.TimeUtils;
|
||||
import com.xscm.moduleutil.utils.logger.Logger;
|
||||
|
||||
@@ -85,7 +87,7 @@ public class OSSOperUtils {
|
||||
if (file.getName().contains(".")) {
|
||||
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() {
|
||||
|
||||
@@ -2518,6 +2518,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
}
|
||||
} else if (id == R.id.rl_gift) { //礼物
|
||||
LogUtils.e("RoomGiftDialogFragment_RoomActivity");
|
||||
val fragment = RoomGiftDialogFragment.show(
|
||||
mRoomInfoResp, null, roomId, 0, "",
|
||||
supportFragmentManager
|
||||
|
||||
@@ -33,10 +33,12 @@ import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class SettingPresenter extends BasePresenter<SettingConacts.View> implements SettingConacts.IMePre {
|
||||
private SettingConacts.View mView;
|
||||
|
||||
public SettingPresenter(SettingConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearLoginInfo() {
|
||||
api.clearLoginInfo(new BaseObserver<String>() {
|
||||
@@ -150,6 +152,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
public void onFailure(Exception e) {
|
||||
ToastUtils.showLong("上传失败");
|
||||
LogUtils.e("上传失败", e.toString());
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().disLoadings();
|
||||
}
|
||||
|
||||
@@ -163,6 +168,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
} else {
|
||||
ToastUtils.showLong("上传失败");
|
||||
LogUtils.e("压缩失败");
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().disLoadings();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.DialogGiftLotteryBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
@@ -371,6 +372,15 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
||||
|
||||
private void onClisk(View view) {
|
||||
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 (!isDrawing) {
|
||||
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) {
|
||||
if (roomInfoResp == null && userInfo == null) {
|
||||
LogUtils.e("RoomGiftDialogFragment_show", "roomInfoResp and userInfo is null");
|
||||
return null;
|
||||
}
|
||||
RoomGiftDialogFragment dialogFragment = new RoomGiftDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable("roomInfoResp", roomInfoResp);
|
||||
@@ -812,7 +816,6 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
if (mBinding.tvBbQs != null) {
|
||||
mBinding.tvBbQs.setVisibility(View.GONE);
|
||||
mBinding.cz.setVisibility(View.VISIBLE);
|
||||
MvpPre.wallet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user