1:修改房间activity
2:修改支付
12
.idea/misc.xml
generated
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="15">
|
||||
<list size="17">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jspecify.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||
@@ -21,12 +25,14 @@
|
||||
<item index="12" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
|
||||
<item index="13" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
|
||||
<item index="14" class="java.lang.String" itemvalue="android.annotation.Nullable" />
|
||||
<item index="15" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
|
||||
<item index="16" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="15">
|
||||
<list size="17">
|
||||
<item index="0" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="org.jspecify.annotations.NonNull" />
|
||||
@@ -42,6 +48,8 @@
|
||||
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
|
||||
<item index="13" class="java.lang.String" itemvalue="android.annotation.NonNull" />
|
||||
<item index="14" class="java.lang.String" itemvalue="lombok.NonNull" />
|
||||
<item index="15" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
|
||||
<item index="16" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
|
||||
@@ -116,7 +116,7 @@ android {
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
jvmTarget = '11'
|
||||
}
|
||||
dexOptions {
|
||||
dexInProcess true
|
||||
@@ -144,8 +144,6 @@ dependencies {
|
||||
implementation files('libs/logger-2.2.2-release.aar')
|
||||
implementation files('libs/main-2.2.3-release.aar')
|
||||
|
||||
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
|
||||
|
||||
implementation(libs.arouter.api.v150)
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.xscm.midi",
|
||||
"applicationId": "com.jdf.myyuliao",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 101,
|
||||
"versionName": "1.0.5",
|
||||
"outputFile": "秘地_1.0.5_101.apk"
|
||||
"versionCode": 4,
|
||||
"versionName": "1.0.0.2",
|
||||
"outputFile": "MY语聊1.0.0.2_4.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
@@ -22,14 +22,14 @@
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/秘地_1.0.5_101.dm"
|
||||
"baselineProfiles/1/MY语聊1.0.0.2_4.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/秘地_1.0.5_101.dm"
|
||||
"baselineProfiles/0/MY语聊1.0.0.2_4.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
</intent-filter>
|
||||
<!-- com.xscm.action.LAUNCH_PAGE-->
|
||||
<intent-filter>
|
||||
<action android:name="com.jdf.action.LAUNCH_PAGE" />
|
||||
<action android:name="com.xscm.action.LAUNCH_PAGE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@@ -200,9 +200,7 @@
|
||||
android:taskAffinity="com.xscm.qxlive"
|
||||
android:launchMode="singleTask">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RealNameActivity"
|
||||
android:exported="false" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".PasswordLoginActivity"
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.jdf.myyuliao.databinding.ActivityLaunchPageBinding;
|
||||
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.AppStateListener;
|
||||
import com.xscm.moduleutil.base.AppStateManager;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
@@ -37,8 +38,13 @@ public class LaunchPageActivity extends BaseAppCompatActivity<ActivityLaunchPage
|
||||
if (!isTaskRoot()) {
|
||||
|
||||
if (SpUtil.getUnderagePassword() != null && !SpUtil.getUnderagePassword().isEmpty()) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
||||
.withString("type", "1").navigation();//type==1:青少年模式
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
||||
// .withString("type", "1").navigation();//type==1:青少年模式
|
||||
|
||||
Intent intent = new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken());
|
||||
intent.putExtra("title", "1");
|
||||
startActivity(intent);
|
||||
} else {
|
||||
// 如果没有设置青少年模式,应该导航到首页
|
||||
try {
|
||||
|
||||
@@ -23,11 +23,20 @@ buildscript {
|
||||
// classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
|
||||
subprojects {
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ isBuildModule=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.0
|
||||
APP_VERSION_CODE=1
|
||||
APP_VERSION_NAME=1.0.0.2
|
||||
APP_VERSION_CODE=3
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
@@ -52,3 +52,6 @@ kapt.incremental.apt=false
|
||||
|
||||
# 或者禁用特定模块的增量编译
|
||||
#org.gradle.configureondemand=false
|
||||
|
||||
# 统一 Kotlin JVM 目标版本
|
||||
kotlin.jvm.target.validation.mode=warning
|
||||
@@ -74,6 +74,7 @@ webpdecoder = "1.6.4.9.0"
|
||||
wechatSdkAndroid = "6.8.30"
|
||||
xbanner = "1.7.0"
|
||||
appcompatVersion = "1.3.1"
|
||||
lifecycleViewmodelKtxVersion = "2.2.0"
|
||||
|
||||
[libraries]
|
||||
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
||||
@@ -155,6 +156,7 @@ wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", ver
|
||||
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
||||
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompatVersion" }
|
||||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtxVersion" }
|
||||
|
||||
|
||||
[plugins]
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,8 @@
|
||||
#Mon Sep 22 21:05:11 CST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
#distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/distsl.
|
||||
distributionUrl=file:///D:/Gradle/gradle-8.10.2-bin.zip
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
||||
import com.xscm.modulelogin.activity.SwitchAccountsActivity;
|
||||
import com.xscm.modulemain.activity.MainActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.ThemeBean;
|
||||
import com.xscm.moduleutil.bean.UserBean;
|
||||
@@ -264,10 +265,20 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
||||
}
|
||||
|
||||
public void ysxl() {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url",CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
Intent intent = new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4");
|
||||
intent.putExtra("title", "隐私协议");
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url",CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
}
|
||||
|
||||
public void yhxy() {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6").withString("title", "用户协议").navigation();
|
||||
Intent intent = new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6");
|
||||
intent.putExtra("title", "用户协议");
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6").withString("title", "用户协议").navigation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
private BroadcastReceiver mLogoutReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if ("com.jdf.moduleutil.ACTION_USER_LOGOUT".equals(intent.getAction())) {
|
||||
if ("com.xscm.moduleutil.ACTION_USER_LOGOUT".equals(intent.getAction())) {
|
||||
// 在这里处理用户登出后的UI更新
|
||||
// 例如:隐藏需要登录才能显示的控件
|
||||
// 或者跳转到登录状态的页面
|
||||
@@ -131,7 +131,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
ColorManager.getInstance().addColorChangeListener(this);
|
||||
|
||||
// 注册登出广播接收器
|
||||
IntentFilter filter = new IntentFilter("com.jdf.moduleutil.ACTION_USER_LOGOUT");
|
||||
IntentFilter filter = new IntentFilter("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
||||
registerReceiver(mLogoutReceiver, filter);
|
||||
|
||||
// 动态判断是否包含 @Subscribe 注解的方法
|
||||
@@ -766,7 +766,10 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEvent(ChatInfo event) {
|
||||
String id = event.getId().replace("g", "");
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/union/setGroup?id=" + SpUtil.getToken() + "&guildId=" + id).navigation();
|
||||
Intent intent = new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/union/setGroup?id=" + SpUtil.getToken() + "&guildId=" + id);
|
||||
startActivity( intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/union/setGroup?id=" + SpUtil.getToken() + "&guildId=" + id).navigation();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.xscm.moduleutil.activity.news;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
|
||||
@@ -14,6 +15,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.RoomManager;
|
||||
import com.xscm.moduleutil.bean.NewsMessageList;
|
||||
import com.xscm.moduleutil.databinding.ActivityOfficialNoticeBinding;
|
||||
@@ -30,6 +32,7 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
private int page = 1;
|
||||
private BaseQuickAdapter<NewsMessageList, BaseViewHolder> mAdapter;
|
||||
private String type;
|
||||
private boolean isRefresh = true; // 添加标志位区分刷新和加载更多
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
@@ -46,12 +49,14 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
isRefresh = false; // 设置为加载更多模式
|
||||
MvpPre.getMessagetitle(type, page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
isRefresh = true; // 设置为刷新模式
|
||||
MvpPre.getMessagetitle(type, page + "", "10");
|
||||
}
|
||||
});
|
||||
@@ -79,7 +84,10 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id()+"","");
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", item.getRoom_id() + "").navigation();
|
||||
}else if (item.getRoom_id() == 0 && item.getUrl() != null && !item.getUrl().isEmpty()){
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", item.getUrl()).navigation();
|
||||
Intent intent = new Intent(OfficialNoticeActivity.this, WebViewActivity.class);
|
||||
intent.putExtra("url", item.getUrl());
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", item.getUrl()).navigation();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -119,7 +127,15 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
|
||||
@Override
|
||||
public void showNews(List<NewsMessageList> newsList) {
|
||||
if (isRefresh) {
|
||||
// 下拉刷新
|
||||
mAdapter.setNewData(newsList);
|
||||
} else {
|
||||
if (newsList != null) {
|
||||
// 上拉加载更多
|
||||
mAdapter.addData(newsList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -159,7 +159,12 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
@Override
|
||||
public void setGiftList(List<RoonGiftModel> data, int type) {
|
||||
giftList = new ArrayList<>();
|
||||
if (data == null) {
|
||||
data = new ArrayList<>();
|
||||
return;
|
||||
}
|
||||
giftList.addAll(data);
|
||||
|
||||
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
||||
|
||||
// 只需要创建一次Adapter并设置,循环设置没有意义
|
||||
@@ -219,7 +224,6 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||
import com.xscm.moduleutil.service.MqttConnect;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.CrashHandler;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.utils.UtilConfig;
|
||||
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
|
||||
@@ -96,6 +97,11 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
public String playId;
|
||||
public String lable_id;
|
||||
public boolean isMicPlace;
|
||||
|
||||
public boolean isShowAg;
|
||||
|
||||
public boolean isRoomJoininj=false;
|
||||
|
||||
public String playCover;
|
||||
public boolean showSelf;//盲盒是否能送自己
|
||||
public String playName;
|
||||
@@ -125,8 +131,6 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
@Getter
|
||||
public UnreadCountEvent unreadCountEvent;
|
||||
|
||||
public boolean isShowAg;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -142,6 +146,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
startListeningUnreadMessageCount();
|
||||
// 全局设置字体不缩放
|
||||
adjustFontScale(getResources().getConfiguration());
|
||||
CrashHandler.init(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -215,6 +221,67 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
CommonAppContext.getInstance().setUnreadCountEvent(event);
|
||||
EventBus.getDefault().post(event);
|
||||
}
|
||||
/**
|
||||
* 检查网络是否可用
|
||||
* @return true表示网络可用,false表示网络不可用
|
||||
*/
|
||||
public boolean isNetworkAvailable() {
|
||||
try {
|
||||
// 获取网络连接管理器
|
||||
android.net.ConnectivityManager connectivityManager =
|
||||
(android.net.ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
|
||||
if (connectivityManager != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
// Android 6.0及以上版本
|
||||
android.net.Network network = connectivityManager.getActiveNetwork();
|
||||
if (network != null) {
|
||||
android.net.NetworkCapabilities capabilities =
|
||||
connectivityManager.getNetworkCapabilities(network);
|
||||
if (capabilities != null) {
|
||||
// 检查是否有网络连接并且可以访问互联网
|
||||
return capabilities.hasCapability(android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET) &&
|
||||
capabilities.hasCapability(android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Android 6.0以下版本
|
||||
android.net.NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("Network availability check failed: " + e.getMessage());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查网络是否可用(简化版本)
|
||||
* @return true表示网络可用,false表示网络不可用
|
||||
*/
|
||||
public boolean isNetworkConnected() {
|
||||
try {
|
||||
android.net.ConnectivityManager connectivityManager =
|
||||
(android.net.ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
|
||||
if (connectivityManager != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
android.net.Network network = connectivityManager.getActiveNetwork();
|
||||
return network != null;
|
||||
} else {
|
||||
android.net.NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("Network connection check failed: " + e.getMessage());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 优化内存设置
|
||||
*/
|
||||
@@ -367,7 +434,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
// startService(mqttServiceIntent);
|
||||
// }
|
||||
|
||||
mqttConnect=MqttConnect.getInstance(this,"tcp://62.234.12.147","android-"+ MqttClient.generateClientId());
|
||||
mqttConnect=MqttConnect.getInstance(this,"tcp://119.45.34.13","android-"+ MqttClient.generateClientId());
|
||||
mqttConnect.mqttClient();
|
||||
|
||||
// 每次启动应用时重置状态
|
||||
@@ -672,9 +739,9 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
SpUtil.setBooleanValue("youth_model_shown", false);
|
||||
|
||||
// 发送广播通知所有Activity刷新状态
|
||||
Intent refreshIntent = new Intent("com.jdf.moduleutil.ACTION_USER_LOGOUT");
|
||||
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
||||
sendBroadcast(refreshIntent);
|
||||
Intent intent = new Intent("com.jdf.action.LAUNCH_PAGE");
|
||||
Intent intent = new Intent("com.xscm.action.LAUNCH_PAGE");
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
getApplicationContext().startActivity(intent);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.xscm.moduleutil.base;
|
||||
|
||||
import static android.app.PendingIntent.getActivity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||
@@ -110,7 +113,10 @@ public class RoomManager {
|
||||
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
|
||||
// 显示加载提示
|
||||
// 这里可以根据需要添加加载对话框
|
||||
|
||||
if (CommonAppContext.getInstance().isRoomJoininj){
|
||||
return;
|
||||
}
|
||||
CommonAppContext.getInstance().isRoomJoininj=true;
|
||||
// 检查是否有有效的缓存数据
|
||||
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
|
||||
// 检查是否是当前房间且用户在线
|
||||
@@ -119,7 +125,11 @@ public class RoomManager {
|
||||
fetchAndJoinRoom(context, roomId, password);
|
||||
} else {
|
||||
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
exitRoom(CommonAppContext.getInstance().playId);
|
||||
CommonAppContext.getInstance().isShow = false;
|
||||
CommonAppContext.getInstance().isPlaying = false;
|
||||
EventBus.getDefault().post(new RoomOutEvent());
|
||||
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
||||
upInfo(context, roomId, password, true, null, true);
|
||||
return;
|
||||
@@ -241,7 +251,7 @@ public class RoomManager {
|
||||
*/
|
||||
private void fetchAndJoinRoom(Context context, String roomId, String password) {
|
||||
// 获取房间数据
|
||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||
|
||||
// 等待一段时间确保退出完成
|
||||
try {
|
||||
Thread.sleep(300);
|
||||
@@ -330,7 +340,6 @@ public class RoomManager {
|
||||
ARouter.getInstance()
|
||||
.build(ARouteConstants.ROOM_DETAILS)
|
||||
.with(bundle)
|
||||
.withFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
||||
.navigation(context);
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -394,11 +403,11 @@ public class RoomManager {
|
||||
// 可以通过检查Agora是否还在房间中,或者通过服务端接口查询用户状态等方式实现
|
||||
// 目前返回false,需要根据实际需求实现具体逻辑
|
||||
// boolean isCurrentRoom=isCurrentRoom(roomId);
|
||||
try {
|
||||
Thread.sleep(300);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
// try {
|
||||
// Thread.sleep(300);
|
||||
// } catch (InterruptedException e) {
|
||||
// Thread.currentThread().interrupt();
|
||||
// }
|
||||
final boolean[] isOnline = {false};
|
||||
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import lombok.Data;
|
||||
public class AppPay {
|
||||
private String ali;
|
||||
private WxBean wx;
|
||||
private String xlx;
|
||||
|
||||
@Data
|
||||
public static class WxBean {
|
||||
@@ -20,4 +21,14 @@ public class AppPay {
|
||||
private String timestamp;
|
||||
private String sign;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class XlxBean {
|
||||
private int pid;
|
||||
private String noncestr;
|
||||
private String partnerid;
|
||||
private String prepayid;
|
||||
private String timestamp;
|
||||
private String sign;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ public class BindType {
|
||||
private AllData bank;
|
||||
private AllData ali_tl;
|
||||
private AllData wx_tl;
|
||||
private AllData xlx_wx;
|
||||
private AllData xlx_ali;
|
||||
private AllData xlx_bank;
|
||||
|
||||
|
||||
@Data
|
||||
|
||||
@@ -26,6 +26,7 @@ public class BlindBoxBean {
|
||||
private int is_xlh; ///是否开启巡乐会 0 关闭 1 开启
|
||||
private Object xlh_data;
|
||||
private List<GiftBean> gift_list;
|
||||
private String end_time;//巡乐会结束时间
|
||||
|
||||
private GiveGift give_homeowner_gift;//房主礼物
|
||||
private GiveGift locking_gift;//锁定礼物
|
||||
@@ -95,6 +96,14 @@ public class BlindBoxBean {
|
||||
}
|
||||
}
|
||||
}
|
||||
Object endTime = map.get("end_time");
|
||||
if (endTime != null) {
|
||||
if (endTime instanceof String){
|
||||
xlhData.setEnd_time(endTime.toString());
|
||||
}else {
|
||||
xlhData.setEnd_time(endTime.toString());
|
||||
}
|
||||
}
|
||||
|
||||
return xlhData;
|
||||
}
|
||||
@@ -118,6 +127,9 @@ public class BlindBoxBean {
|
||||
if (jsonObject.has("status")) {
|
||||
xlhData.setStatus(jsonObject.get("status").getAsInt());
|
||||
}
|
||||
if (jsonObject.has("end_time")){
|
||||
xlhData.setEnd_time(jsonObject.get("end_time").getAsString());
|
||||
}
|
||||
|
||||
return xlhData;
|
||||
}
|
||||
@@ -130,6 +142,7 @@ public class BlindBoxBean {
|
||||
private String start_num;//巡乐会开启需要达到的次数
|
||||
private int current_num;//当前已抽奖次数
|
||||
private int status;
|
||||
private String end_time;
|
||||
}
|
||||
@Data
|
||||
public static class GiveGift {
|
||||
|
||||
@@ -29,6 +29,7 @@ public class RoomInfoResp implements Serializable {
|
||||
private PkRoomInfo pk_info;
|
||||
private List<RoomPitBean> song_pit_list;
|
||||
private FriendInfo friend_info;
|
||||
private GiftXlh gift_cycle;
|
||||
|
||||
|
||||
//弹出麦位操作弹出
|
||||
@@ -114,4 +115,18 @@ public class RoomInfoResp implements Serializable {
|
||||
public boolean isFreedomMode() {
|
||||
return "1".equals(room_info.getWheat());
|
||||
}
|
||||
|
||||
@Data
|
||||
public class GiftXlh implements Serializable{
|
||||
private XlhInfo xlh_info ;
|
||||
}
|
||||
@Data
|
||||
public class XlhInfo implements Serializable{
|
||||
private String activities_name;
|
||||
private String icon;
|
||||
|
||||
private String xlh_status;
|
||||
|
||||
private String end_time;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.xscm.moduleutil.dialog;
|
||||
|
||||
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.text.TextPaint;
|
||||
@@ -16,6 +19,7 @@ import androidx.databinding.DataBindingUtil;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.SpanUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.databinding.DialogPolicBinding;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
@@ -42,7 +46,12 @@ public class PolicyDialog extends Dialog {
|
||||
ClickableSpan clickSpan = new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6" ).withString("title", "用户协议").navigation();
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6");
|
||||
intent.putExtra("title", "用户协议");
|
||||
startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6" ).withString("title", "用户协议").navigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -54,7 +63,12 @@ public class PolicyDialog extends Dialog {
|
||||
ClickableSpan ysClickSpan = new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4");
|
||||
intent.putExtra("title", "隐私协议");
|
||||
startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,7 +77,7 @@ public class PolicyDialog extends Dialog {
|
||||
ds.setUnderlineText(true);
|
||||
}
|
||||
};
|
||||
spanUtils.append("欢迎使用MY语聊!\n").append("在使用我们的产品和服务之前,请您先阅读并了解").append("《用户协议》").setClickSpan(clickSpan).append("和").append("《隐私协议》").setClickSpan(ysClickSpan).append("。我们将严格按照上述协议为" +
|
||||
spanUtils.append("欢迎使用秘地!\n").append("在使用我们的产品和服务之前,请您先阅读并了解").append("《用户协议》").setClickSpan(clickSpan).append("和").append("《隐私协议》").setClickSpan(ysClickSpan).append("。我们将严格按照上述协议为" +
|
||||
"您提供服务,保护您的信息安全,点" +
|
||||
"击“同意”即表示您已阅读并同意全部" +
|
||||
"条款,可以继续使用我们的产品和服" +
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.xscm.moduleutil.dialog;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -182,7 +185,15 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
||||
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getWx_tl());
|
||||
}
|
||||
|
||||
if (bindType.getXlx_wx().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_wx());
|
||||
}
|
||||
if (bindType.getXlx_ali().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_ali());
|
||||
}
|
||||
if (bindType.getXlx_bank().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_bank());
|
||||
}
|
||||
bindTypeAdapter.setNewData(allData);
|
||||
}
|
||||
|
||||
@@ -195,6 +206,22 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(getContext(), CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
PaymentUtil.payWxMiniProgram2(wxapi,appPay);
|
||||
|
||||
}else if (appPay.getXlx()!=null){
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", appPay.getXlx()).navigation();
|
||||
openInExternalBrowser(appPay.getXlx());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void openInExternalBrowser(String url) {
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
// 确保在新任务中打开
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
ToastUtils.showShort("无法找到浏览器应用");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xscm.moduleutil.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@@ -9,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.TeenagerInfo;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
@@ -55,7 +57,11 @@ public class YouthModelDialog extends BaseDialog<IndexDialogYouthModelBinding> {
|
||||
// } else {
|
||||
// ARouter.getInstance().build(ARouteConstants.SET_YOUTH_PWD_ACTIVITY).withInt("type", SetYouthPasswordActivity.SET_TYPE).navigation();
|
||||
// }
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken()).navigation();
|
||||
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken());
|
||||
getContext().startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken()).navigation();
|
||||
dismiss();
|
||||
});
|
||||
|
||||
|
||||
@@ -606,6 +606,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
||||
|
||||
// 停止之前的定时器
|
||||
stopFastAnimate();
|
||||
stopPlay();
|
||||
Log.e("isOpenSound===","isOpenSound111"+isOpenSound);
|
||||
if (isOpenSound) {
|
||||
// 假设此处有播放音乐的逻辑
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.xscm.moduleutil.http;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
/**
|
||||
* 通用的API响应处理回调类
|
||||
* 统一处理所有接口的响应和错误情况
|
||||
*/
|
||||
public abstract class ApiResponseCallback<T> implements Callback<BaseModel<T>> {
|
||||
private Context mContext;
|
||||
|
||||
// 构造方法,传入上下文用于显示提示
|
||||
public ApiResponseCallback(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<T>> call, Response<BaseModel<T>> response) {
|
||||
// 统一处理HTTP响应
|
||||
if (response.isSuccessful()) {
|
||||
// 处理200-299范围内的HTTP状态码
|
||||
BaseModel<T> body = response.body();
|
||||
|
||||
if (body != null) {
|
||||
// 根据code值进行不同处理
|
||||
switch (body.getCode()) {
|
||||
case 1: // 接口返回成功
|
||||
// 业务成功,回调给具体实现
|
||||
// 即使data为null也调用onSuccess,由具体实现决定如何处理null值
|
||||
onSuccess(body.getData());
|
||||
break;
|
||||
case 0: // 接口请求成功但数据错误
|
||||
// 显示错误信息
|
||||
// String errorMsg = body.getMsg() != null ? body.getMsg() : "操作失败,请重试";
|
||||
// showToast(errorMsg);
|
||||
onFailure(new Exception(body.getMsg()));
|
||||
break;
|
||||
case 301: // 登录失效
|
||||
// 显示错误信息并退出应用
|
||||
// String loginErrorMsg = body.getMsg() != null ? body.getMsg() : "登录已失效,请重新登录";
|
||||
showToast(body.getMsg());
|
||||
|
||||
try {
|
||||
// 发送退出登录事件
|
||||
// EventBus.getDefault().post(new com.xscm.moduleutil.event.LogOutEvent());
|
||||
|
||||
// 清除登录信息
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
|
||||
// 跳转到登录页面
|
||||
// android.content.Intent intent = new android.content.Intent(CommonAppContext.getInstance(), Class.forName("com.xscm.midi.LaunchPageActivity"));
|
||||
// intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK | android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
// CommonAppContext.getInstance().startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
onFailure(new Exception(body.getMsg()));
|
||||
break;
|
||||
default:
|
||||
// 其他错误情况
|
||||
String defaultErrorMsg = body.getMsg() != null ? body.getMsg() : "未知错误";
|
||||
showToast(defaultErrorMsg);
|
||||
onFailure(new Exception(defaultErrorMsg));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// 响应体为空的情况
|
||||
String errorMsg = "获取数据失败,请重试";
|
||||
showToast(errorMsg);
|
||||
onFailure(new Exception(errorMsg));
|
||||
}
|
||||
} else {
|
||||
// 处理HTTP错误状态码
|
||||
String errorInfo;
|
||||
try {
|
||||
if (response.errorBody() != null) {
|
||||
errorInfo = response.errorBody().string();
|
||||
// 可以在这里统一解析错误响应体
|
||||
} else {
|
||||
errorInfo = "请求失败,状态码:" + response.code();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
errorInfo = "请求失败,状态码:" + response.code();
|
||||
e.printStackTrace();
|
||||
}
|
||||
showToast("");
|
||||
onFailure(new Exception(errorInfo));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<T>> call, Throwable t) {
|
||||
// 统一处理网络异常
|
||||
String errorMsg;
|
||||
if (t instanceof IOException) {
|
||||
// errorMsg = "网络异常,请检查网络连接";
|
||||
} else {
|
||||
// errorMsg = "请求处理失败,请重试";
|
||||
}
|
||||
showToast("");
|
||||
// 回调给具体实现处理
|
||||
onFailure(t);
|
||||
}
|
||||
|
||||
// 显示提示信息
|
||||
private void showToast(String message) {
|
||||
if (mContext != null) {
|
||||
Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
// 业务成功时的回调,由具体接口实现
|
||||
public abstract void onSuccess(T data);
|
||||
|
||||
// 错误时的回调,可选实现
|
||||
public void onFailure(Throwable t) {
|
||||
// 可以留空,由子类选择性实现
|
||||
LogUtils.e("接口错误:",t);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.xscm.moduleutil.bean.AlbumBean;
|
||||
import com.xscm.moduleutil.bean.AppPay;
|
||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||
@@ -165,9 +166,13 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_WITHDRAWAL_LIST)
|
||||
Observable<BaseModel<List<WithdrawalBean>>> withdrawalList(@Query("page") String page, @Query("page_limit") String page_limit, @Query("search_stime") String search_stime, @Query("search_etime") String search_etime);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_BIND_DETAIL)
|
||||
Call<BaseModel<BindDetail>> bindDetai(@Field("user_id") String user_id, @Field("type") String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_MESSAGE_LIST)
|
||||
Observable<BaseModel<List<NewsMessageList>>> getMessagetitle(@Field("type") String type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
Call<BaseModel<List<NewsMessageList>>> getMessagetitle(@Field("type") String type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RANK)
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.xscm.moduleutil.http;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Converter;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public class BusinessAwareConverterFactory extends Converter.Factory {
|
||||
private final GsonConverterFactory originalFactory;
|
||||
private final Context context;
|
||||
|
||||
public BusinessAwareConverterFactory(Context context) {
|
||||
this.context = context;
|
||||
this.originalFactory = GsonConverterFactory.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Converter<ResponseBody, ?> responseBodyConverter(Type type,
|
||||
Annotation[] annotations,
|
||||
Retrofit retrofit) {
|
||||
final Converter<ResponseBody, ?> delegate =
|
||||
originalFactory.responseBodyConverter(type, annotations, retrofit);
|
||||
|
||||
return new Converter<ResponseBody, Object>() {
|
||||
@Override
|
||||
public Object convert(ResponseBody value) throws IOException {
|
||||
// 先读取响应字符串检查业务状态码
|
||||
String responseString = value.string();
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(responseString);
|
||||
int code = jsonObject.getInt("code");
|
||||
String msg = jsonObject.getString("msg");
|
||||
|
||||
if (code == 301) {
|
||||
handleForceLogout();
|
||||
ToastUtils.showShort(msg);
|
||||
}
|
||||
|
||||
// 重新构建 ResponseBody 供原始转换器使用
|
||||
ResponseBody newValue = ResponseBody.create(value.contentType(), responseString);
|
||||
return delegate.convert(newValue);
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new IOException("");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleForceLogout() {
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import com.xscm.moduleutil.bean.AlbumBean;
|
||||
import com.xscm.moduleutil.bean.AppPay;
|
||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||
@@ -192,6 +193,7 @@ public class RetrofitClient {
|
||||
|
||||
private Retrofit provideRetrofit(OkHttpClient client) {
|
||||
return new Retrofit.Builder()
|
||||
.addConverterFactory(new BusinessAwareConverterFactory(CommonAppContext.getInstance()))
|
||||
.addConverterFactory(MyConverterFactory.create())/**/
|
||||
// .addConverterFactory(GsonConverterFactory.create())
|
||||
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
||||
@@ -233,7 +235,29 @@ public class RetrofitClient {
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
/**
|
||||
* 检查网络连接状态
|
||||
* @return true表示网络可用,false表示网络不可用
|
||||
*/
|
||||
private boolean isNetworkAvailable() {
|
||||
ConnectivityManager connectivityManager = (ConnectivityManager) CommonAppContext.getInstance()
|
||||
.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
if (connectivityManager != null) {
|
||||
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网络不可用时的统一处理方法
|
||||
* @param observer BaseObserver对象
|
||||
* @param <T> 泛型类型
|
||||
*/
|
||||
private <T> void handleNetworkUnavailable(BaseObserver<T> observer) {
|
||||
ToastUtils.showShort("网络不可用,请检查网络设置");
|
||||
observer.onError(new Throwable("网络不可用,请检查网络设置"));
|
||||
}
|
||||
public <T> T createApiClient(Class<T> apiClientClass) {
|
||||
return mRetrofit.create(apiClientClass);
|
||||
}
|
||||
@@ -257,6 +281,7 @@ public class RetrofitClient {
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> body = response.body();
|
||||
|
||||
observer.onNext(body.getMsg());
|
||||
|
||||
}
|
||||
@@ -366,6 +391,7 @@ public class RetrofitClient {
|
||||
sApiServer.exchangeCoin(earnings_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@@ -399,7 +425,7 @@ public class RetrofitClient {
|
||||
public void onResponse(Call<BaseModel<FirstChargeBean>> call, Response<BaseModel<FirstChargeBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<FirstChargeBean> baseModel = response.body();
|
||||
if (baseModel != null) {
|
||||
if (baseModel.getCode()==1){
|
||||
observer.onNext(baseModel.getData());
|
||||
} else {
|
||||
ToastUtils.showShort("获取数据失败");
|
||||
@@ -450,13 +476,51 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
public void getMessagetitle(String type, String page, String page_limit, BaseObserver<List<NewsMessageList>> observer) {
|
||||
sApiServer.getMessagetitle(type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
sApiServer.getMessagetitle(type, page, page_limit).enqueue(new Callback<BaseModel<List<NewsMessageList>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<NewsMessageList>>> call, Response<BaseModel<List<NewsMessageList>>> response) {
|
||||
if (response.code() == 200){
|
||||
BaseModel<List<NewsMessageList>> baseModel = response.body();
|
||||
if (baseModel.getCode()==1){
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<NewsMessageList>>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void withdrawalList(String page, String page_limit, String search_stime, String search_etime, BaseObserver<List<WithdrawalBean>> observer) {
|
||||
sApiServer.withdrawalList(page, page_limit, search_stime, search_etime).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void bindDetai(String userId, String type,BaseObserver<BindDetail> observer){
|
||||
sApiServer.bindDetai(userId, type).enqueue(new Callback<BaseModel<BindDetail>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<BindDetail>> call, Response<BaseModel<BindDetail>> response) {
|
||||
if (response.code() == 200){
|
||||
BaseModel<BindDetail> baseModel = response.body();
|
||||
if (baseModel.getCode()==1){
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
observer.onNext(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<BindDetail>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getRoomRank(String roomId, String type, String time_type, String page, String page_limit, BaseObserver<List<CharmRankingResp>> observer) {
|
||||
// sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).enqueue(new Callback<BaseModel<List<CharmRankingResp>>>() {
|
||||
@@ -1067,6 +1131,8 @@ public class RetrofitClient {
|
||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1086,6 +1152,8 @@ public class RetrofitClient {
|
||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1105,6 +1173,8 @@ public class RetrofitClient {
|
||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1124,6 +1194,8 @@ public class RetrofitClient {
|
||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1254,7 +1326,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<MyRoomBean>>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("获取房间列表失败", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1298,7 +1371,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<TopRoom>>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("getTopRooms", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1700,12 +1774,17 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void roomGetIn(String roomId, String
|
||||
password, BaseObserver<RoomInfoResp> observer) {
|
||||
public void roomGetIn(String roomId, String password, BaseObserver<RoomInfoResp> observer) {
|
||||
if (!isNetworkAvailable()) {
|
||||
handleNetworkUnavailable(observer);
|
||||
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||
return;
|
||||
}
|
||||
sApiServer.roomGetIn(roomId, password).enqueue(new Callback<BaseModel<RoomInfoResp>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<RoomInfoResp>> call, Response<BaseModel<RoomInfoResp>> response) {
|
||||
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||
if (response.code() == 200) {
|
||||
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
|
||||
if (roomInfoRespBaseModel.getCode() == 1) {
|
||||
@@ -1718,7 +1797,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
||||
|
||||
MessageListenerSingleton.getInstance().quitGroup(roomId);
|
||||
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1779,7 +1859,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<MyCpRoom>>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("myCpRoom", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1846,8 +1927,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void appPay(String user_id, String money, String coin, String
|
||||
type, BaseObserver<AppPay> observer) {
|
||||
public void appPay(String user_id, String money, String coin, String type, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||
@@ -1855,13 +1935,21 @@ public class RetrofitClient {
|
||||
BaseModel<AppPay> appPayBaseModel = response.body();
|
||||
if (appPayBaseModel.getCode() == 1) {
|
||||
observer.onNext(appPayBaseModel.getData());
|
||||
}else if (appPayBaseModel.getCode() == 0){
|
||||
ToastUtils.showShort(appPayBaseModel.getMsg());
|
||||
}else if (appPayBaseModel.getCode() == 301){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<AppPay>> call, Throwable t) {
|
||||
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1904,8 +1992,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void bind(String userId, String type, String alipayAccount, String
|
||||
bank_card_number, String bank_card, String open_bank, BaseObserver<String> observer) {
|
||||
public void bind(String userId, String type, String alipayAccount, String bank_card_number, String bank_card, String open_bank, BaseObserver<String> observer) {
|
||||
sApiServer.bind(userId, type, alipayAccount, bank_card_number, bank_card, open_bank).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -1978,8 +2065,7 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
// TODO: 2025/3/15 获取主持人列表
|
||||
public void getHostList(String roomId, String
|
||||
type, BaseObserver<List<HostBean>> observer) {
|
||||
public void getHostList(String roomId, String type, BaseObserver<List<HostBean>> observer) {
|
||||
sApiServer.getHostList(roomId, type).enqueue(new Callback<BaseModel<List<HostBean>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<HostBean>>> call, Response<BaseModel<List<HostBean>>> response) {
|
||||
@@ -1998,8 +2084,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getSearch(String keyWord, String
|
||||
type, BaseObserver<List<RoomSearchResp>> observer) {
|
||||
public void getSearch(String keyWord, String type, BaseObserver<List<RoomSearchResp>> observer) {
|
||||
sApiServer.getSearch(keyWord, type).enqueue(new Callback<BaseModel<List<RoomSearchResp>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<RoomSearchResp>>> call, Response<BaseModel<List<RoomSearchResp>>> response) {
|
||||
@@ -2038,8 +2123,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getCharmList(String roomId, String stime, String etime, String
|
||||
p, BaseObserver<RoomDetails> observer) {
|
||||
public void getCharmList(String roomId, String stime, String etime, String p, BaseObserver<RoomDetails> observer) {
|
||||
sApiServer.getCharmList(roomId, stime, etime, p).enqueue(new Callback<BaseModel<RoomDetails>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<RoomDetails>> call, Response<BaseModel<RoomDetails>> response) {
|
||||
@@ -2098,26 +2182,22 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void roomAuctionJoin(String auctionId, String userId, String giftId, String
|
||||
num, String type, BaseObserver<RoomAuction.AuctionListBean> observer) {
|
||||
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new Callback<BaseModel<RoomAuction.AuctionListBean>>() {
|
||||
|
||||
public void roomAuctionJoin(String auctionId, String userId, String giftId, String num, String type, BaseObserver<RoomAuction.AuctionListBean> observer) {
|
||||
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new ApiResponseCallback<RoomAuction.AuctionListBean>(CommonAppContext.getInstance()) {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<RoomAuction.AuctionListBean>> call, Response<BaseModel<RoomAuction.AuctionListBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<RoomAuction.AuctionListBean> baseModel = response.body();
|
||||
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
public void onSuccess(RoomAuction.AuctionListBean data) {
|
||||
// 确保即使data为null也能够正确传递给observer
|
||||
if (data == null){
|
||||
data = new RoomAuction.AuctionListBean();
|
||||
}
|
||||
observer.onNext(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<RoomAuction.AuctionListBean>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
public void onFailure(Throwable t) {
|
||||
super.onFailure(t);
|
||||
RoomAuction.AuctionListBean yy=new RoomAuction.AuctionListBean();
|
||||
observer.onNext(yy);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2132,6 +2212,7 @@ public class RetrofitClient {
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("auction",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2149,7 +2230,7 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2163,7 +2244,7 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2177,7 +2258,7 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2193,7 +2274,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("editRoom",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2208,7 +2290,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("setPresidedRatio",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2224,7 +2307,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("postHostAdd",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2239,7 +2323,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("reward_zone",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2253,7 +2338,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("upSong",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2267,7 +2353,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("clearApply",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2308,7 +2395,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("helpApply",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2323,7 +2411,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("setRoomApply",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2338,13 +2427,13 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("giveGift",t);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String
|
||||
type, String pit_number, String heart_id, BaseObserver<String> observer) {
|
||||
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number, String heart_id, BaseObserver<String> observer) {
|
||||
sApiServer.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -2353,7 +2442,9 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("解析失败:roomGift", t.toString());
|
||||
observer.onNext( "");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2531,8 +2622,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void setMutePit(String roomId, String user_id, String
|
||||
isMute, BaseObserver<String> observer) {
|
||||
public void setMutePit(String roomId, String user_id, String isMute, BaseObserver<String> observer) {
|
||||
sApiServer.setMutePit(roomId, user_id, isMute).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -2541,7 +2631,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("setMutePit", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2556,7 +2647,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("setLockPit", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2570,7 +2662,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("downPit", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2584,7 +2677,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("kickOutRoom", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2598,7 +2692,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("applySong", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2612,7 +2707,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("agreeSong", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2626,7 +2722,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("endSong", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2721,6 +2818,7 @@ public class RetrofitClient {
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("changeSong", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2735,7 +2833,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("hostUserPit", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2788,7 +2887,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("topRelationCard", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2802,7 +2902,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("deleteRelationCard", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2858,7 +2959,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("setUserDecorate", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2890,7 +2992,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("publishZone", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2904,7 +3007,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("likeZone", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2918,7 +3022,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("deleteComment", t.toString());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2934,7 +3039,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("deleteZone", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2949,7 +3055,9 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("commentZone", t.toString());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2964,7 +3072,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("clearLoginInfo", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2979,13 +3088,13 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("cancel", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getPostData(String new_password, String mobile, String code, String
|
||||
userId, BaseObserver<String> observer) {
|
||||
public void getPostData(String new_password, String mobile, String code, String userId, BaseObserver<String> observer) {
|
||||
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3018,7 +3127,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("forgotPassword", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3033,7 +3143,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("createAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3048,7 +3159,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("editAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3065,7 +3177,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("editUserInfo", t.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -3078,7 +3191,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("editUserBg", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3093,7 +3207,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("userGuanz", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3107,7 +3222,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3122,14 +3238,13 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void userOnlineStatus(String user_id, String
|
||||
roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
||||
public void userOnlineStatus(String user_id, String roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
||||
sApiServer.userOnlineStatus(user_id, roomId).enqueue(new Callback<BaseModel<List<UserOnlineStatusBean>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<UserOnlineStatusBean>>> call, Response<BaseModel<List<UserOnlineStatusBean>>> response) {
|
||||
@@ -3173,7 +3288,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("removeBlackList", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3188,7 +3304,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("upAddAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3202,7 +3319,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("moveAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3231,7 +3349,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("deleteAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -3243,7 +3362,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("deleteAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3259,7 +3379,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("likeAlbum", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3273,7 +3394,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("getRealNameResult", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3287,7 +3409,8 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("changeRoom", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3301,13 +3424,13 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
ToastUtils.showShort(t.toString());
|
||||
// ToastUtils.showShort(t.toString());
|
||||
LogUtils.e("changeRoomType", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onNextRetu
|
||||
(Response<BaseModel<String>> response, BaseObserver<String> observer) {
|
||||
public void onNextRetu(Response<BaseModel<String>> response, BaseObserver<String> observer) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> string = response.body();
|
||||
if (string != null) {
|
||||
@@ -3333,8 +3456,7 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
/// 获取活动礼物列表
|
||||
public void getBoxGiftList(String giftBagId, String
|
||||
roomId, BaseObserver<BlindBoxBean> observer) {
|
||||
public void getBoxGiftList(String giftBagId, String roomId, BaseObserver<BlindBoxBean> observer) {
|
||||
sApiServer.getBoxGiftList(giftBagId, roomId).enqueue(new Callback<BaseModel<BlindBoxBean>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<BlindBoxBean>> call, Response<BaseModel<BlindBoxBean>> response) {
|
||||
@@ -3465,8 +3587,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void xlhMyRecord(String roomId, String page, String
|
||||
pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||
public void xlhMyRecord(String roomId, String page, String pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||
sApiServer.xlhMyRecord(roomId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
|
||||
@@ -3485,8 +3606,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getAllRecord(String giftBagId, String page, String
|
||||
pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||
public void getAllRecord(String giftBagId, String page, String pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||
sApiServer.getAllRecord(giftBagId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
|
||||
|
||||
@@ -21,9 +21,9 @@ public class ARouteConstants {
|
||||
public static final String CREATED_ROOM = "/modulevocal/CreatedRoomActivity"; //创建房间
|
||||
public static final String WITHDRAWAL_ACTIVITY = "/modulevocal/WithdrawalActivity"; //提现
|
||||
public static final String REAL_NAME_ACTIVITY ="/modulevocal/RealNameActivity"; //实名认证
|
||||
public static final String REAL_NAME_ACTIVITY2 ="/app/RealNameActivity"; //实名认证
|
||||
public static final String H5 ="/moduleutil/WebViewActivity"; //网页
|
||||
public static final String GIFT_WALL ="/moduleroom/UserGiftWallFragment"; //实名认证
|
||||
public static final String REAL_NAME_ACTIVITY2 ="/modulevocal/RealNameActivity"; //实名认证
|
||||
public static final String H5 ="/moduleUtil/WebViewActivity"; //网页
|
||||
// public static final String GIFT_WALL ="/moduleroom/UserGiftWallFragment"; //实名认证
|
||||
public static final String RECHARGE_ACTIVITY ="/modulevocal/RechargeActivity"; //实名认证
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.xscm.moduleutil.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
|
||||
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
||||
private static CrashHandler instance;
|
||||
private Thread.UncaughtExceptionHandler defaultHandler;
|
||||
|
||||
private CrashHandler(Context context) {
|
||||
defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
}
|
||||
|
||||
public static void init(Context context) {
|
||||
if (instance == null) {
|
||||
instance = new CrashHandler(context);
|
||||
Thread.setDefaultUncaughtExceptionHandler(instance);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread t, Throwable e) {
|
||||
// 记录崩溃日志
|
||||
Log.e("CrashHandler", "未捕获异常: " + e.getMessage());
|
||||
// 简单处理空指针
|
||||
if (e instanceof NullPointerException) {
|
||||
// 重启应用或跳转错误页
|
||||
restartApp();
|
||||
} else {
|
||||
// 交给系统默认处理
|
||||
defaultHandler.uncaughtException(t, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void restartApp() {
|
||||
// 实现应用重启逻辑
|
||||
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
||||
}
|
||||
}
|
||||
@@ -356,6 +356,7 @@ public class Constants {
|
||||
public static final String GET_APP_UPDATE = "/api/Version/get_app_version";//版本更新
|
||||
public static final String POST_CLEAR_USER_CHARM = "/api/Room/clear_user_charm";//清除魅力值
|
||||
public static final String POST_MESSAGE_LIST = "/api/UserMessage/get_user_message_list";//消息列表
|
||||
public static final String POST_BIND_DETAIL = "/api/Bind/bind_detail";//绑定详情
|
||||
public static final String POST_USER_WALL = "/api/User/user_gift_wall";//礼物墙
|
||||
public static final String POST_USER_OLINE_STATUS = "/api/Room/user_online_status";//用户在线状态
|
||||
public static final String DELETE_ROOM_HISTORY = "/api/Room/delete_room_history";//删除历史足迹
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.xscm.moduleutil.widget;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewAnimationUtils;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
|
||||
public class DropViewRoom extends LinearLayout {
|
||||
|
||||
private int rightMargin = 0;
|
||||
private float lastX, lastY;
|
||||
private int screenWidth;
|
||||
|
||||
public DropViewRoom(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public DropViewRoom(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public DropViewRoom(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
void init() {
|
||||
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//设置初始位置
|
||||
int sh = ScreenUtils.getScreenHeight();
|
||||
int sw = ScreenUtils.getScreenWidth()-100;
|
||||
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||
int y = (int) (0.5f * sh) - getHeight();
|
||||
int x = sw - getWidth();
|
||||
setTranslationX(x);
|
||||
setTranslationY(y);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
boolean starDrap = false;
|
||||
float X1;
|
||||
float X2;
|
||||
float Y1;
|
||||
float Y2;
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
if (starDrap) return true;
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
X1 = event.getX();
|
||||
Y1 = event.getY();
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
X2 = event.getX();//当手指抬起时,再次获取屏幕位置的X值
|
||||
Y2 = event.getY();//同理
|
||||
Action(X1, X2, Y1, Y2);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return starDrap;
|
||||
}
|
||||
|
||||
String TAG = "DropView";
|
||||
|
||||
public boolean Action(float X1, float X2, float Y1, float Y2) {
|
||||
float ComparedX = X2 - X1;//第二次的X坐标的位置减去第一次X坐标的位置,代表X坐标上的变化情况
|
||||
float ComparedY = Y2 - Y1;//同理
|
||||
//当X坐标的变化量的绝对值大于Y坐标的变化量的绝对值,以X坐标的变化情况作为判断依据
|
||||
//上下左右的判断,都在一条直线上,但手指的操作不可能划直线,所有选择变化量大的方向上的量
|
||||
//作为判断依据
|
||||
if (Math.abs(ComparedX) > 30 || Math.abs(ComparedY) > 30) {
|
||||
Log.i(TAG, "Action: 拖动");
|
||||
starDrap = true;
|
||||
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||
return true;
|
||||
} else {
|
||||
starDrap = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// setBackgroundResource(R.drawable.bg_home_drop_view);
|
||||
setTranslationX(getX() + (event.getX() - X1));
|
||||
setTranslationY(getY() + (event.getY() - Y1));
|
||||
X2 = event.getX();
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
starDrap = false;
|
||||
int sw = ScreenUtils.getScreenWidth();
|
||||
Log.i(TAG, "onTouchEvent: " + sw + "," + X2);
|
||||
boolean isR = getTranslationX() + getWidth() / 2 >= sw / 2;//贴边方向
|
||||
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "translationX", isR ? sw - getWidth()+10 : 0f).setDuration(200);
|
||||
anim.start();
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void doRevealAnimation(View mPuppet, boolean flag) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
int[] vLocation = new int[2];
|
||||
getLocationInWindow(vLocation);
|
||||
int centerX = vLocation[0] + getMeasuredWidth() / 2;
|
||||
int centerY = vLocation[1] + getMeasuredHeight() / 2;
|
||||
|
||||
int height = ScreenUtils.getScreenHeight();
|
||||
int width = ScreenUtils.getScreenWidth();
|
||||
int maxRradius = (int) Math.hypot(height, width);
|
||||
Log.e("hei", maxRradius + "");
|
||||
|
||||
if (flag) {
|
||||
mPuppet.setVisibility(VISIBLE);
|
||||
Animator animator = ViewAnimationUtils.createCircularReveal(mPuppet, centerX, centerY, maxRradius, 0);
|
||||
animator.setDuration(600);
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
mPuppet.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
animator.start();
|
||||
flag = false;
|
||||
} else {
|
||||
Animator animator = ViewAnimationUtils.createCircularReveal(mPuppet, centerX, centerY, 0, maxRradius);
|
||||
animator.setDuration(1000);
|
||||
animator.addListener(new Animator.AnimatorListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
mPuppet.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
|
||||
}
|
||||
});
|
||||
animator.start();
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import android.text.TextUtils;
|
||||
import com.alipay.sdk.app.PayTask;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.bean.AppPay;
|
||||
import com.xscm.moduleutil.event.PayEvent;
|
||||
@@ -112,4 +113,19 @@ public class PaymentUtil {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void payWxMiniProgram2(IWXAPI api, String path) {
|
||||
if (!api.isWXAppInstalled()) {
|
||||
ToastUtils.showShort("请安装微信");
|
||||
return;
|
||||
}
|
||||
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
|
||||
req.userName = "gh_e64a1a89a0ad"; // 填小程序原始id
|
||||
req.path = "pages/orderDetail/orderDetail?"+path; ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
|
||||
// req.path="pages/orderDetail/orderDetail?appid=00344656&body=user_Recharge_to_chumeng_App&version=12&trxamt=1¬ify_url=http://tapp.qxcms.com/api/payment/allinpayNotify&paytype=W06&randomstr=67e6671866f0e&cusid=5647950737575ZK&remark=1&reqsn=20250328529202885800&signtype=RSA&sign=O+DT6XMstf+0F8P3li/PM3lZGgam3fBqs2L6pKXUUVadd9kYiuIrbKxzrGVJ47uPWEIGV2W903nKJY+wqAnoKWvGTMMmuEsU+2gOWnDmp7X58Rw7eDDLjy0TGDxheIlMHwJmg0gOCiHGYoiJB61WQlyX4vvKZy9DOuepqnNPvC2ByeL2Vi8eRi1eqoA9PqmePzhFDz5l/EB1UOm8/XmXv4FKO7b/Im7M9cRNX3tXqbKURr5P7ohj42VF8DoYJYp7eAa3ql1GlYDJIbG+D7NGbPkp8AEKUrAShkMgNpLCnIcAGGlEhW1la8qn+/WVazH7CjUrJvqWcKMafSZcLxmMFA==";
|
||||
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
|
||||
api.sendReq(req);
|
||||
Logger.e("@@@@@","payWxMiniProgram2:"+req.path);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
||||
mCharmView.setVisibility(GONE);
|
||||
if (showBoss && TextUtils.equals(WHEAT_BOSS, pitNumber)) {
|
||||
mIvTagBoss.setVisibility(VISIBLE);
|
||||
int resId = bean.getIs_lock() == 1 ? R.mipmap.index_img_room_mask : R.drawable.room_ic_wheat_default;
|
||||
int resId = bean.getIs_lock() == 1 ? R.mipmap.index_img_room_mask : R.mipmap.room_ic_wheat_default;
|
||||
mRiv.setImageResource(resId);
|
||||
} else {
|
||||
mRiv.setImageResource(bean.getIs_lock() == 1 ? R.mipmap.index_img_room_mask : R.drawable.room_ic_wheat_default);
|
||||
mRiv.setImageResource(bean.getIs_lock() == 1 ? R.mipmap.index_img_room_mask : R.mipmap.room_ic_wheat_default);
|
||||
}
|
||||
|
||||
if (isMute()) {
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.xscm.moduleutil.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.petterp.floatingx.listener.control.IFxControl;
|
||||
import com.tencent.liteav.base.Log;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class ViewUtils {
|
||||
public static void waitUntilViewReady(@NonNull IFxControl control, @NonNull OnViewCreatedListener listener) {
|
||||
@@ -33,4 +38,28 @@ public class ViewUtils {
|
||||
public interface OnViewCreatedListener {
|
||||
void onViewCreated(@NonNull View view);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建ImageView并设置相关参数
|
||||
*/
|
||||
|
||||
public static ImageView createImageView(Context context, String url) {
|
||||
|
||||
Resources res = context.getResources();
|
||||
int imageWidth = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_42);
|
||||
int imageHeight = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_15);
|
||||
int rightMargin = res.getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5);
|
||||
ImageView imageView = new ImageView(context);
|
||||
// 设置布局参数
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(imageWidth, imageHeight);
|
||||
params.setMargins(0, 0, rightMargin, 0);
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView);
|
||||
|
||||
return imageView;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 856 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff0dffb9" />
|
||||
<solid android:color="#FC7285" />
|
||||
<corners android:radius="@dimen/dp_53"/>
|
||||
</shape>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff0dffb9" />
|
||||
<solid android:color="#FC7285" />
|
||||
<corners android:topLeftRadius="0dp" android:topRightRadius="65dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="65dp" />
|
||||
</shape>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#68DDAE"/>
|
||||
<solid android:color="#FC7285"/>
|
||||
<corners android:topLeftRadius="65dp" android:topRightRadius="65dp" android:bottomLeftRadius="65dp" android:bottomRightRadius="65dp" />
|
||||
</shape>
|
||||
@@ -2,19 +2,20 @@
|
||||
<!-- 添加阴影 -->
|
||||
<item android:bottom="0dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="0dp"/>
|
||||
<solid android:color="#c9c9c9"/> <!-- 阴影颜色 -->
|
||||
<gradient android:startColor="#80000000"
|
||||
android:endColor="#00000000"
|
||||
android:angle="90"/>
|
||||
<corners android:radius="50dp"/>
|
||||
<solid android:color="#c9c9c9"/>
|
||||
<!-- 阴影颜色 -->
|
||||
<gradient android:startColor="#80000000" android:endColor="#00000000" android:angle="90"/>
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 实际的形状 -->
|
||||
<item android:top="0dp" android:left="0dp" android:right="0dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="0dp"/>
|
||||
<solid android:color="#FFFFFF"/> <!-- 设置背景颜色 -->
|
||||
<stroke android:width="0.1dp" android:color="#c9c9c9"/> <!-- 设置灰色边框 -->
|
||||
<corners android:radius="50dp"/>
|
||||
<solid android:color="#FFFFFF"/>
|
||||
<!-- 设置背景颜色 -->
|
||||
<stroke android:width="0.1dp" android:color="#c9c9c9"/>
|
||||
<!-- 设置灰色边框 -->
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="1dp" android:color="#8865FF" />
|
||||
<stroke android:width="1dp" android:color="#FC7285" />
|
||||
<corners android:topLeftRadius="79dp" android:topRightRadius="79dp" android:bottomLeftRadius="79dp" android:bottomRightRadius="79dp" />
|
||||
</shape>
|
||||
BIN
moduleUtil/src/main/res/mipmap-hdpi/xlh_rk_bj.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 71 KiB |
@@ -244,7 +244,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
// MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ android {
|
||||
enabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:configChanges="fontScale"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -27,6 +28,9 @@ android {
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -35,6 +39,8 @@ dependencies {
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation libs.core.ktx
|
||||
implementation libs.androidx.lifecycle.viewmodel.ktx
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin-kapt'
|
||||
android {
|
||||
namespace 'com.example.moduleroom'
|
||||
compileSdk 35
|
||||
@@ -33,14 +34,24 @@ android {
|
||||
dataBinding {
|
||||
enable = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
// 与 dependencies 同级别
|
||||
kapt {
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation libs.core.ktx
|
||||
implementation libs.androidx.lifecycle.viewmodel.ktx
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
@@ -50,7 +61,8 @@ dependencies {
|
||||
|
||||
implementation 'com.alibaba:arouter-api:1.5.2'
|
||||
//annotationProcessor
|
||||
annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
|
||||
// annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
|
||||
kapt 'com.alibaba:arouter-compiler:1.5.2'
|
||||
|
||||
implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
android:name=".activity.RoomActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:launchMode="singleTask"
|
||||
android:taskAffinity=".RoomTaskAffinity"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.example.moduleroom.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.logger.Logger;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -59,24 +60,38 @@ public class RankingAutcionAdapter extends BaseQuickAdapter<RoomAuction.AuctionL
|
||||
LinearLayout llContainer =helper.getView(R.id.lli);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
List<String> images = item.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
ImageView imageView = ViewUtils.createImageView(getContext(),url);
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
// List<String> images = item.getIcon(); // 获取图片列表
|
||||
//
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.StringUtil;
|
||||
import com.xscm.moduleutil.utils.logger.Logger;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -64,23 +65,37 @@ public class RankingCharmListAdapter extends BaseQuickAdapter<CharmRankingResp,
|
||||
LinearLayout ll = helper.getView(R.id.bnv_rank_list_rich);
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
ll.removeAllViews();
|
||||
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
ll.addView(imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView = ViewUtils.createImageView(getContext(),url);
|
||||
ll.addView(imageView);
|
||||
}
|
||||
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// ll.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.example.moduleroom.R;
|
||||
import com.xscm.moduleutil.bean.RoomUserCharmListBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.MeHeadView;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -34,27 +35,42 @@ public class RoomCharmAdapter extends BaseQuickAdapter<RoomUserCharmListBean, Ba
|
||||
|
||||
LinearLayout llContainer =helper.getView(R.id.ll_in);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
if (item.getIcon() == null){
|
||||
return;
|
||||
|
||||
List<String> images = item.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
ImageView imageView = ViewUtils.createImageView(getContext(),url);
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
// if (item.getIcon() == null){
|
||||
// return;
|
||||
// }
|
||||
// List<String> images = item.getIcon(); // 获取图片列表
|
||||
//
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.example.moduleroom.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomOnlineBean;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -92,24 +93,38 @@ public class RoomOnlineAdapter extends BaseMultiItemQuickAdapter<RoomOnlineBean,
|
||||
LinearLayout llContainer = helper.getView(R.id.line);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
List<String> images = item.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(helper.itemView.getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
ImageView imageView1 = ViewUtils.createImageView(helper.itemView.getContext(),url);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
|
||||
// List<String> images = item.getIcon(); // 获取图片列表
|
||||
//
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(helper.itemView.getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, helper.itemView.getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
helper.getView(R.id.tv_status).setOnClickListener(v -> {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.example.moduleroom.dialog;
|
||||
|
||||
import static com.xscm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
@@ -17,8 +19,10 @@ import com.example.moduleroom.presenter.BidListPresenter;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
@@ -83,26 +87,39 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
LinearLayout llContainer =mBinding.llVip1;
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
||||
|
||||
List<String> images = listsBean.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
|
||||
@@ -115,23 +132,35 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
|
||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
||||
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView1 = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
@@ -145,23 +174,35 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
|
||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
||||
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView1 = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.example.moduleroom.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
@@ -35,6 +36,7 @@ import com.example.moduletablayout.listener.OnTabSelectListener;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
@@ -499,7 +501,11 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
mBinding.ivWf.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", giftDetailResp.getRule_url()).withString("title", "盲盒规则").navigation();
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", giftDetailResp.getRule_url()).withString("title", "盲盒规则").navigation();
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", giftDetailResp.getRule_url());
|
||||
intent.putExtra("title", "盲盒规则");
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -29,10 +29,13 @@ import com.xscm.moduleutil.bean.HostBean;
|
||||
import com.xscm.moduleutil.bean.RefreshEvent;
|
||||
import com.xscm.moduleutil.bean.RoomSearchResp;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/21
|
||||
@@ -127,25 +130,41 @@ public class RoomHostAddFragment extends BaseMvpDialogFragment<RoomHostPresenter
|
||||
// ImageUtils.loadImageView(item.getLevel_icon(), helper.getView(R.id.iv_rd));
|
||||
LinearLayout llContainer = helper.getView(R.id.ll);
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
if (!item.getIcon().isEmpty()||item.getIcon().size()>0){
|
||||
for (String url : item.getIcon()) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView);
|
||||
List<String> images = item.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if (!item.getIcon().isEmpty()||item.getIcon().size()>0){
|
||||
// for (String url : item.getIcon()) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView.setLayoutParams(params);
|
||||
// imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView);
|
||||
//
|
||||
// llContainer.addView(imageView);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
ShadowLayout layout = helper.getView(R.id.shadow_layout);
|
||||
// layout.setShadowColor(R.color.picture_color_fa632d);
|
||||
layout.setShadowHiddenBottom(false);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.example.moduleroom.dialog;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -24,6 +25,7 @@ import com.example.moduleroom.contacts.RoomSettingContacts;
|
||||
import com.example.moduleroom.databinding.DialogRoomSettingFragmentBinding;
|
||||
import com.example.moduleroom.fragment.RoomBackgroundDialogFragment;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.event.EffectEvent;
|
||||
@@ -282,7 +284,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId);
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/report?id=" + SpUtil.getToken() + "&fromType=" + 2 + "&fromId=" + roomId).navigation();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSubsidy) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_ALLOWANCE).withString("from", "我的界面").withString("roomId", roomInfoResp.getRoom_info().getRoom_id() + "").navigation();
|
||||
}else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen){//2025年9月22日14:10:25,添加飘屏关闭打开按钮
|
||||
@@ -355,7 +360,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
} else if (roleLevel == 2 || roleLevel == 3) { // type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl || 2025年9月19日11:21:04,将男神女神合并成互娱,最总是新添加一个标签
|
||||
if (type == RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
|
||||
if (onMic) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.example.moduleroom.fragment.RelationshipFragment;
|
||||
import com.example.moduleroom.presenter.RoomUserPresenter;
|
||||
import com.example.zhouwei.library.CustomPopWindow;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.RelationCardBean;
|
||||
@@ -202,7 +203,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
|
||||
// UserGiftWallRoomFragment.newInstance(Integer.parseInt(user_id)).show(getChildFragmentManager(), "UserGiftWallRoomFragment");
|
||||
}else if (id == R.id.room_jb){
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id);
|
||||
intent.putExtra("title", "举报");
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
}else if (id==R.id.iv_avatar){
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id()+"").navigation();
|
||||
dismiss();
|
||||
@@ -270,7 +275,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
} else if (id == R.id.action_report) {
|
||||
// showContent = "点击 Item菜单6";
|
||||
//TODO 举报功能
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url",CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url",CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id).withString("title", "举报").navigation();
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url()+ "/web/index.html#/pages/feedback/report?id="+SpUtil.getToken()+"&fromType=1&fromId="+user_id);
|
||||
intent.putExtra("title", "举报");
|
||||
startActivity(intent);
|
||||
dismiss();
|
||||
} else if (id == R.id.action_blacklist) {
|
||||
MvpPre.addBlackList(user_id);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import static com.xscm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -26,8 +28,10 @@ import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.StringUtil;
|
||||
import com.xscm.moduleutil.widget.CommonEmptyView;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -219,23 +223,36 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
private void setview(List<String> item, LinearLayout llContainer) {
|
||||
List<String> images = item; // 获取图片列表
|
||||
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView1 = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.example.moduleroom.service
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
import android.os.SystemClock
|
||||
import android.util.Log
|
||||
|
||||
|
||||
// 同时启动两个service,共享同一个NotificationID,并且将他们同时置为前台状态,
|
||||
// 此时会出现两个前台服务,但通知管理器里只有一个关联的通知。
|
||||
// 这时我们在其中一个服务中调用 stopForeground(true),
|
||||
// 这个服务前台状态会被取消,同时状态栏通知也被移除。另外一个服务并没有受到影响,还是前台服务状态,但是此时,状态栏通知已经没了!
|
||||
// 其oom_adj值还是没变的
|
||||
class CancelNoticeService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (null == intent) {
|
||||
//服务被系统kill掉之后重启进来的
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
ForegroundNotification.startForeground(this)
|
||||
Thread {
|
||||
SystemClock.sleep(1000)
|
||||
// stopForeground(true)
|
||||
Log.d("ForegroundService", "CancelNoticeService onStartCommand: CancelNoticeService" )
|
||||
ForegroundNotification.stopForeground(this)
|
||||
// stopSelf()
|
||||
}.start()
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
Log.d("ForegroundService", "onDestroy: CancelNoticeService")
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.example.moduleroom.service
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.ActivityManager
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
|
||||
fun Context.startForegroundService() {
|
||||
Intent(this, ForegroundService::class.java).also { intent ->
|
||||
if (Build.VERSION.SDK_INT >= 34) {
|
||||
this.startForegroundService(intent)
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
this.startForegroundService(intent)
|
||||
} else {
|
||||
this.startService(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun Context.hideBackground(hide: Boolean) {
|
||||
var appTasks: List<ActivityManager.AppTask>? = null
|
||||
val activityManager = getSystemService(
|
||||
Context.ACTIVITY_SERVICE
|
||||
) as? ActivityManager
|
||||
if (activityManager != null && activityManager.appTasks.also {
|
||||
appTasks = it
|
||||
} != null && appTasks?.isNotEmpty() == true) {
|
||||
appTasks?.get(0)?.setExcludeFromRecents(hide)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun Activity.ignoreBattery() {
|
||||
val intent = Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
|
||||
intent.data = Uri.parse("package:$packageName")
|
||||
startActivityForResult(intent, 1)
|
||||
}
|
||||
|
||||
fun Activity.startAccessibilitySetting() {
|
||||
runCatching {
|
||||
val intent = Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun isServiceRunning(context: Context, serviceName: String="com.voice.module_live.keepalive.ForegroundService"): Boolean {
|
||||
val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
||||
if (activityManager != null) {
|
||||
for (service in activityManager.getRunningServices(Int.MAX_VALUE)) {
|
||||
if (serviceName == service.service.className) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.example.moduleroom.service
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.*
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.getSystemService
|
||||
import com.example.moduleroom.activity.RoomActivity
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object ForegroundNotification {
|
||||
private const val CHANNEL_FOREGROUND = "foreground-notification"
|
||||
const val NOTICE_ID = 233
|
||||
private var service: Service? = null
|
||||
|
||||
private fun createChannelIfNeeded(context: Context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return
|
||||
|
||||
val foregroundChannel =
|
||||
NotificationChannel(CHANNEL_FOREGROUND, "前台服务", NotificationManager.IMPORTANCE_MIN)
|
||||
.apply {
|
||||
setShowBadge(false)
|
||||
enableLights(false)
|
||||
enableVibration(false)
|
||||
lockscreenVisibility = Notification.VISIBILITY_SECRET
|
||||
}
|
||||
context.getSystemService<NotificationManager>()
|
||||
?.createNotificationChannel(foregroundChannel)
|
||||
}
|
||||
|
||||
fun startForeground(service: Service) {
|
||||
ForegroundNotification.service = service
|
||||
createChannelIfNeeded(service)
|
||||
val pendingIntent = PendingIntent.getActivity(
|
||||
service,
|
||||
0,
|
||||
Intent(service, RoomActivity::class.java),
|
||||
PendingIntent.FLAG_IMMUTABLE
|
||||
)
|
||||
val notification = NotificationCompat.Builder(service, CHANNEL_FOREGROUND)
|
||||
.setSmallIcon(com.xscm.moduleutil.R.mipmap.ic_launcher_app)
|
||||
.setContentText("正在运行")
|
||||
.setContentIntent(pendingIntent)
|
||||
.setLocalOnly(true)
|
||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
|
||||
.setOngoing(true)
|
||||
.setShowWhen(false)
|
||||
.build()
|
||||
service.startForeground(NOTICE_ID, notification)
|
||||
}
|
||||
|
||||
fun stopForeground(service: Service) {
|
||||
val manager = service.getSystemService(Service.NOTIFICATION_SERVICE) as? NotificationManager
|
||||
manager?.cancel(NOTICE_ID)
|
||||
service.stopForeground(true)
|
||||
}
|
||||
|
||||
fun cancelNotice(service: Service) {
|
||||
val manager = service.getSystemService(Service.NOTIFICATION_SERVICE) as? NotificationManager
|
||||
manager?.cancel(NOTICE_ID)
|
||||
}
|
||||
|
||||
fun stopForeground() {
|
||||
val manager =
|
||||
service?.getSystemService(Service.NOTIFICATION_SERVICE) as? NotificationManager
|
||||
manager?.cancel(NOTICE_ID)
|
||||
service?.stopForeground(true)
|
||||
}
|
||||
|
||||
fun startForegroundIfNeed(service: Service) {
|
||||
val manager = service.getSystemService(Service.NOTIFICATION_SERVICE) as? NotificationManager
|
||||
var needStart = true
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
manager?.activeNotifications?.forEach {
|
||||
needStart = (it.id == NOTICE_ID).not()
|
||||
}
|
||||
}
|
||||
if (needStart) {
|
||||
startForeground(service)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.example.moduleroom.service
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
import android.util.Log
|
||||
import java.util.*
|
||||
|
||||
//前台服务
|
||||
class ForegroundService : Service() {
|
||||
private var logInt = 0
|
||||
private var timer: Timer? = null
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
ForegroundNotification.startForeground(this)
|
||||
timer = Timer()
|
||||
timer?.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
Log.d("ForegroundService", "Timer task ${logInt++}")
|
||||
}
|
||||
}, 0L, 300L)
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (null == intent) {
|
||||
//服务被系统kill掉之后重启进来的
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
ForegroundNotification.startForegroundIfNeed(this)
|
||||
if (ServiceHelper.cancelNotice) {
|
||||
Log.d("ForegroundService", "onStartCommand: CancelNoticeService")
|
||||
val intent = Intent(this, CancelNoticeService::class.java)
|
||||
startService(intent)
|
||||
}
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
Log.d("ForegroundService", "onDestroy: $timer")
|
||||
|
||||
timer?.cancel()
|
||||
ForegroundNotification.stopForeground(this)
|
||||
// 重启自己
|
||||
startForegroundService()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.example.moduleroom.service;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.Service;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.xscm.moduleutil.R;
|
||||
|
||||
public class RoomPlayService extends Service {
|
||||
|
||||
private NotificationManager notificationManager;
|
||||
|
||||
private String notificationId = "room_play_channelId";
|
||||
|
||||
private String notificationName = "room_play_channelName";
|
||||
|
||||
//通知的唯一标识号。
|
||||
private static final int NOTIFICATION_ID = 11210666;
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
return super.onStartCommand(intent, flags, startId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
//创建NotificationChannel
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(notificationId, notificationName, NotificationManager.IMPORTANCE_HIGH);
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
startForeground(1, getNotification());
|
||||
}
|
||||
|
||||
private Notification getNotification() {
|
||||
|
||||
// PendingIntent如果用户选择此通知,则启动我们的活动
|
||||
// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0);
|
||||
|
||||
Notification.Builder builder = new Notification.Builder(this)
|
||||
.setTicker("正在运行")
|
||||
.setSmallIcon(R.mipmap.ic_launcher_app)
|
||||
|
||||
// .setContentIntent(pendingIntent)
|
||||
|
||||
.setContentTitle(getString(R.string.app_name))
|
||||
|
||||
.setContentText("运行中");
|
||||
|
||||
//设置Notification的ChannelID,否则不能正常显示
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
builder.setChannelId(notificationId);
|
||||
}
|
||||
Notification notification = builder.build();
|
||||
|
||||
//发送通知
|
||||
// notificationManager.notify(NOTIFICATION_ID,notification);
|
||||
return notification;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (notificationManager != null) {
|
||||
notificationManager.cancel(NOTIFICATION_ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.example.moduleroom.service
|
||||
|
||||
object ServiceHelper {
|
||||
|
||||
var cancelNotice = false
|
||||
}
|
||||
@@ -93,11 +93,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/vp_room_pager">
|
||||
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_ride"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="@dimen/dp_80" />
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -482,7 +477,41 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
<com.xscm.moduleutil.widget.DropViewRoom
|
||||
android:id="@+id/xlh_rk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:paddingEnd="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:gravity="center_vertical|center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@color/transparent"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/xlh_im"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/xlh_rk_bj"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_djs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:text="倒计时:12:12"
|
||||
android:textColor="#FFEBBD"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="visible"/>
|
||||
|
||||
|
||||
</com.xscm.moduleutil.widget.DropViewRoom>
|
||||
|
||||
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||
android:id="@+id/flaoat"
|
||||
@@ -615,6 +644,14 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_ride"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="@dimen/dp_80"
|
||||
tools:layout_editor_absoluteX="-74dp"
|
||||
tools:layout_editor_absoluteY="-217dp" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
android:text="确定"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginBottom="@dimen/dp_44"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="优先通道(1/20)"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -50,7 +50,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="赠送"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -69,7 +69,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:text="等待上台(1/20)"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/recycle_view" />
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
android:background="@drawable/text_bg_x"
|
||||
android:gravity="center"
|
||||
android:text="全麦"
|
||||
android:textColor="#8865FF"
|
||||
android:textColor="#FC7285"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -130,7 +130,7 @@
|
||||
app:tl_showCateIndicator="false"
|
||||
app:tl_tab_width="@dimen/dp_50"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textSelectColor="#FC7285"
|
||||
app:tl_textSelectedSize="@dimen/sp_14"
|
||||
app:tl_textUnselectColor="#E9E9E9"
|
||||
app:tl_textsize="@dimen/sp_12" />
|
||||
@@ -176,7 +176,7 @@
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_toEndOf="@+id/tv_reward_gift"
|
||||
android:text="去充值"
|
||||
android:textColor="#0DFFB9"
|
||||
android:textColor="#FC7285"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="一键全送"
|
||||
android:textColor="#0DFFB9"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -23,12 +24,16 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.core.ktx
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
@@ -61,5 +61,8 @@ dependencies {
|
||||
//annotationProcessor
|
||||
annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
|
||||
|
||||
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
|
||||
}
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -39,7 +39,7 @@
|
||||
android:exported="false"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".activity.RealName1Activity"
|
||||
android:name=".activity.RealNameActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.RevenueActivity"
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.databinding.ActivityAboutUsBinding;
|
||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.widget.CommonAppConfig;
|
||||
@@ -17,12 +20,21 @@ public class AboutUsActivity extends BaseAppCompatActivity<ActivityAboutUsBindin
|
||||
mBinding.tvAppVersion.setText("Version " + CommonAppConfig.getInstance().getVersion());
|
||||
|
||||
mBinding.llYonghu.setOnClickListener(v -> {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6").withString("title", "用户协议").navigation();
|
||||
Intent intent = new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6");
|
||||
intent.putExtra("title", "用户协议");
|
||||
startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=6").withString("title", "用户协议").navigation();
|
||||
});
|
||||
|
||||
mBinding.llYins.setOnClickListener(v -> {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", "file:///android_asset/page_show.html").withString("title", "隐私协议").navigation();
|
||||
Intent intent = new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4");
|
||||
intent.putExtra("title", "隐私协议");
|
||||
startActivity(intent);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||
import com.example.modulevocal.databinding.ActivityBindCardBinding;
|
||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -75,6 +76,11 @@ public class BindCardActivity extends BaseMvpActivity<WithdrawalPresenter, Activ
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDetai(BindDetail bindDetail) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.example.modulevocal.databinding.ActivityBindCardDetailsBinding;
|
||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -32,6 +33,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
||||
protected void initData() {
|
||||
type=getIntent().getStringExtra("type");
|
||||
|
||||
MvpPre.bindDetai(SpUtil.getUserId()+"",type);
|
||||
if (type.equals("1")){
|
||||
mBinding.topBar.setTitle("微信绑卡");
|
||||
mBinding.cet1.setVisibility(VISIBLE);
|
||||
@@ -58,6 +60,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
||||
}
|
||||
|
||||
|
||||
|
||||
mBinding.tvSend.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -127,6 +130,47 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDetai(BindDetail bindDetail) {
|
||||
if (bindDetail!=null){
|
||||
if (type.equals("2")){
|
||||
mBinding.cet1.setText(bindDetail.getAlipay_account());
|
||||
return;
|
||||
}
|
||||
if (type.equals("3")){
|
||||
mBinding.cet2.setText(bindDetail.getBank_card_number());
|
||||
mBinding.cet3.setText(bindDetail.getBank_card());
|
||||
mBinding.cet4.setText(bindDetail.getOpen_bank());
|
||||
return;
|
||||
}
|
||||
}else {
|
||||
if (type.equals("1")){
|
||||
mBinding.topBar.setTitle("微信绑卡");
|
||||
mBinding.cet1.setVisibility(VISIBLE);
|
||||
mBinding.cet2.setVisibility(GONE);
|
||||
mBinding.cet3.setVisibility(GONE);
|
||||
mBinding.cet4.setVisibility(GONE);
|
||||
mBinding.cet1.setHint("微信账户");
|
||||
}else if (type.equals("2")){
|
||||
mBinding.topBar.setTitle("支付宝绑卡");
|
||||
mBinding.cet1.setVisibility(VISIBLE);
|
||||
mBinding.cet2.setVisibility(GONE);
|
||||
mBinding.cet3.setVisibility(GONE);
|
||||
mBinding.cet4.setVisibility(GONE);
|
||||
mBinding.cet1.setHint("支付宝账户");
|
||||
} else if (type.equals("3")) {
|
||||
mBinding.topBar.setTitle("银行卡绑卡");
|
||||
mBinding.cet1.setVisibility(GONE);
|
||||
mBinding.cet2.setVisibility(VISIBLE);
|
||||
mBinding.cet3.setVisibility(VISIBLE);
|
||||
mBinding.cet4.setVisibility(VISIBLE);
|
||||
mBinding.cet2.setHint("银行卡号");
|
||||
mBinding.cet3.setHint("所属银行");
|
||||
mBinding.cet4.setHint("银行卡开户行");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected WithdrawalPresenter bindPresenter() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.jdf.myyuliao;
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
@@ -11,9 +11,10 @@ import android.view.View;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.blankj.utilcode.util.RegexUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.RealNameConacts;
|
||||
import com.example.modulevocal.databinding.ActivityRealNameBinding;
|
||||
import com.example.modulevocal.presenter.RealNamePresenter;
|
||||
import com.jdf.myyuliao.databinding.ActivityRealNameBinding;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.RealNameBean;
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||
@@ -138,7 +139,8 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
||||
|
||||
@Override
|
||||
public void sendCodeSuccess() {
|
||||
queren();
|
||||
// queren();
|
||||
finish();
|
||||
}
|
||||
private void queren() {
|
||||
// 创建并显示确认对话框
|
||||
@@ -184,12 +186,10 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
||||
return;
|
||||
}
|
||||
if (RegexUtils.isIDCard18Exact(mBinding.edPassword.getText().toString())) {
|
||||
if (mBinding.btnSubmit.getText().toString().equals("立即认证")) {
|
||||
mBinding.stepNum1.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_11));
|
||||
mBinding.stepNum2.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_2));
|
||||
// mBinding.l1.setVisibility(View.GONE);
|
||||
// mBinding.l2.setVisibility(View.VISIBLE);
|
||||
// mBinding.btnSubmit.setText("立即认证");
|
||||
if (mBinding.btnSubmit.getText().toString().equals("确认")) {
|
||||
// mBinding.stepNum1.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_11));
|
||||
// mBinding.stepNum2.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_2));
|
||||
//
|
||||
MvpPre.realName(mBinding.edName.getText().toString(),mBinding.edPassword.getText().toString());
|
||||
} else {
|
||||
SpUtil.setRealName(true);
|
||||
@@ -2,6 +2,9 @@ package com.example.modulevocal.activity;
|
||||
|
||||
import static com.xscm.moduleutil.utils.permission.PermissionUtils.TAG;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -12,8 +15,12 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXWebpageObject;
|
||||
import com.xscm.moduleutil.adapter.PayMethodAdapter;
|
||||
import com.xscm.moduleutil.adapter.BalanceRechargeAdapter;
|
||||
import com.example.modulevocal.conacts.RechargeConactos;
|
||||
@@ -111,6 +118,8 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
||||
return;
|
||||
}
|
||||
MvpPre.appPay(SpUtil.getUserId() + "", money, coin, selectedItem.getType());
|
||||
// openUrlInWeChat("https://wxjs.980city.com/pay/jspay/2025100920433985593/");
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", "https://wxjs.980city.com/pay/jspay/2025100920433985593/").navigation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,13 +184,50 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
||||
if (appPay.getAli()!=null) {
|
||||
PaymentUtil.payAlipay(this, appPay.getAli());
|
||||
}else if (appPay.getWx()!=null){
|
||||
|
||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
PaymentUtil.payWxMiniProgram2(wxapi,appPay);
|
||||
}else if (appPay.getXlx()!=null){
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", appPay.getXlx()).navigation();
|
||||
openInExternalBrowser(appPay.getXlx());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void openInExternalBrowser(String url) {
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(url));
|
||||
// 确保在新任务中打开
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
ToastUtils.showShort("无法找到浏览器应用");
|
||||
}
|
||||
}
|
||||
|
||||
private void openUrlInWeChat(String url) {
|
||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
|
||||
if (!wxapi.isWXAppInstalled()) {
|
||||
ToastUtils.showShort("未安装微信");
|
||||
return;
|
||||
}
|
||||
|
||||
WXWebpageObject webpage = new WXWebpageObject();
|
||||
webpage.webpageUrl = url;
|
||||
|
||||
WXMediaMessage msg = new WXMediaMessage(webpage);
|
||||
msg.title = "支付页面";
|
||||
msg.description = "点击打开支付页面";
|
||||
|
||||
SendMessageToWX.Req req = new SendMessageToWX.Req();
|
||||
req.transaction = String.valueOf(System.currentTimeMillis());
|
||||
req.message = msg;
|
||||
req.scene = SendMessageToWX.Req.WXSceneSession;
|
||||
|
||||
wxapi.sendReq(req);
|
||||
}
|
||||
|
||||
public void onResp(BaseResp resp){
|
||||
if(resp.getType()== ConstantsAPI.COMMAND_PAY_BY_WX){
|
||||
Log.d(TAG,"onPayFinish,errCode="+resp.errCode);
|
||||
@@ -208,6 +254,15 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
||||
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
||||
allData.add(bindType.getWx_tl());
|
||||
}
|
||||
if (bindType.getXlx_wx().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_wx());
|
||||
}
|
||||
if (bindType.getXlx_ali().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_ali());
|
||||
}
|
||||
if (bindType.getXlx_bank().getIs_pay_open().equals("1")){
|
||||
allData.add(bindType.getXlx_bank());
|
||||
}
|
||||
|
||||
bindTypeAdapter.setNewData(allData);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.example.modulevocal.activity;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||
@@ -11,6 +12,7 @@ import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.databinding.ActivityUnderageBinding;
|
||||
import com.example.modulevocal.presenter.UnderagePresenter;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
@@ -190,8 +192,14 @@ public class UnderageActivity extends BaseMvpActivity<UnderagePresenter, Activit
|
||||
private void navigateToNextPage() {
|
||||
// ToastUtils.showShort("密码设置成功");
|
||||
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
||||
.withString("type", "1").navigation();
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
||||
// .withString("type", "1").navigation();
|
||||
Intent intent = new Intent(UnderageActivity.this, WebViewActivity.class);
|
||||
intent.putExtra("type", "1");
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken());
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
mBinding.verificationcodeview.setText("");
|
||||
finish();
|
||||
// 这里可以添加页面跳转逻辑
|
||||
|
||||
@@ -19,6 +19,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.example.modulevocal.R;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.adapter.PayMethodAdapter;
|
||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||
import com.example.modulevocal.databinding.ActivityWithdrawalBinding;
|
||||
@@ -26,6 +27,7 @@ import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -102,7 +104,11 @@ public class WithdrawalActivity extends BaseMvpActivity<WithdrawalPresenter, Act
|
||||
});
|
||||
|
||||
mBinding.tvLhjy.setOnClickListener(v -> {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url",walletBean.getUrl()).withString("title", walletBean.getTitle()).navigation();
|
||||
Intent intent = new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", walletBean.getUrl());
|
||||
intent.putExtra("title", walletBean.getTitle());
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url",walletBean.getUrl()).withString("title", walletBean.getTitle()).navigation();
|
||||
|
||||
});
|
||||
|
||||
@@ -339,4 +345,9 @@ public class WithdrawalActivity extends BaseMvpActivity<WithdrawalPresenter, Act
|
||||
public void withdrawalList(List<WithdrawalBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDetai(BindDetail bindDetail) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||
import com.example.modulevocal.databinding.ActivityWithdrawalListBinding;
|
||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -89,4 +90,9 @@ public class WithdrawalListActivity extends BaseMvpActivity<WithdrawalPresenter,
|
||||
public void withdrawalList(List<WithdrawalBean> list) {
|
||||
adapter.setNewData(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDetai(BindDetail bindDetail) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.MeHeadView;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
@@ -96,23 +97,37 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
||||
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView1 = ViewUtils.createImageView(getContext(),url);
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView1 = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView1.setLayoutParams(params);
|
||||
// imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView1);
|
||||
//
|
||||
// llContainer.addView(imageView1);
|
||||
// }
|
||||
// }
|
||||
|
||||
headView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -22,6 +23,8 @@ public final class WithdrawalConacts {
|
||||
|
||||
void withdrawal(String s);
|
||||
void withdrawalList(List<WithdrawalBean> list);
|
||||
|
||||
void bindDetai(BindDetail bindDetail);
|
||||
}
|
||||
|
||||
public interface IMePre extends IPresenter {
|
||||
@@ -37,5 +40,7 @@ public final class WithdrawalConacts {
|
||||
void withdrawal(String number,String type,String sms_code);
|
||||
|
||||
void withdrawalList(String page,String page_limit,String search_stime,String search_etime);
|
||||
|
||||
void bindDetai(String userId,String type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.example.modulevocal.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@@ -35,9 +36,11 @@ import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -124,25 +127,39 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
||||
LinearLayout llContainer = mBinding.headerInfo.llImageContainer;
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||
List<String> images = userInfo.getIcon(); // 获取图片列表
|
||||
// List<String> images = userInfo.getIcon(); // 获取图片列表
|
||||
|
||||
List<String> images = userInfo.getIcon();
|
||||
if (images == null || images.isEmpty()) {
|
||||
return; // 提前返回,减少嵌套层级
|
||||
}
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView);
|
||||
if (!url.contains("http")) {
|
||||
continue; // 跳过非HTTP链接
|
||||
}
|
||||
|
||||
ImageView imageView = ViewUtils.createImageView(requireContext(),url);
|
||||
llContainer.addView(imageView);
|
||||
}
|
||||
}
|
||||
|
||||
// for (String url : images) {
|
||||
// if (url.contains("http")) {
|
||||
// ImageView imageView = new ImageView(getContext());
|
||||
// LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_74),
|
||||
// getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_17)
|
||||
// );
|
||||
// params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
// imageView.setLayoutParams(params);
|
||||
// imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//
|
||||
// // 使用 Glide 加载图片
|
||||
// ImageUtils.loadHeadCC(url, imageView);
|
||||
//
|
||||
// llContainer.addView(imageView);
|
||||
// }
|
||||
// }
|
||||
mBinding.headerInfo.recycleView2.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||
|
||||
adapter = new BaseQuickAdapter<UserTagBean, BaseViewHolder>(R.layout.item_tag, userTagBeans) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.example.modulevocal.presenter;
|
||||
import android.content.Context;
|
||||
|
||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||
import com.xscm.moduleutil.bean.BindDetail;
|
||||
import com.xscm.moduleutil.bean.BindType;
|
||||
import com.xscm.moduleutil.bean.WalletBean;
|
||||
import com.xscm.moduleutil.bean.WalletConfig;
|
||||
@@ -10,13 +11,17 @@ import com.xscm.moduleutil.bean.WithdrawalBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> implements WithdrawalConacts.IMePre {
|
||||
|
||||
WithdrawalConacts.View mView;
|
||||
public WithdrawalPresenter(WithdrawalConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
this.mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,6 +34,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(WalletBean walletBean) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().wallet(walletBean);
|
||||
}
|
||||
});
|
||||
@@ -44,6 +52,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(BindType bindType) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().bindType(bindType);
|
||||
}
|
||||
});
|
||||
@@ -59,6 +70,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(WalletConfig walletConfig) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getWalletConfig(walletConfig);
|
||||
}
|
||||
});
|
||||
@@ -74,6 +88,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().bind();
|
||||
}
|
||||
});
|
||||
@@ -107,6 +124,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().withdrawal(s);
|
||||
}
|
||||
});
|
||||
@@ -122,8 +142,29 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(List<WithdrawalBean> withdrawalBeans) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().withdrawalList(withdrawalBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindDetai(String userId, String type) {
|
||||
api.bindDetai(userId, type, new BaseObserver<BindDetail>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BindDetail bindDetail) {
|
||||
if (MvpRef == null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().bindDetai(bindDetail);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
tools:context=".activity.RealNameActivity">
|
||||
tools:context="com.example.modulevocal.activity.RealNameActivity">
|
||||
|
||||
<data>
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r9_fffff"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- 第一步:验证手机号 -->
|
||||
<LinearLayout
|
||||
@@ -239,7 +240,7 @@
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:gravity="center"
|
||||
android:text="下一步"
|
||||
android:text="确认"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
@@ -34,7 +34,7 @@ android {
|
||||
enabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
jvmTarget = '11'
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.example.modulevoice.fragment;
|
||||
import static android.view.View.GONE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -29,6 +30,7 @@ import com.example.modulevoice.databinding.FragmentVoiceCategoryBinding;
|
||||
import com.example.modulevoice.presenter.VoiceCategoryPresenter;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.base.RoomManager;
|
||||
import com.xscm.moduleutil.bean.BannerModel;
|
||||
@@ -126,7 +128,12 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
|
||||
* type=1时,该值表示房间id;type=2时,表示文章id
|
||||
*/
|
||||
BannerModel bannerModel = (BannerModel) model;
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", bannerModel.getUrl()).withString("title", "首页横幅").navigation();
|
||||
// BannerModel bannerModel = (BannerModel) model;
|
||||
Intent intent=new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", bannerModel.getUrl());
|
||||
intent.putExtra("title", "首页横幅");
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", bannerModel.getUrl()).withString("title", "首页横幅").navigation();
|
||||
}
|
||||
});
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
|
||||
1
muduleactivity/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -30,9 +31,14 @@ android {
|
||||
res.srcDirs += "src/main/res-serious"
|
||||
}
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.core.ktx
|
||||
|
||||
/*plugin-build-Begin
|
||||
|
||||
compileOnly fileTree(include: ['*.jar','*.aar'], dir: '../../../../tuikit/android/libs')
|
||||
|
||||