Compare commits
283 Commits
dev_blind_
...
master_33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
345c9067aa | ||
|
|
c20312b982 | ||
|
|
643568f63b | ||
|
|
f03ba293b5 | ||
| a2f954b28a | |||
| d4549793d1 | |||
|
|
5da8855948 | ||
|
|
348dca8474 | ||
|
|
5afed0ee43 | ||
|
|
d065726274 | ||
|
|
8f9d558043 | ||
| c594364574 | |||
|
|
68140c8a3a | ||
| 5a4001c858 | |||
|
|
d5953bd651 | ||
|
|
17a2f5e091 | ||
|
|
b2297b062e | ||
| b53472de28 | |||
|
|
9bce235817 | ||
|
|
60ce5572cf | ||
|
|
3761cad653 | ||
|
|
2a276503b5 | ||
| fd0ad36a58 | |||
| 41c8783b53 | |||
|
|
7226add482 | ||
| 09e5f9b984 | |||
| 83ee1f94df | |||
|
|
7e1b054a98 | ||
|
|
9e0c437af5 | ||
|
|
ad26ae7db8 | ||
|
|
84230e517e | ||
| 9818a1af74 | |||
| f91ba79c5c | |||
|
|
0ea9ffc2e8 | ||
|
|
defb5fdd02 | ||
| b443fdd683 | |||
|
|
c11c66f56f | ||
|
|
a618bee6b7 | ||
| 399bedb874 | |||
|
|
3b6e2d47f4 | ||
|
|
96daf73a5c | ||
|
|
55cbd0ff5b | ||
|
|
a3ab9ff03e | ||
|
|
92ed82ea2a | ||
|
|
6d262d0c94 | ||
|
|
ce1174a88c | ||
|
|
2406e9bede | ||
| 9b3a011499 | |||
|
|
7859e7cb29 | ||
|
|
1fd36e3ba0 | ||
| ec3722b7d0 | |||
|
|
35917a5848 | ||
|
|
7ea6bb570d | ||
|
|
43f95260e6 | ||
|
|
54a4c0b590 | ||
|
|
2057a3575f | ||
|
|
aa809ebaf4 | ||
|
|
dffa71e346 | ||
|
|
fea46aab1f | ||
|
|
e032e0807b | ||
|
|
24ed313f60 | ||
|
|
02b70d559d | ||
|
|
7a26e81f67 | ||
| d07439efcf | |||
|
|
7bca817633 | ||
|
|
bad2b3689a | ||
| 3cc9b90151 | |||
|
|
e32e6f95b0 | ||
|
|
2162645da1 | ||
|
|
af17c85366 | ||
|
|
20c00e2896 | ||
|
|
44b95cb1c6 | ||
| 40e744a533 | |||
|
|
82ccd2d89c | ||
|
|
994bd2a3aa | ||
| 3ab91a74d1 | |||
|
|
d899975495 | ||
| dbbe753492 | |||
|
|
017320ac09 | ||
| 7ce0bb3a7c | |||
|
|
a78d5b4aba | ||
| 37fd1e9f47 | |||
|
|
97ad28ba62 | ||
| 3304e8f673 | |||
| e7daabe588 | |||
| d912ad6119 | |||
|
|
dfeb1c246b | ||
|
|
9588619b73 | ||
|
|
6ba71508ca | ||
| c8f443c105 | |||
|
|
ebcfddf450 | ||
| e43fb5e479 | |||
|
|
0c096dcafc | ||
|
|
545c69ff8b | ||
| bf8d88608d | |||
|
|
45c256cbbb | ||
|
|
fb1d6c0688 | ||
| fe921e25bb | |||
|
|
d5ca010ec7 | ||
|
|
04259472a1 | ||
|
|
d6032a0a0a | ||
|
|
4a7790d968 | ||
|
|
49810407ce | ||
|
|
fa086dc5cb | ||
|
|
3f8d6ed4af | ||
|
|
986902886a | ||
|
|
8ed7595aec | ||
|
|
b78fef6adc | ||
| fae0d01dc2 | |||
| 9a8bc0505d | |||
| e31fa0310c | |||
| 2705342e18 | |||
| 1bdf3a2ba3 | |||
|
|
5afa3bd30b | ||
|
|
54458bd0c0 | ||
| c53b9a6064 | |||
| 92d4130c45 | |||
|
|
a353e51ba8 | ||
|
|
0646f245b6 | ||
| 7e3ca79a01 | |||
| dfeb3a78c1 | |||
| e32d450ca1 | |||
| f29766731c | |||
| 736592b4e1 | |||
| 3108c898c2 | |||
| dd2f3db16a | |||
| 8af231e526 | |||
| fdbbc3b224 | |||
| 1e4b0bb536 | |||
| 4729f93515 | |||
|
|
3376a57f9d | ||
|
|
410fcb5895 | ||
|
|
9b62ab6011 | ||
|
|
62aa1d63df | ||
|
|
034f2dba5d | ||
|
|
aee1d6cad4 | ||
| 9b01ae4d82 | |||
| 16f23519b1 | |||
| 9bfed0bc7b | |||
|
|
bc0ed26377 | ||
|
|
0d14ce5aee | ||
|
|
4a7423a5b9 | ||
|
|
0a4425d705 | ||
| d4c2ef71cb | |||
|
|
7184b147d9 | ||
| 39e9670cff | |||
|
|
7d7535935a | ||
|
|
dd657e9918 | ||
| 09cef4ade6 | |||
| 7038681f8c | |||
| 6cf68838f8 | |||
| c3a08974d1 | |||
|
|
20c25a51ef | ||
|
|
9dfb772224 | ||
|
|
f5f68f16b7 | ||
|
|
7672cea263 | ||
| 0a02b39c12 | |||
|
|
e786ae16c2 | ||
|
|
1d447b0a90 | ||
|
|
4918f9ba20 | ||
|
|
124b18dcb0 | ||
|
|
f55e9c0cfe | ||
|
|
84c43f74bc | ||
|
|
674346b6de | ||
|
|
64f40d52da | ||
|
|
75e342975c | ||
|
|
dd4172fc3d | ||
| 6b7a98dbc3 | |||
| 640dea5c53 | |||
| a907897239 | |||
| 3807ff8916 | |||
| 36b85c15f5 | |||
| 3e91068866 | |||
|
|
4d61c7e176 | ||
|
|
c6d9dbc118 | ||
| 6743ec3cf6 | |||
|
|
addab80997 | ||
|
|
9081ba4cd6 | ||
|
|
12bedd630e | ||
|
|
003c7f9e12 | ||
|
|
9089e96856 | ||
| 60c14f720d | |||
|
|
c139b03417 | ||
| b3fb6e62ae | |||
| 613185db40 | |||
|
|
291492f2d0 | ||
|
|
cbe91c84e9 | ||
| f417e4ead8 | |||
|
|
08bc6d554a | ||
|
|
895a1c6951 | ||
| b9f1474362 | |||
|
|
58508ca0ae | ||
|
|
5736265388 | ||
|
|
e68d20252a | ||
| 44b4b06592 | |||
| fb7551f7d0 | |||
|
|
40455fffc9 | ||
| 195035c456 | |||
| 492003ff01 | |||
| 17c2e7f795 | |||
| 1a3d66553c | |||
| 710cddd3a7 | |||
| da7ebb2663 | |||
| 6a6696f355 | |||
| 368b002db6 | |||
| 501a7b482b | |||
|
|
279575d80b | ||
| 3bf594d0b5 | |||
| 5f33fa38f6 | |||
| e0312eedd1 | |||
| 69d8feb9a9 | |||
| 500588c842 | |||
| 0a70da82f0 | |||
| abbb8c524c | |||
| 1334d173cf | |||
| f3ff37aea7 | |||
| 9741be743c | |||
| f54054283c | |||
| fd06243c22 | |||
| cef94a248e | |||
| beb566b294 | |||
|
|
6889828c00 | ||
| 9c57f0bd96 | |||
| a1c96cfd0f | |||
|
|
1198a8f1d8 | ||
| a255d1f2b5 | |||
| 53ce1c703e | |||
| 3f9e95ce7d | |||
|
|
8e07d4523f | ||
| 29ddc54303 | |||
| ae9c050ae6 | |||
| 7b61e8c562 | |||
|
|
23a396864f | ||
| af8052f65b | |||
| 6603a2dbb5 | |||
| f3a0b4d145 | |||
| 0c99324904 | |||
| 8d077e8062 | |||
|
|
3aaafdbbbe | ||
|
|
f4016089a1 | ||
| c53757c64b | |||
| c8c4352284 | |||
|
|
cd2e176f0a | ||
| e6d92ffc86 | |||
| ea0a3375e4 | |||
|
|
06357088c1 | ||
|
|
fa24d226ee | ||
|
|
7eb8153744 | ||
|
|
35f16bdcae | ||
|
|
aacd8b8735 | ||
| 9926997fd7 | |||
| b02cbd7831 | |||
|
|
4150eeed64 | ||
|
|
6e595ff1e4 | ||
|
|
fbc50229e8 | ||
| 1edb07d76c | |||
| 9641d90f32 | |||
| 3095438a5c | |||
|
|
067bbc70c5 | ||
| 7201fd37f3 | |||
|
|
0bab58d507 | ||
|
|
f1ac21fe87 | ||
|
|
f4b5cdfed3 | ||
| 9021659770 | |||
| e04d277560 | |||
|
|
a7a9a28c09 | ||
|
|
bbd394044f | ||
|
|
49df393781 | ||
|
|
f0a8c17401 | ||
| a01ddd310b | |||
|
|
26ec74932f | ||
|
|
3aa85ca9bb | ||
|
|
a67c2b4009 | ||
| 9486a1a572 | |||
| c1aa8188ce | |||
|
|
a83e3e0511 | ||
|
|
3488da27f0 | ||
| 56845de59d | |||
|
|
282790ead5 | ||
| 49313ca326 | |||
| 34c569ecb5 | |||
| a041450766 | |||
| e9488df780 |
@@ -55,8 +55,8 @@ public class FURenderer extends IFURenderer {
|
||||
private FURenderKit mFURenderKit;
|
||||
|
||||
/* AI道具*/
|
||||
private String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||
private String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
|
||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
|
||||
|
||||
/* GL 线程 ID */
|
||||
private Long mGlThreadId = 0L;
|
||||
|
||||
@@ -314,6 +314,35 @@ public class FileUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
|
||||
File fileDir = new File(saveFileDir);
|
||||
if (!fileDir.exists()) {
|
||||
fileDir.mkdirs();
|
||||
}
|
||||
File file = new File(fileDir, fileName);
|
||||
if (file.exists()) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
try {
|
||||
InputStream inputStream = context.getAssets().open(assetsPath);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
BufferedInputStream bis = new BufferedInputStream(inputStream);
|
||||
BufferedOutputStream bos = new BufferedOutputStream(fos);
|
||||
byte[] byteArray = new byte[1024];
|
||||
int bytes = bis.read(byteArray);
|
||||
while (bytes > 0) {
|
||||
bos.write(byteArray, 0, bytes);
|
||||
bos.flush();
|
||||
bytes = bis.read(byteArray);
|
||||
}
|
||||
bos.close();
|
||||
fos.close();
|
||||
return file.getAbsolutePath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Uri文件绝对路径
|
||||
@@ -522,6 +551,7 @@ public class FileUtils {
|
||||
|
||||
/**
|
||||
* 遍历一个文件夹获取改文件夹下所有文件名
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
@@ -563,7 +593,7 @@ public class FileUtils {
|
||||
* @param path String
|
||||
* @return Boolean
|
||||
*/
|
||||
public static Boolean checkIsVideo(Context context,String path) {
|
||||
public static Boolean checkIsVideo(Context context, String path) {
|
||||
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
|
||||
try {
|
||||
retriever.setDataSource(context, Uri.fromFile(new File(path)));
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package com.yunbao.faceunity;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
@@ -10,8 +7,5 @@ import static org.junit.Assert.*;
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,18 +30,12 @@ public class ShareBuilder {
|
||||
private String anchorAvatar;
|
||||
|
||||
public static String createLiveShareLink(String shareUid, String anchorId, String anchorName, String anchorAvatar) {
|
||||
try {
|
||||
return String.format(CommonAppConfig.HOST +
|
||||
"/h5/activity/FriendInvitation/liveShare.html?user_id=%s&anchor_id=%s&anchor_name=%s&anchor_avatar=%s&isGoogle=%s",
|
||||
shareUid,
|
||||
anchorId,
|
||||
URLEncoder.encode(anchorName, "UTF-8"),
|
||||
URLEncoder.encode(anchorAvatar, "UTF-8"),
|
||||
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
|
||||
) ;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return String.format(CommonAppConfig.HOST +
|
||||
"/index.php?g=Appapi&m=home&a=share&uid=%s&user_id=%s&isGoogle=%s",
|
||||
anchorId,
|
||||
shareUid,
|
||||
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
|
||||
) ;
|
||||
}
|
||||
|
||||
public static String createInviteLink(String shareUid) {
|
||||
|
||||
@@ -6,6 +6,9 @@ apply plugin: 'com.alibaba.arouter'
|
||||
android {
|
||||
dexOptions {
|
||||
jumboMode = true
|
||||
}
|
||||
project.tasks.getByName("tasks").doFirst {
|
||||
|
||||
}
|
||||
/* applicationVariants.all { variant ->
|
||||
variant.mergeAssetsProvider.configure {
|
||||
@@ -92,6 +95,13 @@ android {
|
||||
exclude 'lib/armeabi-v7a/libmmlic.so'
|
||||
exclude 'lib/armeabi-v7a/libMNN_CL.so'
|
||||
exclude 'lib/armeabi-v7a/libMNN_Express.so'
|
||||
//美颜
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
exclude 'lib/armeabi-v7a/libCNamaSDK.so'
|
||||
exclude 'lib/arm64-v8a/libCNamaSDK.so'
|
||||
exclude 'lib/armeabi-v7a/libfuai.so'
|
||||
exclude 'lib/arm64-v8a/libfuai.so'
|
||||
}
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
@@ -99,6 +109,11 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
applicationVariants.all { variant ->
|
||||
println "清空build文件夹";
|
||||
for (final def project in rootProject.getAllprojects()) {
|
||||
delete project.buildDir
|
||||
println project.buildDir
|
||||
}
|
||||
String variantName = variant.name.capitalize()
|
||||
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
||||
processManifestTask.doLast { pm ->
|
||||
@@ -139,9 +154,36 @@ android {
|
||||
'Asset/*',
|
||||
'image_effect_shaders/*',
|
||||
'internal/*'
|
||||
//美颜基础组件
|
||||
|
||||
]))
|
||||
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
delete(fileTree(dir: outputDir, includes: [
|
||||
'model/ai_face_processor_lite.bundle',
|
||||
'graphics/face_beautification.bundle'
|
||||
]))
|
||||
} else {
|
||||
println "不删除bundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
variant.outputs.all {
|
||||
def isGoogle = "link"
|
||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay) {
|
||||
isGoogle = "Google"
|
||||
}
|
||||
def isPlugin = "all"
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
isPlugin = "plugin"
|
||||
}
|
||||
def isTest = "测试服"
|
||||
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
|
||||
isTest = "正式服"
|
||||
}
|
||||
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
||||
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -193,12 +235,17 @@ android {
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
zipAlignEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
zipAlignEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
170
app/proguard-rules.pro
vendored
170
app/proguard-rules.pro
vendored
@@ -12,17 +12,40 @@
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
public *;
|
||||
}
|
||||
|
||||
# Uncomment this to preserve the groupLast number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the groupLast number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-renamesourcefileattribute SourceFile
|
||||
|
||||
-keep class com.yunbao.**{
|
||||
public <methods>;
|
||||
protected <methods>;
|
||||
}
|
||||
-keep class * implements com.yunbao.common.bean.BaseModel {
|
||||
*;
|
||||
}
|
||||
-keep class com.yunbao.common.bean.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class com.yunbao.common.views.weight.VerticalViewPager$LayoutParams{
|
||||
*;
|
||||
}
|
||||
-keep class android.**{
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class **.R$* {
|
||||
public static <fields>;
|
||||
}
|
||||
-keep class com.tencent.** { *; }
|
||||
-keep class com.adjust.sdk.**{ *; }
|
||||
-keep class com.google.android.gms.common.ConnectionResult {
|
||||
int SUCCESS;
|
||||
@@ -48,6 +71,13 @@
|
||||
-keep class okhttp3.internal.**{*;}
|
||||
|
||||
-dontwarn okio.**
|
||||
#okhttp
|
||||
-dontwarn okhttp3.**
|
||||
-keep class okhttp3.**{*;}
|
||||
|
||||
#okio
|
||||
-dontwarn okio.**
|
||||
-keep class okio.**{*;}
|
||||
|
||||
# Retrofit
|
||||
|
||||
@@ -55,9 +85,10 @@
|
||||
|
||||
-keep class retrofit2.** { *; }
|
||||
|
||||
-keepattributes Signature-keepattributes Exceptions
|
||||
-keepattributes Signature-keepattributes,Exceptions
|
||||
|
||||
# RxJava RxAndroid
|
||||
-dontwarn java.util.concurrent.Flow*
|
||||
|
||||
-dontwarn sun.misc.**
|
||||
|
||||
@@ -69,20 +100,139 @@ long consumerIndex;
|
||||
|
||||
}
|
||||
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef* {
|
||||
|
||||
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
rx.internal.util.atomic.LinkedQueueNode* producerNode;
|
||||
|
||||
}
|
||||
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef* {
|
||||
|
||||
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
}
|
||||
|
||||
# Gson
|
||||
|
||||
-keep class com.google.gson.stream.** { *; }
|
||||
##---------------Begin: proguard configuration for Gson ----------
|
||||
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
||||
# removes such information by default, so configure it to keep all of it.
|
||||
-keepattributes Signature
|
||||
|
||||
# For using GSON @Expose annotation
|
||||
-keepattributes *Annotation*
|
||||
|
||||
# Gson specific classes
|
||||
-dontwarn sun.misc.**
|
||||
#-keep class com.google.gson.stream.** { *; }
|
||||
|
||||
# Application classes that will be serialized/deserialized over Gson
|
||||
-keep class com.google.gson.examples.android.model.** { <fields>; }
|
||||
|
||||
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
-keep class * extends com.google.gson.TypeAdapter
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
|
||||
# Prevent R8 from leaving Data object members always null
|
||||
-keepclassmembers,allowobfuscation class * {
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
}
|
||||
|
||||
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
||||
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
||||
|
||||
##---------------End: proguard configuration for Gson ----------
|
||||
|
||||
-keepattributes EnclosingMethod
|
||||
#--------融云
|
||||
-keepattributes Exceptions,InnerClasses
|
||||
-keepattributes Signature
|
||||
-keep class io.rong.** {*;}
|
||||
-keep class cn.rongcloud.** {*;}
|
||||
-keep class * implements io.rong.imlib.model.MessageContent {*;}
|
||||
-dontwarn io.rong.push.**
|
||||
-dontnote com.xiaomi.**
|
||||
-dontnote com.google.android.gms.gcm.**
|
||||
-dontnote io.rong.**
|
||||
# 下方混淆使用了融云 IMKit 提供的 locationKit 位置插件时才需要配置,可参考高德官网的混淆方式:https://lbs.amap.com/api/android-sdk/guide/create-project/dev-attention
|
||||
-keep class com.amap.api.maps.**{*;}
|
||||
-keep class com.autonavi.**{*;}
|
||||
-keep class com.amap.api.trace.**{*;}
|
||||
-keep class com.amap.api.location.**{*;}
|
||||
-keep class com.amap.api.fence.**{*;}
|
||||
-keep class com.loc.**{*;}
|
||||
-keep class com.autonavi.aps.amapapi.model.**{*;}
|
||||
-keep class com.amap.api.services.**{*;}
|
||||
-ignorewarnings
|
||||
|
||||
#--------科大讯飞
|
||||
-keep class com.iflytek.**{*;}
|
||||
-keepattributes Signature
|
||||
#EvenBus
|
||||
-keepattributes *Annotation*
|
||||
-keepclassmembers class * {
|
||||
@org.greenrobot.eventbus.Subscribe <methods>;
|
||||
}
|
||||
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
||||
|
||||
# If using AsyncExecutord, keep required constructor of default event used.
|
||||
# Adjust the class name if a custom failure event type is used.
|
||||
-keepclassmembers class org.greenrobot.eventbus.util.ThrowableFailureEvent {
|
||||
<init>(java.lang.Throwable);
|
||||
}
|
||||
|
||||
# Accessed via reflection, avoid renaming or removal
|
||||
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
|
||||
|
||||
#--------ARouter
|
||||
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||
|
||||
# If you use the byType method to obtain Service, add the following rules to protect the interface:
|
||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
||||
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
#----retrofit2
|
||||
-keepattributes Signature, InnerClasses, EnclosingMethod
|
||||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
|
||||
-keepattributes AnnotationDefault
|
||||
-keepclassmembers,allowshrinking,allowobfuscation interface * {
|
||||
@retrofit2.http.* <methods>;
|
||||
}
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement*
|
||||
-dontwarn javax.annotation.**
|
||||
-dontwarn kotlin.Unit
|
||||
-dontwarn retrofit2.KotlinExtensions*
|
||||
-dontwarn retrofit2.KotlinExtensions$*
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface <1>
|
||||
-if interface * { @retrofit2.http.* <methods>; }
|
||||
-keep,allowobfuscation interface * extends <1>
|
||||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
||||
-if interface * { @retrofit2.http.* public *** *(...); }
|
||||
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
|
||||
|
||||
#-----glide
|
||||
-keep public class com.bumptech.glide.** {*;}
|
||||
-keep public class jp.co.cyberagent.** {*;}
|
||||
-dontwarn jp.co.cyberagent.android.gpuimage.**
|
||||
|
||||
-printconfiguration tmp/full-r8-config.txt
|
||||
#---美颜模块需要暴露出来的参数名
|
||||
-keep class com.yunbao.faceunity.utils.FURenderer{
|
||||
public static java.lang.String BUNDLE_AI_FACE;
|
||||
}
|
||||
-keep class com.yunbao.faceunity.utils.FaceUnityConfig{
|
||||
public static java.lang.String BUNDLE_FACE_BEAUTIFICATION;
|
||||
}
|
||||
-keep class com.faceunity.wrapper.faceunity$LoadConfig*{
|
||||
private static boolean sLoadedLibrary;
|
||||
}
|
||||
@@ -99,7 +99,6 @@
|
||||
android:preserveLegacyExternalStorage="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="theme,label,icon,allowBackup">
|
||||
<!-- <service-->
|
||||
<!-- android:name="com.shayu.phonelive.utils.MyNotificationService">-->
|
||||
@@ -133,20 +132,7 @@
|
||||
|
||||
<data android:scheme="smvslm" />
|
||||
</intent-filter>
|
||||
</activity> <!-- keytool -exportcert -alias androiddebugkey -keystore feixiong.jks | openssl sha1 -binary | openssl base64 -->
|
||||
<meta-data
|
||||
android:name="TencentMapSDK"
|
||||
android:value="${txMapAppKey}" />
|
||||
<!-- 百度语音识别 -->
|
||||
<meta-data
|
||||
android:name="com.baidu.speech.APP_ID"
|
||||
android:value="${baiduAppId}" />
|
||||
<meta-data
|
||||
android:name="com.baidu.speech.API_KEY"
|
||||
android:value="${baiduAppKey}" />
|
||||
<meta-data
|
||||
android:name="com.baidu.speech.SECRET_KEY"
|
||||
android:value="${baiduAppSecretKey}" />
|
||||
</activity>
|
||||
|
||||
<!-- 服务器地址 -->
|
||||
<meta-data
|
||||
@@ -159,6 +145,9 @@
|
||||
<meta-data
|
||||
android:name="IS_UPLOAD_ERROR_LOG"
|
||||
android:value="${isUploadLog}" />
|
||||
<meta-data
|
||||
android:name="IS_PLUGIN_MODEL"
|
||||
android:value="${isPluginModel}" />
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="${isUploadLog}" />
|
||||
@@ -197,12 +186,12 @@
|
||||
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<meta-data
|
||||
android:name="com.huawei.hms.client.appid"
|
||||
android:value="106936673"/>
|
||||
<meta-data
|
||||
android:name="com.huawei.hms.client.cpid"
|
||||
android:value="30086000612391734"/>
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.huawei.hms.client.appid"-->
|
||||
<!-- android:value="106936673"/>-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.huawei.hms.client.cpid"-->
|
||||
<!-- android:value="30086000612391734"/>-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -11,14 +11,16 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.os.Process;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
@@ -34,6 +36,7 @@ import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
@@ -44,6 +47,7 @@ import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.socket.SocketReceiveBean;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
@@ -131,12 +135,6 @@ public class AppContext extends CommonAppContext {
|
||||
if (!isMainProcess()) {
|
||||
return;
|
||||
}
|
||||
AppManager.runDebugCode(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtil.show("Debug代码");
|
||||
}
|
||||
});
|
||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||
//注册全局异常捕获
|
||||
registerError();
|
||||
@@ -201,11 +199,16 @@ public class AppContext extends CommonAppContext {
|
||||
&& (TextUtils.equals("__system__", message.getTargetId())
|
||||
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
||||
JSONObject map = received.getMsg().getJSONObject(0);
|
||||
sendStartAnchorLive(map);
|
||||
}
|
||||
//主播页面
|
||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||
EventBus.getDefault().post(message);
|
||||
}
|
||||
@@ -215,6 +218,14 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void sendStartAnchorLive(JSONObject map) {
|
||||
AnchorStartLiveBean bean = new AnchorStartLiveBean();
|
||||
bean.setAnchorName(map.getString("anchorName"));
|
||||
bean.setRoomId(map.getString("roomid"));
|
||||
bean.setAvatar(map.getString("avatar"));
|
||||
EventBus.getDefault().post(bean);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -248,6 +259,7 @@ public class AppContext extends CommonAppContext {
|
||||
configSPApp();
|
||||
//初始化美颜SDK
|
||||
// FaceManager.initFaceUnity(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,7 +301,7 @@ public class AppContext extends CommonAppContext {
|
||||
.setMainCrashHandler((t, e) -> {
|
||||
Log.e("ApplicationError", "主线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||
e.printStackTrace();
|
||||
AppManager.runDebugCode(()->{
|
||||
AppManager.runDebugCode(() -> {
|
||||
//闪退后finish所有Activity并且杀死进程
|
||||
for (WeakReference<Activity> activity : activities) {
|
||||
if (activity != null && activity.get() != null) {
|
||||
@@ -321,7 +333,7 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
|
||||
|
||||
private void setFirebaseCrashData() {
|
||||
public static void setFirebaseCrashData() {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,13 @@ import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.FileUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
@@ -105,7 +107,8 @@ public class NeverCrashUtils {
|
||||
Log.e(TAG, "未捕获的主线程异常行为", e);
|
||||
}
|
||||
e.printStackTrace();
|
||||
|
||||
AppContext.setFirebaseCrashData();
|
||||
FirebaseCrashlytics.getInstance().recordException(e);
|
||||
AppManager.runDebugCode(() -> Toast.makeText(application, "发生闪退:" + e.getMessage(), Toast.LENGTH_SHORT).show());
|
||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||
|
||||
@@ -116,8 +116,8 @@ dependencies {
|
||||
api rootProject.ext.dependencies["ucrop"]
|
||||
|
||||
//腾讯定位,地图sdk
|
||||
api files('libs/TencentLocationSdk_v6.2.5.3.jar')
|
||||
api files('libs/TencentMapSDK_1.2.8.1.jar')
|
||||
// api files('libs/TencentLocationSdk_v6.2.5.3.jar')
|
||||
// api files('libs/TencentMapSDK_1.2.8.1.jar')
|
||||
|
||||
//下拉刷新上拉加载
|
||||
api rootProject.ext.dependencies["smartRefreshLayout"]
|
||||
@@ -174,8 +174,8 @@ dependencies {
|
||||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
api 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
//gson解析
|
||||
api 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
|
||||
api 'com.squareup.retrofit2:converter-gson:2.3.0'//混淆
|
||||
implementation "io.reactivex.rxjava2:rxjava:2.2.3"//混淆
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
api 'com.jakewharton.rxbinding3:rxbinding:3.1.0'
|
||||
//loading样式库
|
||||
@@ -191,4 +191,9 @@ dependencies {
|
||||
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||
|
||||
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
|
||||
//选择器
|
||||
api 'com.github.gzu-liyujiang.AndroidPicker:Common:4.1.11'
|
||||
api 'com.github.gzu-liyujiang.AndroidPicker:WheelView:4.1.11'
|
||||
//自定义圆角图片
|
||||
api 'com.makeramen:roundedimageview:2.3.0'
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -35,6 +35,8 @@ public class CommonAppConfig {
|
||||
public static final boolean IS_GOOGLE_PLAY = getMetaDataBoolean("IS_GOOGLE_PLAY");
|
||||
//是否开启上报错误日志功能
|
||||
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
|
||||
//是否为插件包模式
|
||||
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
|
||||
|
||||
//外部sd卡
|
||||
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
|
||||
|
||||
@@ -179,10 +179,12 @@ public class Constants {
|
||||
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
||||
public static final String XYD_COMPLETE = "XydComplete";//心愿单完成通知
|
||||
public static final String WISH_LIST_PROGRESS = "wishListProgress";//心愿单进度通知
|
||||
public static final String LIVE_VOTE_CREATE="createVote";
|
||||
public static final String LIVE_VOTE_UPDATE="updateVote";
|
||||
public static final String LIVE_VOTE_END="endVote";
|
||||
public static final String LIVE_PK_END="endPK";//结束PK,以这个PK获取到的参数为准
|
||||
public static final String LIVE_VOTE_CREATE = "createVote";
|
||||
public static final String LIVE_VOTE_UPDATE = "updateVote";
|
||||
public static final String LIVE_VOTE_END = "endVote";
|
||||
public static final String LIVE_PK_END = "endPK";//结束PK,以这个PK获取到的参数为准
|
||||
public static final String RED_PACKET = "RedPacket";//红包通知
|
||||
public static final String RED_PACKET_SUPER_JACKPOT = "RedPacketSuperJackpot";//超级红包通知
|
||||
|
||||
//游戏socket
|
||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||
|
||||
@@ -8,7 +8,7 @@ public class HtmlConfig {
|
||||
|
||||
//登录即代表同意服务和隐私条款
|
||||
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
|
||||
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/portal/page/index/id/59";
|
||||
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=Portal&m=Page&a=index&id=59";
|
||||
|
||||
//注册用户协议
|
||||
public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=2";
|
||||
|
||||
@@ -23,12 +23,16 @@ import android.widget.ProgressBar;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
@@ -39,10 +43,13 @@ import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
@@ -82,7 +89,6 @@ public class WebViewActivity extends AbsActivity {
|
||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = DpUtil.dp2px(1);
|
||||
@@ -110,6 +116,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||
}
|
||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||
if (!navigationGestureEnabled(mContext)) {
|
||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
@@ -162,7 +169,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mWebView.getSettings().setDomStorageEnabled(true);
|
||||
String appCachePath = mContext.getCacheDir().getAbsolutePath();
|
||||
mWebView.getSettings().setAppCachePath(appCachePath);
|
||||
// mWebView.getSettings().setAppCachePath(appCachePath);
|
||||
mWebView.getSettings().setAllowFileAccess(true);
|
||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
||||
@@ -171,6 +178,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
if (Constants.myIntoIndex == 2) {
|
||||
ft_title.setVisibility(View.GONE);
|
||||
@@ -252,7 +260,8 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url) {
|
||||
forward(context, url, true); }
|
||||
forward(context, url, true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@@ -373,6 +382,44 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
}))
|
||||
.show();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||
//看直播
|
||||
gotoLive(event.getLiveId());
|
||||
}
|
||||
}
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
|
||||
LiveHttpUtil.getLiveInfo(live_id, new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.UserMedalModel;
|
||||
import com.yunbao.common.views.AchievementDetailsViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AchievementDetailsAdapter extends RecyclerView.Adapter {
|
||||
private List<UserMedalModel> dressInfo = new ArrayList<>();
|
||||
|
||||
public AchievementDetailsAdapter(List<UserMedalModel> dressInfo) {
|
||||
this.dressInfo = dressInfo;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_achievement_details, parent, false);
|
||||
return new AchievementDetailsViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
AchievementDetailsViewHolder achievementDetailsViewHolder = (AchievementDetailsViewHolder) holder;
|
||||
achievementDetailsViewHolder.showData(dressInfo.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return dressInfo.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.views.GiftAlreadyWallViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GiftAlreadyWallAdapter extends RecyclerView.Adapter {
|
||||
private List<GiftWallModel> giftWall = new ArrayList<>();
|
||||
private boolean sbWy;//是否正在直播
|
||||
|
||||
public GiftAlreadyWallAdapter(boolean sbWy) {
|
||||
this.sbWy = sbWy;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_already_wall, parent, false);
|
||||
return new GiftAlreadyWallViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
GiftAlreadyWallViewHolder withoutWallViewHolder = (GiftAlreadyWallViewHolder) holder;
|
||||
withoutWallViewHolder.showData(giftWall.get(position), sbWy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftWall.size();
|
||||
}
|
||||
|
||||
public void addAllData(List<GiftWallModel> mGiftWall) {
|
||||
giftWall.clear();
|
||||
giftWall.addAll(mGiftWall);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftQuantityModel;
|
||||
import com.yunbao.common.views.GiftNumber;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GiftNumberAdapter extends RecyclerView.Adapter {
|
||||
private List<GiftQuantityModel> giftQuantityModels;
|
||||
|
||||
public GiftNumberAdapter(List<GiftQuantityModel> giftQuantityModels) {
|
||||
this.giftQuantityModels = giftQuantityModels;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_gift_number, parent, false);
|
||||
return new GiftNumber(robotSayHelloView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
GiftNumber giftNumber = (GiftNumber) holder;
|
||||
giftNumber.showData(giftQuantityModels.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftQuantityModels.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.views.GiftWithoutWallViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GiftWithoutWallAdapter extends RecyclerView.Adapter {
|
||||
private List<GiftWallModel> giftWall = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_without_wall, parent, false);
|
||||
return new GiftWithoutWallViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
GiftWithoutWallViewHolder withoutWallViewHolder = (GiftWithoutWallViewHolder) holder;
|
||||
withoutWallViewHolder.showData(giftWall.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftWall.size();
|
||||
}
|
||||
|
||||
public void addAllData(List<GiftWallModel> mGiftWall) {
|
||||
giftWall.clear();
|
||||
giftWall.addAll(mGiftWall);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -11,6 +12,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.DayWishItemViewHolder;
|
||||
import com.yunbao.common.views.LunarWishItemViewHolder;
|
||||
import com.yunbao.common.views.SeasonalWishItemViewHolder;
|
||||
@@ -46,8 +48,20 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(true));
|
||||
break;
|
||||
}
|
||||
boolean isAdd = false;
|
||||
for (int i = 0; i < wishList.size(); i++) {
|
||||
if (wishList.get(i)!=null){
|
||||
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid())
|
||||
&& TextUtils.equals(wishList.get(i).getLid(), model.getLid())) {
|
||||
ToastUtil.show(R.string.too_many_gifts);
|
||||
isAdd = true;
|
||||
}
|
||||
}
|
||||
|
||||
wishList.add(0, model);
|
||||
}
|
||||
if (!isAdd) {
|
||||
wishList.add(0, model);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.UserMedalListModel;
|
||||
import com.yunbao.common.views.MedalAchievementViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MedalAchievementAdapter extends RecyclerView.Adapter {
|
||||
private List<UserMedalListModel> medalData = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_medal_achievement, parent, false);
|
||||
return new MedalAchievementViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
MedalAchievementViewHolder achievementViewHolder = (MedalAchievementViewHolder) holder;
|
||||
achievementViewHolder.showData(medalData.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return medalData.size();
|
||||
}
|
||||
|
||||
public void addAllData(List<UserMedalListModel> mGiftWall) {
|
||||
|
||||
medalData.clear();
|
||||
medalData.addAll(mGiftWall);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.views.MonthGiftNamingViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MonthGiftNamingAdapter extends RecyclerView.Adapter {
|
||||
private List<GiftWallModel> giftWall = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_month_gift_naming, parent, false);
|
||||
return new MonthGiftNamingViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
MonthGiftNamingViewHolder monthGiftNamingViewHolder = (MonthGiftNamingViewHolder) holder;
|
||||
monthGiftNamingViewHolder.showData(giftWall.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftWall.size();
|
||||
}
|
||||
|
||||
public void addAllData(List<GiftWallModel> mGiftWall) {
|
||||
giftWall.clear();
|
||||
giftWall.addAll(mGiftWall);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,8 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
//是否展示0=不展示1=展示
|
||||
@SerializedName("list_show")
|
||||
private int listShow = 0;
|
||||
@SerializedName("red_packet_show")
|
||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
@SerializedName("up_show")
|
||||
private int upShow = 0;
|
||||
@@ -24,6 +26,10 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
@SerializedName("slide")
|
||||
private List<SlideInfoModel> slide = new ArrayList<>();
|
||||
@SerializedName("red_packet_total")
|
||||
private int redPacketTotal = 100;
|
||||
@SerializedName("red_packet_day_create_num")
|
||||
private int redPacketNum = 0;
|
||||
|
||||
public List<SlideInfoModel> getSlide() {
|
||||
return slide;
|
||||
@@ -52,6 +58,30 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getShowRedPacket() {
|
||||
return showRedPacket;
|
||||
}
|
||||
|
||||
public void setShowRedPacket(int showRedPacket) {
|
||||
this.showRedPacket = showRedPacket;
|
||||
}
|
||||
|
||||
public int getRedPacketTotal() {
|
||||
return redPacketTotal;
|
||||
}
|
||||
|
||||
public void setRedPacketTotal(int redPacketTotal) {
|
||||
this.redPacketTotal = redPacketTotal;
|
||||
}
|
||||
|
||||
public int getRedPacketNum() {
|
||||
return redPacketNum;
|
||||
}
|
||||
|
||||
public void setRedPacketNum(int redPacketNum) {
|
||||
this.redPacketNum = redPacketNum;
|
||||
}
|
||||
|
||||
public List<AnchorRecommendItemModel> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class AnchorStartLiveBean extends BaseModel{
|
||||
private String anchorName;
|
||||
private String avatar;
|
||||
private String roomId;
|
||||
|
||||
public String getAnchorName() {
|
||||
return anchorName;
|
||||
}
|
||||
|
||||
public void setAnchorName(String anchorName) {
|
||||
this.anchorName = anchorName;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId;
|
||||
}
|
||||
|
||||
public void setRoomId(String roomId) {
|
||||
this.roomId = roomId;
|
||||
}
|
||||
}
|
||||
@@ -103,9 +103,43 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
@SerializedName("anchor_goodnum")
|
||||
private String anchorGoodnum;
|
||||
@SerializedName("jackpot_level")
|
||||
private String jackpotLevel="-1";
|
||||
private String jackpotLevel = "-1";
|
||||
@SerializedName("live_vote")
|
||||
private LiveRoomVoteModel voteModel;
|
||||
@SerializedName("red_packet")
|
||||
private RedPacketModel redPacketModel;
|
||||
|
||||
@SerializedName("gift_wall_lighten_number")
|
||||
private String giftWallLightenNumber;
|
||||
@SerializedName("gift_wall_lighten_total")
|
||||
private String giftWallLightenTotal;
|
||||
|
||||
public String getGiftWallLightenNumber() {
|
||||
return giftWallLightenNumber;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGiftWallLightenNumber(String giftWallLightenNumber) {
|
||||
this.giftWallLightenNumber = giftWallLightenNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftWallLightenTotal() {
|
||||
return giftWallLightenTotal;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setGiftWallLightenTotal(String giftWallLightenTotal) {
|
||||
this.giftWallLightenTotal = giftWallLightenTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedPacketModel getRedPacketModel() {
|
||||
return redPacketModel;
|
||||
}
|
||||
|
||||
public EnterRoomInfoModel setRedPacketModel(RedPacketModel redPacketModel) {
|
||||
this.redPacketModel = redPacketModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getJackpotLevel() {
|
||||
|
||||
@@ -486,8 +520,8 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getIsconnection() {
|
||||
if(StringUtil.isEmpty(isconnection)){
|
||||
isconnection="0";
|
||||
if (StringUtil.isEmpty(isconnection)) {
|
||||
isconnection = "0";
|
||||
}
|
||||
return isconnection;
|
||||
}
|
||||
@@ -498,6 +532,9 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getIsleave() {
|
||||
if (StringUtil.isEmpty(isleave)) {
|
||||
isleave = "0";
|
||||
}
|
||||
return isleave;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FansCheckRed extends BaseModel{
|
||||
@SerializedName("fans_level_upgrade_status")
|
||||
private int status;
|
||||
|
||||
public FansCheckRed() {
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FansGroupGiftPack extends BaseModel{
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("quantity")
|
||||
private int quantity;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("giftname")
|
||||
private String giftName;
|
||||
@SerializedName("needcoin")
|
||||
private String needCoin;
|
||||
@SerializedName("gifticon")
|
||||
private String icon;
|
||||
|
||||
public FansGroupGiftPack() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName;
|
||||
}
|
||||
|
||||
public void setGiftName(String giftName) {
|
||||
this.giftName = giftName;
|
||||
}
|
||||
|
||||
public String getNeedCoin() {
|
||||
return needCoin;
|
||||
}
|
||||
|
||||
public void setNeedCoin(String needCoin) {
|
||||
this.needCoin = needCoin;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FansGroupGiftPack{" +
|
||||
"id=" + id +
|
||||
", quantity=" + quantity +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", giftName='" + giftName + '\'' +
|
||||
", needCoin='" + needCoin + '\'' +
|
||||
", icon='" + icon + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FansGroupGiftPackInfo extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("pack_name")
|
||||
private String packName;
|
||||
@SerializedName("description")
|
||||
private String description;
|
||||
@SerializedName("coin")
|
||||
private String coin;
|
||||
@SerializedName("data")
|
||||
private List<Gift> data;
|
||||
|
||||
public FansGroupGiftPackInfo() {
|
||||
}
|
||||
|
||||
public String getPackName() {
|
||||
return packName;
|
||||
}
|
||||
|
||||
public void setPackName(String packName) {
|
||||
this.packName = packName;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public void setCoin(String coin) {
|
||||
this.coin = coin;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<Gift> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<Gift> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FansGroupGiftPackInfo{" +
|
||||
"id=" + id +
|
||||
", packName='" + packName + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class Gift {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("name")
|
||||
private String giftName;
|
||||
@SerializedName("needcoin")
|
||||
private String needCoin;
|
||||
@SerializedName("src")
|
||||
private String giftIcon;
|
||||
@SerializedName("quantity")
|
||||
private String quantity;
|
||||
@SerializedName("restrict")
|
||||
private int restrict;
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
|
||||
public Gift() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName;
|
||||
}
|
||||
|
||||
public void setGiftName(String giftName) {
|
||||
this.giftName = giftName;
|
||||
}
|
||||
|
||||
public String getNeedCoin() {
|
||||
return needCoin;
|
||||
}
|
||||
|
||||
public void setNeedCoin(String needCoin) {
|
||||
this.needCoin = needCoin;
|
||||
}
|
||||
|
||||
public String getGiftIcon() {
|
||||
return giftIcon;
|
||||
}
|
||||
|
||||
public void setGiftIcon(String giftIcon) {
|
||||
this.giftIcon = giftIcon;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getRestrict() {
|
||||
return restrict;
|
||||
}
|
||||
|
||||
public void setRestrict(int restrict) {
|
||||
this.restrict = restrict;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Gift{" +
|
||||
"id=" + id +
|
||||
", giftName='" + giftName + '\'' +
|
||||
", needCoin='" + needCoin + '\'' +
|
||||
", giftIcon='" + giftIcon + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", restrict='" + restrict + '\'' +
|
||||
", type=" + type +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
57
common/src/main/java/com/yunbao/common/bean/FansModel.java
Normal file
57
common/src/main/java/com/yunbao/common/bean/FansModel.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FansModel extends BaseModel {
|
||||
|
||||
@SerializedName("levelid")
|
||||
private int levelid;
|
||||
@SerializedName("thumb")
|
||||
private String thumb;
|
||||
@SerializedName("colour")
|
||||
private String colour;
|
||||
@SerializedName("thumb_mark")
|
||||
private String thumbMark;
|
||||
@SerializedName("bg")
|
||||
private String bg;
|
||||
|
||||
public int getLevelid() {
|
||||
return levelid;
|
||||
}
|
||||
|
||||
public void setLevelid(int levelid) {
|
||||
this.levelid = levelid;
|
||||
}
|
||||
|
||||
public String getThumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
public void setThumb(String thumb) {
|
||||
this.thumb = thumb;
|
||||
}
|
||||
|
||||
public String getColour() {
|
||||
return colour;
|
||||
}
|
||||
|
||||
public void setColour(String colour) {
|
||||
this.colour = colour;
|
||||
}
|
||||
|
||||
public String getThumbMark() {
|
||||
return thumbMark;
|
||||
}
|
||||
|
||||
public void setThumbMark(String thumbMark) {
|
||||
this.thumbMark = thumbMark;
|
||||
}
|
||||
|
||||
public String getBg() {
|
||||
return bg;
|
||||
}
|
||||
|
||||
public void setBg(String bg) {
|
||||
this.bg = bg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 礼物墙已点亮
|
||||
*/
|
||||
public class GiftAlreadyWallModel extends BaseModel {
|
||||
@SerializedName("gift_wall")
|
||||
private List<GiftWallModel> giftWall;
|
||||
@SerializedName("gift_wall_lighten_number")
|
||||
private String giftWallLightenNumber;
|
||||
@SerializedName("gift_wall_lighten_total")
|
||||
private String giftWallLightenTotal;
|
||||
|
||||
public List<GiftWallModel> getGiftWall() {
|
||||
return giftWall;
|
||||
}
|
||||
|
||||
public GiftAlreadyWallModel setGiftWall(List<GiftWallModel> giftWall) {
|
||||
this.giftWall = giftWall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftWallLightenNumber() {
|
||||
return giftWallLightenNumber;
|
||||
}
|
||||
|
||||
public GiftAlreadyWallModel setGiftWallLightenNumber(String giftWallLightenNumber) {
|
||||
this.giftWallLightenNumber = giftWallLightenNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftWallLightenTotal() {
|
||||
return giftWallLightenTotal;
|
||||
}
|
||||
|
||||
public GiftAlreadyWallModel setGiftWallLightenTotal(String giftWallLightenTotal) {
|
||||
this.giftWallLightenTotal = giftWallLightenTotal;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
119
common/src/main/java/com/yunbao/common/bean/GiftGuideModel.java
Normal file
119
common/src/main/java/com/yunbao/common/bean/GiftGuideModel.java
Normal file
@@ -0,0 +1,119 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GiftGuideModel extends BaseModel {
|
||||
|
||||
@SerializedName("guide_name")
|
||||
private String guideName;
|
||||
@SerializedName("illuminate_count")
|
||||
private int illuminateCount;
|
||||
@SerializedName("already_font")
|
||||
private String alreadyFont;
|
||||
@SerializedName("without_font")
|
||||
private String withoutFont;
|
||||
@SerializedName("number")
|
||||
private String number;
|
||||
@SerializedName("illuminate_total")
|
||||
private int illuminateTotal;
|
||||
@SerializedName("week_number")
|
||||
private String weekNumber;
|
||||
@SerializedName("guide_name_img_path")
|
||||
private String guideNameImgPath;
|
||||
@SerializedName("guide_background_picture_path")
|
||||
private String guideBackgroundPicturePath;
|
||||
@SerializedName("gift_data")
|
||||
private List<GiftWallModel> giftData;
|
||||
|
||||
public String getAlreadyFont() {
|
||||
return alreadyFont;
|
||||
}
|
||||
|
||||
public GiftGuideModel setAlreadyFont(String alreadyFont) {
|
||||
this.alreadyFont = alreadyFont;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWithoutFont() {
|
||||
return withoutFont;
|
||||
}
|
||||
|
||||
public GiftGuideModel setWithoutFont(String withoutFont) {
|
||||
this.withoutFont = withoutFont;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public GiftGuideModel setNumber(String number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateTotal() {
|
||||
return illuminateTotal;
|
||||
}
|
||||
|
||||
public GiftGuideModel setIlluminateTotal(int illuminateTotal) {
|
||||
this.illuminateTotal = illuminateTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWeekNumber() {
|
||||
return weekNumber;
|
||||
}
|
||||
|
||||
public GiftGuideModel setWeekNumber(String weekNumber) {
|
||||
this.weekNumber = weekNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideNameImgPath() {
|
||||
return guideNameImgPath;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideNameImgPath(String guideNameImgPath) {
|
||||
this.guideNameImgPath = guideNameImgPath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideBackgroundPicturePath() {
|
||||
return guideBackgroundPicturePath;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideBackgroundPicturePath(String guideBackgroundPicturePath) {
|
||||
this.guideBackgroundPicturePath = guideBackgroundPicturePath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideName() {
|
||||
return guideName;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideName(String guideName) {
|
||||
this.guideName = guideName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateCount() {
|
||||
return illuminateCount;
|
||||
}
|
||||
|
||||
public GiftGuideModel setIlluminateCount(int illuminateCount) {
|
||||
this.illuminateCount = illuminateCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GiftWallModel> getGiftData() {
|
||||
return giftData;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGiftData(List<GiftWallModel> giftData) {
|
||||
this.giftData = giftData;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,359 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GiftNamingInfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("sendtype")
|
||||
private String sendtype;
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("release_status")
|
||||
private String releaseStatus;
|
||||
@SerializedName("type_sort")
|
||||
private String typeSort;
|
||||
@SerializedName("operate_image")
|
||||
private String operateImage;
|
||||
@SerializedName("operate_url")
|
||||
private String operateUrl;
|
||||
@SerializedName("mark")
|
||||
private String mark;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("needcoin")
|
||||
private String needcoin;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
@SerializedName("gift_description")
|
||||
private String giftDescription;
|
||||
@SerializedName("corner_mark")
|
||||
private String cornerMark;
|
||||
@SerializedName("swf")
|
||||
private String swf;
|
||||
@SerializedName("gift_uid")
|
||||
private String giftUid;
|
||||
@SerializedName("type_start_time")
|
||||
private String typeStartTime;
|
||||
@SerializedName("type_end_time")
|
||||
private String typeEndTime;
|
||||
@SerializedName("gift_start_time")
|
||||
private String giftStartTime;
|
||||
@SerializedName("gift_end_time")
|
||||
private String giftEndTime;
|
||||
@SerializedName("naming_liveuid")
|
||||
private String namingLiveuid;
|
||||
@SerializedName("naming_uid")
|
||||
private String namingUid;
|
||||
@SerializedName("naming_live_name")
|
||||
private String namingLiveName;
|
||||
@SerializedName("naming_user_name")
|
||||
private String namingUserName;
|
||||
@SerializedName("naming_live_avatar")
|
||||
private String namingLiveAvatar;
|
||||
@SerializedName("naming_user_avatar")
|
||||
private String namingUserAvatar;
|
||||
@SerializedName("naming_status")
|
||||
private String namingStatus;
|
||||
@SerializedName("naming_coin")
|
||||
private String namingCoin;
|
||||
@SerializedName("fans_level")
|
||||
private String fansLevel;
|
||||
@SerializedName("naming_user_coin")
|
||||
private String namingUserCoin;
|
||||
@SerializedName("naming_live_coin")
|
||||
private String namingLiveCoin;
|
||||
@SerializedName("isweek")
|
||||
private String isweek;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendtype() {
|
||||
return sendtype;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setSendtype(String sendtype) {
|
||||
this.sendtype = sendtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReleaseStatus() {
|
||||
return releaseStatus;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setReleaseStatus(String releaseStatus) {
|
||||
this.releaseStatus = releaseStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeSort() {
|
||||
return typeSort;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setTypeSort(String typeSort) {
|
||||
this.typeSort = typeSort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateImage() {
|
||||
return operateImage;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setOperateImage(String operateImage) {
|
||||
this.operateImage = operateImage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateUrl() {
|
||||
return operateUrl;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setOperateUrl(String operateUrl) {
|
||||
this.operateUrl = operateUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMark() {
|
||||
return mark;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setMark(String mark) {
|
||||
this.mark = mark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname() {
|
||||
return giftname;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGiftname(String giftname) {
|
||||
this.giftname = giftname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNeedcoin(String needcoin) {
|
||||
this.needcoin = needcoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftDescription() {
|
||||
return giftDescription;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGiftDescription(String giftDescription) {
|
||||
this.giftDescription = giftDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCornerMark() {
|
||||
return cornerMark;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setCornerMark(String cornerMark) {
|
||||
this.cornerMark = cornerMark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSwf() {
|
||||
return swf;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setSwf(String swf) {
|
||||
this.swf = swf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftUid() {
|
||||
return giftUid;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGiftUid(String giftUid) {
|
||||
this.giftUid = giftUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeStartTime() {
|
||||
return typeStartTime;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setTypeStartTime(String typeStartTime) {
|
||||
this.typeStartTime = typeStartTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeEndTime() {
|
||||
return typeEndTime;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setTypeEndTime(String typeEndTime) {
|
||||
this.typeEndTime = typeEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftStartTime() {
|
||||
return giftStartTime;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGiftStartTime(String giftStartTime) {
|
||||
this.giftStartTime = giftStartTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftEndTime() {
|
||||
return giftEndTime;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setGiftEndTime(String giftEndTime) {
|
||||
this.giftEndTime = giftEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveuid() {
|
||||
return namingLiveuid;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingLiveuid(String namingLiveuid) {
|
||||
this.namingLiveuid = namingLiveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUid() {
|
||||
return namingUid;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingUid(String namingUid) {
|
||||
this.namingUid = namingUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveName() {
|
||||
return namingLiveName;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingLiveName(String namingLiveName) {
|
||||
this.namingLiveName = namingLiveName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserName() {
|
||||
return namingUserName;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingUserName(String namingUserName) {
|
||||
this.namingUserName = namingUserName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveAvatar() {
|
||||
return namingLiveAvatar;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingLiveAvatar(String namingLiveAvatar) {
|
||||
this.namingLiveAvatar = namingLiveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserAvatar() {
|
||||
return namingUserAvatar;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingUserAvatar(String namingUserAvatar) {
|
||||
this.namingUserAvatar = namingUserAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingStatus() {
|
||||
return namingStatus;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingStatus(String namingStatus) {
|
||||
this.namingStatus = namingStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoin() {
|
||||
return namingCoin;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingCoin(String namingCoin) {
|
||||
this.namingCoin = namingCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFansLevel() {
|
||||
return fansLevel;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setFansLevel(String fansLevel) {
|
||||
this.fansLevel = fansLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserCoin() {
|
||||
return namingUserCoin;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingUserCoin(String namingUserCoin) {
|
||||
this.namingUserCoin = namingUserCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveCoin() {
|
||||
return namingLiveCoin;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setNamingLiveCoin(String namingLiveCoin) {
|
||||
this.namingLiveCoin = namingLiveCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsweek() {
|
||||
return isweek;
|
||||
}
|
||||
|
||||
public GiftNamingInfoModel setIsweek(String isweek) {
|
||||
this.isweek = isweek;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 礼物选择数量
|
||||
*/
|
||||
public class GiftQuantityModel extends BaseModel {
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("gift_quantity")
|
||||
private String giftQuantity;
|
||||
@SerializedName("font_colour")
|
||||
private String fontColour;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GiftQuantityModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftQuantity() {
|
||||
return giftQuantity;
|
||||
}
|
||||
|
||||
public GiftQuantityModel setGiftQuantity(String giftQuantity) {
|
||||
this.giftQuantity = giftQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFontColour() {
|
||||
return fontColour;
|
||||
}
|
||||
|
||||
public GiftQuantityModel setFontColour(String fontColour) {
|
||||
this.fontColour = fontColour;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GiftWallGiftDetail extends BaseModel {
|
||||
|
||||
@SerializedName("uid")
|
||||
private int uid;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("naming_coin")
|
||||
private String namingCoin;
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public GiftWallGiftDetail setUid(int uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
if (userNicename.length() > 5) {
|
||||
userNicename = userNicename.substring(0, 5) + "...";
|
||||
}
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public GiftWallGiftDetail setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public GiftWallGiftDetail setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoin() {
|
||||
return namingCoin;
|
||||
}
|
||||
|
||||
public GiftWallGiftDetail setNamingCoin(String namingCoin) {
|
||||
this.namingCoin = namingCoin;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
392
common/src/main/java/com/yunbao/common/bean/GiftWallModel.java
Normal file
392
common/src/main/java/com/yunbao/common/bean/GiftWallModel.java
Normal file
@@ -0,0 +1,392 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GiftWallModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("sendtype")
|
||||
private String sendtype;
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("release_status")
|
||||
private String releaseStatus;
|
||||
@SerializedName("type_sort")
|
||||
private String typeSort;
|
||||
@SerializedName("operate_image")
|
||||
private String operateImage;
|
||||
@SerializedName("operate_url")
|
||||
private String operateUrl;
|
||||
@SerializedName("mark")
|
||||
private String mark;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("needcoin")
|
||||
private String needcoin;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
@SerializedName("gift_description")
|
||||
private String giftDescription;
|
||||
@SerializedName("corner_mark")
|
||||
private String cornerMark;
|
||||
@SerializedName("swf")
|
||||
private String swf;
|
||||
@SerializedName("gift_uid")
|
||||
private String giftUid;
|
||||
@SerializedName("type_start_time")
|
||||
private String typeStartTime;
|
||||
@SerializedName("type_end_time")
|
||||
private String typeEndTime;
|
||||
@SerializedName("gift_start_time")
|
||||
private String giftStartTime;
|
||||
@SerializedName("gift_end_time")
|
||||
private String giftEndTime;
|
||||
@SerializedName("naming_liveuid")
|
||||
private String namingLiveuid;
|
||||
@SerializedName("naming_uid")
|
||||
private String namingUid;
|
||||
@SerializedName("naming_live_name")
|
||||
private String namingLiveName;
|
||||
@SerializedName("naming_user_name")
|
||||
private String namingUserName;
|
||||
@SerializedName("naming_live_avatar")
|
||||
private String namingLiveAvatar;
|
||||
@SerializedName("naming_user_avatar")
|
||||
private String namingUserAvatar;
|
||||
@SerializedName("naming_status")
|
||||
private String namingStatus;
|
||||
@SerializedName("naming_coin")
|
||||
private String namingCoin;
|
||||
@SerializedName("gifticon_total")
|
||||
private String gifticonTotal;
|
||||
@SerializedName("gift_count_number")
|
||||
private String giftCountNumber;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("naming_coin_max")
|
||||
private String namingCoinMax;
|
||||
|
||||
@SerializedName("illuminate_status")
|
||||
private int illuminateStatus;
|
||||
@SerializedName("font_color")
|
||||
private String fontColor;
|
||||
|
||||
public String getFontColor() {
|
||||
return fontColor;
|
||||
}
|
||||
|
||||
public GiftWallModel setFontColor(String fontColor) {
|
||||
this.fontColor = fontColor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateStatus() {
|
||||
return illuminateStatus;
|
||||
}
|
||||
|
||||
public GiftWallModel setIlluminateStatus(int illuminateStatus) {
|
||||
this.illuminateStatus = illuminateStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoinMax() {
|
||||
return namingCoinMax;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingCoinMax(String namingCoinMax) {
|
||||
this.namingCoinMax = namingCoinMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public GiftWallModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public GiftWallModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public GiftWallModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendtype() {
|
||||
return sendtype;
|
||||
}
|
||||
|
||||
public GiftWallModel setSendtype(String sendtype) {
|
||||
this.sendtype = sendtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public GiftWallModel setType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public GiftWallModel setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReleaseStatus() {
|
||||
return releaseStatus;
|
||||
}
|
||||
|
||||
public GiftWallModel setReleaseStatus(String releaseStatus) {
|
||||
this.releaseStatus = releaseStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeSort() {
|
||||
return typeSort;
|
||||
}
|
||||
|
||||
public GiftWallModel setTypeSort(String typeSort) {
|
||||
this.typeSort = typeSort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateImage() {
|
||||
return operateImage;
|
||||
}
|
||||
|
||||
public GiftWallModel setOperateImage(String operateImage) {
|
||||
this.operateImage = operateImage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateUrl() {
|
||||
return operateUrl;
|
||||
}
|
||||
|
||||
public GiftWallModel setOperateUrl(String operateUrl) {
|
||||
this.operateUrl = operateUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMark() {
|
||||
return mark;
|
||||
}
|
||||
|
||||
public GiftWallModel setMark(String mark) {
|
||||
this.mark = mark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname() {
|
||||
return giftname;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftname(String giftname) {
|
||||
this.giftname = giftname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public GiftWallModel setNeedcoin(String needcoin) {
|
||||
this.needcoin = needcoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public GiftWallModel setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftDescription() {
|
||||
return giftDescription;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftDescription(String giftDescription) {
|
||||
this.giftDescription = giftDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCornerMark() {
|
||||
return cornerMark;
|
||||
}
|
||||
|
||||
public GiftWallModel setCornerMark(String cornerMark) {
|
||||
this.cornerMark = cornerMark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSwf() {
|
||||
return swf;
|
||||
}
|
||||
|
||||
public GiftWallModel setSwf(String swf) {
|
||||
this.swf = swf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftUid() {
|
||||
return giftUid;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftUid(String giftUid) {
|
||||
this.giftUid = giftUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeStartTime() {
|
||||
return typeStartTime;
|
||||
}
|
||||
|
||||
public GiftWallModel setTypeStartTime(String typeStartTime) {
|
||||
this.typeStartTime = typeStartTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTypeEndTime() {
|
||||
return typeEndTime;
|
||||
}
|
||||
|
||||
public GiftWallModel setTypeEndTime(String typeEndTime) {
|
||||
this.typeEndTime = typeEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftStartTime() {
|
||||
return giftStartTime;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftStartTime(String giftStartTime) {
|
||||
this.giftStartTime = giftStartTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftEndTime() {
|
||||
return giftEndTime;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftEndTime(String giftEndTime) {
|
||||
this.giftEndTime = giftEndTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveuid() {
|
||||
return namingLiveuid;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingLiveuid(String namingLiveuid) {
|
||||
this.namingLiveuid = namingLiveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUid() {
|
||||
return namingUid;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingUid(String namingUid) {
|
||||
this.namingUid = namingUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveName() {
|
||||
return namingLiveName;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingLiveName(String namingLiveName) {
|
||||
this.namingLiveName = namingLiveName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserName() {
|
||||
return namingUserName;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingUserName(String namingUserName) {
|
||||
this.namingUserName = namingUserName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveAvatar() {
|
||||
return namingLiveAvatar;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingLiveAvatar(String namingLiveAvatar) {
|
||||
this.namingLiveAvatar = namingLiveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserAvatar() {
|
||||
return namingUserAvatar;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingUserAvatar(String namingUserAvatar) {
|
||||
this.namingUserAvatar = namingUserAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingStatus() {
|
||||
return namingStatus;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingStatus(String namingStatus) {
|
||||
this.namingStatus = namingStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoin() {
|
||||
return namingCoin;
|
||||
}
|
||||
|
||||
public GiftWallModel setNamingCoin(String namingCoin) {
|
||||
this.namingCoin = namingCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticonTotal() {
|
||||
return gifticonTotal;
|
||||
}
|
||||
|
||||
public GiftWallModel setGifticonTotal(String gifticonTotal) {
|
||||
this.gifticonTotal = gifticonTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftCountNumber() {
|
||||
return giftCountNumber;
|
||||
}
|
||||
|
||||
public GiftWallModel setGiftCountNumber(String giftCountNumber) {
|
||||
this.giftCountNumber = giftCountNumber;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
|
||||
private String recommendCardtype = "";
|
||||
private String recommendCardIconSizeTwo = "";
|
||||
private String recommendCardIconSizeThree = "";
|
||||
@SerializedName("red_packet_status")
|
||||
private int redPacketStatus;
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
@@ -382,6 +385,14 @@ public class LiveBean implements Parcelable {
|
||||
this.islive = islive;
|
||||
}
|
||||
|
||||
public int getRedPacketStatus() {
|
||||
return redPacketStatus;
|
||||
}
|
||||
|
||||
public void setRedPacketStatus(int redPacketStatus) {
|
||||
this.redPacketStatus = redPacketStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示靓号
|
||||
*/
|
||||
@@ -529,6 +540,7 @@ public class LiveBean implements Parcelable {
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", redPacketStatus=" + redPacketStatus +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
|
||||
@@ -23,7 +23,7 @@ public class LiveGiftBean {
|
||||
private String name;
|
||||
private String price;
|
||||
private String icon;
|
||||
private boolean checked;
|
||||
private boolean checked = false;
|
||||
private int page;
|
||||
private View mView;
|
||||
private String sendType;//支付是金币还是钻石
|
||||
@@ -36,6 +36,181 @@ public class LiveGiftBean {
|
||||
private String tag;
|
||||
@JSONField(name = "blind_box_type")
|
||||
private int blind_box_type = 0;
|
||||
//礼物角标
|
||||
|
||||
@JSONField(name = "corner_mark")
|
||||
private String cornerMark;
|
||||
@JSONField(name = "gift_description")
|
||||
private String giftDescription;
|
||||
|
||||
@JSONField(name = "operate_image")
|
||||
private String operateImage;
|
||||
|
||||
@JSONField(name = "operate_url")
|
||||
private String operateUrl;
|
||||
@JSONField(name = "naming_liveuid")
|
||||
private String namingLiveuid;
|
||||
@JSONField(name = "naming_uid")
|
||||
private String namingUid;
|
||||
@JSONField(name = "naming_live_name")
|
||||
private String namingLiveName;
|
||||
@JSONField(name = "naming_user_name")
|
||||
private String namingUserName;
|
||||
@JSONField(name = "naming_live_avatar")
|
||||
private String namingLiveAvatar;
|
||||
@JSONField(name = "naming_user_avatar")
|
||||
private String namingUserAvatar;
|
||||
@JSONField(name = "naming_status")
|
||||
private String namingStatus;
|
||||
@JSONField(name = "naming_coin")
|
||||
private String namingCoin;
|
||||
@JSONField(name = "naming_user_coin")
|
||||
private String namingUserCoin;
|
||||
|
||||
public String getNamingUserCoin() {
|
||||
return namingUserCoin;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingUserCoin(String namingUserCoin) {
|
||||
this.namingUserCoin = namingUserCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public View getmView() {
|
||||
return mView;
|
||||
}
|
||||
|
||||
public LiveGiftBean setmView(View mView) {
|
||||
this.mView = mView;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getmGiftNum() {
|
||||
return mGiftNum;
|
||||
}
|
||||
|
||||
public LiveGiftBean setmGiftNum(String mGiftNum) {
|
||||
this.mGiftNum = mGiftNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveuid() {
|
||||
return namingLiveuid;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingLiveuid(String namingLiveuid) {
|
||||
this.namingLiveuid = namingLiveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUid() {
|
||||
return namingUid;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingUid(String namingUid) {
|
||||
this.namingUid = namingUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveName() {
|
||||
return namingLiveName;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingLiveName(String namingLiveName) {
|
||||
this.namingLiveName = namingLiveName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserName() {
|
||||
return namingUserName;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingUserName(String namingUserName) {
|
||||
this.namingUserName = namingUserName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingLiveAvatar() {
|
||||
return namingLiveAvatar;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingLiveAvatar(String namingLiveAvatar) {
|
||||
this.namingLiveAvatar = namingLiveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingUserAvatar() {
|
||||
return namingUserAvatar;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingUserAvatar(String namingUserAvatar) {
|
||||
this.namingUserAvatar = namingUserAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingStatus() {
|
||||
return namingStatus;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingStatus(String namingStatus) {
|
||||
this.namingStatus = namingStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoin() {
|
||||
return namingCoin;
|
||||
}
|
||||
|
||||
public LiveGiftBean setNamingCoin(String namingCoin) {
|
||||
this.namingCoin = namingCoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateImage() {
|
||||
return operateImage;
|
||||
}
|
||||
|
||||
public LiveGiftBean setOperateImage(String operateImage) {
|
||||
this.operateImage = operateImage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperateUrl() {
|
||||
return operateUrl;
|
||||
}
|
||||
|
||||
public LiveGiftBean setOperateUrl(String operateUrl) {
|
||||
this.operateUrl = operateUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftDescription() {
|
||||
return giftDescription;
|
||||
}
|
||||
|
||||
public LiveGiftBean setGiftDescription(String giftDescription) {
|
||||
this.giftDescription = giftDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCornerMark() {
|
||||
return cornerMark;
|
||||
}
|
||||
|
||||
public LiveGiftBean setCornerMark(String cornerMark) {
|
||||
this.cornerMark = cornerMark;
|
||||
return this;
|
||||
}
|
||||
|
||||
private int fansGiftLevel=0;//粉丝团礼物等级要求
|
||||
|
||||
public int getFansGiftLevel() {
|
||||
return fansGiftLevel;
|
||||
}
|
||||
|
||||
public void setFansGiftLevel(int fansGiftLevel) {
|
||||
this.fansGiftLevel = fansGiftLevel;
|
||||
}
|
||||
|
||||
public int getBlind_box_type() {
|
||||
return blind_box_type;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -36,8 +36,10 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
private String answer1;
|
||||
@SerializedName("option_content_second")
|
||||
private String answer2;
|
||||
@SerializedName("result")
|
||||
private String result;
|
||||
@SerializedName("result_zh")
|
||||
private String resultZh;
|
||||
@SerializedName("result_en")
|
||||
private String resultEn;
|
||||
@SerializedName("option_text")
|
||||
private String optionText;
|
||||
@SerializedName("option_content_key")
|
||||
@@ -126,11 +128,23 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
return WordUtil.isNewZh() ? resultZh : resultEn;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
public String getResultZh() {
|
||||
return resultZh;
|
||||
}
|
||||
|
||||
public void setResultZh(String resultZh) {
|
||||
this.resultZh = resultZh;
|
||||
}
|
||||
|
||||
public String getResultEn() {
|
||||
return resultEn;
|
||||
}
|
||||
|
||||
public void setResultEn(String resultEn) {
|
||||
this.resultEn = resultEn;
|
||||
}
|
||||
|
||||
public String getOptionText() {
|
||||
@@ -153,7 +167,8 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
", userIds=" + userIds +
|
||||
", answer1='" + answer1 + '\'' +
|
||||
", answer2='" + answer2 + '\'' +
|
||||
", result='" + result + '\'' +
|
||||
", resultZh='" + resultZh + '\'' +
|
||||
", resultEn='" + resultEn + '\'' +
|
||||
", optionText='" + optionText + '\'' +
|
||||
", vote='" + vote + '\'' +
|
||||
", liveUid='" + liveUid + '\'' +
|
||||
|
||||
@@ -68,7 +68,7 @@ public class LiveTaskModel extends BaseModel {
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class NewUser {
|
||||
public static class NewUser implements Serializable{
|
||||
@SerializedName("isNew")
|
||||
private int isNew;
|
||||
@SerializedName("endTime")
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MedalAchievementModel extends BaseModel {
|
||||
|
||||
@SerializedName("medal_total_number")
|
||||
private String medalTotalNumber;
|
||||
@SerializedName("medal_light_number")
|
||||
private String medalLightNumber;
|
||||
@SerializedName("medal_data")
|
||||
private List<UserMedalListModel> medalData;
|
||||
|
||||
public String getMedalTotalNumber() {
|
||||
return medalTotalNumber;
|
||||
}
|
||||
|
||||
public MedalAchievementModel setMedalTotalNumber(String medalTotalNumber) {
|
||||
this.medalTotalNumber = medalTotalNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMedalLightNumber() {
|
||||
return medalLightNumber;
|
||||
}
|
||||
|
||||
public MedalAchievementModel setMedalLightNumber(String medalLightNumber) {
|
||||
this.medalLightNumber = medalLightNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<UserMedalListModel> getMedalData() {
|
||||
return medalData;
|
||||
}
|
||||
|
||||
public MedalAchievementModel setMedalData(List<UserMedalListModel> medalData) {
|
||||
this.medalData = medalData;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -357,4 +357,8 @@ public class MsgModel extends BaseModel {
|
||||
public void setSystem_bubble(String system_bubble) {
|
||||
this.system_bubble = system_bubble;
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RedPacketDetailsBean extends BaseModel {
|
||||
@SerializedName("u_nicename")
|
||||
private String niceName;
|
||||
@SerializedName("avatar_thumb")
|
||||
private String avatarThumb;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("red_packet_money")
|
||||
private long money;// 红包金豆总数量
|
||||
@SerializedName("amount_diamond")
|
||||
private long diamond;// 红包价值钻石
|
||||
@SerializedName("red_packet_quantity")
|
||||
private int quantity; // 领取的红包总数量
|
||||
@SerializedName("red_packet_quantity_already")
|
||||
private int already; // 领取的红包总数量
|
||||
@SerializedName("red_packet_record_details")
|
||||
private List<Detail> details;
|
||||
|
||||
public String getNiceName() {
|
||||
return niceName;
|
||||
}
|
||||
|
||||
public void setNiceName(String niceName) {
|
||||
this.niceName=niceName;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
avatarThumb=avatarThumb.replace("\\","");
|
||||
if(!avatarThumb.startsWith("http")){
|
||||
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
|
||||
}
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public long getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(long money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getAlready() {
|
||||
return already;
|
||||
}
|
||||
|
||||
public void setAlready(int already) {
|
||||
this.already = already;
|
||||
}
|
||||
|
||||
public List<Detail> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<Detail> details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public long getDiamond() {
|
||||
return diamond;
|
||||
}
|
||||
|
||||
public void setDiamond(long diamond) {
|
||||
this.diamond = diamond;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RedPacketDetailsBean{" +
|
||||
"niceName='" + niceName + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", money=" + money +
|
||||
", diamond=" + diamond +
|
||||
", quantity=" + quantity +
|
||||
", already=" + already +
|
||||
", details=" + details +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class Detail extends BaseModel {
|
||||
@SerializedName("receive_money")
|
||||
private long money;
|
||||
@SerializedName("user_nicename")
|
||||
private String niceName;
|
||||
@SerializedName("receive_time")
|
||||
private String time;
|
||||
@SerializedName("avatar_thumb")
|
||||
private String avatarThumb;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
|
||||
|
||||
public long getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(long money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getNiceName() {
|
||||
return niceName;
|
||||
}
|
||||
|
||||
public void setNiceName(String niceName) {
|
||||
this.niceName=niceName;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
avatarThumb=avatarThumb.replace("\\","");
|
||||
if(!avatarThumb.startsWith("http")){
|
||||
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
|
||||
}
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public void setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Detail{" +
|
||||
"money=" + money +
|
||||
", niceName='" + niceName + '\'' +
|
||||
", time='" + time + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", gifticon='" + gifticon + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 红包随机礼物
|
||||
*/
|
||||
public class RedPacketGiftModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "id": 210,
|
||||
* "giftname": "玫瑰",
|
||||
* "needcoin": 20,
|
||||
* "gifticon": "https://downs.yaoulive.com/603f25d9aa969.png"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("needcoin")
|
||||
private String needcoin;
|
||||
@SerializedName("gifticon")
|
||||
private String gifticon;
|
||||
@SerializedName("gift_num")
|
||||
private String giftNum;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname() {
|
||||
return giftname;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setGiftname(String giftname) {
|
||||
this.giftname = giftname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setNeedcoin(String needcoin) {
|
||||
this.needcoin = needcoin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftNum() {
|
||||
return giftNum;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setGiftNum(String giftNum) {
|
||||
this.giftNum = giftNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 红包信息
|
||||
*/
|
||||
public class RedPacketInfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("amount_diamond")
|
||||
private String amountDiamond;
|
||||
@SerializedName("red_packet_money")
|
||||
private String redPacketMoney;
|
||||
@SerializedName("red_packet_quantity")
|
||||
private String redPacketQuantity;
|
||||
@SerializedName("conditions")
|
||||
private String conditions;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("user_id")
|
||||
private String userId;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("avatar_thumb")
|
||||
private String avatarThumb;
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("user_exists")
|
||||
private String userExists;
|
||||
@SerializedName("is_attention")
|
||||
private String isAttention;
|
||||
//0.未领取到 1.领取但是没抢过东西 2.已经领抢到东西
|
||||
@SerializedName("receive_status")
|
||||
private String receiveStatus;
|
||||
//超级红包ID
|
||||
@SerializedName("super_jackpot_id")
|
||||
private String superJackpotId;
|
||||
|
||||
public String getSuperJackpotId() {
|
||||
return superJackpotId;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setSuperJackpotId(String superJackpotId) {
|
||||
this.superJackpotId = superJackpotId;
|
||||
return this;
|
||||
}
|
||||
|
||||
//是否超级红包
|
||||
private boolean isSuperJackpot = false;
|
||||
|
||||
public boolean isSuperJackpot() {
|
||||
return isSuperJackpot;
|
||||
}
|
||||
|
||||
//红包id
|
||||
@SerializedName("red_packet_id")
|
||||
private String redPacketId;
|
||||
|
||||
public String getRedPacketId() {
|
||||
return redPacketId;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setRedPacketId(String redPacketId) {
|
||||
this.redPacketId = redPacketId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setSuperJackpot(boolean superJackpot) {
|
||||
isSuperJackpot = superJackpot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsAttention() {
|
||||
return isAttention;
|
||||
}
|
||||
|
||||
|
||||
public RedPacketInfoModel setIsAttention(String isAttention) {
|
||||
this.isAttention = isAttention;
|
||||
return this;
|
||||
}
|
||||
|
||||
@SerializedName("user_golden_bean")
|
||||
private String userGoldenBean;
|
||||
|
||||
@SerializedName("red_packet_gift")
|
||||
private List<RedPacketGiftModel> packetGiftModels;
|
||||
@SerializedName("gift")
|
||||
private List<RedPacketGiftModel> giftModels;
|
||||
|
||||
public String getReceiveStatus() {
|
||||
return receiveStatus;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setReceiveStatus(String receiveStatus) {
|
||||
this.receiveStatus = receiveStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<RedPacketGiftModel> getGiftModels() {
|
||||
return giftModels;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setGiftModels(List<RedPacketGiftModel> giftModels) {
|
||||
this.giftModels = giftModels;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<RedPacketGiftModel> getPacketGiftModels() {
|
||||
return packetGiftModels;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setPacketGiftModels(List<RedPacketGiftModel> packetGiftModels) {
|
||||
this.packetGiftModels = packetGiftModels;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAmountDiamond() {
|
||||
return amountDiamond;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setAmountDiamond(String amountDiamond) {
|
||||
this.amountDiamond = amountDiamond;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRedPacketMoney() {
|
||||
return redPacketMoney;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setRedPacketMoney(String redPacketMoney) {
|
||||
this.redPacketMoney = redPacketMoney;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRedPacketQuantity() {
|
||||
return redPacketQuantity;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setRedPacketQuantity(String redPacketQuantity) {
|
||||
this.redPacketQuantity = redPacketQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getConditions() {
|
||||
return conditions;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setConditions(String conditions) {
|
||||
this.conditions = conditions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserExists() {
|
||||
return userExists;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setUserExists(String userExists) {
|
||||
this.userExists = userExists;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserGoldenBean() {
|
||||
return userGoldenBean;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setUserGoldenBean(String userGoldenBean) {
|
||||
this.userGoldenBean = userGoldenBean;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RedPacketListBean extends BaseModel {
|
||||
public static final int RED_PACKET_STATUS_SUCCESS=1;//红包消费
|
||||
public static final int RED_PACKET_STATUS_BACK=2;//红包退回
|
||||
public static final int RED_PACKET_CURRENT_STATUS_SUCCESS=1;//红包已生效
|
||||
public static final int RED_PACKET_CURRENT_STATUS_TIMEOUT=2;//红包已过期
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("live_nicename")
|
||||
private String liveNicename;
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
@SerializedName("red_packet_money")
|
||||
private long redPacketMoney;
|
||||
@SerializedName("red_packet_status")
|
||||
private int redPacketStatus;
|
||||
@SerializedName("current_status")
|
||||
private int currentStatus;
|
||||
@SerializedName("uid")
|
||||
private long uid;
|
||||
|
||||
@SerializedName("amount_diamond")
|
||||
private long amountDiamond;
|
||||
@SerializedName("amount_refund")
|
||||
private long amountRefund;
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLiveNicename() {
|
||||
return liveNicename;
|
||||
}
|
||||
|
||||
public void setLiveNicename(String liveNicename) {
|
||||
this.liveNicename = liveNicename;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public long getRedPacketMoney() {
|
||||
return redPacketMoney;
|
||||
}
|
||||
|
||||
public void setRedPacketMoney(long redPacketMoney) {
|
||||
this.redPacketMoney = redPacketMoney;
|
||||
}
|
||||
|
||||
public int getRedPacketStatus() {
|
||||
return redPacketStatus;
|
||||
}
|
||||
|
||||
public void setRedPacketStatus(int redPacketStatus) {
|
||||
this.redPacketStatus = redPacketStatus;
|
||||
}
|
||||
|
||||
public long getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(long uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getCurrentStatus() {
|
||||
return currentStatus;
|
||||
}
|
||||
|
||||
public void setCurrentStatus(int currentStatus) {
|
||||
this.currentStatus = currentStatus;
|
||||
}
|
||||
|
||||
public long getAmountDiamond() {
|
||||
return amountDiamond;
|
||||
}
|
||||
|
||||
public void setAmountDiamond(long amountDiamond) {
|
||||
this.amountDiamond = amountDiamond;
|
||||
}
|
||||
|
||||
public long getAmountRefund() {
|
||||
return amountRefund;
|
||||
}
|
||||
|
||||
public void setAmountRefund(long amountRefund) {
|
||||
this.amountRefund = amountRefund;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RedPacketListBean{" +
|
||||
"id=" + id +
|
||||
", liveNicename='" + liveNicename + '\'' +
|
||||
", createTime='" + createTime + '\'' +
|
||||
", redPacketMoney=" + redPacketMoney +
|
||||
", redPacketStatus=" + redPacketStatus +
|
||||
", currentStatus=" + currentStatus +
|
||||
", uid=" + uid +
|
||||
", amountDiamond=" + amountDiamond +
|
||||
", amountRefund=" + amountRefund +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RedPacketModel extends BaseModel {
|
||||
//是否展示
|
||||
@SerializedName("is_show")
|
||||
private int isShow;
|
||||
//正在进行的红包数量
|
||||
@SerializedName("red_packet_count")
|
||||
private int redPacketCount;
|
||||
//正在进行的红包总数量
|
||||
@SerializedName("red_packet_quantity")
|
||||
private int redPacketQuantity;
|
||||
//当前红包剩余数量
|
||||
@SerializedName("red_packet_remain")
|
||||
private int redPacketRemain;
|
||||
//红包倒计时
|
||||
@SerializedName("countdown")
|
||||
private int countdown;
|
||||
//红包id
|
||||
@SerializedName("red_packet_id")
|
||||
private String redPacketId;
|
||||
//红包领取条件
|
||||
@SerializedName("conditions")
|
||||
private int conditions;
|
||||
|
||||
|
||||
|
||||
public int getIsShow() {
|
||||
return isShow;
|
||||
}
|
||||
|
||||
public RedPacketModel setIsShow(int isShow) {
|
||||
this.isShow = isShow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getRedPacketCount() {
|
||||
return redPacketCount;
|
||||
}
|
||||
|
||||
public RedPacketModel setRedPacketCount(int redPacketCount) {
|
||||
this.redPacketCount = redPacketCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getRedPacketQuantity() {
|
||||
return redPacketQuantity;
|
||||
}
|
||||
|
||||
public RedPacketModel setRedPacketQuantity(int redPacketQuantity) {
|
||||
this.redPacketQuantity = redPacketQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getRedPacketRemain() {
|
||||
return redPacketRemain;
|
||||
}
|
||||
|
||||
public RedPacketModel setRedPacketRemain(int redPacketRemain) {
|
||||
this.redPacketRemain = redPacketRemain;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public RedPacketModel setCountdown(int countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRedPacketId() {
|
||||
return redPacketId;
|
||||
}
|
||||
|
||||
public RedPacketModel setRedPacketId(String redPacketId) {
|
||||
this.redPacketId = redPacketId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getConditions() {
|
||||
return conditions;
|
||||
}
|
||||
|
||||
public RedPacketModel setConditions(int conditions) {
|
||||
this.conditions = conditions;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class UserAvatarSelectBean extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
@SerializedName("checked")
|
||||
private int checked;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public int getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(int checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,10 @@ public class UserBean implements Parcelable {
|
||||
private String mRankPkImgUrl;
|
||||
//是否填写完整资料
|
||||
private int user_info_complete;
|
||||
//粉丝团等级
|
||||
private int fansLevel;
|
||||
//粉丝团进场皮肤
|
||||
private String fansEnterRoomUrl;
|
||||
|
||||
public int getUserInfoComplete() {
|
||||
return user_info_complete;
|
||||
@@ -78,6 +82,22 @@ public class UserBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getFansLevel() {
|
||||
return fansLevel;
|
||||
}
|
||||
|
||||
public void setFansLevel(int fansLevel) {
|
||||
this.fansLevel = fansLevel;
|
||||
}
|
||||
|
||||
public String getFansEnterRoomUrl() {
|
||||
return fansEnterRoomUrl;
|
||||
}
|
||||
|
||||
public void setFansEnterRoomUrl(String fansEnterRoomUrl) {
|
||||
this.fansEnterRoomUrl = fansEnterRoomUrl;
|
||||
}
|
||||
|
||||
public boolean isRandomPk() {
|
||||
return randomPk;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserMedalListModel extends BaseModel {
|
||||
|
||||
@SerializedName("dress_name")
|
||||
private String dressName;
|
||||
@SerializedName("dress_info")
|
||||
private List<UserMedalModel> dressInfo = new ArrayList<>();
|
||||
@SerializedName("display_src")
|
||||
private String displaySrc;
|
||||
@SerializedName("dress_description")
|
||||
private String dressDescription;
|
||||
@SerializedName("display_src_second")
|
||||
private String displaySrcSecond;
|
||||
@SerializedName("dress_status")//1Hd2whd
|
||||
private String dressStatus;
|
||||
|
||||
public String getDressDescription() {
|
||||
return dressDescription;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDressDescription(String dressDescription) {
|
||||
this.dressDescription = dressDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplaySrcSecond() {
|
||||
return displaySrcSecond;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDisplaySrcSecond(String displaySrcSecond) {
|
||||
this.displaySrcSecond = displaySrcSecond;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressStatus() {
|
||||
return dressStatus;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDressStatus(String dressStatus) {
|
||||
this.dressStatus = dressStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressName() {
|
||||
return dressName;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDressName(String dressName) {
|
||||
this.dressName = dressName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<UserMedalModel> getDressInfo() {
|
||||
return dressInfo;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDressInfo(List<UserMedalModel> dressInfo) {
|
||||
this.dressInfo = dressInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplaySrc() {
|
||||
return displaySrc;
|
||||
}
|
||||
|
||||
public UserMedalListModel setDisplaySrc(String displaySrc) {
|
||||
this.displaySrc = displaySrc;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class UserMedalModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
@SerializedName("display_src")
|
||||
private String displaySrc;
|
||||
@SerializedName("dress_name")
|
||||
private String dressName;
|
||||
@SerializedName("dress_description")
|
||||
private String dressDescription;
|
||||
@SerializedName("sort")
|
||||
private String sort;
|
||||
@SerializedName("dress_status")
|
||||
private String dressStatus;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public UserMedalModel setId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplaySrc() {
|
||||
return displaySrc;
|
||||
}
|
||||
|
||||
public UserMedalModel setDisplaySrc(String displaySrc) {
|
||||
this.displaySrc = displaySrc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressName() {
|
||||
return dressName;
|
||||
}
|
||||
|
||||
public UserMedalModel setDressName(String dressName) {
|
||||
this.dressName = dressName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressDescription() {
|
||||
return dressDescription;
|
||||
}
|
||||
|
||||
public UserMedalModel setDressDescription(String dressDescription) {
|
||||
this.dressDescription = dressDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public UserMedalModel setSort(String sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDressStatus() {
|
||||
return dressStatus;
|
||||
}
|
||||
|
||||
public UserMedalModel setDressStatus(String dressStatus) {
|
||||
this.dressStatus = dressStatus;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
|
||||
/**
|
||||
* 居中弹窗
|
||||
*/
|
||||
public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogCenterPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
|
||||
*/
|
||||
public abstract void buildDialog(XPopup.Builder builder);
|
||||
public abstract int bindLayoutId();
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return bindLayoutId();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||
builder.isDestroyOnDismiss(true);
|
||||
builder.enableDrag(false);
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,9 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
@Override
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
try {
|
||||
super.show(manager, tag);
|
||||
if (manager.findFragmentByTag(tag) == null) {
|
||||
super.show(manager, tag);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -7,9 +7,11 @@ import androidx.annotation.NonNull;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
|
||||
|
||||
/**
|
||||
* 底部弹窗
|
||||
*/
|
||||
public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
||||
private final Context mContext;
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.PositionPopupView;
|
||||
|
||||
/**
|
||||
* 自定义位置弹窗
|
||||
*/
|
||||
public abstract class AbsDialogPositionPopupWindow extends PositionPopupView {
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogPositionPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
|
||||
*/
|
||||
public abstract void buildDialog(XPopup.Builder builder);
|
||||
public abstract int bindLayoutId();
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return bindLayoutId();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||
builder.isDestroyOnDismiss(true);
|
||||
builder.enableDrag(false);
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.AchievementDetailsAdapter;
|
||||
import com.yunbao.common.bean.UserMedalListModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class AchievementDetailsPopup extends CenterPopupView {
|
||||
private UserMedalListModel userMedalListModel;
|
||||
private ImageView achievementImg;
|
||||
private TextView dressName, dressDescription;
|
||||
private View havaDataList, havaData;
|
||||
private AchievementDetailsAdapter achievementDetailsAdapter;
|
||||
private RecyclerView achievementImgList;
|
||||
public AchievementDetailsPopup(@NonNull Context context, UserMedalListModel userMedalListModel) {
|
||||
super(context);
|
||||
this.userMedalListModel = userMedalListModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.popup_achievement_details;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
havaDataList = findViewById(R.id.hava_data_list);
|
||||
havaData = findViewById(R.id.hava_data);
|
||||
if (userMedalListModel.getDressInfo().size() > 0) {
|
||||
havaDataList.setVisibility(GONE);
|
||||
havaData.setVisibility(VISIBLE);
|
||||
achievementDetailsAdapter = new AchievementDetailsAdapter(userMedalListModel.getDressInfo());
|
||||
|
||||
achievementImg = findViewById(R.id.achievement_img2);
|
||||
dressName = findViewById(R.id.dress_name2);
|
||||
dressDescription = findViewById(R.id.dress_description2);
|
||||
achievementImgList = findViewById(R.id.achievement_img_list);
|
||||
|
||||
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
|
||||
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
|
||||
} else {
|
||||
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
|
||||
}
|
||||
dressName.setText(userMedalListModel.getDressName());
|
||||
dressDescription.setText(userMedalListModel.getDressDescription());
|
||||
achievementImgList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||
achievementImgList.setAdapter(achievementDetailsAdapter);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn2), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
havaDataList.setVisibility(VISIBLE);
|
||||
havaData.setVisibility(GONE);
|
||||
|
||||
achievementImg = findViewById(R.id.achievement_img);
|
||||
dressName = findViewById(R.id.dress_name);
|
||||
dressDescription = findViewById(R.id.dress_description);
|
||||
|
||||
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
|
||||
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
|
||||
} else {
|
||||
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
|
||||
}
|
||||
dressName.setText(userMedalListModel.getDressName());
|
||||
dressDescription.setText(userMedalListModel.getDressDescription());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,17 @@ public class AllServerNotifyEvent extends BaseModel {
|
||||
//主播名字
|
||||
@SerializedName("ancherName")
|
||||
private String anchorName;
|
||||
// 是否是红包
|
||||
private boolean isRedPacket = false;
|
||||
|
||||
public boolean isRedPacket() {
|
||||
return isRedPacket;
|
||||
}
|
||||
|
||||
public AllServerNotifyEvent setRedPacket(boolean redPacket) {
|
||||
isRedPacket = redPacket;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnchorName() {
|
||||
return anchorName;
|
||||
@@ -137,6 +148,6 @@ public class AllServerNotifyEvent extends BaseModel {
|
||||
", blindBoxId='" + blindBoxId + '\'' + "\n" +
|
||||
", boxType='" + boxType + '\'' + "\n" +
|
||||
", displaySrc='" + displaySrc + '\'' + "\n" +
|
||||
'}' + "\n" ;
|
||||
'}' + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CodexEvent extends BaseModel {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class GiftNumberEvent extends BaseModel {
|
||||
private String mCount;
|
||||
|
||||
public String getmCount() {
|
||||
return mCount;
|
||||
}
|
||||
|
||||
public GiftNumberEvent setmCount(String mCount) {
|
||||
this.mCount = mCount;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class GiftWallIlluminateEvent extends BaseModel {
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("max_number")
|
||||
private int maxNumber;
|
||||
@SerializedName("new_number")
|
||||
private int newNumber;
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public GiftWallIlluminateEvent setMethod(String method) {
|
||||
this.method = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public GiftWallIlluminateEvent setAction(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getMaxNumber() {
|
||||
return maxNumber;
|
||||
}
|
||||
|
||||
public GiftWallIlluminateEvent setMaxNumber(int maxNumber) {
|
||||
this.maxNumber = maxNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNewNumber() {
|
||||
return newNumber;
|
||||
}
|
||||
|
||||
public GiftWallIlluminateEvent setNewNumber(int newNumber) {
|
||||
this.newNumber = newNumber;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
|
||||
public class GiftWallItemEvent extends BaseModel {
|
||||
private GiftWallModel giftWallModel;
|
||||
private boolean unlit;
|
||||
|
||||
|
||||
public GiftWallModel getGiftWallModel() {
|
||||
return giftWallModel;
|
||||
}
|
||||
|
||||
public GiftWallItemEvent setGiftWallModel(GiftWallModel giftWallModel) {
|
||||
this.giftWallModel = giftWallModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isUnlit() {
|
||||
return unlit;
|
||||
}
|
||||
|
||||
public GiftWallItemEvent setUnlit(boolean unlit) {
|
||||
this.unlit = unlit;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LiveErrorEvent extends BaseModel {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
public class LiveGiftDialogEvent {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.live.event;
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
@SerializedName("ispk")
|
||||
private String ispk;
|
||||
@SerializedName("pkuid")
|
||||
private boolean pkuid;
|
||||
private String pkuid;
|
||||
@SerializedName("pkuid1")
|
||||
private String pkuid1;
|
||||
@SerializedName("pkuid2")
|
||||
@@ -60,7 +60,7 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
@SerializedName("active_total")
|
||||
private String activeTotal;
|
||||
@SerializedName("blind_box_status")
|
||||
private boolean blindBoxStatus;
|
||||
private String blindBoxStatus;
|
||||
@SerializedName("gift_id")
|
||||
private String giftId;
|
||||
@SerializedName("gift_type")
|
||||
@@ -78,7 +78,7 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("dress_notification")
|
||||
private boolean dressNotification;
|
||||
private String dressNotification;
|
||||
@SerializedName("dress_type")
|
||||
private Object dressType;
|
||||
@SerializedName("dress_id")
|
||||
@@ -313,11 +313,11 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isPkuid() {
|
||||
public String isPkuid() {
|
||||
return pkuid;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setPkuid(boolean pkuid) {
|
||||
public SendBlindGiftEvent setPkuid(String pkuid) {
|
||||
this.pkuid = pkuid;
|
||||
return this;
|
||||
}
|
||||
@@ -367,11 +367,11 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isBlindBoxStatus() {
|
||||
public String isBlindBoxStatus() {
|
||||
return blindBoxStatus;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setBlindBoxStatus(boolean blindBoxStatus) {
|
||||
public SendBlindGiftEvent setBlindBoxStatus(String blindBoxStatus) {
|
||||
this.blindBoxStatus = blindBoxStatus;
|
||||
return this;
|
||||
}
|
||||
@@ -449,11 +449,11 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDressNotification() {
|
||||
public String isDressNotification() {
|
||||
return dressNotification;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setDressNotification(boolean dressNotification) {
|
||||
public SendBlindGiftEvent setDressNotification(String dressNotification) {
|
||||
this.dressNotification = dressNotification;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.yunbao.common.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class AllServiceChampionFragment extends BaseFragment {
|
||||
private TextView winnerOfTheMonth, lastMonthWinner;
|
||||
private String mStream, mLiveUid;
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_all_service_champion, viewGroup, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
winnerOfTheMonth = contentView.findViewById(R.id.winner_of_the_month);
|
||||
lastMonthWinner = contentView.findViewById(R.id.last_month_winner);
|
||||
winnerOfTheMonth.setSelected(true);
|
||||
lastMonthWinner.setSelected(false);
|
||||
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
|
||||
transaction.commit();
|
||||
ViewClicksAntiShake.clicksAntiShake(winnerOfTheMonth, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
winnerOfTheMonth.setSelected(true);
|
||||
lastMonthWinner.setSelected(false);
|
||||
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
|
||||
transaction.commit();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(lastMonthWinner, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
lastMonthWinner.setSelected(true);
|
||||
winnerOfTheMonth.setSelected(false);
|
||||
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
|
||||
transaction.replace(R.id.context_layout_gift, LastMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
|
||||
transaction.commit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
}
|
||||
public static AllServiceChampionFragment newInstance(String mStream, String mLiveUid) {
|
||||
AllServiceChampionFragment allServiceChampionFragment = new AllServiceChampionFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
allServiceChampionFragment.setArguments(bundle);
|
||||
return allServiceChampionFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.yunbao.common.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CurrentMonthGiftNamingFragment extends BaseFragment {
|
||||
private String mStream, mLiveUid;
|
||||
private RecyclerView giftList;
|
||||
private MonthGiftNamingAdapter monthGiftNamingAdapter;
|
||||
private View noData;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_current_month_gift_naming, viewGroup, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
giftList = contentView.findViewById(R.id.gift_list);
|
||||
noData = contentView.findViewById(R.id.no_data);
|
||||
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
|
||||
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
|
||||
giftList.setAdapter(monthGiftNamingAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveNetManager.get(getContext()).
|
||||
currentMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<GiftWallModel> data) {
|
||||
if (data.size() > 0) {
|
||||
giftList.setVisibility(View.VISIBLE);
|
||||
noData.setVisibility(View.GONE);
|
||||
monthGiftNamingAdapter.addAllData(data);
|
||||
} else {
|
||||
giftList.setVisibility(View.GONE);
|
||||
noData.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static CurrentMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
|
||||
CurrentMonthGiftNamingFragment currentMonthGiftNamingFragment = new CurrentMonthGiftNamingFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
currentMonthGiftNamingFragment.setArguments(bundle);
|
||||
return currentMonthGiftNamingFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.yunbao.common.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.GiftWithoutWallAdapter;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
|
||||
/**
|
||||
* wei点亮礼物墙
|
||||
*/
|
||||
public class GiftWithoutWallFragment extends BaseFragment {
|
||||
private String mStream, mLiveUid, toUid;
|
||||
private RecyclerView withoutList;
|
||||
private LinearLayout giftWallNoData;
|
||||
private GiftWithoutWallAdapter withoutWallAdapter;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_gift_without_wall, viewGroup, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
toUid = bundle.getString("toUid");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
withoutList = contentView.findViewById(R.id.without_list);
|
||||
giftWallNoData = contentView.findViewById(R.id.gift_wall_no_data);
|
||||
withoutWallAdapter = new GiftWithoutWallAdapter();
|
||||
withoutList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
|
||||
withoutList.setAdapter(withoutWallAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveNetManager.get(getActivity()).
|
||||
giftWithoutWall(mLiveUid, toUid, new HttpCallback<GiftAlreadyWallModel>() {
|
||||
@Override
|
||||
public void onSuccess(GiftAlreadyWallModel data) {
|
||||
if (data.getGiftWall().size() > 0) {
|
||||
giftWallNoData.setVisibility(View.GONE);
|
||||
withoutList.setVisibility(View.VISIBLE);
|
||||
withoutWallAdapter.addAllData(data.getGiftWall());
|
||||
} else {
|
||||
giftWallNoData.setVisibility(View.VISIBLE);
|
||||
withoutList.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static GiftWithoutWallFragment newInstance(String mStream, String mLiveUid, String toUid) {
|
||||
GiftWithoutWallFragment liveGiftFragment = new GiftWithoutWallFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
bundle.putString("toUid", toUid);
|
||||
liveGiftFragment.setArguments(bundle);
|
||||
return liveGiftFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.yunbao.common.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LastMonthGiftNamingFragment extends BaseFragment {
|
||||
private String mStream, mLiveUid;
|
||||
private RecyclerView giftList;
|
||||
private MonthGiftNamingAdapter monthGiftNamingAdapter;
|
||||
private View noData;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_last_month_gift_naming, viewGroup, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
giftList = contentView.findViewById(R.id.gift_list);
|
||||
noData = contentView.findViewById(R.id.no_data);
|
||||
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
|
||||
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
|
||||
giftList.setAdapter(monthGiftNamingAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveNetManager.get(getContext()).
|
||||
lastMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<GiftWallModel> data) {
|
||||
if (data.size() > 0) {
|
||||
giftList.setVisibility(View.VISIBLE);
|
||||
noData.setVisibility(View.GONE);
|
||||
monthGiftNamingAdapter.addAllData(data);
|
||||
} else {
|
||||
giftList.setVisibility(View.GONE);
|
||||
noData.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static LastMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
|
||||
LastMonthGiftNamingFragment lastMonthGiftNamingFragment = new LastMonthGiftNamingFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
lastMonthGiftNamingFragment.setArguments(bundle);
|
||||
return lastMonthGiftNamingFragment;
|
||||
}
|
||||
}
|
||||
@@ -17,11 +17,11 @@ import com.yunbao.common.bean.WishListModel;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.WishModel2;
|
||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||
import com.yunbao.common.event.PopupViewDismissEvent;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
import com.yunbao.common.views.LiveNewWishGiftPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
saveWish();
|
||||
Bus.get().post(new PopupViewDismissEvent());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -105,29 +105,51 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
liveNewWishAdapter.addData(wishList, type);
|
||||
}
|
||||
|
||||
public void saveWish() {
|
||||
public int liveNewWishAdapterWishList() {
|
||||
List<WishModel> wishList = liveNewWishAdapter.getWishList();
|
||||
List<WishModel2> wishList2 = new ArrayList<>();
|
||||
Gson gson = new Gson();
|
||||
for (WishModel model : wishList) {
|
||||
if (model!=null){
|
||||
if (model != null) {
|
||||
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
|
||||
wishList2.add(model2);
|
||||
}
|
||||
|
||||
}
|
||||
if (wishList2.size() == 0) {
|
||||
Bus.get().post(new PopupViewDismissEvent());
|
||||
} else {
|
||||
if (wishList2.size()>10){
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
return;
|
||||
return wishList2.size();
|
||||
}
|
||||
|
||||
public void saveWish() {
|
||||
List<WishModel> wishList = liveNewWishAdapter.getWishList();
|
||||
List<WishModel2> wishList2 = new ArrayList<>();
|
||||
Gson gson = new Gson();
|
||||
for (WishModel model : wishList) {
|
||||
if (model != null) {
|
||||
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
|
||||
wishList2.add(model2);
|
||||
}
|
||||
|
||||
}
|
||||
switch (type) {
|
||||
case 1:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
|
||||
break;
|
||||
case 2:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
|
||||
break;
|
||||
case 3:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
|
||||
break;
|
||||
case 4:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
|
||||
break;
|
||||
}
|
||||
if (wishList2.size() == 0) {
|
||||
LiveNetManager.get(getContext()).
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
|
||||
ToastUtil.show("修改成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,22 +157,58 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
switch (type) {
|
||||
case 1:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
|
||||
break;
|
||||
case 2:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
|
||||
break;
|
||||
case 3:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
|
||||
break;
|
||||
case 4:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
|
||||
break;
|
||||
} else if (wishList2.size() == 1) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new HintCustomPopup(getContext(),
|
||||
getContext().getString(R.string.dialog_tip),
|
||||
getContext().getString(R.string.sett_rigger))
|
||||
.setLiveOpenOk(getContext().getString(R.string.settings_ser))
|
||||
.setLiveOpenCancel(getContext().getString(R.string.cancel_ca))
|
||||
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||
@Override
|
||||
public void onSure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
if (wishList2.size() > 10) {
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext()).
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
}
|
||||
})).show();
|
||||
} else {
|
||||
if (wishList2.size() > 10) {
|
||||
ToastUtil.show(R.string.must_hint);
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext()).
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show("修改成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,6 +336,18 @@ public class ImgLoader {
|
||||
builder.into(imageView);
|
||||
}
|
||||
|
||||
public static void displayBlurLive(Context context, int url, ImageView imageView) {
|
||||
if (!contextIsExist(context)) {
|
||||
return;
|
||||
}
|
||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||
.load(url)
|
||||
.thumbnail(thumbnail)
|
||||
.apply(RequestOptions.bitmapTransform(new BlurTransformation(20)))
|
||||
.placeholder(R.mipmap.live_bg);
|
||||
builder.into(imageView);
|
||||
}
|
||||
|
||||
private static boolean contextIsExist(Context context) {
|
||||
if (context == null) {
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.http;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
@@ -18,11 +19,13 @@ import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.GiftQuantityManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.LiveClassManager;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
@@ -62,7 +65,7 @@ public class CommonHttpUtil {
|
||||
* @param poi 是否要查询POI
|
||||
*/
|
||||
public static void getAddressInfoByTxLocaitonSdk(final double lng, final double lat, final int poi, int pageIndex, String tag, final HttpCallback commonCallback) {
|
||||
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
|
||||
/*String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
|
||||
String s = "/ws/geocoder/v1/?get_poi=" + poi + "&key=" + txMapAppKey + "&location=" + lat + "," + lng
|
||||
+ "&poi_options=address_format=short;radius=1000;page_size=20;page_index=" + pageIndex + ";policy=5" + CommonAppConfig.getInstance().getTxMapAppSecret();
|
||||
String sign = MD5Util.getMD5(s);
|
||||
@@ -98,7 +101,7 @@ public class CommonHttpUtil {
|
||||
commonCallback.onFinish();
|
||||
}
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,7 +112,7 @@ public class CommonHttpUtil {
|
||||
*/
|
||||
public static void searchAddressInfoByTxLocaitonSdk(final double lng, final double lat, String keyword, int pageIndex, final HttpCallback commonCallback) {
|
||||
|
||||
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
|
||||
/* String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
|
||||
String s = "/ws/place/v1/search?boundary=nearby(" + lat + "," + lng + ",1000)&key=" + txMapAppKey + "&keyword=" + keyword + "&orderby=_distance&page_index=" + pageIndex +
|
||||
"&page_size=20" + CommonAppConfig.getInstance().getTxMapAppSecret();
|
||||
String sign = MD5Util.getMD5(s);
|
||||
@@ -143,7 +146,7 @@ public class CommonHttpUtil {
|
||||
commonCallback.onFinish();
|
||||
}
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
|
||||
@@ -195,6 +198,10 @@ public class CommonHttpUtil {
|
||||
if (obj.containsKey("is_chat")) {
|
||||
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
|
||||
}
|
||||
if (obj.containsKey("levelfans")) {
|
||||
JSONArray levelArray = obj.getJSONArray("levelfans");
|
||||
new NewLevelManager(context).upDataFansLevel(levelArray.toJSONString());
|
||||
}
|
||||
if (obj.containsKey("level_new")) {//缓存等级数据
|
||||
JSONArray levelArray = obj.getJSONArray("level_new");
|
||||
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
|
||||
@@ -224,14 +231,35 @@ public class CommonHttpUtil {
|
||||
}
|
||||
if (obj.containsKey("clarity")) {
|
||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||
} if (obj.containsKey("defaultBubbleUrl")) {
|
||||
}
|
||||
if (obj.containsKey("defaultBubbleUrl")) {
|
||||
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
|
||||
}
|
||||
if (obj.containsKey("gift_quantity")) {
|
||||
JSONArray giftQuantity = obj.getJSONArray("gift_quantity");
|
||||
new GiftQuantityManager(context).UpGiftQuantity(giftQuantity.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||
}
|
||||
} else if (code == 1000) {
|
||||
new DialogUitl
|
||||
.Builder(context)
|
||||
.setContent(msg)
|
||||
.setCancelable(false)
|
||||
.setClickCallback3(new DialogUitl.SimpleCallback3() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog) {
|
||||
AppManager.getInstance().AppExit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
AppManager.getInstance().AppExit();
|
||||
}
|
||||
}).build().show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,8 +314,15 @@ public class CommonHttpUtil {
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
if (code == 0 && info.length > 0 || code == 1001) {
|
||||
int isAttention = JSON.parseObject(info[0]).getIntValue("isattent");//1是 关注 0是未关注
|
||||
/* if (code == 1001) {
|
||||
if (WordUtil.isNewZh()) {
|
||||
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
|
||||
} else {
|
||||
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
|
||||
}
|
||||
}*/
|
||||
EventBus.getDefault().post(new FollowEvent(touid, isAttention));
|
||||
if (callback != null) {
|
||||
callback.callback(isAttention);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.live.http;
|
||||
package com.yunbao.common.http;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2019/3/21.
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.live.http;
|
||||
package com.yunbao.common.http;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.yunbao.common.http.JsonBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
|
||||
import java.io.File;
|
||||
@@ -285,17 +286,24 @@ public class LiveHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
public static void setShutUp(String liveUid, String stream, int type, String touid, HttpCallback callback) {
|
||||
setShutUp(liveUid, stream, type, touid, null, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播或管理员禁言
|
||||
* @param time 禁言时间 (分)
|
||||
*/
|
||||
public static void setShutUp(String liveUid, String stream, int type, String touid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.setShutUp", LiveHttpConsts.SET_SHUT_UP)
|
||||
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
|
||||
GetRequest<JsonBean> request = HttpClient.getInstance().get("Live.setShutUp", LiveHttpConsts.SET_SHUT_UP)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("type", type)
|
||||
.params("touid", touid)
|
||||
.execute(callback);
|
||||
.params("touid", touid);
|
||||
if (!StringUtil.isEmpty(time)) {
|
||||
request.params("minute", time);
|
||||
}
|
||||
request.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -611,15 +619,17 @@ public class LiveHttpUtil {
|
||||
* 观众给主播送礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, callback);
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, false,callback);
|
||||
}
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false,callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 观众给主播送礼物
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift,HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
@@ -627,6 +637,7 @@ public class LiveHttpUtil {
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack",isFansGroupGift?"1":"0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.common.http;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
@@ -11,6 +12,14 @@ import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.FansCheckRed;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@@ -26,6 +35,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.LiveTaskModel;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.MedalAchievementModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
@@ -35,11 +45,16 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserAreaBean;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
@@ -400,7 +415,7 @@ public interface PDLiveApi {
|
||||
* 自由PK开始后调用接口扣掉次数
|
||||
*/
|
||||
@GET("/api/public/?service=Livepk.setActivePkNum")
|
||||
Observable<ResponseModel<BaseModel>> setFreePkNum();
|
||||
Observable<ResponseModel<List<BaseModel>>> setFreePkNum();
|
||||
|
||||
/**
|
||||
* 随机PK搜索用户
|
||||
@@ -730,4 +745,227 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getBlindBoxInfo")
|
||||
Observable<ResponseModel<List<BlindBoxInfoModel>>> getBlindBoxInfo();
|
||||
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
@GET("/api/public/?service=Live.redPacketRecord")
|
||||
Observable<ResponseModel<List<RedPacketListBean>>> getRedPacketList();
|
||||
|
||||
/**
|
||||
* 获取红包詳情
|
||||
*/
|
||||
@GET("/api/public/?service=Live.redPacketRecordDetails")
|
||||
Observable<ResponseModel<RedPacketDetailsBean>> getRedPacketDetails(@Query("red_packet_id") int id);
|
||||
|
||||
/**
|
||||
* 获取直播间上下滑动红包集合
|
||||
*/
|
||||
@GET("/api/public/?service=Home.getRedPacket")
|
||||
Observable<ResponseModel<List<AnchorRecommendItemModel>>> getRedPacket();
|
||||
|
||||
|
||||
/**
|
||||
* 获取盲盒礼物当前数据
|
||||
*/
|
||||
@GET("/api/public/?service=Live.createRedPacket")
|
||||
Observable<ResponseModel<Object>> createRedPacket(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("red_packet_money") String redPacketMoney,
|
||||
@Query("red_packet_quantity") String redPacketQuantity,
|
||||
@Query("conditions") String conditions
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取盲盒礼物当前数据
|
||||
*/
|
||||
@GET("/api/public/?service=Live.redPacketInfo")
|
||||
Observable<ResponseModel<RedPacketInfoModel>> redPacketInfo(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* 获取盲盒礼物当前数据
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacket")
|
||||
Observable<ResponseModel<RedPacketInfoModel>> getRedPacket(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 超级红包打开接口
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketSuperPrize")
|
||||
Observable<ResponseModel<RedPacketInfoModel>> getRedPacketSuperPrize(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("super_jackpot_id") String superJackpotId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketReceive")
|
||||
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketReceive(
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketSuperPrizeReceive")
|
||||
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketSuperPrizeReceive(
|
||||
@Query("super_jackpot_id") String superJackpotId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.endRedPacket")
|
||||
Observable<ResponseModel<Object>> endRedPacket(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.startRedPacketRobot")
|
||||
Observable<ResponseModel<Object>> startRedPacketRobot(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取系统默认头像列表
|
||||
*/
|
||||
@GET("/api/public/?service=Userhome.getDefaultAvatarList")
|
||||
Observable<ResponseModel<List<UserAvatarSelectBean>>> getSystemUserAvatar();
|
||||
|
||||
/**
|
||||
* 设置系统默认头像
|
||||
*
|
||||
* @param id 头像id
|
||||
*/
|
||||
@GET("/api/public/?service=Userhome.setAvatar")
|
||||
Observable<ResponseModel<Object>> setSystemUserAvatar(
|
||||
@Query("avatar_id") int id
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙已点亮
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.giftAlreadyWall")
|
||||
Observable<ResponseModel<GiftAlreadyWallModel>> giftAlreadyWall(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙已点亮
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.giftUserSendWall")
|
||||
Observable<ResponseModel<GiftAlreadyWallModel>> giftUserSendWall(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙未点亮
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.giftWithoutWall")
|
||||
Observable<ResponseModel<GiftAlreadyWallModel>> giftWithoutWall(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙选中礼物详情
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.giftDetail")
|
||||
Observable<ResponseModel<GiftWallGiftDetail>> giftDetail(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("gift_id") String giftId
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙本月冠名礼物
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.currentMonthGiftNaming")
|
||||
Observable<ResponseModel<List<GiftWallModel>>> currentMonthGiftNaming();
|
||||
|
||||
/**
|
||||
* 礼物墙上月冠名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.lastMonthGiftNaming")
|
||||
Observable<ResponseModel<List<GiftWallModel>>> lastMonthGiftNaming();
|
||||
|
||||
/**
|
||||
* 礼物墙上月冠名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.getGiftGuide")
|
||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Gift.getGiftGuideHistory")
|
||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Gift.getUserMedalList")
|
||||
Observable<ResponseModel<MedalAchievementModel>> getUserMedalList(@Query("to_uid") String toUid);
|
||||
|
||||
@GET("/api/public/?service=Gift.getLiveMedalList")
|
||||
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList(@Query("liveuid") String liveUid);
|
||||
|
||||
/**
|
||||
* 获取粉丝团礼物信息
|
||||
*
|
||||
* @param packId 礼包id
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.getFansExclusivePack")
|
||||
Observable<ResponseModel<FansGroupGiftPackInfo>> getFansExclusivePack(@Query("liveuid") String liveUid,
|
||||
@Query("pack_id") String packId
|
||||
);
|
||||
|
||||
/**
|
||||
* 购买粉丝团礼包
|
||||
*
|
||||
* @param packId 礼包id
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.buyFansExclusivePack")
|
||||
Observable<ResponseModel<HttpCallbackModel>> buyFansExclusivePack(@Query("liveuid") String liveUid,
|
||||
@Query("pack_id") String packId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取粉丝团礼物包裹
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.userFansExclusivePackList")
|
||||
Observable<ResponseModel<List<FansGroupGiftPack>>> userFansExclusivePackList(@Query("liveuid") String liveUid);
|
||||
|
||||
/**
|
||||
* 获取粉丝团礼物包裹
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.getCheckFansLevelUpgrade")
|
||||
Observable<ResponseModel<FansCheckRed>> getCheckFansLevelUpgrade(@Query("liveuid") String liveUid);
|
||||
|
||||
@GET("/api/public/?service=gift.getGiftNamingInfo")
|
||||
Observable<ResponseModel<GiftNamingInfoModel>> getGiftNamingInfo(@Query("gift_id") String giftId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@ import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FansCheckRed;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
@@ -21,12 +29,14 @@ import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.LiveTaskModel;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.MedalAchievementModel;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
@@ -34,9 +44,14 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserAreaBean;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
@@ -163,8 +178,16 @@ public class LiveNetManager {
|
||||
.subscribe(listResponseModel -> {
|
||||
List<SetAttentsModel> setAttentsModels = listResponseModel.getData().getInfo();
|
||||
if (setAttentsModels.size() > 0) {
|
||||
if (callback != null)
|
||||
if (callback != null) {
|
||||
/* if (listResponseModel.getData().getCode() == 1001) {
|
||||
if (WordUtil.isNewZh()) {
|
||||
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
|
||||
} else {
|
||||
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
|
||||
}
|
||||
}*/
|
||||
callback.onSuccess(setAttentsModels.get(0));
|
||||
}
|
||||
} else {
|
||||
if (callback != null)
|
||||
callback.onError("操作失效");
|
||||
@@ -639,9 +662,9 @@ public class LiveNetManager {
|
||||
.setFreePkNum()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> responseModel) throws Exception {
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@@ -1264,6 +1287,7 @@ public class LiveNetManager {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
@@ -1550,6 +1574,625 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
public void getRedPacketList(HttpCallback<List<RedPacketListBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketList()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketListBean>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketListBean>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取红包记录列表
|
||||
*/
|
||||
public void getRedPacketUserList(int id, HttpCallback<RedPacketDetailsBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketDetails(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RedPacketDetailsBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RedPacketDetailsBean> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建红包
|
||||
*
|
||||
* @param liveUid 直播间id
|
||||
* @param redPacketMoney 红包金额
|
||||
* @param redPacketQuantity 红包数量
|
||||
* @param conditions 红包领取条件 0.无 1.关注主播
|
||||
*/
|
||||
public void createRedPacket(String liveUid, String redPacketMoney, String redPacketQuantity, String conditions, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.createRedPacket(liveUid, redPacketMoney, redPacketQuantity, conditions)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包信息
|
||||
*
|
||||
* @param liveUid 直播间id
|
||||
* @param redPacketId 红包id
|
||||
*/
|
||||
public void redPacketInfo(String liveUid, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.redPacketInfo(liveUid, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(redPacketInfoModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取红包
|
||||
*
|
||||
* @param liveUid 直播间id
|
||||
* @param redPacketId 红包id
|
||||
*/
|
||||
public void getRedPacket(String liveUid, String stream, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacket(liveUid, stream, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(redPacketInfoModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketSuperPrize(String liveUid, String superJackpotId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketSuperPrize(liveUid, superJackpotId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RedPacketInfoModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RedPacketInfoModel> redPacketInfoModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketReceive(redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketSuperPrizeReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketSuperPrizeReceive(redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void endRedPacket(String liveUid, String redPacketId, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.endRedPacket(liveUid, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess("");
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void startRedPacketRobot(String liveUid, String stream, String redPacketId, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.startRedPacketRobot(liveUid, stream, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getSystemUserAvatar(HttpCallback<List<UserAvatarSelectBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getSystemUserAvatar()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<UserAvatarSelectBean>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<UserAvatarSelectBean>> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void setSystemUserAvatar(int id, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setSystemUserAvatar(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void giftAlreadyWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftAlreadyWall(liveUid, toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void giftUserSendWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftUserSendWall(liveUid, toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void giftWithoutWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftWithoutWall(liveUid, toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void giftDetail(String liveUid, String giftId, HttpCallback<GiftWallGiftDetail> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftDetail(liveUid, giftId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftWallGiftDetail>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GiftWallGiftDetail> giftWallGiftDetailResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(giftWallGiftDetailResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void currentMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.currentMonthGiftNaming()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void lastMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.lastMonthGiftNaming()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getGiftGuide(String liveUid, String toUid, HttpCallback<List<GiftGuideModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGiftGuide(liveUid, toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getGiftGuideHistory(String toUid, String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGiftGuideHistory(liveUid, toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getUserMedalList(String toUid, HttpCallback<MedalAchievementModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getUserMedalList(toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getLiveMedalList(String liveUid, HttpCallback<MedalAchievementModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveMedalList(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getFansExclusivePack(String liveUid, String packId, HttpCallback<FansGroupGiftPackInfo> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getFansExclusivePack(liveUid, packId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<FansGroupGiftPackInfo>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<FansGroupGiftPackInfo> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void buyFansExclusivePack(String liveUid, String packId, String stream, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.buyFansExclusivePack(liveUid, packId, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<HttpCallbackModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<HttpCallbackModel> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void userFansExclusivePackList(String liveUid, HttpCallback<List<FansGroupGiftPack>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.userFansExclusivePackList(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<FansGroupGiftPack>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<FansGroupGiftPack>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getCheckFansLevelUpgrade(String liveUid, HttpCallback<FansCheckRed> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getCheckFansLevelUpgrade(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<FansCheckRed>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<FansCheckRed> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getGiftNamingInfo(String giftId,HttpCallback<GiftNamingInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGiftNamingInfo(giftId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftNamingInfoModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<GiftNamingInfoModel> liveGiftBeanResponseModel) throws Exception {
|
||||
if (callback!=null){
|
||||
callback.onSuccess(liveGiftBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.yunbao.common.http.main;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
@@ -13,7 +13,6 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseData;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -207,13 +206,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 获取推送关注的设置和关注列表
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
|
||||
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
|
||||
callback.onSuccess(msgSwitchDetailModel);
|
||||
@@ -227,13 +227,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 推送开关设置
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void setMsgMasterSwitch(String status,String type,HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status,type)
|
||||
public void setMsgMasterSwitch(String status, String type, HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status, type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseModel -> {
|
||||
.subscribe(BaseModel -> {
|
||||
if (callback != null) {
|
||||
ResponseData responseData = BaseModel.getData();
|
||||
callback.onSuccess(responseData);
|
||||
@@ -247,13 +248,14 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* 主播开播推送开关设置
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void setBeginShowMsgSwitch(String status,String isAll,String liveuid,HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status,isAll,liveuid)
|
||||
public void setBeginShowMsgSwitch(String status, String isAll, String liveuid, HttpCallback<ResponseData> callback) {
|
||||
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status, isAll, liveuid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseModel -> {
|
||||
.subscribe(BaseModel -> {
|
||||
if (callback != null) {
|
||||
ResponseData responseData = BaseModel.getData();
|
||||
callback.onSuccess(responseData);
|
||||
@@ -264,5 +266,22 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
/**
|
||||
* 获取直播间上下滑动红包集合
|
||||
*/
|
||||
public void getRedPacket(HttpCallback<List<AnchorRecommendItemModel>> callback) {
|
||||
API.get().pdLiveApi(mContext).getRedPacket()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(msgSwitchDetailModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(msgSwitchDetailModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
|
||||
}).isDisposed();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.yunbao.common.manager;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.bean.GiftQuantityModel;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GiftQuantityManager extends BaseCacheManager {
|
||||
private final static String KEY_GIFT_QUANTITY = "GiftQuantity";
|
||||
private static GiftQuantityManager manager;
|
||||
private Context context;
|
||||
private List<GiftQuantityModel> giftQuantityModels;
|
||||
|
||||
public GiftQuantityManager(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指导员备注信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<GiftQuantityModel> getGiftQuantity() {
|
||||
List<GiftQuantityModel> giftQuantityModels = getList(KEY_GIFT_QUANTITY, new TypeToken<List<GiftQuantityModel>>() {
|
||||
}.getType());
|
||||
if (giftQuantityModels == null || giftQuantityModels.size() == 0) {
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1314").setFontColour("#05F3EC"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("520").setFontColour("#65BFFB"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("100").setFontColour("#9B62FF"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("88").setFontColour("#FA62A1"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("66").setFontColour("#ffffff"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("10").setFontColour("#ffffff"));
|
||||
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1").setFontColour("#ffffff"));
|
||||
}
|
||||
return giftQuantityModels;
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存等级图标
|
||||
*
|
||||
* @param json
|
||||
*/
|
||||
public void UpGiftQuantity(String json) {
|
||||
giftQuantityModels = new Gson().fromJson(json, new TypeToken<List<GiftQuantityModel>>() {
|
||||
}.getType());
|
||||
put(KEY_GIFT_QUANTITY, giftQuantityModels);
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,7 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
|
||||
private final String STATUS_ANCHOR_SAY = "anchorSay";
|
||||
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
|
||||
private final String LIVE_NOTIFY_SETTINGS = "liveNotifySettings";//开播通知
|
||||
|
||||
private final String KEY_LANGUAGE = "language";
|
||||
|
||||
@@ -280,6 +281,10 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public void setMedalName(String medalName) {
|
||||
userInfo.setMedalName(medalName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否已登录
|
||||
*
|
||||
@@ -354,6 +359,14 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
return getBoolean(GiftEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
|
||||
}
|
||||
|
||||
public void setLiveNotifySettings(boolean isTrue) {
|
||||
put(LIVE_NOTIFY_SETTINGS, isTrue);
|
||||
}
|
||||
|
||||
public boolean isLiveNotifySettings() {
|
||||
return getBoolean(LIVE_NOTIFY_SETTINGS, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新请求管理员身份信息
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.yunbao.common.bean.FansModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
|
||||
@@ -17,9 +18,11 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
private final String KEY_USER_LEVEL = "keyUserLevel";
|
||||
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
|
||||
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
|
||||
private final String KEY_FANS_LEVEL = "keyFansLevel";
|
||||
|
||||
private List<NewLevelModel> newLevelModels = new ArrayList<>();
|
||||
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
|
||||
private List<FansModel> fansModels = new ArrayList<>();
|
||||
|
||||
public NewLevelManager(Context context) {
|
||||
super(context);
|
||||
@@ -36,6 +39,29 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
put(KEY_USER_LEVEL, newLevelModels);
|
||||
}
|
||||
|
||||
public void upDataFansLevel(String json) {
|
||||
fansModels = new Gson().fromJson(json, new TypeToken<List<FansModel>>() {
|
||||
}.getType());
|
||||
put(KEY_FANS_LEVEL, fansModels);
|
||||
}
|
||||
|
||||
public List<FansModel> getFansLevel() {
|
||||
fansModels = getList(KEY_FANS_LEVEL, new TypeToken<List<FansModel>>() {
|
||||
}.getType());
|
||||
return fansModels;
|
||||
}
|
||||
|
||||
public FansModel getFansModel(int level) {
|
||||
getFansLevel();
|
||||
FansModel fansModel = null;
|
||||
for (FansModel model : fansModels) {
|
||||
if (model.getLevelid() == level) {
|
||||
fansModel = model;
|
||||
}
|
||||
}
|
||||
return fansModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取等级数据
|
||||
*
|
||||
@@ -45,6 +71,7 @@ public class NewLevelManager extends BaseCacheManager {
|
||||
return getList(KEY_USER_LEVEL, new TypeToken<List<NewLevelModel>>() {
|
||||
}.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存等级图标
|
||||
*
|
||||
|
||||
@@ -401,7 +401,7 @@ public class RandomPkManager {
|
||||
* 清空状态,下播时调用
|
||||
*/
|
||||
public void release() {
|
||||
status = PK_STATUS_REQUEST;
|
||||
status = PK_STATUS_DEFAULT;
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
/**
|
||||
* 修复全屏WebView输入法遮挡输入框的问题
|
||||
* <a href="https://github.com/madebycm/AndroidBug5497Workaround/tree/master">GitHub</a>
|
||||
*/
|
||||
public class AndroidBug5497Workaround {
|
||||
|
||||
// For more information, see https://issuetracker.google.com/issues/36911528
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.renderscript.Allocation;
|
||||
import android.renderscript.Element;
|
||||
import android.renderscript.RenderScript;
|
||||
import android.renderscript.ScriptIntrinsicBlur;
|
||||
|
||||
/**
|
||||
* Created by L on 2017/10/12.
|
||||
*/
|
||||
|
||||
public class BlurBitmapUtil {
|
||||
/**
|
||||
* 图片缩放比例
|
||||
*/
|
||||
private static final float BITMAP_SCALE = 0.4f;
|
||||
/**
|
||||
* 最大模糊度(在0.0到25.0之间)
|
||||
*/
|
||||
private static final float BLUR_RADIUS = 25f;
|
||||
/**
|
||||
* 模糊图片的具体方法
|
||||
*
|
||||
* @param context 上下文对象
|
||||
* @param image 需要模糊的图片
|
||||
* @return 模糊处理后的图片
|
||||
*/
|
||||
public static Bitmap blur(Context context, Bitmap image) {
|
||||
// 计算图片缩小后的长宽
|
||||
int width = Math.round(image.getWidth() * BITMAP_SCALE);
|
||||
int height = Math.round(image.getHeight() * BITMAP_SCALE);
|
||||
// 将缩小后的图片做为预渲染的图片。
|
||||
Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false);
|
||||
// 创建一张渲染后的输出图片。
|
||||
Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);
|
||||
// 创建RenderScript内核对象
|
||||
RenderScript rs = RenderScript.create(context);
|
||||
// 创建一个模糊效果的RenderScript的工具对象
|
||||
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
|
||||
// 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。
|
||||
// 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。
|
||||
Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
|
||||
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
|
||||
// 设置渲染的模糊程度, 25f是最大模糊度
|
||||
blurScript.setRadius(BLUR_RADIUS);
|
||||
// 设置blurScript对象的输入内存
|
||||
blurScript.setInput(tmpIn);
|
||||
// 将输出数据保存到输出内存中
|
||||
blurScript.forEach(tmpOut);
|
||||
// 将数据填充到Allocation中
|
||||
tmpOut.copyTo(outputBitmap);
|
||||
return outputBitmap;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
@@ -88,7 +89,11 @@ public class FileUtil {
|
||||
duration= Long.parseLong(time);
|
||||
} catch (Exception ex) {
|
||||
} finally {
|
||||
mmr.release();
|
||||
try {
|
||||
mmr.release();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return duration;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.VideoBean;
|
||||
import com.yunbao.common.bean.VideoListBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
@@ -542,9 +544,52 @@ public class JavascriptInterfaceUtils {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("closeLiveRoom"));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void clickLogOffAccount() {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("clickLogOffAccount"));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupBuy(String id){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupBuy").setUserId(id));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupPack(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupPack"));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupInfo(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupInfo"));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
|
||||
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0,isAnchor==1);
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void wearOrCancelFanMedal(){
|
||||
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
|
||||
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
|
||||
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
IMLoginManager.get(mContext).upDataUserInfo(info[0]);
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
UserBean bean = JSON.toJavaObject(obj, UserBean.class);
|
||||
CommonAppConfig.getInstance().setUserBean(bean);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidCancelAnchorAttention(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidCancelAnchorAttention"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.yunbao.live.presenter;
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
@@ -10,19 +10,15 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.LiveErrorEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.base.CheckLiveCallBack;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/9/29.
|
||||
@@ -111,8 +107,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("直播间异常", "onError: " + error);
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
|
||||
Bus.get().post(new LiveErrorEvent());
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
@@ -162,8 +157,7 @@ public class LiveRoomCheckLivePresenter {
|
||||
}
|
||||
} else {
|
||||
Log.e("直播间异常", "Error: " + msg);
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
|
||||
Bus.get().post(new LiveErrorEvent());
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@ package com.yunbao.common.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.tencent.map.geolocation.TencentLocation;
|
||||
import com.tencent.map.geolocation.TencentLocationListener;
|
||||
import com.tencent.map.geolocation.TencentLocationManager;
|
||||
import com.tencent.map.geolocation.TencentLocationRequest;
|
||||
//import com.tencent.map.geolocation.TencentLocation;
|
||||
//import com.tencent.map.geolocation.TencentLocationListener;
|
||||
//import com.tencent.map.geolocation.TencentLocationManager;
|
||||
//import com.tencent.map.geolocation.TencentLocationRequest;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.TxLocationBean;
|
||||
@@ -23,12 +23,12 @@ import java.util.List;
|
||||
public class LocationUtil {
|
||||
private static final String TAG = "定位";
|
||||
private static LocationUtil sInstance;
|
||||
private TencentLocationManager mLocationManager;
|
||||
// private TencentLocationManager mLocationManager;
|
||||
private boolean mLocationStarted;
|
||||
private boolean mNeedPostLocationEvent;//是否需要发送定位成功事件
|
||||
|
||||
private LocationUtil() {
|
||||
mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
|
||||
// mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
|
||||
}
|
||||
|
||||
public static LocationUtil getInstance() {
|
||||
@@ -42,26 +42,26 @@ public class LocationUtil {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
private TencentLocationListener mLocationListener = new TencentLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(TencentLocation location, int code, String reason) {
|
||||
if (code == TencentLocation.ERROR_OK) {
|
||||
double lng = location.getLongitude();//经度
|
||||
double lat = location.getLatitude();//纬度
|
||||
L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
|
||||
CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
|
||||
if (mNeedPostLocationEvent) {
|
||||
EventBus.getDefault().post(new LocationEvent(lng, lat));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusUpdate(String s, int i, String s1) {
|
||||
|
||||
}
|
||||
};
|
||||
//
|
||||
// private TencentLocationListener mLocationListener = new TencentLocationListener() {
|
||||
// @Override
|
||||
// public void onLocationChanged(TencentLocation location, int code, String reason) {
|
||||
// if (code == TencentLocation.ERROR_OK) {
|
||||
// double lng = location.getLongitude();//经度
|
||||
// double lat = location.getLatitude();//纬度
|
||||
// L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
|
||||
// CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
|
||||
// if (mNeedPostLocationEvent) {
|
||||
// EventBus.getDefault().post(new LocationEvent(lng, lat));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onStatusUpdate(String s, int i, String s1) {
|
||||
//
|
||||
// }
|
||||
// };
|
||||
|
||||
private HttpCallback mCallback = new HttpCallback() {
|
||||
@Override
|
||||
@@ -86,29 +86,29 @@ public class LocationUtil {
|
||||
|
||||
//启动定位
|
||||
public void startLocation() {
|
||||
if (!mLocationStarted && mLocationManager != null) {
|
||||
mLocationStarted = true;
|
||||
L.e(TAG, "开启定位");
|
||||
TencentLocationRequest request = TencentLocationRequest
|
||||
.create()
|
||||
.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
|
||||
.setInterval(60 * 60 * 1000);//1小时定一次位
|
||||
|
||||
//当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
|
||||
// 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
|
||||
// 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
|
||||
mLocationManager.requestLocationUpdates(request, mLocationListener);
|
||||
}
|
||||
// if (!mLocationStarted && mLocationManager != null) {
|
||||
// mLocationStarted = true;
|
||||
// L.e(TAG, "开启定位");
|
||||
// TencentLocationRequest request = TencentLocationRequest
|
||||
// .create()
|
||||
// .setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
|
||||
// .setInterval(60 * 60 * 1000);//1小时定一次位
|
||||
//
|
||||
// //当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
|
||||
// // 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
|
||||
// // 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
|
||||
// mLocationManager.requestLocationUpdates(request, mLocationListener);
|
||||
// }
|
||||
}
|
||||
|
||||
//停止定位
|
||||
public void stopLocation() {
|
||||
CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
|
||||
if (mLocationStarted && mLocationManager != null) {
|
||||
L.e(TAG, "关闭定位");
|
||||
mLocationManager.removeUpdates(mLocationListener);
|
||||
mLocationStarted = false;
|
||||
}
|
||||
// CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
|
||||
// if (mLocationStarted && mLocationManager != null) {
|
||||
// L.e(TAG, "关闭定位");
|
||||
// mLocationManager.removeUpdates(mLocationListener);
|
||||
// mLocationStarted = false;
|
||||
// }
|
||||
}
|
||||
|
||||
public void setNeedPostLocationEvent(boolean needPostLocationEvent) {
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.lzy.okserver.OkUpload;
|
||||
import com.lzy.okserver.upload.UploadListener;
|
||||
import com.lzy.okserver.upload.UploadTask;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
@@ -157,7 +159,13 @@ public class LogUtil {
|
||||
|
||||
public static void shareFile(Context context) {
|
||||
try {
|
||||
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()) {
|
||||
IMLoginModel bean = IMLoginManager.get(context).getUserInfo();
|
||||
boolean isAnchor=false;
|
||||
if(bean!=null){
|
||||
isAnchor=bean.anchorUserType();
|
||||
}
|
||||
//有debug文件或主播才允许
|
||||
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()&&!isAnchor) {
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -258,8 +266,7 @@ public class LogUtil {
|
||||
.connectTimeout(3, TimeUnit.SECONDS)
|
||||
.build();
|
||||
Request request = new Request.Builder()
|
||||
//.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
|
||||
.url("https://tools.yutou233.cn/public/file/request.do")//临时上报地址,可接受文件
|
||||
.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
|
||||
.post(requestBody)
|
||||
.build();
|
||||
client.newCall(request)
|
||||
|
||||
@@ -23,6 +23,9 @@ public class NobleUtil {
|
||||
return -1;
|
||||
}
|
||||
public static String nobleIdToStringName(int id){
|
||||
if(!WordUtil.isNewZh()){
|
||||
return nobleIdToStringNameForEn(id);
|
||||
}
|
||||
switch (id){
|
||||
case 1:return "男爵";
|
||||
case 2:return "子爵";
|
||||
@@ -34,6 +37,18 @@ public class NobleUtil {
|
||||
}
|
||||
return "未开通";
|
||||
}
|
||||
public static String nobleIdToStringNameForEn(int id){
|
||||
switch (id){
|
||||
case 1:return "baron";
|
||||
case 2:return "viscount";
|
||||
case 3:return "marquis";
|
||||
case 4:return "duke";
|
||||
case 5:return "king";
|
||||
case 6:return "emperor";
|
||||
case 7:return "SuperEmperor";
|
||||
}
|
||||
return "Not Opened";
|
||||
}
|
||||
public static int getNobleBackgroundId(int id){
|
||||
switch (id){
|
||||
case 1:return R.mipmap.img_aristocrat_nanjue;
|
||||
|
||||
262
common/src/main/java/com/yunbao/common/utils/PluginManager.java
Normal file
262
common/src/main/java/com/yunbao/common/utils/PluginManager.java
Normal file
@@ -0,0 +1,262 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
/**
|
||||
* 插件加载器
|
||||
*/
|
||||
public class PluginManager {
|
||||
private static PluginManager manager;
|
||||
private static final String TAG = "插件管理器";
|
||||
private String anchorPluginDownloadUrl = "https://downs.yaoulive.com/pluginsForAnchor-release.apk";
|
||||
|
||||
private PluginManager() {
|
||||
}
|
||||
|
||||
public static PluginManager getInstance() {
|
||||
if (manager == null) {
|
||||
manager = new PluginManager();
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置主播插件下载地址
|
||||
*/
|
||||
public void setAnchorPluginDownloadUrl(String anchorPluginDownloadUrl) {
|
||||
this.anchorPluginDownloadUrl = anchorPluginDownloadUrl;
|
||||
}
|
||||
|
||||
public boolean isDownloadApk() {
|
||||
if(!CommonAppConfig.IS_PLUGIN_MODEL){
|
||||
return true;
|
||||
}
|
||||
return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk").exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载主播插件
|
||||
*/
|
||||
public void loadAnchorPlugin(DialogInterface.OnDismissListener dismissListener) {
|
||||
if(!CommonAppConfig.IS_PLUGIN_MODEL){
|
||||
dismissListener.onDismiss(null);
|
||||
return;
|
||||
}
|
||||
new Thread(() -> {
|
||||
try {
|
||||
if (Arrays.asList(CommonAppContext.sInstance.getAssets().list("")).contains("anchorPlugin.apk")) {
|
||||
copyAssetsFile(CommonAppContext.sInstance, "anchorPlugin.apk", "anchorPlugin.apk", CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download");
|
||||
Log.d(TAG, "解压assets下的文件");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
File sdk = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk");
|
||||
if (!sdk.exists()) {
|
||||
if (StringUtil.isEmpty(anchorPluginDownloadUrl)) {
|
||||
Log.e(TAG, "主播下载地址为空");
|
||||
return;
|
||||
}
|
||||
downloadAnchorSdk(dismissListener);
|
||||
return;
|
||||
}
|
||||
String outDir = CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin";
|
||||
loadFaceSo(sdk, outDir);
|
||||
loadFaceBundle(sdk, outDir);
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
dismissListener.onDismiss(null);
|
||||
});
|
||||
}).start();
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载美颜so文件
|
||||
*
|
||||
* @param plugin 插件apk文件
|
||||
* @param outDir 解压路径
|
||||
*/
|
||||
private void loadFaceSo(File plugin, String outDir) {
|
||||
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"lib").exists()) {
|
||||
unzip(plugin.getAbsolutePath(), outDir, ".so");
|
||||
}
|
||||
String[] abis = Build.SUPPORTED_ABIS;
|
||||
String abi = Arrays.asList(abis).contains("arm64-v8a") ? "arm64-v8a" : "armeabi-v7a";
|
||||
File plugins = new File(outDir + File.separator + "lib" + File.separator + abi);
|
||||
loadSo(plugins, "libfuai");
|
||||
loadSo(plugins, "libCNamaSDK");
|
||||
try {
|
||||
Field field = Class.forName("com.faceunity.wrapper.faceunity$LoadConfig").getDeclaredField("sLoadedLibrary");
|
||||
field.setAccessible(true);
|
||||
field.set(null,true);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置美颜Bundle文件
|
||||
*
|
||||
* @param plugin 插件apk文件
|
||||
* @param outDir 解压路径
|
||||
*/
|
||||
private void loadFaceBundle(File plugin, String outDir) {
|
||||
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"assets").exists()) {
|
||||
unzip(plugin.getAbsolutePath(), outDir, ".bundle");
|
||||
}
|
||||
try {
|
||||
Object BUNDLE_AI_FACE = Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").get(null);
|
||||
Object BUNDLE_FACE_BEAUTIFICATION = Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").get(null);
|
||||
Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_AI_FACE);
|
||||
Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_FACE_BEAUTIFICATION);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载指定so
|
||||
*
|
||||
* @param dir so文件路径
|
||||
* @param file so文件名字
|
||||
*/
|
||||
private void loadSo(File dir, String file) {
|
||||
file += ".so";
|
||||
if (new File(dir.getAbsolutePath() + File.separator + file).exists()) {
|
||||
System.load(dir + File.separator + file);
|
||||
Log.d(TAG, "加载成功 " + dir + File.separator + file);
|
||||
} else {
|
||||
Log.e(TAG, "不存在 " + dir + File.separator + file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载主播插件包
|
||||
*/
|
||||
private void downloadAnchorSdk(DialogInterface.OnDismissListener dismissListener) {
|
||||
String downloadDir = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download").getAbsolutePath();
|
||||
new DownloadUtil().download("plugin", downloadDir, "anchorPlugin.apk", anchorPluginDownloadUrl, new DownloadUtil.Callback() {
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
Log.d(TAG, "下载成功 " + file);
|
||||
loadAnchorPlugin(dismissListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(int progress) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解压zip文件
|
||||
*
|
||||
* @param zip zip文件
|
||||
* @param outDir 解压路径
|
||||
* @param suffix 过滤
|
||||
*/
|
||||
private boolean unzip(String zip, String outDir, String suffix) {
|
||||
FileOutputStream out;
|
||||
byte buffer[] = new byte[1024];
|
||||
try {
|
||||
ZipInputStream zis = new ZipInputStream(new FileInputStream(zip));
|
||||
ZipEntry entry = zis.getNextEntry();
|
||||
while (entry != null) {
|
||||
String name = entry.getName();
|
||||
if (entry.isDirectory()) {
|
||||
File newDir = new File(outDir + entry.getName());
|
||||
newDir.mkdir();
|
||||
} else if (name.endsWith(suffix)) {
|
||||
File outputFile = new File(outDir + File.separator + name);
|
||||
String outputPath = outputFile.getCanonicalPath();
|
||||
name = outputPath
|
||||
.substring(outputPath.lastIndexOf("/") + 1);
|
||||
outputPath = outputPath.substring(0, outputPath
|
||||
.lastIndexOf("/"));
|
||||
File outputDir = new File(outputPath);
|
||||
outputDir.mkdirs();
|
||||
outputFile = new File(outputPath, name);
|
||||
outputFile.createNewFile();
|
||||
out = new FileOutputStream(outputFile);
|
||||
|
||||
int tmp = 0;
|
||||
while ((tmp = zis.read(buffer)) > 0) {
|
||||
out.write(buffer, 0, tmp);
|
||||
}
|
||||
/* do {
|
||||
tmp = zis.read(buffer);
|
||||
if (tmp <= 0) {
|
||||
break;
|
||||
} else {
|
||||
out.write(buffer, 0, tmp);
|
||||
}
|
||||
} while (true);*/
|
||||
out.close();
|
||||
}
|
||||
entry = zis.getNextEntry();
|
||||
}
|
||||
zis.close();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
|
||||
File fileDir = new File(saveFileDir);
|
||||
if (!fileDir.exists()) {
|
||||
fileDir.mkdirs();
|
||||
}
|
||||
File file = new File(fileDir, fileName);
|
||||
if (file.exists()) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
try {
|
||||
InputStream inputStream = context.getAssets().open(assetsPath);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
BufferedInputStream bis = new BufferedInputStream(inputStream);
|
||||
BufferedOutputStream bos = new BufferedOutputStream(fos);
|
||||
byte[] byteArray = new byte[1024];
|
||||
int bytes = bis.read(byteArray);
|
||||
while (bytes > 0) {
|
||||
bos.write(byteArray, 0, bytes);
|
||||
bos.flush();
|
||||
bytes = bis.read(byteArray);
|
||||
}
|
||||
bos.close();
|
||||
fos.close();
|
||||
return file.getAbsolutePath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
@@ -34,10 +35,16 @@ public class RouteUtil {
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
public static final String PATH_ENTRY = "/main/EntryActivity";
|
||||
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
|
||||
public static final String PATH_GIFT_WALL = "/live/GiftWallActivity";
|
||||
public static final String PATH_SETTING = "/main/SettingActivity";
|
||||
public static final String PATH_FANSACTIVITY = "/main/FansActivity";
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
|
||||
public static final String PATH_LOGIN = "/main/LoginActivity";
|
||||
public static final String PATH_CS = "/main/CustomerServiceWebViewActivity";
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@@ -79,6 +86,7 @@ public class RouteUtil {
|
||||
.withBoolean("forwardEntry", true)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 只回到登录页,不提示东西
|
||||
*/
|
||||
@@ -187,6 +195,7 @@ public class RouteUtil {
|
||||
ARouter.getInstance().build(PATH_EDITPROFILE)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改个人资料
|
||||
*/
|
||||
@@ -225,6 +234,16 @@ public class RouteUtil {
|
||||
postcard.navigation();
|
||||
}
|
||||
|
||||
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
|
||||
ARouter.getInstance().build(PATH_GIFT_WALL)
|
||||
.withString(Constants.LIVE_UID, mLiveUid)
|
||||
.withString(Constants.STREAM, mStream)
|
||||
.withString("mAnchorName", mAnchorName)
|
||||
.withString("mAvatarUrl", mAvatarUrl)
|
||||
.withInt("isAttention", isAttention)
|
||||
.withBoolean("isLive",isLive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 举报个人
|
||||
@@ -251,4 +270,49 @@ public class RouteUtil {
|
||||
ARouter.getInstance().build(PATH_FACEBOOKACTIVITY)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 客服页面
|
||||
*/
|
||||
public static void forwardCustomerService(String url) {
|
||||
ARouter.getInstance().build(PATH_CS)
|
||||
.withString(Constants.URL, url)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包记录列表
|
||||
*/
|
||||
public static void forwardRedPacketList() {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_LIST)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包详情
|
||||
*/
|
||||
public static void forwardRedPacketInfo(RedPacketListBean bean) {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_INFO)
|
||||
.withSerializable("bean", bean)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 红包发放情况
|
||||
*
|
||||
* @param id 发放者uid
|
||||
*/
|
||||
public static void forwardRedPacketUser(int id) {
|
||||
ARouter.getInstance().build(PATH_RED_PACKET_USER)
|
||||
.withInt("id", id)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect(){
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ package com.yunbao.common.utils;
|
||||
public class TimeUtils {
|
||||
/**
|
||||
* 毫秒转秒
|
||||
*
|
||||
* @param duration 毫秒数
|
||||
* @return
|
||||
*/
|
||||
@@ -17,4 +18,53 @@ public class TimeUtils {
|
||||
toSecond = ((minute * 60) + second);
|
||||
return toSecond;
|
||||
}
|
||||
|
||||
//根据秒数转化为时分秒 00:00:00
|
||||
public static String getTime(int second) {
|
||||
if (second < 10) {
|
||||
return "" + second;
|
||||
}
|
||||
if (second < 60) {
|
||||
return "" + second;
|
||||
}
|
||||
if (second < 3600) {
|
||||
int minute = second / 60;
|
||||
second = second - minute * 60;
|
||||
if (minute < 10) {
|
||||
if (second < 10) {
|
||||
return "0" + minute + ":0" + second;
|
||||
}
|
||||
return "0" + minute + ":" + second;
|
||||
}
|
||||
if (second < 10) {
|
||||
return minute + ":0" + second;
|
||||
}
|
||||
return minute + ":" + second;
|
||||
}
|
||||
int hour = second / 3600;
|
||||
int minute = (second - hour * 3600) / 60;
|
||||
second = second - hour * 3600 - minute * 60;
|
||||
if (hour < 10) {
|
||||
if (minute < 10) {
|
||||
if (second < 10) {
|
||||
return "0" + hour + ":0" + minute + ":0" + second;
|
||||
}
|
||||
return "0" + hour + ":0" + minute + ":" + second;
|
||||
}
|
||||
if (second < 10) {
|
||||
return "0" + hour + minute + ":0" + second;
|
||||
}
|
||||
return "0" + hour + minute + ":" + second;
|
||||
}
|
||||
if (minute < 10) {
|
||||
if (second < 10) {
|
||||
return hour + ":0" + minute + ":0" + second;
|
||||
}
|
||||
return hour + ":0" + minute + ":" + second;
|
||||
}
|
||||
if (second < 10) {
|
||||
return hour + minute + ":0" + second;
|
||||
}
|
||||
return hour + minute + ":" + second;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -30,6 +31,9 @@ public class WordUtil {
|
||||
String language = locale.getLanguage();
|
||||
return language.endsWith("zh");
|
||||
}
|
||||
public static boolean isNewZh(){
|
||||
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否包含特殊字符
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.UserMedalModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class AchievementDetailsViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView achievementImg;
|
||||
public AchievementDetailsViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
achievementImg = itemView.findViewById(R.id.achievement_img);
|
||||
}
|
||||
public void showData(UserMedalModel userMedalModel){
|
||||
ImgLoader.display(itemView.getContext(), userMedalModel.getDisplaySrc(), achievementImg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.style.ImageSpan;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class CenterImageSpan extends ImageSpan {
|
||||
|
||||
public CenterImageSpan(Drawable arg1) {
|
||||
super(arg1);
|
||||
}
|
||||
|
||||
public int getSize(@NotNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
|
||||
|
||||
Drawable d = getDrawable();
|
||||
Rect rect = d.getBounds();
|
||||
|
||||
if (fm != null) {
|
||||
Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt();
|
||||
int fontHeight = fmPaint.bottom - fmPaint.top;
|
||||
int drHeight = rect.bottom - rect.top;
|
||||
|
||||
int top = drHeight / 2 - fontHeight / 4;
|
||||
int bottom = drHeight / 2 + fontHeight / 4;
|
||||
|
||||
fm.ascent = -bottom;
|
||||
fm.top = -bottom;
|
||||
fm.bottom = top;
|
||||
fm.descent = top;
|
||||
}
|
||||
|
||||
return rect.right;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(@NotNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, @NotNull Paint paint) {
|
||||
|
||||
Drawable b = getDrawable();
|
||||
canvas.save();
|
||||
int transY = 0;
|
||||
transY = ((bottom - top) - b.getBounds().bottom) / 2 + top;
|
||||
canvas.translate(x, transY);
|
||||
b.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,10 +80,13 @@ public class DayWishItemViewHolder extends RecyclerView.ViewHolder {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
int number = model.wishProgress();
|
||||
model.setWishlistNum(String.valueOf(number - 1));
|
||||
if (listener != null) {
|
||||
listener.onUpdate(model, index);
|
||||
if (number>1){
|
||||
model.setWishlistNum(String.valueOf(number - 1));
|
||||
if (listener != null) {
|
||||
listener.onUpdate(model, index);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.event.GiftWallItemEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView giftImg;
|
||||
private TextView giftTitle, giftNumber;
|
||||
|
||||
public GiftAlreadyWallViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
giftImg = itemView.findViewById(R.id.gift_img);
|
||||
giftTitle = itemView.findViewById(R.id.gift_title);
|
||||
giftNumber = itemView.findViewById(R.id.gift_number);
|
||||
}
|
||||
|
||||
public void showData(GiftWallModel giftWallModel,boolean sbWy) {
|
||||
giftTitle.setText(giftWallModel.getGiftname());
|
||||
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
|
||||
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(true));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
34
common/src/main/java/com/yunbao/common/views/GiftNumber.java
Normal file
34
common/src/main/java/com/yunbao/common/views/GiftNumber.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.GiftQuantityModel;
|
||||
import com.yunbao.common.event.GiftNumberEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class GiftNumber extends RecyclerView.ViewHolder {
|
||||
private TextView customQuantity;
|
||||
|
||||
public GiftNumber(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
customQuantity = itemView.findViewById(R.id.custom_quantity);
|
||||
}
|
||||
|
||||
public void showData(GiftQuantityModel quantityModel) {
|
||||
customQuantity.setText(quantityModel.getGiftQuantity());
|
||||
customQuantity.setTextColor(Color.parseColor(quantityModel.getFontColour()));
|
||||
ViewClicksAntiShake.clicksAntiShake(customQuantity, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Bus.get().post(new GiftNumberEvent().setmCount(quantityModel.getGiftQuantity()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.GiftNumberAdapter;
|
||||
import com.yunbao.common.event.GiftNumberEvent;
|
||||
import com.yunbao.common.manager.GiftQuantityManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
public class GiftNumberPopup extends BottomPopupView {
|
||||
public GiftNumberPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_live_gift_number;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
Bus.getOn(this);
|
||||
super.onCreate();
|
||||
RecyclerView giftList = findViewById(R.id.gift_list);
|
||||
giftList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
GiftNumberAdapter giftNumberAdapter = new GiftNumberAdapter(new GiftQuantityManager(getContext()).getGiftQuantity());
|
||||
giftList.setAdapter(giftNumberAdapter);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_can), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.custom_quantity), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new InputCustomPopup(getContext(),
|
||||
getContext().getString(R.string.the_title_financier3),
|
||||
R.string.custom_quantity, true)
|
||||
.setMaxValue(4)
|
||||
.setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
int number = Integer.parseInt(text);
|
||||
if (1 <= number && number <= 9999) {
|
||||
Bus.get().post(new GiftNumberEvent().setmCount(text));
|
||||
} else {
|
||||
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
|
||||
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
|
||||
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
|
||||
}
|
||||
|
||||
}
|
||||
})).show();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGiftNumberEvent(GiftNumberEvent event) {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user