徐勤民 3 miesięcy temu
rodzic
commit
e11c2c653b
100 zmienionych plików z 1855 dodań i 0 usunięć
  1. 85 0
      .gitignore
  2. 1 0
      app/.gitignore
  3. 117 0
      app/build.gradle
  4. BIN
      app/key.jks
  5. 22 0
      app/proguard-rules.pro
  6. 116 0
      app/src/main/AndroidManifest.xml
  7. 0 0
      app/src/main/assets/answer.json
  8. BIN
      app/src/main/assets/fonts/Montserrat-Black.ttf
  9. BIN
      app/src/main/assets/fonts/Montserrat-BlackItalic.ttf
  10. BIN
      app/src/main/assets/fonts/Montserrat-Bold.ttf
  11. BIN
      app/src/main/assets/fonts/Montserrat-BoldItalic.ttf
  12. BIN
      app/src/main/assets/fonts/Montserrat-ExtraBold.ttf
  13. BIN
      app/src/main/assets/fonts/Montserrat-ExtraBoldItalic.ttf
  14. BIN
      app/src/main/assets/fonts/Montserrat-ExtraLight.ttf
  15. BIN
      app/src/main/assets/fonts/Montserrat-ExtraLightItalic.ttf
  16. BIN
      app/src/main/assets/fonts/Montserrat-Italic.ttf
  17. BIN
      app/src/main/assets/fonts/Montserrat-Light.ttf
  18. BIN
      app/src/main/assets/fonts/Montserrat-LightItalic.ttf
  19. BIN
      app/src/main/assets/fonts/Montserrat-Medium.ttf
  20. BIN
      app/src/main/assets/fonts/Montserrat-MediumItalic.ttf
  21. BIN
      app/src/main/assets/fonts/Montserrat-Regular.ttf
  22. BIN
      app/src/main/assets/fonts/Montserrat-SemiBold.ttf
  23. BIN
      app/src/main/assets/fonts/Montserrat-SemiBoldItalic.ttf
  24. BIN
      app/src/main/assets/fonts/Montserrat-Thin.ttf
  25. BIN
      app/src/main/assets/fonts/Montserrat-ThinItalic.ttf
  26. BIN
      app/src/main/assets/images/img_0.png
  27. BIN
      app/src/main/assets/images/img_1.png
  28. 0 0
      app/src/main/assets/matching.json
  29. 72 0
      app/src/main/java/com/xuqinmin/android/app/MyApplication.java
  30. 14 0
      app/src/main/java/com/xuqinmin/android/app/MyFileNameGenerator.java
  31. 18 0
      app/src/main/java/com/xuqinmin/android/app/common/CountryHelper.kt
  32. 150 0
      app/src/main/java/com/xuqinmin/android/app/common/CrashHandler.java
  33. 27 0
      app/src/main/java/com/xuqinmin/android/app/common/GenderHelper.kt
  34. 42 0
      app/src/main/java/com/xuqinmin/android/app/common/LiveHelper.kt
  35. 236 0
      app/src/main/java/com/xuqinmin/android/app/common/RabbitMQClient.java
  36. 227 0
      app/src/main/java/com/xuqinmin/android/app/common/RabbitMQUtil.java
  37. 8 0
      app/src/main/java/com/xuqinmin/android/app/common/SharedPreferencesConfigs.kt
  38. 59 0
      app/src/main/java/com/xuqinmin/android/app/common/StoreHelper.kt
  39. 16 0
      app/src/main/java/com/xuqinmin/android/app/db/BaseEntity.java
  40. 14 0
      app/src/main/java/com/xuqinmin/android/app/db/MessageDatabase.java
  41. 23 0
      app/src/main/java/com/xuqinmin/android/app/db/XuqmDbHelper.java
  42. 29 0
      app/src/main/java/com/xuqinmin/android/app/db/msg/MessageDao.java
  43. 57 0
      app/src/main/java/com/xuqinmin/android/app/db/msg/MessageEntity.java
  44. 28 0
      app/src/main/java/com/xuqinmin/android/app/model/AnchorInfoModel.kt
  45. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/BalanceChange.kt
  46. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/BlackListModel.kt
  47. 18 0
      app/src/main/java/com/xuqinmin/android/app/model/BlackListModelItem.kt
  48. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/CallData.kt
  49. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/CallFailData.kt
  50. 16 0
      app/src/main/java/com/xuqinmin/android/app/model/CanCallModel.kt
  51. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/Coins.kt
  52. 10 0
      app/src/main/java/com/xuqinmin/android/app/model/CompleteData.kt
  53. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/CountryModel.kt
  54. 9 0
      app/src/main/java/com/xuqinmin/android/app/model/Data.kt
  55. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/DataDate.kt
  56. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/DataInit.kt
  57. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/DataLogin.kt
  58. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/DataRegister.kt
  59. 12 0
      app/src/main/java/com/xuqinmin/android/app/model/DiscoverData.kt
  60. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/DiscoverListModel.kt
  61. 21 0
      app/src/main/java/com/xuqinmin/android/app/model/DiscoverModel.kt
  62. 11 0
      app/src/main/java/com/xuqinmin/android/app/model/EditUserData.kt
  63. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/EndData.kt
  64. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/FeedbackData.kt
  65. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/FollowData.kt
  66. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/FollowPageData.kt
  67. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/GetFileData.kt
  68. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/GetFileModel.kt
  69. 10 0
      app/src/main/java/com/xuqinmin/android/app/model/GiftModel.kt
  70. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/HistoryData.kt
  71. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/HistoryListModel.kt
  72. 14 0
      app/src/main/java/com/xuqinmin/android/app/model/HistoryModel.kt
  73. 9 0
      app/src/main/java/com/xuqinmin/android/app/model/Label.kt
  74. 9 0
      app/src/main/java/com/xuqinmin/android/app/model/LabelX.kt
  75. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/MatchLogModel.kt
  76. 28 0
      app/src/main/java/com/xuqinmin/android/app/model/MatchLogModelItem.kt
  77. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/MatchingData.kt
  78. 25 0
      app/src/main/java/com/xuqinmin/android/app/model/ModelHideIn.kt
  79. 28 0
      app/src/main/java/com/xuqinmin/android/app/model/ModelInit.kt
  80. 9 0
      app/src/main/java/com/xuqinmin/android/app/model/ModelResponse.kt
  81. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/MsgListData.kt
  82. 10 0
      app/src/main/java/com/xuqinmin/android/app/model/NewUserModel.kt
  83. 12 0
      app/src/main/java/com/xuqinmin/android/app/model/OrderModel.kt
  84. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/PageData.kt
  85. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/Pic.kt
  86. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/RecommendData.kt
  87. 12 0
      app/src/main/java/com/xuqinmin/android/app/model/RecommendModel.kt
  88. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/Region.kt
  89. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/RegionList.kt
  90. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/ReportData.kt
  91. 7 0
      app/src/main/java/com/xuqinmin/android/app/model/SendGiftData.kt
  92. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/SendGiftModel.kt
  93. 8 0
      app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorData.kt
  94. 3 0
      app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorModel.kt
  95. 16 0
      app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorModelItem.kt
  96. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/SwitchData.kt
  97. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/Tab.kt
  98. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/UnlockData.kt
  99. 5 0
      app/src/main/java/com/xuqinmin/android/app/model/UnlockModel.kt
  100. 6 0
      app/src/main/java/com/xuqinmin/android/app/model/UpDownData.kt

+ 85 - 0
.gitignore

@@ -0,0 +1,85 @@
+# Built application files
+*.apk
+*.aar
+*.ap_
+*.aab
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+#  Uncomment the following line in case you need and you don't have the release build type files in your app
+# release/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# IntelliJ
+*.iml
+.idea/
+# Android Studio 3 in .gitignore file.
+.idea/caches
+.idea/modules.xml
+# Comment next line if keeping position of elements in Navigation Editor is relevant for you
+.idea/navEditor.xml
+
+# Keystore files
+# Uncomment the following lines if you do not want to check your keystore files in.
+#*.jks
+#*.keystore
+
+# External native build folder generated in Android Studio 2.2 and later
+.externalNativeBuild
+.cxx/
+
+# Google Services (e.g. APIs or Firebase)
+# google-services.json
+
+# Freeline
+freeline.py
+freeline/
+freeline_project_description.json
+
+# fastlane
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots
+fastlane/test_output
+fastlane/readme.md
+
+# Version control
+vcs.xml
+
+# lint
+lint/intermediates/
+lint/generated/
+lint/outputs/
+lint/tmp/
+# lint/reports/
+
+/app/key
+output-metadata.json
+# Android Profiling
+*.hprof

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
+/build

+ 117 - 0
app/build.gradle

@@ -0,0 +1,117 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+apply plugin: 'kotlin-kapt'
+
+
+android {
+    compileSdkVersion versions.compileSdk
+    buildToolsVersion versions.buildTools
+
+    defaultConfig {
+        applicationId apps.applicationId
+        minSdkVersion versions.minSdk
+        targetSdkVersion versions.targetSdk
+        versionCode versions.versionCode
+        versionName versions.versionName
+
+        manifestPlaceholders = [
+                APP_NAME: apps.applicationName,
+                APP_ID  : apps.applicationId,
+        ]
+        buildConfigField("String", "APP_Name", "\"" + apps.applicationName + "\"")
+
+        flavorDimensions "versioncode"
+    }
+    buildTypes {
+        debug {
+            minifyEnabled false
+            signingConfig signingConfigs.debug
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+        release {
+            minifyEnabled false
+            signingConfig signingConfigs.debug
+            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+        }
+    }
+
+    applicationVariants.configureEach { variant ->
+        variant.outputs.configureEach { output ->
+            if ("debug" != variant.buildType.name) {
+                def now = new Date()
+                def path = "../../../../../apks/${variant.buildType.name}/v${defaultConfig.versionName}_" + now.format("yyyy.MM.dd_HH")
+                outputFileName = path + "/${applicationId}.apk"
+            }
+        }
+    }
+    signingConfigs {
+        debug {
+            keyAlias 'livechat'
+            keyPassword '123456'
+            storeFile file('key.jks')
+            storePassword '123456'
+        }
+        releaseConfig {}
+    }
+
+    sourceSets {
+        main {
+            jniLibs.srcDirs = ['libs']
+        }
+    }
+    androidExtensions {
+        experimental = true
+    }
+    namespace 'com.xuqinmin.android.app'
+}
+
+dependencies {
+    implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
+    implementation project(path: ':core')
+    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+
+    implementation 'com.android.support:appcompat-v7:28.0.0'
+    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+    implementation 'androidx.appcompat:appcompat:1.3.0'
+    implementation 'com.google.android.material:material:1.3.0'
+
+    implementation 'tp.xmaihh:serialport:2.1'
+
+    implementation 'com.rabbitmq:amqp-client:5.15.0'
+    implementation 'com.github.weidongjian:androidWheelView:1.0.0'
+
+    // 声网
+    implementation 'io.agora.rtc:full-sdk:4.2.3'
+
+    //毛玻璃
+    implementation 'com.github.centerzx:ShapeBlurView:1.0.5'
+
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
+//
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'
+//
+//    implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
+
+    implementation 'com.github.leifzhang:IjkLib:0.4.3'
+    // json 动画
+    implementation 'com.airbnb.android:lottie:3.4.0'
+    // 视频缓存
+    implementation 'com.danikula:videocache:2.7.1'
+
+    //eventbus
+    implementation 'org.greenrobot:eventbus:3.1.1'
+
+    implementation 'androidx.room:room-runtime:2.2.3'
+//    annotationProcessor "androidx.room:room-compiler:2.2.3"
+    kapt "androidx.room:room-compiler:2.2.3"
+
+    implementation("com.android.billingclient:billing:6.2.0")
+//    implementation("com.android.billingclient:billing-ktx:6.2.0")
+
+}

BIN
app/key.jks


+ 22 - 0
app/proguard-rules.pro

@@ -0,0 +1,22 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# 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 *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
+# -keep class io.agora.**{*;}

+ 116 - 0
app/src/main/AndroidManifest.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+    <!-- 网络权限 -->
+    <uses-feature
+        android:name="android.hardware.camera"
+        android:required="false" />
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.BLUETOOTH" /> <!-- 对于 Android 12.0 及以上设备,还需要添加以下权限 -->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
+
+    <queries package="${applicationId}">
+        <intent>
+            <action android:name="android.media.action.IMAGE_CAPTURE" />
+        </intent>
+        <intent>
+            <action android:name="android.media.action.ACTION_VIDEO_CAPTURE" />
+        </intent>
+    </queries>
+
+    <application
+        android:name=".MyApplication"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher"
+        android:label="${APP_NAME}"
+        android:supportsRtl="true"
+        android:theme="@style/AppTheme"
+        android:usesCleartextTraffic="true"
+        tools:replace="android:label">
+        <activity
+            android:name=".ui.AboutActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.SettingActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.ChatActivity"
+            android:exported="false"
+            android:windowSoftInputMode="stateVisible|adjustResize" />
+        <activity
+            android:name=".ui.FeedbackActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.BlocklistActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.FriendsActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.CoinStoreActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.EditActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.VideoActivity"
+            android:exported="true" />
+        <activity
+            android:name=".ui.HomeActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.LiveActivity"
+            android:exported="true"
+            android:windowSoftInputMode="adjustResize" />
+        <activity
+            android:name=".ui.SearchingActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.MainActivity"
+            android:exported="true" />
+        <activity
+            android:name=".ui.RegisterMoreActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.RegisterActivity"
+            android:exported="false" />
+        <activity
+            android:name=".ui.WelcomeActivity"
+            android:exported="true"
+            android:screenOrientation="portrait">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <provider
+            android:name="androidx.core.content.FileProvider"
+            android:authorities="${APP_ID}.fileprovider"
+            android:exported="false"
+            android:grantUriPermissions="true">
+            <meta-data
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/filepaths" />
+        </provider>
+
+        <meta-data
+            android:name="com.google.android.gms.wallet.api.enabled"
+            android:value="true" />
+        <meta-data
+            android:name="design_width_in_dp"
+            android:value="375" />
+        <meta-data
+            android:name="design_height_in_dp"
+            android:value="812" />
+    </application>
+
+</manifest>

Plik diff jest za duży
+ 0 - 0
app/src/main/assets/answer.json


BIN
app/src/main/assets/fonts/Montserrat-Black.ttf


BIN
app/src/main/assets/fonts/Montserrat-BlackItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Bold.ttf


BIN
app/src/main/assets/fonts/Montserrat-BoldItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-ExtraBold.ttf


BIN
app/src/main/assets/fonts/Montserrat-ExtraBoldItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-ExtraLight.ttf


BIN
app/src/main/assets/fonts/Montserrat-ExtraLightItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Italic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Light.ttf


BIN
app/src/main/assets/fonts/Montserrat-LightItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Medium.ttf


BIN
app/src/main/assets/fonts/Montserrat-MediumItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Regular.ttf


BIN
app/src/main/assets/fonts/Montserrat-SemiBold.ttf


BIN
app/src/main/assets/fonts/Montserrat-SemiBoldItalic.ttf


BIN
app/src/main/assets/fonts/Montserrat-Thin.ttf


BIN
app/src/main/assets/fonts/Montserrat-ThinItalic.ttf


BIN
app/src/main/assets/images/img_0.png


BIN
app/src/main/assets/images/img_1.png


Plik diff jest za duży
+ 0 - 0
app/src/main/assets/matching.json


Plik diff jest za duży
+ 72 - 0
app/src/main/java/com/xuqinmin/android/app/MyApplication.java


+ 14 - 0
app/src/main/java/com/xuqinmin/android/app/MyFileNameGenerator.java

@@ -0,0 +1,14 @@
+package com.xuqinmin.android.app;
+
+import android.net.Uri;
+
+import com.danikula.videocache.file.FileNameGenerator;
+
+public class MyFileNameGenerator implements FileNameGenerator {
+
+    public String generate(String url) {
+        Uri uri = Uri.parse(url);
+        String videoId = uri.getQueryParameter("videoId");
+        return videoId + ".mp4";
+    }
+}

+ 18 - 0
app/src/main/java/com/xuqinmin/android/app/common/CountryHelper.kt

@@ -0,0 +1,18 @@
+package com.xuqinmin.android.app.common
+
+import com.xuqinmin.android.app.MyApplication
+
+class CountryHelper {
+    companion object {
+        fun getCountryName(code: String?): String {
+            var name = "United States"
+            if (code == null) return name
+            for (region in MyApplication.country) {
+                if (region.code == code) {
+                    name = "${region.emoji} ${region.name}"
+                }
+            }
+            return name
+        }
+    }
+}

+ 150 - 0
app/src/main/java/com/xuqinmin/android/app/common/CrashHandler.java

@@ -0,0 +1,150 @@
+package com.xuqinmin.android.app.common;
+
+import android.content.Context;
+import android.os.Environment;
+import android.os.SystemClock;
+import android.util.Log;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+public class CrashHandler implements Thread.UncaughtExceptionHandler {
+
+
+    private static String TAG = "CrashHandler";
+    // 系统默认的UncaughtException处理类
+    private Thread.UncaughtExceptionHandler mDefaultHandler;
+    // 用于格式化日期,作为日志文件名的一部分
+    private DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+    private static CrashHandler mCrashHandler;
+    private Context mContext;
+
+
+    private CrashHandler() {
+
+    }
+
+    public static CrashHandler getInstance() {
+        if (mCrashHandler == null) {
+            synchronized (CrashHandler.class) {
+                mCrashHandler = new CrashHandler();
+            }
+        }
+        return mCrashHandler;
+    }
+
+    public void init(Context context) {
+        mContext = context;
+        mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
+        Thread.setDefaultUncaughtExceptionHandler(this);
+    }
+
+    @Override
+    public void uncaughtException(Thread thread, Throwable throwable) {
+        if (!handleException(throwable) && mDefaultHandler != null) {
+            // 如果用户没有处理则让系统默认的异常处理器来处理
+            mDefaultHandler.uncaughtException(thread, throwable);
+        } else {
+            SystemClock.sleep(2000);
+            // 退出程序
+            android.os.Process.killProcess(android.os.Process.myPid());
+            System.exit(1);
+        }
+    }
+
+
+    private boolean handleException(Throwable ex) {
+        if (ex == null) {
+            return false;
+        }
+        try {
+            saveCrashInfoFile(ex);
+            SystemClock.sleep(2000);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return true;
+    }
+
+    private String saveCrashInfoFile(Throwable ex) {
+        StringBuffer sb = new StringBuffer();
+
+        if (hasSdcard())
+            try {
+                SimpleDateFormat sDateFormat = new SimpleDateFormat(
+                        "yyyy-MM-dd HH:mm:ss", Locale.CHINA);
+                String date = sDateFormat.format(new Date());
+                sb.append("\r\n" + date + "\n");
+
+                Writer writer = new StringWriter();
+                PrintWriter printWriter = new PrintWriter(writer);
+                ex.printStackTrace(printWriter);
+                Throwable cause = ex.getCause();
+                while (cause != null) {
+                    cause.printStackTrace(printWriter);
+                    cause = cause.getCause();
+                }
+                printWriter.flush();
+                printWriter.close();
+                String result = writer.toString();
+                sb.append(result);
+
+                String fileName = writeFile(sb.toString());
+                return fileName;
+            } catch (Exception e) {
+                Log.e(TAG, "an error occured while writing file...", e);
+                sb.append("an error occured while writing file...\r\n");
+                writeFile(sb.toString());
+            }
+        return null;
+    }
+
+    private String writeFile(String text) {
+        Log.e("writeFile", text);
+        String time = formatter.format(new Date());
+        String fileName = "crash-demo-" + time + ".log";
+
+        String path = getGlobalpath();
+
+        File dir = new File(path);
+        if (!dir.exists()) {
+            dir.mkdir();
+        }
+        FileOutputStream fos = null;
+        try {
+            fos = new FileOutputStream(path + fileName, true);
+            fos.write(text.getBytes());
+            fos.flush();
+            fos.close();
+
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return fileName;
+    }
+
+
+    public String getGlobalpath() {
+        return Environment.getExternalStorageDirectory().getAbsolutePath()
+                + File.separator + "crash" + File.separator;
+    }
+
+
+    public boolean hasSdcard(){
+        return Environment.getExternalStorageState()
+                .equals(Environment.MEDIA_MOUNTED);
+    }
+}
+

+ 27 - 0
app/src/main/java/com/xuqinmin/android/app/common/GenderHelper.kt

@@ -0,0 +1,27 @@
+package com.xuqinmin.android.app.common
+
+import com.xuqinmin.android.app.R
+import com.xuqm.base.model.KeyValueData
+
+class GenderHelper {
+    companion object {
+        val list_gender = listOf<KeyValueData<Int, String>>(
+            KeyValueData(-1, "Unknown"), KeyValueData(0, "Male"), KeyValueData(1, "Female")
+        )
+
+        fun getString(code: Int): String {
+            for (keyValueData in list_gender) {
+                if (keyValueData.key == code) return keyValueData.value
+            }
+            return "Unknown"
+        }
+
+        fun getImage(code: Int): Int {
+
+            return when (code) {
+                1 -> R.mipmap.female_selected
+                else -> R.mipmap.male_selected
+            }
+        }
+    }
+}

+ 42 - 0
app/src/main/java/com/xuqinmin/android/app/common/LiveHelper.kt

@@ -0,0 +1,42 @@
+package com.xuqinmin.android.app.common
+
+import android.content.Intent
+import com.xuqinmin.android.app.MyApplication
+import com.xuqinmin.android.app.model.msg.CallModel
+import com.xuqinmin.android.app.ui.LiveActivity
+import com.xuqm.base.common.AppManager
+import com.xuqm.base.common.GsonImplHelp
+import com.xuqm.sdhbwfu.core.extensions.loge
+
+class LiveHelper {
+
+    companion object {
+        /**
+         * 1=收到邀请、2=发起邀请、0=直接通话
+         */
+        fun start(model: CallModel, type: Int) {
+
+            model.price.loge()
+            MyApplication.modelHideIn.coins.loge()
+            if (type == 2 && model.price > 0 && MyApplication.modelHideIn.coins < model.price) {
+
+                StoreHelper.showPay()
+
+                return
+            }
+
+            AppManager.getInstance().activity.startActivity(Intent(
+                AppManager.getInstance().activity, LiveActivity::class.java
+            ).apply {
+                putExtra("model", GsonImplHelp.get().toJson(model))
+                putExtra("type", type)
+            })
+        }
+
+        fun start(model: String, type: Int) {
+
+
+            this.start(GsonImplHelp.get().toObject(model, CallModel::class.java), type)
+        }
+    }
+}

+ 236 - 0
app/src/main/java/com/xuqinmin/android/app/common/RabbitMQClient.java

@@ -0,0 +1,236 @@
+package com.xuqinmin.android.app.common;
+
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.rabbitmq.client.AMQP;
+import com.rabbitmq.client.AlreadyClosedException;
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.DefaultConsumer;
+import com.rabbitmq.client.Envelope;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeoutException;
+
+public class RabbitMQClient {
+    private final String TAG = "RabbitMQ";
+    private final String FLAG_SEND = "send";
+    private final String FLAG_RECEIVE = "receive";
+
+    private final ConnectionFactory factory;
+    private Connection connection;
+    private Map<String, Channel> channelMap = new HashMap<>();
+
+    public static final String EXCHANGETYPE_FANOUT = "fanout";   //不用匹配路由,发送给所有绑定转换器的队列
+    public static final String EXCHANGETYPE_DIRECT = "direct";  //匹配路由一致,才发送给绑定转换器队列
+    public static final String EXCHANGETYPE_TOPIC = "topic";  // 通配符* 和 # 匹配路由一致,才发送给绑定转换器队列
+
+
+    public RabbitMQClient(String hostIp, int port, String username, String password) {
+        factory = new ConnectionFactory();
+        factory.setUsername(username);
+        factory.setPassword(password);
+        factory.setHost(hostIp);
+        factory.setPort(port);
+        factory.setVirtualHost("/");//类似数据库的意思
+        factory.setConnectionTimeout(15 * 1000);         //连接时间设置为10秒
+        factory.setAutomaticRecoveryEnabled(true);   //恢复连接,通道
+        factory.setTopologyRecoveryEnabled(true);    //恢复通道中 转换器,队列,绑定关系等
+        factory.setNetworkRecoveryInterval(5 * 1000);    //恢复连接间隔,默认5秒
+    }
+
+
+    /**
+     * @param message   需要发送的消息
+     * @param queueName 管道名称
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void sendQueueMessage(String message, String queueName) throws IOException, TimeoutException, AlreadyClosedException {
+        if (connection == null || !connection.isOpen()) {
+            connection = factory.newConnection();
+        }
+        if (!channelMap.containsKey(FLAG_SEND + queueName)) {
+            Channel channel = connection.createChannel();
+            channel.queueDeclare(queueName, false, false, false, null);
+            channelMap.put(FLAG_SEND + queueName, channel);
+        }
+        //空名字的交换机,需要设置routingKey,此时会将routingKey 作为 队列名使用
+        channelMap.get(FLAG_SEND + queueName).basicPublish("", queueName, null, message.getBytes());
+    }
+
+
+    /**
+     * @param exchangeName 交换机名称
+     * @param message      需要发送的消息
+     * @param queueName    队列名称
+     * @param routingKey   路由规则
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion 发送 exchangeType direct 类型的信息
+     **/
+    public void sendDirectTypeMessage(String exchangeName, String message, String queueName, String routingKey) throws IOException, TimeoutException, AlreadyClosedException {
+        if (connection == null || !connection.isOpen()) {
+            connection = factory.newConnection();
+        }
+        if (!channelMap.containsKey(FLAG_SEND + exchangeName + EXCHANGETYPE_DIRECT + queueName)) {
+            Channel channel = connection.createChannel();
+            channel.queueDeclare(queueName, false, false, false, null);
+            channel.exchangeDeclare(exchangeName, EXCHANGETYPE_DIRECT);
+            channelMap.put(FLAG_SEND + exchangeName + EXCHANGETYPE_DIRECT + queueName, channel);
+        }
+        channelMap.get(FLAG_SEND + exchangeName + EXCHANGETYPE_DIRECT + queueName).basicPublish(exchangeName, routingKey, null, message.getBytes());
+    }
+
+    /**
+     * @param exchangeName 交换机名称
+     * @param queueName    队列名称
+     * @param message      发送的消息
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion 发送 exchangeType fanout 类型的信息
+     **/
+    public void sendFanoutTypeMessage(String exchangeName, String queueName, String message) throws IOException, TimeoutException, AlreadyClosedException {
+        if (connection == null || !connection.isOpen()) {
+            connection = factory.newConnection();
+        }
+        if (!channelMap.containsKey(FLAG_SEND + exchangeName + EXCHANGETYPE_FANOUT + queueName)) {
+            Channel channel = connection.createChannel();
+            channel.queueDeclare(queueName, false, false, false, null);
+            channel.exchangeDeclare(exchangeName, EXCHANGETYPE_FANOUT);
+            channelMap.put(FLAG_SEND + exchangeName + EXCHANGETYPE_FANOUT + queueName, channel);
+        }
+        channelMap.get(FLAG_SEND + exchangeName + EXCHANGETYPE_FANOUT + queueName).basicPublish(exchangeName, "", null, message.getBytes());
+    }
+
+    /**
+     * @param exchangeName 交换机名称
+     * @param exchangeType 模式
+     * @param queueName    队列名称
+     * @param message      需要发送的消息
+     * @param routingKey   路由规则
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void sendExchangeNameQueueMessage(String exchangeName, String exchangeType, String message, String queueName, String routingKey) throws IOException, TimeoutException, AlreadyClosedException {
+        if (connection == null || !connection.isOpen()) {
+            connection = factory.newConnection();
+        }
+        if (!channelMap.containsKey(FLAG_SEND + exchangeName + exchangeType + queueName)) {
+            Channel channel = connection.createChannel();
+            channel.queueDeclare(queueName, false, false, false, null);
+            channel.exchangeDeclare(exchangeName, exchangeType);
+            channelMap.put(FLAG_SEND + exchangeName + exchangeType + queueName, channel);
+        }
+        if (exchangeType.equals(EXCHANGETYPE_FANOUT)) {
+            channelMap.get(FLAG_SEND + exchangeName + exchangeType + queueName).basicPublish(exchangeName, "", null, message.getBytes());
+        } else if (exchangeType.equals(EXCHANGETYPE_DIRECT)) {
+            channelMap.get(FLAG_SEND + exchangeName + exchangeType + queueName).basicPublish(exchangeName, routingKey, null, message.getBytes());
+        } else if (exchangeType.equals(EXCHANGETYPE_TOPIC)) {
+            channelMap.get(FLAG_SEND + exchangeName + exchangeType + queueName).basicPublish(exchangeName, routingKey, null, message.getBytes());
+        }
+    }
+
+
+    /**
+     * @param queueName 队列名称
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void receiveQueueMessage(final String queueName, final ResponseListener listener)
+            throws IOException, TimeoutException, AlreadyClosedException {
+        receiveQueueRoutingKeyMessage(queueName, "", "", "", listener);
+    }
+
+
+    /**
+     * @param queueName    队列名称
+     * @param routingKey   路由规则
+     * @param exchangeName 交换机名称
+     * @param exchangeType 交换机类型
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void receiveQueueRoutingKeyMessage(String queueName, final String routingKey, String exchangeName, String exchangeType, final ResponseListener listener)
+            throws IOException, TimeoutException, AlreadyClosedException {
+
+        if (exchangeType.equals(EXCHANGETYPE_DIRECT) || exchangeType.equals(EXCHANGETYPE_TOPIC)) {
+            if (TextUtils.isEmpty(routingKey)) {
+                throw new NullPointerException("路由规则不能为空");
+            }
+        }
+
+        if (!TextUtils.isEmpty(routingKey)) {
+            if (TextUtils.isEmpty(exchangeName)) {
+                throw new NullPointerException("交换机名称不能为空");
+            }
+        }
+
+        if (!channelMap.containsKey(FLAG_RECEIVE + routingKey + queueName)) {
+            if (connection == null || !connection.isOpen()) {
+                connection = factory.newConnection();
+            }
+
+            final Channel channel = connection.createChannel();
+            channel.queueDeclare(queueName, true, false, false, null);
+            //绑定转换器,使用路由筛选消息
+            if (!TextUtils.isEmpty(routingKey)) {
+                channel.exchangeDeclare(exchangeName, exchangeType);
+                channel.queueBind(queueName, exchangeName, routingKey);  //设置绑定
+            }
+            //监听队列
+            channel.basicConsume(queueName, false, new DefaultConsumer(channel) {
+                @Override
+                public void handleDelivery(String consumerTag, Envelope envelope,
+                                           AMQP.BasicProperties properties, byte[] body)
+                        throws IOException {
+                    String message = new String(body, "UTF-8");
+                    if (listener != null) {
+                        listener.receive(message);
+                    }
+                    channel.basicAck(envelope.getDeliveryTag(), false);  //消息应答
+                }
+            });
+            channelMap.put(FLAG_RECEIVE + routingKey + queueName, channel);
+            Log.e(TAG,"已经连接上了,队列名称:" + queueName);
+        }
+    }
+
+
+    /**
+     * 关闭所有资源
+     */
+    public void close() {
+        for (Channel next : channelMap.values()) {
+            if (next != null && next.isOpen()) {
+                try {
+                    next.close();
+                } catch (IOException | TimeoutException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        channelMap.clear();
+        if (connection != null && connection.isOpen()) {
+            try {
+                connection.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+
+    public interface ResponseListener {
+        void receive(String message);
+    }
+}
+

+ 227 - 0
app/src/main/java/com/xuqinmin/android/app/common/RabbitMQUtil.java

@@ -0,0 +1,227 @@
+package com.xuqinmin.android.app.common;
+
+import android.os.SystemClock;
+import android.text.TextUtils;
+
+import com.rabbitmq.client.AlreadyClosedException;
+
+import java.io.IOException;
+import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeoutException;
+
+public class RabbitMQUtil {
+    private boolean isRunning = true;
+    private RabbitMQClient rabbitMQ;
+    private ExecutorService executor;
+
+
+    public RabbitMQUtil(String hostIp, int port, String username, String password) {
+        rabbitMQ = new RabbitMQClient(hostIp, port, username, password);
+        executor = Executors.newSingleThreadExecutor();  //根据项目需要设置常用线程个数
+    }
+
+    /**
+     * @param message   发送的消息
+     * @param queueName 队列名称
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void sendMessage(final String message, final String queueName, final SendMessageListener sendMessageListener,final ErrorMessageListener errorMessageListener) {
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    rabbitMQ.sendQueueMessage(message, queueName);
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(true);
+                } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                    e.printStackTrace();
+                    if (errorMessageListener!=null){
+                        errorMessageListener.errorMessage(e);
+                    }
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(false);
+                }
+            }
+        });
+    }
+
+    /**
+     * @param message      发送的消息
+     * @param exchangeName 交换机名称
+     * @param queueName    队列名称
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void sendMessage(final String message, final String exchangeName, final String exchangeType, final String queueName, final String routingKey, final SendMessageListener sendMessageListener,final ErrorMessageListener errorMessageListener) {
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    rabbitMQ.sendExchangeNameQueueMessage(exchangeName, exchangeType, message, queueName, routingKey);
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(true);
+                } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                    e.printStackTrace();
+                    if (errorMessageListener!=null){
+                        errorMessageListener.errorMessage(e);
+                    }
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(false);
+                }
+            }
+        });
+    }
+
+    /**
+     * @param exchangeName 交换机名称
+     * @param queueName    队列名称
+     * @param message      需要发送的消息
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void sendFanoutTypeMessage(final String exchangeName, final String message, final String queueName, final SendMessageListener sendMessageListener,final ErrorMessageListener errorMessageListener) {
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    rabbitMQ.sendFanoutTypeMessage(exchangeName, queueName, message);
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(true);
+                } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                    e.printStackTrace();
+                    if (errorMessageListener!=null){
+                        errorMessageListener.errorMessage(e);
+                    }
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(false);
+                }
+            }
+        });
+    }
+
+    /**
+     * @param exchangeName 交换机名称
+     * @param message      需要发送的消息
+     * @param queueName    队列名称
+     * @param routingKey   路由规则
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion 发送 exchangeType direct 类型的信息
+     **/
+    public void sendDirectTypeMessage(final String exchangeName, final String queueName, final String message, final String routingKey, final SendMessageListener sendMessageListener,final ErrorMessageListener errorMessageListener) {
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    rabbitMQ.sendDirectTypeMessage(exchangeName, queueName, message, routingKey);
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(true);
+                } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                    e.printStackTrace();
+                    if (errorMessageListener!=null){
+                        errorMessageListener.errorMessage(e);
+                    }
+                    if (sendMessageListener != null) sendMessageListener.sendMessage(false);
+                }
+            }
+        });
+    }
+
+    /**
+     * @param queueName 队列名称
+     * @date 创建时间:2020/9/8 0008
+     * @auther gaoxiaoxiong
+     * @Descriptiion
+     **/
+    public void receiveQueueMessage(String queueName, final ReceiveMessageListener listener,final ErrorMessageListener errorMessageListener) {
+        String newQueueName = null;
+        if (TextUtils.isEmpty(queueName)){
+            newQueueName = createDefaultQueueName(queueName);
+        }else {
+            newQueueName = queueName;
+        }
+        final String finalNewQueueName = newQueueName;
+        executor.execute(() -> {
+            while (isRunning) {
+                try {
+                    rabbitMQ.receiveQueueMessage(finalNewQueueName, message -> {
+                        if (listener != null) listener.receiveMessage(message);
+                    });
+                } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                    if (errorMessageListener!=null){
+                        errorMessageListener.errorMessage(e);
+                    }
+                    e.printStackTrace();
+                    SystemClock.sleep(5000);
+                }
+            }
+        });
+    }
+
+    public void receiveQueueRoutingKeyMessage(String queueName, final String routingKey, final String exchangeName, final String exchangeType, final ReceiveMessageListener listener,final ErrorMessageListener errorMessageListener) {
+        String newQueueName = null;
+        if (TextUtils.isEmpty(queueName)){
+            newQueueName = createDefaultQueueName(queueName);
+        }else {
+            newQueueName = queueName;
+        }
+        final String finalNewQueueName = newQueueName;
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                while (isRunning) {
+                    try {
+                        rabbitMQ.receiveQueueRoutingKeyMessage(finalNewQueueName, routingKey, exchangeName, exchangeType, new RabbitMQClient.ResponseListener() {
+                            @Override
+                            public void receive(String message) {
+                                if (listener != null) listener.receiveMessage(message);
+                            }
+
+                        });
+                    } catch (IOException | TimeoutException | AlreadyClosedException e) {
+                        if (errorMessageListener!=null){
+                            errorMessageListener.errorMessage(e);
+                        }
+                        e.printStackTrace();
+                        SystemClock.sleep(5000);  //等待五秒
+                    }
+                }
+            }
+        });
+    }
+
+    public String createDefaultQueueName(String routingKey) {
+        if (TextUtils.isEmpty(routingKey)){
+            routingKey = "";
+        }
+        return routingKey + "@" + UUID.randomUUID();
+    }
+
+    /**
+     * 建议:
+     * 在application中关闭或者在结束工作时关闭
+     */
+    public void close() {
+        isRunning = false;
+        executor.execute(new Runnable() {
+            @Override
+            public void run() {
+                rabbitMQ.close();
+                executor.shutdownNow();
+            }
+        });
+    }
+
+
+    public interface ReceiveMessageListener {
+        void receiveMessage(String message);
+    }
+
+    public interface SendMessageListener {
+        void sendMessage(boolean isSuccess);
+    }
+
+    public interface ErrorMessageListener{
+        void errorMessage(Exception e);
+    }
+}
+

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/common/SharedPreferencesConfigs.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.common
+
+const val SHARE_RISK_LOCATION = "share_risk_location"
+const val SHARE_RISK_PURE = "share_risk_pure"
+
+const val MCC = "mcc"
+const val DEVICE_ID = "deviceUuid"
+const val USER_INFO = "user_info"

+ 59 - 0
app/src/main/java/com/xuqinmin/android/app/common/StoreHelper.kt

@@ -0,0 +1,59 @@
+package com.xuqinmin.android.app.common
+
+import com.xuqinmin.android.app.MyApplication
+import com.xuqinmin.android.app.model.RecommendData
+import com.xuqinmin.android.app.repository.Service
+import com.xuqinmin.android.app.ui.dialog.DialogBalance
+import com.xuqinmin.android.app.ui.dialog.DialogStore
+import com.xuqm.base.di.manager.HttpManager
+import com.xuqm.sdhbwfu.core.extensions.ioMain
+import com.xuqm.sdhbwfu.core.extensions.showMessage
+import com.xuqm.sdhbwfu.core.extensions.subscribeBy
+
+class StoreHelper {
+    companion object {
+        fun showPay() {
+            HttpManager.getApi(Service::class.java)
+                .recommend(RecommendData(1))
+                .ioMain()
+                .subscribeBy(
+                    {
+                        if (null != it) {
+                            DialogBalance.show(it) { ite ->
+                                if (!MyApplication.isInit) {
+                                    "The initialization of the payment component failed. Please try again later.".showMessage()
+                                    MyApplication.startConnection()
+                                } else
+                                    MyApplication.startPay(ite)
+                            }
+                        } else {
+                            showPayView()
+                        }
+                    }, {
+                        showPayView()
+                    }
+                )
+        }
+
+        private fun showPayView() {
+
+            HttpManager.getApi(Service::class.java).orders()
+                .ioMain()
+                .subscribeBy({
+                    if (null != it) {
+                        DialogStore.show(it) { it2 ->
+                            if (!MyApplication.isInit) {
+                                "The initialization of the payment component failed. Please try again later.".showMessage()
+                                MyApplication.startConnection()
+                            } else
+                                MyApplication.startPay(it2)
+                        }
+                    } else {
+                        "Insufficient gold coins".showMessage()
+                    }
+                }, {
+                    it.showMessage()
+                })
+        }
+    }
+}

+ 16 - 0
app/src/main/java/com/xuqinmin/android/app/db/BaseEntity.java

@@ -0,0 +1,16 @@
+package com.xuqinmin.android.app.db;
+
+import androidx.room.PrimaryKey;
+
+public class BaseEntity {
+    @PrimaryKey(autoGenerate = true)
+    private int _uid;
+
+    public int get_uid() {
+        return _uid;
+    }
+
+    public void set_uid(int _uid) {
+        this._uid = _uid;
+    }
+}

+ 14 - 0
app/src/main/java/com/xuqinmin/android/app/db/MessageDatabase.java

@@ -0,0 +1,14 @@
+package com.xuqinmin.android.app.db;
+
+import androidx.room.Database;
+import androidx.room.RoomDatabase;
+
+import com.xuqinmin.android.app.db.msg.MessageDao;
+import com.xuqinmin.android.app.db.msg.MessageEntity;
+
+@Database(entities = {MessageEntity.class}, version = 2, exportSchema = false)
+public abstract class MessageDatabase extends RoomDatabase {
+
+    public abstract MessageDao messageDao();
+
+}

+ 23 - 0
app/src/main/java/com/xuqinmin/android/app/db/XuqmDbHelper.java

@@ -0,0 +1,23 @@
+package com.xuqinmin.android.app.db;
+
+import android.content.Context;
+
+import androidx.room.Room;
+
+public class XuqmDbHelper {
+
+    private static MessageDatabase dataBase;
+
+    public static MessageDatabase get() {
+        return dataBase;
+    }
+
+    public static void get(Context context) {
+        if (null == dataBase) {
+            dataBase = Room.databaseBuilder(context, MessageDatabase.class, "xuqm-im-db")
+//        .addMigrations(MIGRATION_1_2)
+                    .allowMainThreadQueries() //允许在主线程 操作db
+                    .build();
+        }
+    }
+}

+ 29 - 0
app/src/main/java/com/xuqinmin/android/app/db/msg/MessageDao.java

@@ -0,0 +1,29 @@
+package com.xuqinmin.android.app.db.msg;
+
+import androidx.room.Dao;
+import androidx.room.Delete;
+import androidx.room.Insert;
+import androidx.room.Query;
+import androidx.room.Update;
+
+import java.util.List;
+
+@Dao
+public interface MessageDao {
+
+    @Query("SELECT *  FROM message WHERE (toUser = :user OR fromUser = :user) AND type = 'MSG'  ORDER BY _uid  LIMIT :pageSize OFFSET (:currentPage - 1) * :pageSize")
+    List<MessageEntity> getMessageList(int user, int currentPage, int pageSize);
+
+    @Insert
+    void insertAll(MessageEntity... devices);
+
+    @Update
+    void update(MessageEntity device);
+
+    @Delete
+    void delete(MessageEntity device);
+
+    @Query("DELETE FROM message")
+    void clearTable();
+
+}

+ 57 - 0
app/src/main/java/com/xuqinmin/android/app/db/msg/MessageEntity.java

@@ -0,0 +1,57 @@
+package com.xuqinmin.android.app.db.msg;
+
+import androidx.room.ColumnInfo;
+import androidx.room.Entity;
+
+import com.xuqinmin.android.app.db.BaseEntity;
+
+@Entity(tableName = "message")
+public class MessageEntity extends BaseEntity {
+    @ColumnInfo(name = "type")
+    private String type;
+    @ColumnInfo(name = "toUser")
+    private int toUser;
+    @ColumnInfo(name = "fromUser")
+    private int fromUser;
+    @ColumnInfo(name = "msg")
+    private String message;
+
+    public MessageEntity(String type, int fromUser, int toUser, String message) {
+        this.type = type;
+        this.toUser = toUser;
+        this.fromUser = fromUser;
+        this.message = message;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public int getToUser() {
+        return toUser;
+    }
+
+    public void setToUser(int toUser) {
+        this.toUser = toUser;
+    }
+
+    public int getFromUser() {
+        return fromUser;
+    }
+
+    public void setFromUser(int fromUser) {
+        this.fromUser = fromUser;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+}

+ 28 - 0
app/src/main/java/com/xuqinmin/android/app/model/AnchorInfoModel.kt

@@ -0,0 +1,28 @@
+package com.xuqinmin.android.app.model
+
+data class AnchorInfoModel(
+    val age: Int,
+    val bodyType: String,
+    val country: Int,
+    val cup: String,
+    val emId: String,
+    val fansNum: Int,
+    val followedNum: Int,
+    // 性别 0-男 1-女 -1 未填写性别
+    val gender: Int,
+    val headImage: String,
+    val height: Int,
+    val imId: String,
+    val isFollow: Int,
+    val language: List<String>,
+    val nickname: String,
+    val online: Int,
+    val pics: List<String>,
+    val price: Float,
+    val signature: String,
+    val sort: Int,
+    val userId: Int,
+    val videos: List<Video>,
+    val labels: List<Label>,
+    val weight: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/BalanceChange.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class BalanceChange(
+    val command: String,
+    val `data`: Balance
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/BlackListModel.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+class BlackListModel : ArrayList<BlackListModelItem>()

+ 18 - 0
app/src/main/java/com/xuqinmin/android/app/model/BlackListModelItem.kt

@@ -0,0 +1,18 @@
+package com.xuqinmin.android.app.model
+
+import com.xuqm.base.adapter.BaseItem
+
+data class BlackListModelItem(
+    val age: Int,
+    val gender: Int,
+    val headImage: String,
+    val nickname: String,
+    val signature: String?,
+    //status
+    //integer <int32>
+    //0 关注 1 取消关注
+    val status: Int?,
+    val online: Int,
+    val role: Int,
+    val userId: Int
+) : BaseItem()

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/CallData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class CallData(
+    val callId: String,
+    val status: Int
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/CallFailData.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class CallFailData(
+    val callId: String,
+    val matchId: String,
+    val type: Int
+)

+ 16 - 0
app/src/main/java/com/xuqinmin/android/app/model/CanCallModel.kt

@@ -0,0 +1,16 @@
+package com.xuqinmin.android.app.model
+
+data class CanCallModel(
+    val age: Int,
+    val callId: String,
+    val country: String,
+    val gender: Int,
+    val headImage: String,
+    val imId: String,
+    val nickname: String,
+    val price: Float,
+    val role: Int,
+    val rtcToken: String,
+    val signature: String,
+    val userId: Int
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/Coins.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+data class Coins(
+    val commission: Int,
+    val freezeComm: Int,
+    val goldCoins: Int,
+    val unFreezeComm: Int
+)

+ 10 - 0
app/src/main/java/com/xuqinmin/android/app/model/CompleteData.kt

@@ -0,0 +1,10 @@
+package com.xuqinmin.android.app.model
+
+data class CompleteData(
+    val male: Int?,
+    val age: String,
+    val nickname: String,
+    val avatar: String?,
+    val country: String?,
+    val labels: List<Int>,
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/CountryModel.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+data class CountryModel(
+    val Regions: List<Region>
+)

+ 9 - 0
app/src/main/java/com/xuqinmin/android/app/model/Data.kt

@@ -0,0 +1,9 @@
+package com.xuqinmin.android.app.model
+
+data class Balance(
+    val commission: Double,
+    val freezeComm: Double,
+    val goldCoins: Double,
+    val serviceMessage: String,
+    val unFreezeComm: Double
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/DataDate.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+data class DataDate(var year: String?, var month: String?, var days: String?)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/DataInit.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+data class DataInit(val device:String)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/DataLogin.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class DataLogin(
+    val device: String,
+    val openId: String,
+    val type: Int
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/DataRegister.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+import android.net.Uri
+
+data class DataRegister(var name: String?, var gender: Int?, var avatar: String?, var country: String?)

+ 12 - 0
app/src/main/java/com/xuqinmin/android/app/model/DiscoverData.kt

@@ -0,0 +1,12 @@
+package com.xuqinmin.android.app.model
+
+
+data class DiscoverData(
+    val num: Int,
+    val size: Int,
+    /**
+     * 类型 0 热门 1 活跃 2 新 3 关注 4 粉丝
+     */
+    val type: Int,
+    val content: String
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/DiscoverListModel.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+class DiscoverListModel : ArrayList<DiscoverModel>()

+ 21 - 0
app/src/main/java/com/xuqinmin/android/app/model/DiscoverModel.kt

@@ -0,0 +1,21 @@
+package com.xuqinmin.android.app.model
+
+import com.xuqm.base.adapter.BaseItem
+
+data class DiscoverModel(
+    val age: Int,
+    val agoraId: String,
+    val country: String,
+    val emId: String,
+    val headImage: String,
+    val imId: String,
+    val nickname: String,
+    //在线状态 0 离线 1 在线 2 忙碌
+    val online: Int,
+    val price: Int,
+    // 角色 0 用户 1 主播
+    val role: Int,
+    val signature: String,
+    val sort: Int,
+    val userId: Int
+) : BaseItem()

+ 11 - 0
app/src/main/java/com/xuqinmin/android/app/model/EditUserData.kt

@@ -0,0 +1,11 @@
+package com.xuqinmin.android.app.model
+
+data class EditUserData(
+    val age: String,
+    val country: String,
+    val headImage: String,
+    val labels: List<Int>,
+    val nickname: String,
+    val signature: String,
+    val gender: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/EndData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class EndData(
+    val callId: String?,
+    val matchId: String?,
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/FeedbackData.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+data class FeedbackData(
+    val type: String = "",
+    val content: String,
+    val email: String?,
+    val `file`: String?,
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/FollowData.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class FollowData(
+    val status: Int,
+    // 0 关注 1 取消关注
+    val userId: Int
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/FollowPageData.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+data class FollowPageData(
+    // 类型 0 关注列表 1 粉丝列表
+    val status: Int,
+    val num: Int,
+    val size: Int,
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/GetFileData.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+data class GetFileData(
+    val fileName: String
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/GetFileModel.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class GetFileModel(
+    val contentType: String,
+    val fileUrl: String,
+    val preUrl: String
+)

+ 10 - 0
app/src/main/java/com/xuqinmin/android/app/model/GiftModel.kt

@@ -0,0 +1,10 @@
+package com.xuqinmin.android.app.model
+
+data class GiftModel(
+    val gif: String,
+    val giftId: Int,
+    val gray: String,
+    val name: String,
+    val picture: String,
+    val price: Double
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/HistoryData.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+data class HistoryData(
+    val num: Int,
+    val size: Int,
+    // 0-通话 1-匹配 参数为空(null)所有
+    val type: Int?
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/HistoryListModel.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+class HistoryListModel : ArrayList<HistoryModel>()

+ 14 - 0
app/src/main/java/com/xuqinmin/android/app/model/HistoryModel.kt

@@ -0,0 +1,14 @@
+package com.xuqinmin.android.app.model
+
+import com.xuqm.base.adapter.BaseItem
+
+data class HistoryModel(
+    val agoraId: String,
+    val avatar: String,
+    val imId: String,
+    val msgId: String,
+    val nickname: String,
+    val online: Int,
+    val sendTime: Int,
+    val userId: Int
+) : BaseItem()

+ 9 - 0
app/src/main/java/com/xuqinmin/android/app/model/Label.kt

@@ -0,0 +1,9 @@
+package com.xuqinmin.android.app.model
+
+data class Label(
+    val labelId: Int,
+    val name: String,
+    val icon: String,
+    val color: String,
+    val type: Int,
+)

+ 9 - 0
app/src/main/java/com/xuqinmin/android/app/model/LabelX.kt

@@ -0,0 +1,9 @@
+package com.xuqinmin.android.app.model
+
+data class LabelX(
+    val color: String,
+    val icon: String,
+    val labelId: Int,
+    val name: String,
+    val type: Int
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/MatchLogModel.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+class MatchLogModel : ArrayList<MatchLogModelItem>()

+ 28 - 0
app/src/main/java/com/xuqinmin/android/app/model/MatchLogModelItem.kt

@@ -0,0 +1,28 @@
+package com.xuqinmin.android.app.model
+
+import com.airbnb.lottie.L
+import com.xuqm.base.adapter.BaseItem
+
+
+// "userId": 0,
+//    "nickname": "string",
+//    "headImage": "string",
+//    "online": 0,
+//    "times": 0,
+//    "callTimes": 0,
+//    "coins": 0,
+//    "isBlack": 0,
+//    "type": 0,
+//    "callType": 0
+data class MatchLogModelItem(
+    val userId: Int,
+    val nickname: String,
+    val headImage: String,
+    val online: Int,
+    val times: Long,
+    val callTimes: Int,
+    val coins: Int,
+    val isBlack: Int,
+    val type: Int,
+    val callType: Int,
+):BaseItem()

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/MatchingData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class MatchingData(
+    val matchId: String,
+    val status: Int
+)

+ 25 - 0
app/src/main/java/com/xuqinmin/android/app/model/ModelHideIn.kt

@@ -0,0 +1,25 @@
+package com.xuqinmin.android.app.model
+
+data class ModelHideIn(
+    val age: String,
+    val agoraId: Int,
+    var coins: Int,
+    val country: String,
+    val emId: String,
+    val ext: String,
+    val fansNum: Int,
+    val followNum: Int,
+    val gender: Int,
+    val giftNum: Int,
+    val headImage: String,
+    val imId: String,
+    val isInfo: Int,
+    val labels: List<Label>,
+    val nickname: String,
+    val pics: List<Pic>,
+    val rtmToken: String,
+    val signature: String,
+    val token: String,
+    val userId: Int,
+    val videos: List<Video>
+)

+ 28 - 0
app/src/main/java/com/xuqinmin/android/app/model/ModelInit.kt

@@ -0,0 +1,28 @@
+package com.xuqinmin.android.app.model
+
+data class ModelInit(
+    val agoraKey: String,
+    val country: String,
+    val customerEmail: String,
+    val emKey: String,
+    val eula: String,
+    val gifts: String,
+    val imKey: String,
+    val imSecret: String,
+    val imserver: String,
+    val match: Int,
+    val matchPrice: Int,
+    val matchTimes: Int,
+    val policy: String,
+    val report: List<String>,
+    // 审核模式 0 非审核模式 1 审核模式
+    val review: Int,
+    val sendCoins: Int,
+    val tabs: List<Tab> = mutableListOf(),
+    val labels: List<Label> = mutableListOf(),
+    val terms: String,
+    val videoLogin: String,
+    val videoRecharge: String,
+    val voiceCalling: String,
+    val voiceIncoming: String
+)

+ 9 - 0
app/src/main/java/com/xuqinmin/android/app/model/ModelResponse.kt

@@ -0,0 +1,9 @@
+package com.xuqinmin.android.app.model
+
+data class ModelResponse(
+    val code: Int,
+    val msg: String,
+    val data: String?,
+    val check: String,
+    val offset: String
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/MsgListData.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class MsgListData(
+    val imId: String,
+    val num: Int,
+    val size: Int
+)

+ 10 - 0
app/src/main/java/com/xuqinmin/android/app/model/NewUserModel.kt

@@ -0,0 +1,10 @@
+package com.xuqinmin.android.app.model
+
+data class NewUserModel(
+    val coins: Int,
+    val content: String,
+    val money: String,
+    val payCode: String,
+    val price: String,
+    val time: Int
+)

+ 12 - 0
app/src/main/java/com/xuqinmin/android/app/model/OrderModel.kt

@@ -0,0 +1,12 @@
+package com.xuqinmin.android.app.model
+
+data class OrderModel(
+    val acode: String,
+    val addCoin: Int?,
+    val addWords: String?,
+    val coins: Int,
+    val originalCoin: Int?,
+    val price: Double,
+    val suggest: Int,
+    val uid: Int
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/PageData.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+
+data class PageData(
+    val num: Int,
+    val size: Int,
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/Pic.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class Pic(
+    val isCover: Int,
+    val pic: String,
+    val picId: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/RecommendData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class RecommendData(
+    // 0 默认配置 1 匹配中推荐充值 2 通话中匹配充值
+    val recommentType: Int
+)

+ 12 - 0
app/src/main/java/com/xuqinmin/android/app/model/RecommendModel.kt

@@ -0,0 +1,12 @@
+package com.xuqinmin.android.app.model
+
+data class RecommendModel(
+    val acode: String,
+    val addCoin: Int,
+    val addWords: String,
+    val coins: Int,
+    val originalCoin: Int,
+    val price: Int,
+    val suggest: Int,
+    val uid: Int
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/Region.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+data class Region(
+    val code: String,
+    val emoji: String,
+    val iso: String,
+    val name: String
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/RegionList.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+data class RegionList(
+    val Regions: ArrayList<Region>
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/ReportData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class ReportData(
+    val type: String,
+    val userId: Int
+)

+ 7 - 0
app/src/main/java/com/xuqinmin/android/app/model/SendGiftData.kt

@@ -0,0 +1,7 @@
+package com.xuqinmin.android.app.model
+
+data class SendGiftData(
+    val giftId: Int,
+    val num: Int,
+    val userId: Int
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/SendGiftModel.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+data class SendGiftModel(
+    val coins: Coins
+)

+ 8 - 0
app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorData.kt

@@ -0,0 +1,8 @@
+package com.xuqinmin.android.app.model
+
+
+data class SuggestAnchorData(
+    val userId: Int,
+    val num: Int,
+    val size: Int,
+)

+ 3 - 0
app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorModel.kt

@@ -0,0 +1,3 @@
+package com.xuqinmin.android.app.model
+
+class SuggestAnchorModel : ArrayList<SuggestAnchorModelItem>()

+ 16 - 0
app/src/main/java/com/xuqinmin/android/app/model/SuggestAnchorModelItem.kt

@@ -0,0 +1,16 @@
+package com.xuqinmin.android.app.model
+
+import com.xuqm.base.adapter.BaseItem
+
+data class SuggestAnchorModelItem(
+    val age: Int,
+    val country: String,
+    val emId: String,
+    val gender: Int,
+    val headImage: String,
+    val nickname: String,
+    val online: Int,
+    val price: Int,
+    val signature: String,
+    val userId: Int
+):BaseItem()

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/SwitchData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class SwitchData(
+    // 状态 0 关闭 1 开启
+    val status: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/Tab.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class Tab(
+    val title: String,
+    val type: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/UnlockData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class UnlockData(
+    val uid: Int,
+    val videoId: Int
+)

+ 5 - 0
app/src/main/java/com/xuqinmin/android/app/model/UnlockModel.kt

@@ -0,0 +1,5 @@
+package com.xuqinmin.android.app.model
+
+data class UnlockModel(
+    val coins: Int
+)

+ 6 - 0
app/src/main/java/com/xuqinmin/android/app/model/UpDownData.kt

@@ -0,0 +1,6 @@
+package com.xuqinmin.android.app.model
+
+data class UpDownData(
+    val status: Int,
+    val videoId: Int
+)

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików