[6.6.0]
[fea] [设置车牌和车型]
This commit is contained in:
@@ -5,6 +5,7 @@ import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.och.CallerOchFunctionCallManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -149,6 +150,10 @@ class LoginProvider : LoginService {
|
||||
if(this.loginInfo!=loginInfo){
|
||||
this.loginInfo = loginInfo
|
||||
}
|
||||
|
||||
CallerOchFunctionCallManager.setCarModel(loginInfo.carModel)
|
||||
CallerOchFunctionCallManager.setPlateNumber(loginInfo.plateNumber)
|
||||
|
||||
}
|
||||
|
||||
override fun getLoginInfo(): LoginInfo? {
|
||||
|
||||
@@ -10,9 +10,10 @@ interface IOchFunctionCall {
|
||||
*/
|
||||
fun registerToolKitDefaultItemClickListener(tag: String, listener: IToolKitItemClickListener) {}
|
||||
|
||||
/**
|
||||
* 网约车回调登陆信息
|
||||
*/
|
||||
fun invokeLoginInfo(){}
|
||||
// 车型变化回调
|
||||
fun invokeCarMode(carModel: String?)
|
||||
|
||||
// 车牌变化回调
|
||||
fun invokePlateNumber(plateNumber: String?)
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.mogo.eagle.core.function.api.och.IOchFunctionCall
|
||||
import com.mogo.eagle.core.function.api.och.IToolKitItemClickListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
/**
|
||||
* 实现给 Och 业务层调用的接口
|
||||
@@ -13,7 +14,24 @@ object CallerOchFunctionCallManager : CallerBase<IOchFunctionCall>() {
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IOchFunctionCall) {
|
||||
super.doSomeAfterAddListener(tag, listener)
|
||||
listener.invokeLoginInfo()
|
||||
listener.invokeCarMode(carModel)
|
||||
listener.invokePlateNumber(plateNumber)
|
||||
}
|
||||
|
||||
// 车的类型
|
||||
var carModel:String? by Delegates.observable(null) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
M_LISTENERS.forEach {
|
||||
it.value.invokeCarMode(carModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
var plateNumber:String? by Delegates.observable(null) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
M_LISTENERS.forEach {
|
||||
it.value.invokePlateNumber(plateNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,10 +44,13 @@ object CallerOchFunctionCallManager : CallerBase<IOchFunctionCall>() {
|
||||
CallerHmiManager.registerToolKitDefaultItemClickListener(tag, listener)
|
||||
}
|
||||
|
||||
fun invokeLoginInfo(){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.invokeLoginInfo()
|
||||
}
|
||||
// 车型 E70 H9 B1 B2 M1 金旅牌XML6606JEVY0(小巴车) NJL6450ICEV(小巴) BJ5122TXSEV-H1(环卫车)
|
||||
fun setCarModel(carModel: String?) {
|
||||
this.carModel = carModel
|
||||
|
||||
}
|
||||
// 车牌
|
||||
fun setPlateNumber(plateNumber:String?){
|
||||
this.plateNumber = plateNumber
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user