2024-08-11 21:17:02 +08:00
|
|
|
package com.aiosman.riderpro
|
|
|
|
|
|
2024-09-06 15:34:27 +08:00
|
|
|
import android.content.Context
|
|
|
|
|
|
2024-08-11 21:17:02 +08:00
|
|
|
object ConstVars {
|
|
|
|
|
// api 地址
|
2024-08-31 23:49:15 +08:00
|
|
|
// const val BASE_SERVER = "http://192.168.31.190:8088"
|
2024-09-06 15:34:27 +08:00
|
|
|
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"
|
|
|
|
|
|
2024-09-06 15:34:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|