[fea]
[添加地图参数]
This commit is contained in:
yangyakun
2024-12-04 11:46:19 +08:00
parent 5e477b5873
commit acd15af0fa
4 changed files with 28 additions and 6 deletions

View File

@@ -84,9 +84,13 @@ object LineManager : CallerBase<ILineCallback>() {
if(!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&&!AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
val (start, end) = getStations()
if(start!=null&&end!=null){
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf(start.toMogoLocation(),end.toMogoLocation())))
val ochInfo = OchInfo(0, mutableListOf(start.toMogoLocation(), end.toMogoLocation()))
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
OchChainLogManager.writeChainLogMap("向地图传参数", "参数信息:${ochInfo}")
}else{
CallerDataCenterBizListener.invokeOchInfo(OchInfo(0, mutableListOf()))
val ochInfo = OchInfo(0, mutableListOf())
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
OchChainLogManager.writeChainLogMap("向地图传参数", "参数信息:${ochInfo}")
}
}
}

View File

@@ -62,6 +62,12 @@ object OchChainLogManager {
const val EVENT_KEY_INFO_BLUETOOTH = "analytics_event_och_bluetooth"
const val EVENT_KEY_INFO_MAP = "analytics_event_och_map"
fun writeChainLogMap(title: String, info: String) {
writeChainLog(title, info, true, EVENT_KEY_INFO_MAP)
}
fun writeChainLogDb(title: String, info: String) {
writeChainLog(title, info, true, EVENT_KEY_INFO_DB)

View File

@@ -435,8 +435,8 @@ object LineModel {
if(stationList.isNullOrEmpty()){
val ochInfo = OchInfo(1, mutableListOf())
ochInfo.siteMarkerList = mutableListOf()
OchChainLogManager.writeChainLog("地图","站点信息:${ochInfo}")
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
OchChainLogManager.writeChainLogMap("地图","站点信息:${ochInfo}")
}else{
val siteList = mutableListOf<SiteMarkerBean>()
var temp: SiteMarkerBean?=null
@@ -468,8 +468,8 @@ object LineModel {
if(start!=null&&end!=null){
val ochInfo = OchInfo(1, mutableListOf(start.toMogoLocation(),end.toMogoLocation()))
ochInfo.siteMarkerList = siteList
OchChainLogManager.writeChainLog("地图","站点信息:${ochInfo}")
CallerDataCenterBizListener.invokeOchInfo(ochInfo)
OchChainLogManager.writeChainLogMap("地图","站点信息:${ochInfo}")
}
}
}

View File

@@ -110,7 +110,13 @@ object MogoAnalyticUtils {
e.printStackTrace()
properties["network_type"] = "获取设备网络状态错误"
}
Analytics.getInstance().track(event, properties)
if(ThreadUtils.isMainThread()){
ThreadUtils.getIoPool().submit{
Analytics.getInstance().track(event, properties)
}
}else{
Analytics.getInstance().track(event, properties)
}
}
/**
@@ -120,7 +126,13 @@ object MogoAnalyticUtils {
* @param properties json事件参数
*/
fun track(event: String?, properties: JSONObject) {
Analytics.getInstance().track(event, properties)
if(ThreadUtils.isMainThread()){
ThreadUtils.getIoPool().submit{
Analytics.getInstance().track(event, properties)
}
}else{
Analytics.getInstance().track(event, properties)
}
}