Merge branch 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into 'dev_RoboBus_P_230220_1.0.1'

[m1]

See merge request zhjt/AndroidApp/MoGoEagleEye!601
This commit is contained in:
wangmingjun
2023-02-22 06:52:49 +00:00
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
}
}