Compare commits
5 Commits
aa26d9f9f5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 01f09a0895 | |||
| d793c65471 | |||
| 61cd9616b9 | |||
| c125f78353 | |||
| 4d58e96c43 |
12
.idea/misc.xml
generated
@@ -1,11 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
<component name="NullableNotNullManager">
|
<component name="NullableNotNullManager">
|
||||||
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
|
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
|
||||||
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
||||||
<option name="myNullables">
|
<option name="myNullables">
|
||||||
<value>
|
<value>
|
||||||
<list size="15">
|
<list size="17">
|
||||||
<item index="0" class="java.lang.String" itemvalue="org.jspecify.annotations.Nullable" />
|
<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="1" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||||
<item index="2" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
<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="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="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="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>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
<option name="myNotNulls">
|
<option name="myNotNulls">
|
||||||
<value>
|
<value>
|
||||||
<list size="15">
|
<list size="17">
|
||||||
<item index="0" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
<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="1" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||||
<item index="2" class="java.lang.String" itemvalue="org.jspecify.annotations.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="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
|
||||||
<item index="13" class="java.lang.String" itemvalue="android.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="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>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '17'
|
jvmTarget = '11'
|
||||||
}
|
}
|
||||||
dexOptions {
|
dexOptions {
|
||||||
dexInProcess true
|
dexInProcess true
|
||||||
@@ -144,8 +144,6 @@ dependencies {
|
|||||||
implementation files('libs/logger-2.2.2-release.aar')
|
implementation files('libs/logger-2.2.2-release.aar')
|
||||||
implementation files('libs/main-2.2.3-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)
|
implementation(libs.arouter.api.v150)
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
"type": "APK",
|
"type": "APK",
|
||||||
"kind": "Directory"
|
"kind": "Directory"
|
||||||
},
|
},
|
||||||
"applicationId": "com.xscm.midi",
|
"applicationId": "com.jdf.myyuliao",
|
||||||
"variantName": "release",
|
"variantName": "release",
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 101,
|
"versionCode": 4,
|
||||||
"versionName": "1.0.5",
|
"versionName": "1.0.0.2",
|
||||||
"outputFile": "秘地_1.0.5_101.apk"
|
"outputFile": "MY语聊1.0.0.2_4.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"elementType": "File",
|
"elementType": "File",
|
||||||
@@ -22,14 +22,14 @@
|
|||||||
"minApi": 28,
|
"minApi": 28,
|
||||||
"maxApi": 30,
|
"maxApi": 30,
|
||||||
"baselineProfiles": [
|
"baselineProfiles": [
|
||||||
"baselineProfiles/1/秘地_1.0.5_101.dm"
|
"baselineProfiles/1/MY语聊1.0.0.2_4.dm"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"minApi": 31,
|
"minApi": 31,
|
||||||
"maxApi": 2147483647,
|
"maxApi": 2147483647,
|
||||||
"baselineProfiles": [
|
"baselineProfiles": [
|
||||||
"baselineProfiles/0/秘地_1.0.5_101.dm"
|
"baselineProfiles/0/MY语聊1.0.0.2_4.dm"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- com.xscm.action.LAUNCH_PAGE-->
|
<!-- com.xscm.action.LAUNCH_PAGE-->
|
||||||
<intent-filter>
|
<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" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
@@ -200,9 +200,7 @@
|
|||||||
android:taskAffinity="com.xscm.qxlive"
|
android:taskAffinity="com.xscm.qxlive"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".RealNameActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".PasswordLoginActivity"
|
android:name=".PasswordLoginActivity"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
|||||||
import com.jdf.myyuliao.databinding.ActivityLaunchPageBinding;
|
import com.jdf.myyuliao.databinding.ActivityLaunchPageBinding;
|
||||||
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
||||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.AppStateListener;
|
import com.xscm.moduleutil.base.AppStateListener;
|
||||||
import com.xscm.moduleutil.base.AppStateManager;
|
import com.xscm.moduleutil.base.AppStateManager;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
@@ -37,8 +38,13 @@ public class LaunchPageActivity extends BaseAppCompatActivity<ActivityLaunchPage
|
|||||||
if (!isTaskRoot()) {
|
if (!isTaskRoot()) {
|
||||||
|
|
||||||
if (SpUtil.getUnderagePassword() != null && !SpUtil.getUnderagePassword().isEmpty()) {
|
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())
|
// 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:青少年模式
|
// .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 {
|
} else {
|
||||||
// 如果没有设置青少年模式,应该导航到首页
|
// 如果没有设置青少年模式,应该导航到首页
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -23,11 +23,20 @@ buildscript {
|
|||||||
// classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
|
// classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.android.library) apply false
|
alias(libs.plugins.android.library) apply false
|
||||||
alias(libs.plugins.kotlin.android) 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) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ isBuildModule=false
|
|||||||
#org.gradle.deamon=false
|
#org.gradle.deamon=false
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.0
|
APP_VERSION_NAME=1.0.0.2
|
||||||
APP_VERSION_CODE=1
|
APP_VERSION_CODE=3
|
||||||
|
|
||||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||||
@@ -51,4 +51,7 @@ org.gradle.caching=false
|
|||||||
kapt.incremental.apt=false
|
kapt.incremental.apt=false
|
||||||
|
|
||||||
# 或者禁用特定模块的增量编译
|
# 或者禁用特定模块的增量编译
|
||||||
#org.gradle.configureondemand=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"
|
wechatSdkAndroid = "6.8.30"
|
||||||
xbanner = "1.7.0"
|
xbanner = "1.7.0"
|
||||||
appcompatVersion = "1.3.1"
|
appcompatVersion = "1.3.1"
|
||||||
|
lifecycleViewmodelKtxVersion = "2.2.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
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" }
|
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
||||||
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
||||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompatVersion" }
|
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]
|
[plugins]
|
||||||
|
|||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,8 @@
|
|||||||
#Mon Sep 22 21:05:11 CST 2025
|
#Mon Sep 22 21:05:11 CST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/distsl.
|
zipStorePath=wrapper/distsl.
|
||||||
|
distributionUrl=file:///D:/Gradle/gradle-8.10.2-bin.zip
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.xscm.modulelogin.activity;
|
package com.xscm.modulelogin.activity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.blankj.utilcode.util.ToastUtils;
|
|||||||
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
import com.xscm.modulelogin.activity.ImproveInfoActivity;
|
||||||
import com.xscm.modulelogin.activity.SwitchAccountsActivity;
|
import com.xscm.modulelogin.activity.SwitchAccountsActivity;
|
||||||
import com.xscm.modulemain.activity.MainActivity;
|
import com.xscm.modulemain.activity.MainActivity;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.bean.ThemeBean;
|
import com.xscm.moduleutil.bean.ThemeBean;
|
||||||
import com.xscm.moduleutil.bean.UserBean;
|
import com.xscm.moduleutil.bean.UserBean;
|
||||||
@@ -264,10 +265,20 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ysxl() {
|
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() {
|
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() {
|
private BroadcastReceiver mLogoutReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
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更新
|
// 在这里处理用户登出后的UI更新
|
||||||
// 例如:隐藏需要登录才能显示的控件
|
// 例如:隐藏需要登录才能显示的控件
|
||||||
// 或者跳转到登录状态的页面
|
// 或者跳转到登录状态的页面
|
||||||
@@ -131,7 +131,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
ColorManager.getInstance().addColorChangeListener(this);
|
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);
|
registerReceiver(mLogoutReceiver, filter);
|
||||||
|
|
||||||
// 动态判断是否包含 @Subscribe 注解的方法
|
// 动态判断是否包含 @Subscribe 注解的方法
|
||||||
@@ -421,7 +421,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
mqttMessageQueue.addAll(mqttBean.getList());
|
mqttMessageQueue.addAll(mqttBean.getList());
|
||||||
// if (!isMqttPlaying) {
|
// if (!isMqttPlaying) {
|
||||||
// isMqttPlaying = true;
|
// isMqttPlaying = true;
|
||||||
processNextMqttMessage();
|
processNextMqttMessage();
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
@@ -670,7 +670,7 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
onAnimationEnd.run();
|
onAnimationEnd.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 添加获取屏幕宽度的方法
|
// 添加获取屏幕宽度的方法
|
||||||
private int getScreenWidth() {
|
private int getScreenWidth() {
|
||||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
if (getWindowManager() != null) {
|
if (getWindowManager() != null) {
|
||||||
@@ -766,7 +766,10 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEvent(ChatInfo event) {
|
public void onEvent(ChatInfo event) {
|
||||||
String id = event.getId().replace("g", "");
|
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.GONE;
|
||||||
import static android.view.View.VISIBLE;
|
import static android.view.View.VISIBLE;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
|||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.RoomManager;
|
import com.xscm.moduleutil.base.RoomManager;
|
||||||
import com.xscm.moduleutil.bean.NewsMessageList;
|
import com.xscm.moduleutil.bean.NewsMessageList;
|
||||||
import com.xscm.moduleutil.databinding.ActivityOfficialNoticeBinding;
|
import com.xscm.moduleutil.databinding.ActivityOfficialNoticeBinding;
|
||||||
@@ -30,6 +32,7 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
|||||||
private int page = 1;
|
private int page = 1;
|
||||||
private BaseQuickAdapter<NewsMessageList, BaseViewHolder> mAdapter;
|
private BaseQuickAdapter<NewsMessageList, BaseViewHolder> mAdapter;
|
||||||
private String type;
|
private String type;
|
||||||
|
private boolean isRefresh = true; // 添加标志位区分刷新和加载更多
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
@@ -46,12 +49,14 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
|||||||
@Override
|
@Override
|
||||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||||
page++;
|
page++;
|
||||||
|
isRefresh = false; // 设置为加载更多模式
|
||||||
MvpPre.getMessagetitle(type, page + "", "10");
|
MvpPre.getMessagetitle(type, page + "", "10");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||||
page = 1;
|
page = 1;
|
||||||
|
isRefresh = true; // 设置为刷新模式
|
||||||
MvpPre.getMessagetitle(type, page + "", "10");
|
MvpPre.getMessagetitle(type, page + "", "10");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -79,7 +84,10 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
|||||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id()+"","");
|
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id()+"","");
|
||||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", item.getRoom_id() + "").navigation();
|
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("roomId", item.getRoom_id() + "").navigation();
|
||||||
}else if (item.getRoom_id() == 0 && item.getUrl() != null && !item.getUrl().isEmpty()){
|
}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
|
@Override
|
||||||
public void showNews(List<NewsMessageList> newsList) {
|
public void showNews(List<NewsMessageList> newsList) {
|
||||||
mAdapter.setNewData(newsList);
|
if (isRefresh) {
|
||||||
|
// 下拉刷新
|
||||||
|
mAdapter.setNewData(newsList);
|
||||||
|
} else {
|
||||||
|
if (newsList != null) {
|
||||||
|
// 上拉加载更多
|
||||||
|
mAdapter.addData(newsList);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadDataIfNeeded(String id, int type, String roomId) {
|
public void loadDataIfNeeded(String id, int type, String roomId) {
|
||||||
if (MvpPre==null){
|
if (MvpPre == null) {
|
||||||
MvpPre = new RewardGiftPresenter(this, getActivity());
|
MvpPre = new RewardGiftPresenter(this, getActivity());
|
||||||
}
|
}
|
||||||
if (id.equals("0")) {
|
if (id.equals("0")) {
|
||||||
@@ -100,7 +100,7 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onString(GiftPackEvent event) {
|
public void onString(GiftPackEvent event) {
|
||||||
if (event!=null && event.getBdid()!=null) {
|
if (event != null && event.getBdid() != null) {
|
||||||
bdgiftId = event.getBdid();
|
bdgiftId = event.getBdid();
|
||||||
MvpPre.giftPack();
|
MvpPre.giftPack();
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
if (type==0){
|
if (type == 0) {
|
||||||
MvpPre.getGiftList("0", type, roomId);
|
MvpPre.getGiftList("0", type, roomId);
|
||||||
}
|
}
|
||||||
// if (id.equals("0")) {
|
// if (id.equals("0")) {
|
||||||
@@ -159,7 +159,12 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
@Override
|
@Override
|
||||||
public void setGiftList(List<RoonGiftModel> data, int type) {
|
public void setGiftList(List<RoonGiftModel> data, int type) {
|
||||||
giftList = new ArrayList<>();
|
giftList = new ArrayList<>();
|
||||||
|
if (data == null) {
|
||||||
|
data = new ArrayList<>();
|
||||||
|
return;
|
||||||
|
}
|
||||||
giftList.addAll(data);
|
giftList.addAll(data);
|
||||||
|
|
||||||
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
pageCount = (int) Math.ceil(data.size() * 1.0 / pageSize);
|
||||||
|
|
||||||
// 只需要创建一次Adapter并设置,循环设置没有意义
|
// 只需要创建一次Adapter并设置,循环设置没有意义
|
||||||
@@ -219,7 +224,6 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton;
|
|||||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||||
import com.xscm.moduleutil.service.MqttConnect;
|
import com.xscm.moduleutil.service.MqttConnect;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
|
import com.xscm.moduleutil.utils.CrashHandler;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.utils.UtilConfig;
|
import com.xscm.moduleutil.utils.UtilConfig;
|
||||||
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
|
import com.xscm.moduleutil.utils.config.EnvironmentEnum;
|
||||||
@@ -96,6 +97,11 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
public String playId;
|
public String playId;
|
||||||
public String lable_id;
|
public String lable_id;
|
||||||
public boolean isMicPlace;
|
public boolean isMicPlace;
|
||||||
|
|
||||||
|
public boolean isShowAg;
|
||||||
|
|
||||||
|
public boolean isRoomJoininj=false;
|
||||||
|
|
||||||
public String playCover;
|
public String playCover;
|
||||||
public boolean showSelf;//盲盒是否能送自己
|
public boolean showSelf;//盲盒是否能送自己
|
||||||
public String playName;
|
public String playName;
|
||||||
@@ -125,8 +131,6 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
@Getter
|
@Getter
|
||||||
public UnreadCountEvent unreadCountEvent;
|
public UnreadCountEvent unreadCountEvent;
|
||||||
|
|
||||||
public boolean isShowAg;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
@@ -142,6 +146,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
startListeningUnreadMessageCount();
|
startListeningUnreadMessageCount();
|
||||||
// 全局设置字体不缩放
|
// 全局设置字体不缩放
|
||||||
adjustFontScale(getResources().getConfiguration());
|
adjustFontScale(getResources().getConfiguration());
|
||||||
|
CrashHandler.init(this);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,8 +219,69 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
event.setALong(unreadCount);
|
event.setALong(unreadCount);
|
||||||
// 使用EventBus通知
|
// 使用EventBus通知
|
||||||
CommonAppContext.getInstance().setUnreadCountEvent(event);
|
CommonAppContext.getInstance().setUnreadCountEvent(event);
|
||||||
EventBus.getDefault().post(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);
|
// 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();
|
mqttConnect.mqttClient();
|
||||||
|
|
||||||
// 每次启动应用时重置状态
|
// 每次启动应用时重置状态
|
||||||
@@ -672,9 +739,9 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
SpUtil.setBooleanValue("youth_model_shown", false);
|
SpUtil.setBooleanValue("youth_model_shown", false);
|
||||||
|
|
||||||
// 发送广播通知所有Activity刷新状态
|
// 发送广播通知所有Activity刷新状态
|
||||||
Intent refreshIntent = new Intent("com.jdf.moduleutil.ACTION_USER_LOGOUT");
|
Intent refreshIntent = new Intent("com.xscm.moduleutil.ACTION_USER_LOGOUT");
|
||||||
sendBroadcast(refreshIntent);
|
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);
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
getApplicationContext().startActivity(intent);
|
getApplicationContext().startActivity(intent);
|
||||||
}
|
}
|
||||||
@@ -779,7 +846,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
if (appStateListener != null && appStateListener.isFloatingWindowVisible()) {
|
if (appStateListener != null && appStateListener.isFloatingWindowVisible()) {
|
||||||
// 有悬浮窗,直接回到首页
|
// 有悬浮窗,直接回到首页
|
||||||
// if (!className.contains("MainActivity")) {
|
// if (!className.contains("MainActivity")) {
|
||||||
ARouter.getInstance().build(ARouteConstants.ME).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP).navigation();
|
ARouter.getInstance().build(ARouteConstants.ME).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP).navigation();
|
||||||
// }
|
// }
|
||||||
} else if (appStateListener != null && appStateListener.shouldShowSplash()) {
|
} else if (appStateListener != null && appStateListener.shouldShowSplash()) {
|
||||||
// 需要显示启动页
|
// 需要显示启动页
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package com.xscm.moduleutil.base;
|
package com.xscm.moduleutil.base;
|
||||||
|
|
||||||
|
import static android.app.PendingIntent.getActivity;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
@@ -110,7 +113,10 @@ public class RoomManager {
|
|||||||
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
|
public void fetchRoomDataAndEnter(Context context, String roomId, String password) {
|
||||||
// 显示加载提示
|
// 显示加载提示
|
||||||
// 这里可以根据需要添加加载对话框
|
// 这里可以根据需要添加加载对话框
|
||||||
|
if (CommonAppContext.getInstance().isRoomJoininj){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=true;
|
||||||
// 检查是否有有效的缓存数据
|
// 检查是否有有效的缓存数据
|
||||||
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
|
// RoomInfoResp roomInfo = getCachedRoomData(roomId);
|
||||||
// 检查是否是当前房间且用户在线
|
// 检查是否是当前房间且用户在线
|
||||||
@@ -119,7 +125,11 @@ public class RoomManager {
|
|||||||
fetchAndJoinRoom(context, roomId, password);
|
fetchAndJoinRoom(context, roomId, password);
|
||||||
} else {
|
} else {
|
||||||
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
if (!CommonAppContext.getInstance().playId.equals(roomId)) {
|
||||||
|
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
||||||
exitRoom(CommonAppContext.getInstance().playId);
|
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")) {
|
} else if (CommonAppContext.getInstance().lable_id.equals("6")) {
|
||||||
upInfo(context, roomId, password, true, null, true);
|
upInfo(context, roomId, password, true, null, true);
|
||||||
return;
|
return;
|
||||||
@@ -241,7 +251,7 @@ public class RoomManager {
|
|||||||
*/
|
*/
|
||||||
private void fetchAndJoinRoom(Context context, String roomId, String password) {
|
private void fetchAndJoinRoom(Context context, String roomId, String password) {
|
||||||
// 获取房间数据
|
// 获取房间数据
|
||||||
MessageListenerSingleton.getInstance().joinGroup(roomId);
|
|
||||||
// 等待一段时间确保退出完成
|
// 等待一段时间确保退出完成
|
||||||
try {
|
try {
|
||||||
Thread.sleep(300);
|
Thread.sleep(300);
|
||||||
@@ -330,7 +340,6 @@ public class RoomManager {
|
|||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(ARouteConstants.ROOM_DETAILS)
|
.build(ARouteConstants.ROOM_DETAILS)
|
||||||
.with(bundle)
|
.with(bundle)
|
||||||
.withFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
|
||||||
.navigation(context);
|
.navigation(context);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -394,11 +403,11 @@ public class RoomManager {
|
|||||||
// 可以通过检查Agora是否还在房间中,或者通过服务端接口查询用户状态等方式实现
|
// 可以通过检查Agora是否还在房间中,或者通过服务端接口查询用户状态等方式实现
|
||||||
// 目前返回false,需要根据实际需求实现具体逻辑
|
// 目前返回false,需要根据实际需求实现具体逻辑
|
||||||
// boolean isCurrentRoom=isCurrentRoom(roomId);
|
// boolean isCurrentRoom=isCurrentRoom(roomId);
|
||||||
try {
|
// try {
|
||||||
Thread.sleep(300);
|
// Thread.sleep(300);
|
||||||
} catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
// Thread.currentThread().interrupt();
|
||||||
}
|
// }
|
||||||
final boolean[] isOnline = {false};
|
final boolean[] isOnline = {false};
|
||||||
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
|
RetrofitClient.getInstance().getRoomOnline(roomId, "1", "50", new BaseObserver<RoomOnline>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import lombok.Data;
|
|||||||
public class AppPay {
|
public class AppPay {
|
||||||
private String ali;
|
private String ali;
|
||||||
private WxBean wx;
|
private WxBean wx;
|
||||||
|
private String xlx;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class WxBean {
|
public static class WxBean {
|
||||||
@@ -20,4 +21,14 @@ public class AppPay {
|
|||||||
private String timestamp;
|
private String timestamp;
|
||||||
private String sign;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.xscm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/9/25
|
||||||
|
*@description: 绑定详情
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BindDetail {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String alipay_name;//支付宝姓名
|
||||||
|
private String alipay_account;//支付宝账户
|
||||||
|
|
||||||
|
private String bank_card_number;//银行卡号
|
||||||
|
|
||||||
|
private String bank_user_name;//姓名
|
||||||
|
private String bank_card;//所属行
|
||||||
|
private String open_bank;//开户行
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,6 +14,9 @@ public class BindType {
|
|||||||
private AllData bank;
|
private AllData bank;
|
||||||
private AllData ali_tl;
|
private AllData ali_tl;
|
||||||
private AllData wx_tl;
|
private AllData wx_tl;
|
||||||
|
private AllData xlx_wx;
|
||||||
|
private AllData xlx_ali;
|
||||||
|
private AllData xlx_bank;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class RoomMessageEvent {
|
|||||||
private int count;//排麦模式下的人数
|
private int count;//排麦模式下的人数
|
||||||
private int step ; //1:等待邂逅 2:心动连线 3:牵手良缘
|
private int step ; //1:等待邂逅 2:心动连线 3:牵手良缘
|
||||||
private int friend_id; //场次id
|
private int friend_id; //场次id
|
||||||
// private List<FriendInfo.HeartList> list;//交友心动值发生变化
|
// private List<FriendInfo.HeartList> list;//交友心动值发生变化
|
||||||
private List<UserInfo> list;//交友房麦位发生变化 //推送的事麦上用户信息,这里使用了userinfo接收的
|
private List<UserInfo> list;//交友房麦位发生变化 //推送的事麦上用户信息,这里使用了userinfo接收的
|
||||||
|
|
||||||
private FriendUserBean friend_user;//这是推送过来需要卡关系的数据
|
private FriendUserBean friend_user;//这是推送过来需要卡关系的数据
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class BlindBoxBean {
|
|||||||
private int is_xlh; ///是否开启巡乐会 0 关闭 1 开启
|
private int is_xlh; ///是否开启巡乐会 0 关闭 1 开启
|
||||||
private Object xlh_data;
|
private Object xlh_data;
|
||||||
private List<GiftBean> gift_list;
|
private List<GiftBean> gift_list;
|
||||||
|
private String end_time;//巡乐会结束时间
|
||||||
|
|
||||||
private GiveGift give_homeowner_gift;//房主礼物
|
private GiveGift give_homeowner_gift;//房主礼物
|
||||||
private GiveGift locking_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;
|
return xlhData;
|
||||||
}
|
}
|
||||||
@@ -118,6 +127,9 @@ public class BlindBoxBean {
|
|||||||
if (jsonObject.has("status")) {
|
if (jsonObject.has("status")) {
|
||||||
xlhData.setStatus(jsonObject.get("status").getAsInt());
|
xlhData.setStatus(jsonObject.get("status").getAsInt());
|
||||||
}
|
}
|
||||||
|
if (jsonObject.has("end_time")){
|
||||||
|
xlhData.setEnd_time(jsonObject.get("end_time").getAsString());
|
||||||
|
}
|
||||||
|
|
||||||
return xlhData;
|
return xlhData;
|
||||||
}
|
}
|
||||||
@@ -126,10 +138,11 @@ public class BlindBoxBean {
|
|||||||
}
|
}
|
||||||
@Data
|
@Data
|
||||||
public static class XlhData {
|
public static class XlhData {
|
||||||
private String waiting_start_num;//等待开始需要达到的次数
|
private String waiting_start_num;//等待开始需要达到的次数
|
||||||
private String start_num;//巡乐会开启需要达到的次数
|
private String start_num;//巡乐会开启需要达到的次数
|
||||||
private int current_num;//当前已抽奖次数
|
private int current_num;//当前已抽奖次数
|
||||||
private int status;
|
private int status;
|
||||||
|
private String end_time;
|
||||||
}
|
}
|
||||||
@Data
|
@Data
|
||||||
public static class GiveGift {
|
public static class GiveGift {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class RoomInfoResp implements Serializable {
|
|||||||
private PkRoomInfo pk_info;
|
private PkRoomInfo pk_info;
|
||||||
private List<RoomPitBean> song_pit_list;
|
private List<RoomPitBean> song_pit_list;
|
||||||
private FriendInfo friend_info;
|
private FriendInfo friend_info;
|
||||||
|
private GiftXlh gift_cycle;
|
||||||
|
|
||||||
|
|
||||||
//弹出麦位操作弹出
|
//弹出麦位操作弹出
|
||||||
@@ -114,4 +115,18 @@ public class RoomInfoResp implements Serializable {
|
|||||||
public boolean isFreedomMode() {
|
public boolean isFreedomMode() {
|
||||||
return "1".equals(room_info.getWheat());
|
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;
|
package com.xscm.moduleutil.dialog;
|
||||||
|
|
||||||
|
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.text.TextPaint;
|
import android.text.TextPaint;
|
||||||
@@ -16,6 +19,7 @@ import androidx.databinding.DataBindingUtil;
|
|||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.SpanUtils;
|
import com.blankj.utilcode.util.SpanUtils;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.databinding.DialogPolicBinding;
|
import com.xscm.moduleutil.databinding.DialogPolicBinding;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
@@ -42,7 +46,12 @@ public class PolicyDialog extends Dialog {
|
|||||||
ClickableSpan clickSpan = new ClickableSpan() {
|
ClickableSpan clickSpan = new ClickableSpan() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull View widget) {
|
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
|
@Override
|
||||||
@@ -54,7 +63,12 @@ public class PolicyDialog extends Dialog {
|
|||||||
ClickableSpan ysClickSpan = new ClickableSpan() {
|
ClickableSpan ysClickSpan = new ClickableSpan() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull View widget) {
|
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
|
@Override
|
||||||
@@ -63,7 +77,7 @@ public class PolicyDialog extends Dialog {
|
|||||||
ds.setUnderlineText(true);
|
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;
|
package com.xscm.moduleutil.dialog;
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -182,7 +185,15 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
|||||||
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
||||||
allData.add(bindType.getWx_tl());
|
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);
|
bindTypeAdapter.setNewData(allData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,6 +206,22 @@ public class RechargeDialogFragment extends BaseMvpDialogFragment<RechargeDialog
|
|||||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(getContext(), CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
IWXAPI wxapi = WXAPIFactory.createWXAPI(getContext(), CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||||
PaymentUtil.payWxMiniProgram2(wxapi,appPay);
|
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;
|
package com.xscm.moduleutil.dialog;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ import androidx.annotation.NonNull;
|
|||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ScreenUtils;
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.bean.TeenagerInfo;
|
import com.xscm.moduleutil.bean.TeenagerInfo;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
@@ -55,7 +57,11 @@ public class YouthModelDialog extends BaseDialog<IndexDialogYouthModelBinding> {
|
|||||||
// } else {
|
// } else {
|
||||||
// ARouter.getInstance().build(ARouteConstants.SET_YOUTH_PWD_ACTIVITY).withInt("type", SetYouthPasswordActivity.SET_TYPE).navigation();
|
// 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();
|
dismiss();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -606,6 +606,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
|
|
||||||
// 停止之前的定时器
|
// 停止之前的定时器
|
||||||
stopFastAnimate();
|
stopFastAnimate();
|
||||||
|
stopPlay();
|
||||||
Log.e("isOpenSound===","isOpenSound111"+isOpenSound);
|
Log.e("isOpenSound===","isOpenSound111"+isOpenSound);
|
||||||
if (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.AppPay;
|
||||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||||
import com.xscm.moduleutil.bean.BannerModel;
|
import com.xscm.moduleutil.bean.BannerModel;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||||
@@ -165,9 +166,13 @@ public interface ApiServer {
|
|||||||
@GET(Constants.GET_WITHDRAWAL_LIST)
|
@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);
|
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
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_MESSAGE_LIST)
|
@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
|
@FormUrlEncoded
|
||||||
@POST(Constants.POST_ROOM_RANK)
|
@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.AppPay;
|
||||||
import com.xscm.moduleutil.bean.AppUpdateModel;
|
import com.xscm.moduleutil.bean.AppUpdateModel;
|
||||||
import com.xscm.moduleutil.bean.BannerModel;
|
import com.xscm.moduleutil.bean.BannerModel;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.BlackUserBean;
|
import com.xscm.moduleutil.bean.BlackUserBean;
|
||||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||||
@@ -192,6 +193,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
private Retrofit provideRetrofit(OkHttpClient client) {
|
private Retrofit provideRetrofit(OkHttpClient client) {
|
||||||
return new Retrofit.Builder()
|
return new Retrofit.Builder()
|
||||||
|
.addConverterFactory(new BusinessAwareConverterFactory(CommonAppContext.getInstance()))
|
||||||
.addConverterFactory(MyConverterFactory.create())/**/
|
.addConverterFactory(MyConverterFactory.create())/**/
|
||||||
// .addConverterFactory(GsonConverterFactory.create())
|
// .addConverterFactory(GsonConverterFactory.create())
|
||||||
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
|
||||||
@@ -233,7 +235,29 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
return INSTANCE;
|
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) {
|
public <T> T createApiClient(Class<T> apiClientClass) {
|
||||||
return mRetrofit.create(apiClientClass);
|
return mRetrofit.create(apiClientClass);
|
||||||
}
|
}
|
||||||
@@ -257,6 +281,7 @@ public class RetrofitClient {
|
|||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<String> body = response.body();
|
BaseModel<String> body = response.body();
|
||||||
|
|
||||||
observer.onNext(body.getMsg());
|
observer.onNext(body.getMsg());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -366,6 +391,7 @@ public class RetrofitClient {
|
|||||||
sApiServer.exchangeCoin(earnings_num).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.exchangeCoin(earnings_num).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
|
|
||||||
onNextRetu(response, observer);
|
onNextRetu(response, observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,7 +425,7 @@ public class RetrofitClient {
|
|||||||
public void onResponse(Call<BaseModel<FirstChargeBean>> call, Response<BaseModel<FirstChargeBean>> response) {
|
public void onResponse(Call<BaseModel<FirstChargeBean>> call, Response<BaseModel<FirstChargeBean>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<FirstChargeBean> baseModel = response.body();
|
BaseModel<FirstChargeBean> baseModel = response.body();
|
||||||
if (baseModel != null) {
|
if (baseModel.getCode()==1){
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.showShort("获取数据失败");
|
ToastUtils.showShort("获取数据失败");
|
||||||
@@ -450,13 +476,51 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getMessagetitle(String type, String page, String page_limit, BaseObserver<List<NewsMessageList>> observer) {
|
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) {
|
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);
|
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) {
|
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).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).enqueue(new Callback<BaseModel<List<CharmRankingResp>>>() {
|
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();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1086,6 +1152,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1105,6 +1173,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1124,6 +1194,8 @@ public class RetrofitClient {
|
|||||||
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
BaseModel<List<BlackUserBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
|
}else {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1254,7 +1326,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<List<MyRoomBean>>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<List<TopRoom>>> call, Throwable t) {
|
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
|
public void roomGetIn(String roomId, String password, BaseObserver<RoomInfoResp> observer) {
|
||||||
password, BaseObserver<RoomInfoResp> observer) {
|
if (!isNetworkAvailable()) {
|
||||||
|
handleNetworkUnavailable(observer);
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
sApiServer.roomGetIn(roomId, password).enqueue(new Callback<BaseModel<RoomInfoResp>>() {
|
sApiServer.roomGetIn(roomId, password).enqueue(new Callback<BaseModel<RoomInfoResp>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomInfoResp>> call, Response<BaseModel<RoomInfoResp>> response) {
|
public void onResponse(Call<BaseModel<RoomInfoResp>> call, Response<BaseModel<RoomInfoResp>> response) {
|
||||||
|
CommonAppContext.getInstance().isRoomJoininj=false;
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
|
BaseModel<RoomInfoResp> roomInfoRespBaseModel = response.body();
|
||||||
if (roomInfoRespBaseModel.getCode() == 1) {
|
if (roomInfoRespBaseModel.getCode() == 1) {
|
||||||
@@ -1718,7 +1797,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<List<MyCpRoom>>> call, Throwable t) {
|
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
|
public void appPay(String user_id, String money, String coin, String type, BaseObserver<AppPay> observer) {
|
||||||
type, BaseObserver<AppPay> observer) {
|
|
||||||
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
sApiServer.appPay(user_id, money, coin, type).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||||
@@ -1855,13 +1935,21 @@ public class RetrofitClient {
|
|||||||
BaseModel<AppPay> appPayBaseModel = response.body();
|
BaseModel<AppPay> appPayBaseModel = response.body();
|
||||||
if (appPayBaseModel.getCode() == 1) {
|
if (appPayBaseModel.getCode() == 1) {
|
||||||
observer.onNext(appPayBaseModel.getData());
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<AppPay>> call, Throwable t) {
|
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
|
public void bind(String userId, String type, String alipayAccount, String bank_card_number, String bank_card, String open_bank, BaseObserver<String> observer) {
|
||||||
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>>() {
|
sApiServer.bind(userId, type, alipayAccount, bank_card_number, bank_card, open_bank).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -1978,8 +2065,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/3/15 获取主持人列表
|
// TODO: 2025/3/15 获取主持人列表
|
||||||
public void getHostList(String roomId, String
|
public void getHostList(String roomId, String type, BaseObserver<List<HostBean>> observer) {
|
||||||
type, BaseObserver<List<HostBean>> observer) {
|
|
||||||
sApiServer.getHostList(roomId, type).enqueue(new Callback<BaseModel<List<HostBean>>>() {
|
sApiServer.getHostList(roomId, type).enqueue(new Callback<BaseModel<List<HostBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<HostBean>>> call, Response<BaseModel<List<HostBean>>> response) {
|
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
|
public void getSearch(String keyWord, String type, BaseObserver<List<RoomSearchResp>> observer) {
|
||||||
type, BaseObserver<List<RoomSearchResp>> observer) {
|
|
||||||
sApiServer.getSearch(keyWord, type).enqueue(new Callback<BaseModel<List<RoomSearchResp>>>() {
|
sApiServer.getSearch(keyWord, type).enqueue(new Callback<BaseModel<List<RoomSearchResp>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<RoomSearchResp>>> call, Response<BaseModel<List<RoomSearchResp>>> response) {
|
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
|
public void getCharmList(String roomId, String stime, String etime, String p, BaseObserver<RoomDetails> observer) {
|
||||||
p, BaseObserver<RoomDetails> observer) {
|
|
||||||
sApiServer.getCharmList(roomId, stime, etime, p).enqueue(new Callback<BaseModel<RoomDetails>>() {
|
sApiServer.getCharmList(roomId, stime, etime, p).enqueue(new Callback<BaseModel<RoomDetails>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomDetails>> call, Response<BaseModel<RoomDetails>> response) {
|
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
|
public void roomAuctionJoin(String auctionId, String userId, String giftId, String num, String type, BaseObserver<RoomAuction.AuctionListBean> observer) {
|
||||||
num, String type, BaseObserver<RoomAuction.AuctionListBean> observer) {
|
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new ApiResponseCallback<RoomAuction.AuctionListBean>(CommonAppContext.getInstance()) {
|
||||||
sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new Callback<BaseModel<RoomAuction.AuctionListBean>>() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomAuction.AuctionListBean>> call, Response<BaseModel<RoomAuction.AuctionListBean>> response) {
|
public void onSuccess(RoomAuction.AuctionListBean data) {
|
||||||
if (response.code() == 200) {
|
// 确保即使data为null也能够正确传递给observer
|
||||||
BaseModel<RoomAuction.AuctionListBean> baseModel = response.body();
|
if (data == null){
|
||||||
|
data = new RoomAuction.AuctionListBean();
|
||||||
if (baseModel.getCode() == 1) {
|
|
||||||
observer.onNext(baseModel.getData());
|
|
||||||
} else {
|
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
observer.onNext(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RoomAuction.AuctionListBean>> call, Throwable t) {
|
public void onFailure(Throwable t) {
|
||||||
t.printStackTrace();
|
super.onFailure(t);
|
||||||
|
RoomAuction.AuctionListBean yy=new RoomAuction.AuctionListBean();
|
||||||
|
observer.onNext(yy);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2132,6 +2212,7 @@ public class RetrofitClient {
|
|||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
ToastUtils.showShort(t.toString());
|
ToastUtils.showShort(t.toString());
|
||||||
|
LogUtils.e("auction",t);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2149,7 +2230,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
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) {
|
||||||
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>>() {
|
sApiServer.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -2353,7 +2442,9 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
public void setMutePit(String roomId, String user_id, String isMute, BaseObserver<String> observer) {
|
||||||
isMute, BaseObserver<String> observer) {
|
|
||||||
sApiServer.setMutePit(roomId, user_id, isMute).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.setMutePit(roomId, user_id, isMute).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -2541,7 +2631,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
ToastUtils.showShort(t.toString());
|
ToastUtils.showShort(t.toString());
|
||||||
|
LogUtils.e("changeSong", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2735,7 +2833,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
public void getPostData(String new_password, String mobile, String code, String userId, BaseObserver<String> observer) {
|
||||||
userId, BaseObserver<String> observer) {
|
|
||||||
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -3018,7 +3127,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
ToastUtils.showShort(t.toString());
|
// ToastUtils.showShort(t.toString());
|
||||||
|
LogUtils.e("editUserInfo", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -3078,7 +3191,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
ToastUtils.showShort(t.toString());
|
// ToastUtils.showShort(t.toString());
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void userOnlineStatus(String user_id, String
|
public void userOnlineStatus(String user_id, String roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
||||||
roomId, BaseObserver<List<UserOnlineStatusBean>> observer) {
|
|
||||||
sApiServer.userOnlineStatus(user_id, roomId).enqueue(new Callback<BaseModel<List<UserOnlineStatusBean>>>() {
|
sApiServer.userOnlineStatus(user_id, roomId).enqueue(new Callback<BaseModel<List<UserOnlineStatusBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<UserOnlineStatusBean>>> call, Response<BaseModel<List<UserOnlineStatusBean>>> response) {
|
public void onResponse(Call<BaseModel<List<UserOnlineStatusBean>>> call, Response<BaseModel<List<UserOnlineStatusBean>>> response) {
|
||||||
@@ -3173,7 +3288,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
ToastUtils.showShort(t.toString());
|
// ToastUtils.showShort(t.toString());
|
||||||
|
LogUtils.e("deleteAlbum", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -3243,7 +3362,8 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
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
|
public void onNextRetu(Response<BaseModel<String>> response, BaseObserver<String> observer) {
|
||||||
(Response<BaseModel<String>> response, BaseObserver<String> observer) {
|
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<String> string = response.body();
|
BaseModel<String> string = response.body();
|
||||||
if (string != null) {
|
if (string != null) {
|
||||||
@@ -3333,8 +3456,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 获取活动礼物列表
|
/// 获取活动礼物列表
|
||||||
public void getBoxGiftList(String giftBagId, String
|
public void getBoxGiftList(String giftBagId, String roomId, BaseObserver<BlindBoxBean> observer) {
|
||||||
roomId, BaseObserver<BlindBoxBean> observer) {
|
|
||||||
sApiServer.getBoxGiftList(giftBagId, roomId).enqueue(new Callback<BaseModel<BlindBoxBean>>() {
|
sApiServer.getBoxGiftList(giftBagId, roomId).enqueue(new Callback<BaseModel<BlindBoxBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<BlindBoxBean>> call, Response<BaseModel<BlindBoxBean>> response) {
|
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
|
public void xlhMyRecord(String roomId, String page, String pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||||
pageSize, BaseObserver<List<GiftBean>> observer) {
|
|
||||||
sApiServer.xlhMyRecord(roomId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
sApiServer.xlhMyRecord(roomId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
|
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
|
public void getAllRecord(String giftBagId, String page, String pageSize, BaseObserver<List<GiftBean>> observer) {
|
||||||
pageSize, BaseObserver<List<GiftBean>> observer) {
|
|
||||||
sApiServer.getAllRecord(giftBagId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
sApiServer.getAllRecord(giftBagId, page, pageSize).enqueue(new Callback<BaseModel<List<GiftBean>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<GiftBean>>> call, Response<BaseModel<List<GiftBean>>> response) {
|
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 CREATED_ROOM = "/modulevocal/CreatedRoomActivity"; //创建房间
|
||||||
public static final String WITHDRAWAL_ACTIVITY = "/modulevocal/WithdrawalActivity"; //提现
|
public static final String WITHDRAWAL_ACTIVITY = "/modulevocal/WithdrawalActivity"; //提现
|
||||||
public static final String REAL_NAME_ACTIVITY ="/modulevocal/RealNameActivity"; //实名认证
|
public static final String REAL_NAME_ACTIVITY ="/modulevocal/RealNameActivity"; //实名认证
|
||||||
public static final String REAL_NAME_ACTIVITY2 ="/app/RealNameActivity"; //实名认证
|
public static final String REAL_NAME_ACTIVITY2 ="/modulevocal/RealNameActivity"; //实名认证
|
||||||
public static final String H5 ="/moduleutil/WebViewActivity"; //网页
|
public static final String H5 ="/moduleUtil/WebViewActivity"; //网页
|
||||||
public static final String GIFT_WALL ="/moduleroom/UserGiftWallFragment"; //实名认证
|
// public static final String GIFT_WALL ="/moduleroom/UserGiftWallFragment"; //实名认证
|
||||||
public static final String RECHARGE_ACTIVITY ="/modulevocal/RechargeActivity"; //实名认证
|
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 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_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_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_WALL = "/api/User/user_gift_wall";//礼物墙
|
||||||
public static final String POST_USER_OLINE_STATUS = "/api/Room/user_online_status";//用户在线状态
|
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";//删除历史足迹
|
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.alipay.sdk.app.PayTask;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
|
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
import com.xscm.moduleutil.bean.AppPay;
|
import com.xscm.moduleutil.bean.AppPay;
|
||||||
import com.xscm.moduleutil.event.PayEvent;
|
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);
|
mCharmView.setVisibility(GONE);
|
||||||
if (showBoss && TextUtils.equals(WHEAT_BOSS, pitNumber)) {
|
if (showBoss && TextUtils.equals(WHEAT_BOSS, pitNumber)) {
|
||||||
mIvTagBoss.setVisibility(VISIBLE);
|
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);
|
mRiv.setImageResource(resId);
|
||||||
} else {
|
} 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()) {
|
if (isMute()) {
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
package com.xscm.moduleutil.widget;
|
package com.xscm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.petterp.floatingx.listener.control.IFxControl;
|
import com.petterp.floatingx.listener.control.IFxControl;
|
||||||
import com.tencent.liteav.base.Log;
|
import com.tencent.liteav.base.Log;
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
|
||||||
public class ViewUtils {
|
public class ViewUtils {
|
||||||
public static void waitUntilViewReady(@NonNull IFxControl control, @NonNull OnViewCreatedListener listener) {
|
public static void waitUntilViewReady(@NonNull IFxControl control, @NonNull OnViewCreatedListener listener) {
|
||||||
@@ -33,4 +38,28 @@ public class ViewUtils {
|
|||||||
public interface OnViewCreatedListener {
|
public interface OnViewCreatedListener {
|
||||||
void onViewCreated(@NonNull View view);
|
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"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape android:shape="rectangle"
|
<shape android:shape="rectangle"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#ff0dffb9" />
|
<solid android:color="#FC7285" />
|
||||||
<corners android:radius="@dimen/dp_53"/>
|
<corners android:radius="@dimen/dp_53"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape android:shape="rectangle"
|
<shape android:shape="rectangle"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
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" />
|
<corners android:topLeftRadius="0dp" android:topRightRadius="65dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="65dp" />
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape android:shape="rectangle"
|
<shape android:shape="rectangle"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
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" />
|
<corners android:topLeftRadius="65dp" android:topRightRadius="65dp" android:bottomLeftRadius="65dp" android:bottomRightRadius="65dp" />
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,20 +1,21 @@
|
|||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<!-- 添加阴影 -->
|
<!-- 添加阴影 -->
|
||||||
<item android:bottom="0dp">
|
<item android:bottom="0dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="0dp"/>
|
<corners android:radius="50dp"/>
|
||||||
<solid android:color="#c9c9c9"/> <!-- 阴影颜色 -->
|
<solid android:color="#c9c9c9"/>
|
||||||
<gradient android:startColor="#80000000"
|
<!-- 阴影颜色 -->
|
||||||
android:endColor="#00000000"
|
<gradient android:startColor="#80000000" android:endColor="#00000000" android:angle="90"/>
|
||||||
android:angle="90"/>
|
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<!-- 实际的形状 -->
|
<!-- 实际的形状 -->
|
||||||
<item android:top="0dp" android:left="0dp" android:right="0dp">
|
<item android:top="0dp" android:left="0dp" android:right="0dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="0dp"/>
|
<corners android:radius="50dp"/>
|
||||||
<solid android:color="#FFFFFF"/> <!-- 设置背景颜色 -->
|
<solid android:color="#FFFFFF"/>
|
||||||
<stroke android:width="0.1dp" android:color="#c9c9c9"/> <!-- 设置灰色边框 -->
|
<!-- 设置背景颜色 -->
|
||||||
|
<stroke android:width="0.1dp" android:color="#c9c9c9"/>
|
||||||
|
<!-- 设置灰色边框 -->
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape android:shape="rectangle"
|
<shape android:shape="rectangle"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
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" />
|
<corners android:topLeftRadius="79dp" android:topRightRadius="79dp" android:bottomLeftRadius="79dp" android:bottomRightRadius="79dp" />
|
||||||
</shape>
|
</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
|
@Override
|
||||||
public void setLikeZone(int type) {
|
public void setLikeZone(int type) {
|
||||||
MvpPre.getCircleList(page + "", "10");
|
// MvpPre.getCircleList(page + "", "10");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ android {
|
|||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '17'
|
jvmTarget = '11'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activity.MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
android:configChanges="fontScale"
|
android:configChanges="fontScale"
|
||||||
android:exported="true"
|
|
||||||
android:launchMode="singleTask"
|
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
|
alias(libs.plugins.kotlin.android)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -27,6 +28,9 @@ android {
|
|||||||
dataBinding {
|
dataBinding {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '17'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -35,6 +39,8 @@ dependencies {
|
|||||||
implementation libs.material
|
implementation libs.material
|
||||||
implementation libs.activity
|
implementation libs.activity
|
||||||
implementation libs.constraintlayout
|
implementation libs.constraintlayout
|
||||||
|
implementation libs.core.ktx
|
||||||
|
implementation libs.androidx.lifecycle.viewmodel.ktx
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
|
alias(libs.plugins.kotlin.android)
|
||||||
}
|
}
|
||||||
|
apply plugin: 'kotlin-kapt'
|
||||||
android {
|
android {
|
||||||
namespace 'com.example.moduleroom'
|
namespace 'com.example.moduleroom'
|
||||||
compileSdk 35
|
compileSdk 35
|
||||||
@@ -33,14 +34,24 @@ android {
|
|||||||
dataBinding {
|
dataBinding {
|
||||||
enable = true
|
enable = true
|
||||||
}
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '11'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 与 dependencies 同级别
|
||||||
|
kapt {
|
||||||
|
arguments {
|
||||||
|
arg("AROUTER_MODULE_NAME", project.getName())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation libs.appcompat
|
implementation libs.appcompat
|
||||||
implementation libs.material
|
implementation libs.material
|
||||||
implementation libs.activity
|
implementation libs.activity
|
||||||
implementation libs.constraintlayout
|
implementation libs.constraintlayout
|
||||||
|
implementation libs.core.ktx
|
||||||
|
implementation libs.androidx.lifecycle.viewmodel.ktx
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
@@ -50,7 +61,8 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'com.alibaba:arouter-api:1.5.2'
|
implementation 'com.alibaba:arouter-api:1.5.2'
|
||||||
//annotationProcessor
|
//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'
|
implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
android:name=".activity.RoomActivity"
|
android:name=".activity.RoomActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:taskAffinity=".RoomTaskAffinity"
|
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:windowSoftInputMode="adjustPan"
|
android:windowSoftInputMode="adjustPan"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.example.moduleroom.R;
|
|||||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.logger.Logger;
|
import com.xscm.moduleutil.utils.logger.Logger;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -59,24 +60,38 @@ public class RankingAutcionAdapter extends BaseQuickAdapter<RoomAuction.AuctionL
|
|||||||
LinearLayout llContainer =helper.getView(R.id.lli);
|
LinearLayout llContainer =helper.getView(R.id.lli);
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||||
|
|
||||||
List<String> images = item.getIcon(); // 获取图片列表
|
List<String> images = item.getIcon();
|
||||||
|
if (images == null || images.isEmpty()) {
|
||||||
|
return; // 提前返回,减少嵌套层级
|
||||||
|
}
|
||||||
|
|
||||||
for (String url : images) {
|
for (String url : images) {
|
||||||
if (url.contains("http")) {
|
if (!url.contains("http")) {
|
||||||
ImageView imageView1 = new ImageView(getContext());
|
continue; // 跳过非HTTP链接
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageView imageView = ViewUtils.createImageView(getContext(),url);
|
||||||
|
llContainer.addView(imageView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.StringUtil;
|
import com.xscm.moduleutil.utils.StringUtil;
|
||||||
import com.xscm.moduleutil.utils.logger.Logger;
|
import com.xscm.moduleutil.utils.logger.Logger;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -64,23 +65,37 @@ public class RankingCharmListAdapter extends BaseQuickAdapter<CharmRankingResp,
|
|||||||
LinearLayout ll = helper.getView(R.id.bnv_rank_list_rich);
|
LinearLayout ll = helper.getView(R.id.bnv_rank_list_rich);
|
||||||
List<String> images = item.getIcon(); // 获取图片列表
|
List<String> images = item.getIcon(); // 获取图片列表
|
||||||
ll.removeAllViews();
|
ll.removeAllViews();
|
||||||
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 加载图片
|
if (images == null || images.isEmpty()) {
|
||||||
ImageUtils.loadHeadCC(url, imageView1);
|
return; // 提前返回,减少嵌套层级
|
||||||
|
|
||||||
ll.addView(imageView1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
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
|
@Override
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.example.moduleroom.R;
|
|||||||
import com.xscm.moduleutil.bean.RoomUserCharmListBean;
|
import com.xscm.moduleutil.bean.RoomUserCharmListBean;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.MeHeadView;
|
import com.xscm.moduleutil.utils.MeHeadView;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -34,27 +35,42 @@ public class RoomCharmAdapter extends BaseQuickAdapter<RoomUserCharmListBean, Ba
|
|||||||
|
|
||||||
LinearLayout llContainer =helper.getView(R.id.ll_in);
|
LinearLayout llContainer =helper.getView(R.id.ll_in);
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
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) {
|
for (String url : images) {
|
||||||
if (url.contains("http")) {
|
if (!url.contains("http")) {
|
||||||
ImageView imageView1 = new ImageView(getContext());
|
continue; // 跳过非HTTP链接
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
ImageView imageView = ViewUtils.createImageView(getContext(),url);
|
||||||
|
llContainer.addView(imageView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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.bean.room.RoomOnlineBean;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -92,25 +93,39 @@ public class RoomOnlineAdapter extends BaseMultiItemQuickAdapter<RoomOnlineBean,
|
|||||||
LinearLayout llContainer = helper.getView(R.id.line);
|
LinearLayout llContainer = helper.getView(R.id.line);
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||||
|
|
||||||
List<String> images = item.getIcon(); // 获取图片列表
|
List<String> images = item.getIcon();
|
||||||
|
if (images == null || images.isEmpty()) {
|
||||||
|
return; // 提前返回,减少嵌套层级
|
||||||
|
}
|
||||||
|
|
||||||
for (String url : images) {
|
for (String url : images) {
|
||||||
if (url.contains("http")) {
|
if (!url.contains("http")) {
|
||||||
ImageView imageView1 = new ImageView(helper.itemView.getContext());
|
continue; // 跳过非HTTP链接
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 -> {
|
helper.getView(R.id.tv_status).setOnClickListener(v -> {
|
||||||
if (textView.getText().toString().equals("抱麦")) {
|
if (textView.getText().toString().equals("抱麦")) {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.example.moduleroom.dialog;
|
package com.example.moduleroom.dialog;
|
||||||
|
|
||||||
|
import static com.xscm.moduleutil.utils.UtilConfig.getContext;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
@@ -17,8 +19,10 @@ import com.example.moduleroom.presenter.BidListPresenter;
|
|||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
import com.xscm.moduleutil.bean.room.RoomAuction;
|
import com.xscm.moduleutil.bean.room.RoomAuction;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@author qx
|
*@author qx
|
||||||
@@ -83,26 +87,39 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
|||||||
LinearLayout llContainer =mBinding.llVip1;
|
LinearLayout llContainer =mBinding.llVip1;
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||||
|
|
||||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
|
||||||
|
List<String> images = listsBean.getIcon();
|
||||||
|
if (images == null || images.isEmpty()) {
|
||||||
|
return; // 提前返回,减少嵌套层级
|
||||||
|
}
|
||||||
|
|
||||||
for (String url : images) {
|
for (String url : images) {
|
||||||
if (url.contains("http")) {
|
if (!url.contains("http")) {
|
||||||
ImageView imageView1 = new ImageView(getContext());
|
continue; // 跳过非HTTP链接
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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());
|
mBinding.roomHeadTop1Label.setText(listsBean.getGift_prices());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,24 +132,36 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
|||||||
|
|
||||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
List<String> images = listsBean.getIcon(); // 获取图片列表
|
||||||
|
|
||||||
for (String url : images) {
|
if (images == null || images.isEmpty()) {
|
||||||
if (url.contains("http")) {
|
return; // 提前返回,减少嵌套层级
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
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());
|
mBinding.roomHeadTop2Label.setText(listsBean.getGift_prices());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,24 +174,36 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
|||||||
|
|
||||||
List<String> images = listsBean.getIcon(); // 获取图片列表
|
List<String> images = listsBean.getIcon(); // 获取图片列表
|
||||||
|
|
||||||
for (String url : images) {
|
if (images == null || images.isEmpty()) {
|
||||||
if (url.contains("http")) {
|
return; // 提前返回,减少嵌套层级
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
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());
|
mBinding.roomHeadTop3Label.setText(listsBean.getGift_prices());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.example.moduleroom.dialog;
|
|||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
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.TabLayout;
|
||||||
import com.google.android.material.tabs.TabLayoutMediator;
|
import com.google.android.material.tabs.TabLayoutMediator;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||||
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
@@ -499,7 +501,11 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
mBinding.ivWf.setOnClickListener(new View.OnClickListener() {
|
mBinding.ivWf.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
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.RefreshEvent;
|
||||||
import com.xscm.moduleutil.bean.RoomSearchResp;
|
import com.xscm.moduleutil.bean.RoomSearchResp;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@author qx
|
*@author qx
|
||||||
*@data 2025/6/21
|
*@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));
|
// ImageUtils.loadImageView(item.getLevel_icon(), helper.getView(R.id.iv_rd));
|
||||||
LinearLayout llContainer = helper.getView(R.id.ll);
|
LinearLayout llContainer = helper.getView(R.id.ll);
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
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 加载图片
|
List<String> images = item.getIcon();
|
||||||
ImageUtils.loadHeadCC(url, imageView);
|
if (images == null || images.isEmpty()) {
|
||||||
|
return; // 提前返回,减少嵌套层级
|
||||||
llContainer.addView(imageView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
ShadowLayout layout = helper.getView(R.id.shadow_layout);
|
||||||
// layout.setShadowColor(R.color.picture_color_fa632d);
|
// layout.setShadowColor(R.color.picture_color_fa632d);
|
||||||
layout.setShadowHiddenBottom(false);
|
layout.setShadowHiddenBottom(false);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.example.moduleroom.dialog;
|
|||||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -24,6 +25,7 @@ import com.example.moduleroom.contacts.RoomSettingContacts;
|
|||||||
import com.example.moduleroom.databinding.DialogRoomSettingFragmentBinding;
|
import com.example.moduleroom.databinding.DialogRoomSettingFragmentBinding;
|
||||||
import com.example.moduleroom.fragment.RoomBackgroundDialogFragment;
|
import com.example.moduleroom.fragment.RoomBackgroundDialogFragment;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||||
import com.xscm.moduleutil.event.EffectEvent;
|
import com.xscm.moduleutil.event.EffectEvent;
|
||||||
@@ -282,7 +284,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
|||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
} 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) {
|
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSubsidy) {
|
||||||
ARouter.getInstance().build(ARouteConstants.ROOM_ALLOWANCE).withString("from", "我的界面").withString("roomId", roomInfoResp.getRoom_info().getRoom_id() + "").navigation();
|
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,添加飘屏关闭打开按钮
|
}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,将男神女神合并成互娱,最总是新添加一个标签
|
} 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 ||
|
if (type == RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
|
||||||
type == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU ||
|
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.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen
|
||||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
|
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
|
||||||
if (onMic) {
|
if (onMic) {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.example.moduleroom.fragment.RelationshipFragment;
|
|||||||
import com.example.moduleroom.presenter.RoomUserPresenter;
|
import com.example.moduleroom.presenter.RoomUserPresenter;
|
||||||
import com.example.zhouwei.library.CustomPopWindow;
|
import com.example.zhouwei.library.CustomPopWindow;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.bean.RelationCardBean;
|
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");
|
// UserGiftWallRoomFragment.newInstance(Integer.parseInt(user_id)).show(getChildFragmentManager(), "UserGiftWallRoomFragment");
|
||||||
}else if (id == R.id.room_jb){
|
}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){
|
}else if (id==R.id.iv_avatar){
|
||||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id()+"").navigation();
|
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id()+"").navigation();
|
||||||
dismiss();
|
dismiss();
|
||||||
@@ -270,7 +275,11 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
} else if (id == R.id.action_report) {
|
} else if (id == R.id.action_report) {
|
||||||
// showContent = "点击 Item菜单6";
|
// showContent = "点击 Item菜单6";
|
||||||
//TODO 举报功能
|
//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();
|
dismiss();
|
||||||
} else if (id == R.id.action_blacklist) {
|
} else if (id == R.id.action_blacklist) {
|
||||||
MvpPre.addBlackList(user_id);
|
MvpPre.addBlackList(user_id);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.example.moduleroom.fragment;
|
package com.example.moduleroom.fragment;
|
||||||
|
|
||||||
|
import static com.xscm.moduleutil.utils.UtilConfig.getContext;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
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.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.StringUtil;
|
import com.xscm.moduleutil.utils.StringUtil;
|
||||||
import com.xscm.moduleutil.widget.CommonEmptyView;
|
import com.xscm.moduleutil.widget.CommonEmptyView;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qx
|
* @author qx
|
||||||
@@ -219,23 +223,36 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
private void setview(List<String> item, LinearLayout llContainer) {
|
private void setview(List<String> item, LinearLayout llContainer) {
|
||||||
List<String> images = item; // 获取图片列表
|
List<String> images = item; // 获取图片列表
|
||||||
|
|
||||||
for (String url : images) {
|
if (images == null || images.isEmpty()) {
|
||||||
if (url.contains("http")) {
|
return; // 提前返回,减少嵌套层级
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
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
|
@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_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/vp_room_pager">
|
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>
|
</FrameLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@@ -482,7 +477,41 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:visibility="visible" />
|
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
|
<com.xscm.moduleutil.widget.floatingView.Floa
|
||||||
android:id="@+id/flaoat"
|
android:id="@+id/flaoat"
|
||||||
@@ -615,6 +644,14 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
android:text="确定"
|
android:text="确定"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/white"
|
||||||
android:layout_marginBottom="@dimen/dp_44"
|
android:layout_marginBottom="@dimen/dp_44"
|
||||||
/>
|
/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="优先通道(1/20)"
|
android:text="优先通道(1/20)"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="赠送"
|
android:text="赠送"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
android:text="等待上台(1/20)"
|
android:text="等待上台(1/20)"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/recycle_view" />
|
app:layout_constraintTop_toBottomOf="@+id/recycle_view" />
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
android:background="@drawable/text_bg_x"
|
android:background="@drawable/text_bg_x"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="全麦"
|
android:text="全麦"
|
||||||
android:textColor="#8865FF"
|
android:textColor="#FC7285"
|
||||||
android:textSize="@dimen/sp_14" />
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
app:tl_showCateIndicator="false"
|
app:tl_showCateIndicator="false"
|
||||||
app:tl_tab_width="@dimen/dp_50"
|
app:tl_tab_width="@dimen/dp_50"
|
||||||
app:tl_textBold="SELECT"
|
app:tl_textBold="SELECT"
|
||||||
app:tl_textSelectColor="@color/white"
|
app:tl_textSelectColor="#FC7285"
|
||||||
app:tl_textSelectedSize="@dimen/sp_14"
|
app:tl_textSelectedSize="@dimen/sp_14"
|
||||||
app:tl_textUnselectColor="#E9E9E9"
|
app:tl_textUnselectColor="#E9E9E9"
|
||||||
app:tl_textsize="@dimen/sp_12" />
|
app:tl_textsize="@dimen/sp_12" />
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_18"
|
android:layout_marginStart="@dimen/dp_18"
|
||||||
android:layout_toEndOf="@+id/tv_reward_gift"
|
android:layout_toEndOf="@+id/tv_reward_gift"
|
||||||
android:text="去充值"
|
android:text="去充值"
|
||||||
android:textColor="#0DFFB9"
|
android:textColor="#FC7285"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="一键全送"
|
android:text="一键全送"
|
||||||
android:textColor="#0DFFB9"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_14" />
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.library)
|
alias(libs.plugins.android.library)
|
||||||
|
alias(libs.plugins.kotlin.android)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -23,12 +24,16 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '17'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation libs.appcompat
|
implementation libs.appcompat
|
||||||
implementation libs.material
|
implementation libs.material
|
||||||
|
implementation libs.core.ktx
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
|
|||||||
@@ -61,5 +61,8 @@ dependencies {
|
|||||||
//annotationProcessor
|
//annotationProcessor
|
||||||
annotationProcessor 'com.alibaba:arouter-compiler:1.5.2'
|
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' // ⚠️ 添加这一行
|
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:launchMode="singleTask" />
|
android:launchMode="singleTask" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.RealName1Activity"
|
android:name=".activity.RealNameActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.RevenueActivity"
|
android:name=".activity.RevenueActivity"
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
package com.example.modulevocal.activity;
|
package com.example.modulevocal.activity;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.example.modulevocal.R;
|
import com.example.modulevocal.R;
|
||||||
import com.example.modulevocal.databinding.ActivityAboutUsBinding;
|
import com.example.modulevocal.databinding.ActivityAboutUsBinding;
|
||||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.widget.CommonAppConfig;
|
import com.xscm.moduleutil.widget.CommonAppConfig;
|
||||||
@@ -17,12 +20,21 @@ public class AboutUsActivity extends BaseAppCompatActivity<ActivityAboutUsBindin
|
|||||||
mBinding.tvAppVersion.setText("Version " + CommonAppConfig.getInstance().getVersion());
|
mBinding.tvAppVersion.setText("Version " + CommonAppConfig.getInstance().getVersion());
|
||||||
|
|
||||||
mBinding.llYonghu.setOnClickListener(v -> {
|
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 -> {
|
mBinding.llYins.setOnClickListener(v -> {
|
||||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl() + "/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
Intent intent = new Intent(this, WebViewActivity.class);
|
||||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", "file:///android_asset/page_show.html").withString("title", "隐私协议").navigation();
|
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.databinding.ActivityBindCardBinding;
|
||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -75,6 +76,11 @@ public class BindCardActivity extends BaseMvpActivity<WithdrawalPresenter, Activ
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void bindDetai(BindDetail bindDetail) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.example.modulevocal.databinding.ActivityBindCardDetailsBinding;
|
|||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -32,6 +33,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
|||||||
protected void initData() {
|
protected void initData() {
|
||||||
type=getIntent().getStringExtra("type");
|
type=getIntent().getStringExtra("type");
|
||||||
|
|
||||||
|
MvpPre.bindDetai(SpUtil.getUserId()+"",type);
|
||||||
if (type.equals("1")){
|
if (type.equals("1")){
|
||||||
mBinding.topBar.setTitle("微信绑卡");
|
mBinding.topBar.setTitle("微信绑卡");
|
||||||
mBinding.cet1.setVisibility(VISIBLE);
|
mBinding.cet1.setVisibility(VISIBLE);
|
||||||
@@ -58,6 +60,7 @@ public class BindCardDetailsActivity extends BaseMvpActivity<WithdrawalPresenter
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mBinding.tvSend.setOnClickListener(new View.OnClickListener() {
|
mBinding.tvSend.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
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
|
@Override
|
||||||
protected WithdrawalPresenter bindPresenter() {
|
protected WithdrawalPresenter bindPresenter() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.jdf.myyuliao;
|
package com.example.modulevocal.activity;
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -11,9 +11,10 @@ import android.view.View;
|
|||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.blankj.utilcode.util.RegexUtils;
|
import com.blankj.utilcode.util.RegexUtils;
|
||||||
|
import com.example.modulevocal.R;
|
||||||
import com.example.modulevocal.conacts.RealNameConacts;
|
import com.example.modulevocal.conacts.RealNameConacts;
|
||||||
|
import com.example.modulevocal.databinding.ActivityRealNameBinding;
|
||||||
import com.example.modulevocal.presenter.RealNamePresenter;
|
import com.example.modulevocal.presenter.RealNamePresenter;
|
||||||
import com.jdf.myyuliao.databinding.ActivityRealNameBinding;
|
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
import com.xscm.moduleutil.bean.RealNameBean;
|
import com.xscm.moduleutil.bean.RealNameBean;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
@@ -138,7 +139,8 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendCodeSuccess() {
|
public void sendCodeSuccess() {
|
||||||
queren();
|
// queren();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
private void queren() {
|
private void queren() {
|
||||||
// 创建并显示确认对话框
|
// 创建并显示确认对话框
|
||||||
@@ -184,12 +186,10 @@ public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, Activit
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (RegexUtils.isIDCard18Exact(mBinding.edPassword.getText().toString())) {
|
if (RegexUtils.isIDCard18Exact(mBinding.edPassword.getText().toString())) {
|
||||||
if (mBinding.btnSubmit.getText().toString().equals("立即认证")) {
|
if (mBinding.btnSubmit.getText().toString().equals("确认")) {
|
||||||
mBinding.stepNum1.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_11));
|
// 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.stepNum2.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.num_2));
|
||||||
// mBinding.l1.setVisibility(View.GONE);
|
//
|
||||||
// mBinding.l2.setVisibility(View.VISIBLE);
|
|
||||||
// mBinding.btnSubmit.setText("立即认证");
|
|
||||||
MvpPre.realName(mBinding.edName.getText().toString(),mBinding.edPassword.getText().toString());
|
MvpPre.realName(mBinding.edName.getText().toString(),mBinding.edPassword.getText().toString());
|
||||||
} else {
|
} else {
|
||||||
SpUtil.setRealName(true);
|
SpUtil.setRealName(true);
|
||||||
@@ -2,6 +2,9 @@ package com.example.modulevocal.activity;
|
|||||||
|
|
||||||
import static com.xscm.moduleutil.utils.permission.PermissionUtils.TAG;
|
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.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -12,8 +15,12 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
import com.example.modulevocal.R;
|
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.PayMethodAdapter;
|
||||||
import com.xscm.moduleutil.adapter.BalanceRechargeAdapter;
|
import com.xscm.moduleutil.adapter.BalanceRechargeAdapter;
|
||||||
import com.example.modulevocal.conacts.RechargeConactos;
|
import com.example.modulevocal.conacts.RechargeConactos;
|
||||||
@@ -111,6 +118,8 @@ public class RechargeActivity extends BaseMvpActivity<RechargePresenter, Activit
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MvpPre.appPay(SpUtil.getUserId() + "", money, coin, selectedItem.getType());
|
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) {
|
if (appPay.getAli()!=null) {
|
||||||
PaymentUtil.payAlipay(this, appPay.getAli());
|
PaymentUtil.payAlipay(this, appPay.getAli());
|
||||||
}else if (appPay.getWx()!=null){
|
}else if (appPay.getWx()!=null){
|
||||||
|
|
||||||
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
IWXAPI wxapi = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||||
PaymentUtil.payWxMiniProgram2(wxapi,appPay);
|
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){
|
public void onResp(BaseResp resp){
|
||||||
if(resp.getType()== ConstantsAPI.COMMAND_PAY_BY_WX){
|
if(resp.getType()== ConstantsAPI.COMMAND_PAY_BY_WX){
|
||||||
Log.d(TAG,"onPayFinish,errCode="+resp.errCode);
|
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")) {
|
if (bindType.getWx_tl().getIs_pay_open().equals("1")) {
|
||||||
allData.add(bindType.getWx_tl());
|
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);
|
bindTypeAdapter.setNewData(allData);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.modulevocal.activity;
|
package com.example.modulevocal.activity;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
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.databinding.ActivityUnderageBinding;
|
||||||
import com.example.modulevocal.presenter.UnderagePresenter;
|
import com.example.modulevocal.presenter.UnderagePresenter;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
@@ -190,12 +192,18 @@ public class UnderageActivity extends BaseMvpActivity<UnderagePresenter, Activit
|
|||||||
private void navigateToNextPage() {
|
private void navigateToNextPage() {
|
||||||
// ToastUtils.showShort("密码设置成功");
|
// ToastUtils.showShort("密码设置成功");
|
||||||
|
|
||||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
|
||||||
.withString("type", "1").navigation();
|
// .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("");
|
mBinding.verificationcodeview.setText("");
|
||||||
finish();
|
finish();
|
||||||
// 这里可以添加页面跳转逻辑
|
// 这里可以添加页面跳转逻辑
|
||||||
finishAll();
|
finishAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.example.modulevocal.R;
|
import com.example.modulevocal.R;
|
||||||
|
import com.xscm.moduleutil.activity.WebViewActivity;
|
||||||
import com.xscm.moduleutil.adapter.PayMethodAdapter;
|
import com.xscm.moduleutil.adapter.PayMethodAdapter;
|
||||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||||
import com.example.modulevocal.databinding.ActivityWithdrawalBinding;
|
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.google.android.material.textfield.TextInputEditText;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -102,7 +104,11 @@ public class WithdrawalActivity extends BaseMvpActivity<WithdrawalPresenter, Act
|
|||||||
});
|
});
|
||||||
|
|
||||||
mBinding.tvLhjy.setOnClickListener(v -> {
|
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) {
|
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.databinding.ActivityWithdrawalListBinding;
|
||||||
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
import com.example.modulevocal.presenter.WithdrawalPresenter;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -89,4 +90,9 @@ public class WithdrawalListActivity extends BaseMvpActivity<WithdrawalPresenter,
|
|||||||
public void withdrawalList(List<WithdrawalBean> list) {
|
public void withdrawalList(List<WithdrawalBean> list) {
|
||||||
adapter.setNewData(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.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.MeHeadView;
|
import com.xscm.moduleutil.utils.MeHeadView;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/**
|
/**
|
||||||
@@ -96,24 +97,38 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
|||||||
|
|
||||||
List<String> images = item.getIcon(); // 获取图片列表
|
List<String> images = item.getIcon(); // 获取图片列表
|
||||||
|
|
||||||
for (String url : images) {
|
if (images == null || images.isEmpty()) {
|
||||||
if (url.contains("http")) {
|
return; // 提前返回,减少嵌套层级
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String url : images) {
|
||||||
|
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() {
|
headView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.app.Activity;
|
|||||||
|
|
||||||
import com.xscm.moduleutil.activity.IPresenter;
|
import com.xscm.moduleutil.activity.IPresenter;
|
||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
import com.xscm.moduleutil.bean.WalletConfig;
|
||||||
@@ -22,6 +23,8 @@ public final class WithdrawalConacts {
|
|||||||
|
|
||||||
void withdrawal(String s);
|
void withdrawal(String s);
|
||||||
void withdrawalList(List<WithdrawalBean> list);
|
void withdrawalList(List<WithdrawalBean> list);
|
||||||
|
|
||||||
|
void bindDetai(BindDetail bindDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IMePre extends IPresenter {
|
public interface IMePre extends IPresenter {
|
||||||
@@ -37,5 +40,7 @@ public final class WithdrawalConacts {
|
|||||||
void withdrawal(String number,String type,String sms_code);
|
void withdrawal(String number,String type,String sms_code);
|
||||||
|
|
||||||
void withdrawalList(String page,String page_limit,String search_stime,String search_etime);
|
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;
|
package com.example.modulevocal.fragment;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -35,9 +36,11 @@ import com.xscm.moduleutil.utils.SpUtil;
|
|||||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||||
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||||
|
import com.xscm.moduleutil.widget.ViewUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qx
|
* @author qx
|
||||||
@@ -124,25 +127,39 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
LinearLayout llContainer = mBinding.headerInfo.llImageContainer;
|
LinearLayout llContainer = mBinding.headerInfo.llImageContainer;
|
||||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
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) {
|
for (String url : images) {
|
||||||
if (url.contains("http")) {
|
if (!url.contains("http")) {
|
||||||
ImageView imageView = new ImageView(getContext());
|
continue; // 跳过非HTTP链接
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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));
|
mBinding.headerInfo.recycleView2.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||||
|
|
||||||
adapter = new BaseQuickAdapter<UserTagBean, BaseViewHolder>(R.layout.item_tag, userTagBeans) {
|
adapter = new BaseQuickAdapter<UserTagBean, BaseViewHolder>(R.layout.item_tag, userTagBeans) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.example.modulevocal.presenter;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||||
|
import com.xscm.moduleutil.bean.BindDetail;
|
||||||
import com.xscm.moduleutil.bean.BindType;
|
import com.xscm.moduleutil.bean.BindType;
|
||||||
import com.xscm.moduleutil.bean.WalletBean;
|
import com.xscm.moduleutil.bean.WalletBean;
|
||||||
import com.xscm.moduleutil.bean.WalletConfig;
|
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.http.BaseObserver;
|
||||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> implements WithdrawalConacts.IMePre {
|
public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> implements WithdrawalConacts.IMePre {
|
||||||
|
|
||||||
|
WithdrawalConacts.View mView;
|
||||||
public WithdrawalPresenter(WithdrawalConacts.View view, Context context) {
|
public WithdrawalPresenter(WithdrawalConacts.View view, Context context) {
|
||||||
super(view, context);
|
super(view, context);
|
||||||
|
this.mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -29,6 +34,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(WalletBean walletBean) {
|
public void onNext(WalletBean walletBean) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().wallet(walletBean);
|
MvpRef.get().wallet(walletBean);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -44,6 +52,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(BindType bindType) {
|
public void onNext(BindType bindType) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().bindType(bindType);
|
MvpRef.get().bindType(bindType);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -59,6 +70,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(WalletConfig walletConfig) {
|
public void onNext(WalletConfig walletConfig) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().getWalletConfig(walletConfig);
|
MvpRef.get().getWalletConfig(walletConfig);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -74,6 +88,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().bind();
|
MvpRef.get().bind();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -107,6 +124,9 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(String s) {
|
public void onNext(String s) {
|
||||||
|
if (MvpRef == null){
|
||||||
|
MvpRef=new WeakReference<>(mView);
|
||||||
|
}
|
||||||
MvpRef.get().withdrawal(s);
|
MvpRef.get().withdrawal(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -122,7 +142,28 @@ public class WithdrawalPresenter extends BasePresenter<WithdrawalConacts.View> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(List<WithdrawalBean> withdrawalBeans) {
|
public void onNext(List<WithdrawalBean> withdrawalBeans) {
|
||||||
MvpRef.get().withdrawalList(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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
||||||
tools:context=".activity.RealNameActivity">
|
tools:context="com.example.modulevocal.activity.RealNameActivity">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
@@ -26,7 +26,8 @@
|
|||||||
android:layout_height="@dimen/dp_68"
|
android:layout_height="@dimen/dp_68"
|
||||||
android:layout_margin="@dimen/dp_16"
|
android:layout_margin="@dimen/dp_16"
|
||||||
android:background="@drawable/bg_r9_fffff"
|
android:background="@drawable/bg_r9_fffff"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<!-- 第一步:验证手机号 -->
|
<!-- 第一步:验证手机号 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -239,7 +240,7 @@
|
|||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
android:layout_marginEnd="@dimen/dp_38"
|
android:layout_marginEnd="@dimen/dp_38"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="下一步"
|
android:text="确认"
|
||||||
android:textColor="@color/color_FF333333"
|
android:textColor="@color/color_FF333333"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||