fix: 【光环助手V5.14.0】数据后台—搜索词统计 https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2057
This commit is contained in:
@ -367,10 +367,11 @@ object NewFlatLogUtils {
|
||||
|
||||
//社区搜索结果浏览
|
||||
@JvmStatic
|
||||
fun logViewSearchList(stayTime: Long) {
|
||||
fun logViewSearchList(stayTime: Long, searchKey: String) {
|
||||
val json = json {
|
||||
"event" to "view_search_list"
|
||||
"stay_time" to stayTime
|
||||
"search_key" to searchKey
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
@ -401,10 +402,11 @@ object NewFlatLogUtils {
|
||||
|
||||
//论坛搜索结果浏览
|
||||
@JvmStatic
|
||||
fun logViewBbsSearchList(stayTime: Long) {
|
||||
fun logViewBbsSearchList(stayTime: Long, searchKey: String) {
|
||||
val json = json {
|
||||
"event" to "view_bbs_search_list"
|
||||
"stay_time" to stayTime
|
||||
"search_key" to searchKey
|
||||
parseAndPutMeta().invoke(this)
|
||||
}
|
||||
log(json, "event", false)
|
||||
|
||||
@ -94,9 +94,9 @@ class ForumOrUserSearchActivity : SearchActivity() {
|
||||
if (key.isNotEmpty()) {
|
||||
val stayTime = (System.currentTimeMillis() - startPageTime) / 1000
|
||||
if (mEntrance == "论坛首页") {
|
||||
NewFlatLogUtils.logViewSearchList(stayTime)
|
||||
NewFlatLogUtils.logViewSearchList(stayTime, key)
|
||||
} else {
|
||||
NewFlatLogUtils.logViewBbsSearchList(stayTime)
|
||||
NewFlatLogUtils.logViewBbsSearchList(stayTime, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user