xulei hace 6 meses
padre
commit
b2b00683a4

+ 2 - 2
app/src/main/java/com/swago/app/SplashVm.kt

@@ -113,8 +113,8 @@ class SplashVm(application: Application) : BaseViewModel(application) {
     private fun setBaseUrl(baseUrl: String) {
         if (BuildConfig.DEBUG) {
 //            UrlConstant.BASE_URL =   "http:test-api.swago.cn"
-            UrlConstant.BASE_URL =   "http:huawei.swago.cn"
-//            UrlConstant.BASE_URL =   "https://pro-api.swago.cn"
+//            UrlConstant.BASE_URL =   "http:huawei.swago.cn"
+            UrlConstant.BASE_URL =   "https://pro-api.swago.cn"
         } else {
             UrlConstant.BASE_URL = baseUrl
         }

+ 2 - 2
baseswago/src/main/java/com/swago/baseswago/constant/UrlConstant.kt

@@ -15,8 +15,8 @@ object UrlConstant {
 
     var BASE_URL = if (BuildConfig.DEBUG) {
 //            "http:test-api.swago.cn"
-          "http:huawei.swago.cn"
-//        "https://pro-api.swago.cn"
+//          "http:huawei.swago.cn"
+        "https://pro-api.swago.cn"
     } else {
         "https://pro-api.swago.cn"
     }

+ 1 - 0
baseswago/src/main/java/com/swago/baseswago/http/SwagoInterceptor.kt

@@ -54,6 +54,7 @@ class SwagoInterceptor : Interceptor {
             .addHeader("app-time", "$time")
             .addHeader("app-secret", secret)
             .addHeader("app-client-device-id",SwagoInfo.getIMEI())
+            .addHeader("app-os",SwagoInfo.getAndroidOS())
             .build()
         return chain.proceed(finalRequest)
     }

+ 1 - 1
baseswago/src/main/java/com/swago/baseswago/http/UrlChangeInterceptor.kt

@@ -18,7 +18,7 @@ class UrlChangeInterceptor : Interceptor {
         if (!TextUtils.isEmpty(headerValue)){
             baseURL = when(headerValue){
                 "apiDomain" -> {
-                    "http://doc.swago.cn".toHttpUrlOrNull()
+                    "https://domain.me-live.cn".toHttpUrlOrNull()
                 }
 
                 else -> {

+ 4 - 0
baseswago/src/main/java/com/swago/baseswago/util/SwagoInfo.kt

@@ -95,6 +95,10 @@ object SwagoInfo {
         return imei
     }
 
+    fun getAndroidOS(): String {
+        return "Android ${Build.VERSION.RELEASE}"
+    }
+
     private fun getUniqueDeviceId():String{
         if (PermissionX.isGranted(AppContext.getContext(), Manifest.permission.READ_EXTERNAL_STORAGE)){
            if (AppContext.getContext().getExternalFilesDir(null) == null){

BIN
baseswago/src/main/res/mipmap-xxhdpi/ic_room_admin.png


+ 2 - 2
room/src/main/java/com/swago/room/adapter/RoomChatAdapter.kt

@@ -49,7 +49,7 @@ class RoomChatAdapter :
     companion object {
         const val LEVEL_KEY = "level"
         const val PRETTY_KEY = "pretty"//靓号
-        const val VIP_KEY = "pretty"//每日首冲
+        const val VIP_KEY = "vip"//每日首冲
         const val IS_OFFICIAL = "official"
         const val IS_SERVICE = "service"
         const val IS_CROWN = "crown"
@@ -310,7 +310,7 @@ class RoomChatAdapter :
                 RoomMsgType.USER_ENTER_ROOM -> {
                     val sb = StringBuffer()
 
-                    if (item is UserJoinRoomBean&&item.isAdmin==1) {
+                    if (item is UserJoinRoomBean&&item.isAdmin==0) {
                         count++
                         sb.append("<img src='" + "file:///xx/")
                             .append(IS_ADMIN).append(".png")