Files
rider-pro-android-app/app/src/main/java/com/aiosman/riderpro/Const.kt

24 lines
647 B
Kotlin
Raw Normal View History

2024-08-11 21:17:02 +08:00
package com.aiosman.riderpro
import android.content.Context
2024-08-11 21:17:02 +08:00
object ConstVars {
// api 地址
// const val BASE_SERVER = "http://192.168.31.190:8088"
const val BASE_SERVER = "http://192.168.31.36:8088"
// const val BASE_SERVER = "https://8.137.22.101:8088"
2024-09-05 22:04:41 +08:00
const val MOMENT_LIKE_CHANNEL_ID = "moment_like"
const val MOMENT_LIKE_CHANNEL_NAME = "Moment Like"
}
enum class ErrorCode(val code: Int) {
USER_EXIST(10001)
}
fun Context.getErrorMessageCode(code: Int?): String {
return when (code) {
10001 -> getString(R.string.error_10001_user_exist)
else -> getString(R.string.error_unknown)
}
2024-08-11 21:17:02 +08:00
}