[1.1.2]
包车结构
This commit is contained in:
yangyakun
2023-02-22 11:13:05 +08:00
parent 625aa7456c
commit 2ecf3e3ebd
7 changed files with 117 additions and 23 deletions

View File

@@ -24,6 +24,7 @@ object AppIdentityModeUtils {
private const val BUS = "Bus"
private const val SWEEPER = "Sweeper"
private const val SHUTTLE = "Shuttle"
private const val CHARTER = "Charter"
// 车型
private const val M1 = "M1"
@@ -106,15 +107,6 @@ object AppIdentityModeUtils {
}
return false
}
@JvmStatic
fun isM1(appIdentityMode: String): Boolean {
val (_, _, model) = getInfo(appIdentityMode)
if (model.isNotEmpty()) {
return model == M1
}
return false
}
@JvmStatic
fun isM2(appIdentityMode: String): Boolean {
val (_, _, model) = getInfo(appIdentityMode)
@@ -204,5 +196,27 @@ object AppIdentityModeUtils {
}
/**
* 是否包车
*/
@JvmStatic
fun isCharter(appIdentityMode: String): Boolean {
val (bussness, _, _) = getInfo(appIdentityMode)
if (bussness.isNotEmpty()) {
return bussness == CHARTER
}
return false
}
@JvmStatic
fun isM1(appIdentityMode: String): Boolean {
val (_, _, model) = getInfo(appIdentityMode)
if (model.isNotEmpty()) {
return model == M1
}
return false
}
}