package com.gh.common.util

import android.annotation.SuppressLint
import com.gh.gamecenter.common.entity.WechatConfigEntity
import com.gh.gamecenter.common.json.JsonObjectBuilder
import com.gh.gamecenter.common.json.json
import com.gh.gamecenter.common.loghub.LoghubUtils
import com.gh.gamecenter.common.retrofit.EmptyResponse
import com.gh.gamecenter.common.tracker.Tracker
import com.gh.gamecenter.common.utils.toRequestBody
import com.gh.gamecenter.entity.QuoteCountEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.lightgame.utils.Utils
import io.reactivex.schedulers.Schedulers
import okhttp3.ResponseBody
import org.json.JSONObject

object NewLogUtils {

    private fun log(jsonObject: JSONObject, logStore: String, uploadImmediately: Boolean) {
        Utils.log("NewLogUtils", jsonObject.toString(4))
        LoghubUtils.log(jsonObject, logStore, uploadImmediately)
    }

    fun parseAndPutMeta(): JsonObjectBuilder.() -> Unit = {
        val meta = LogUtils.getMetaObject()
        val metaKeys = meta.keys()
        while (metaKeys.hasNext()) {
            val key: String = metaKeys.next().toString()
            val value = meta.getString(key)
            key to value
        }
    }

    @SuppressLint("CheckResult")
    fun logForumContentBrowser(contentId: String, contentType: String, recommendId: String) {
        val requestMap = hashMapOf<String, Any>()
        requestMap["content_id"] = contentId
        requestMap["content_type"] = contentType
        if (recommendId.isNotBlank()) {
            requestMap["recommend_id"] = recommendId
        }

        RetrofitManager.getInstance()
            .api
            .postBrowses(requestMap.toRequestBody())
            .subscribeOn(Schedulers.io())
            .subscribe(EmptyResponse<ResponseBody>())
    }

    // 触发实名认证
    fun logCertificationTrigger(gameId: String, gameName: String) {
        val json = json {
            "event" to "verification_trigger"
            "game_id" to gameId
            "game_name" to gameName
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 触发实名认证的来源 (下载触发或用户手动触发)
    fun logCertificationTriggerType(isForced: Boolean) {
        val json = json {
            "event" to "verification_page"
            "trigger" to if (isForced) "实名认证流程" else ""
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    /**
     * 记录实名认证结果
     * @param result 0 失败, 1 成功但未成年 2 成功且成年 3 认证中
     */
    fun logCertificationResult(isForced: Boolean, result: Int) {
        val json = json {
            "event" to "verification_finished"
            "trigger" to if (isForced) "实名认证流程" else ""
            "result" to result
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 实名弹窗弹出（含前往实名认证选项）
    fun logCertificationHintDialogAppearance() {
        val json = json {
            "event" to "verification_pop_a_show"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 实名弹窗（含前往实名认证选项） 选项点击
    fun logCertificationHintDialogOptionsClicked(text: String) {
        val json = json {
            "event" to "verification_pop_a_click"
            "timestamp" to System.currentTimeMillis() / 1000
            "button" to text
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 实名弹窗弹出（不含前往实名认证选项）
    fun logCertificationHintDialogTrigger(isForced: Boolean) {
        val json = json {
            "event" to "verification_pop_b_show"
            "timestamp" to System.currentTimeMillis() / 1000
            "trigger" to if (isForced) "实名认证流程" else ""
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 游戏详情点击顶部标签
    fun logGameDetailTagClick(gameId: String, gameName: String, tagId: String, tagName: String) {
        val json = json {
            "event" to "game_type_tag_click_jump"
            "meta" to LogUtils.getMetaObject()
            "game_id" to gameId
            "game_name" to gameName
            "type_tag_id" to tagId
            "type_tag_name" to tagName
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //发布面板
    fun logBbsPostPanelClick(entrance: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "发布面板"
            "event" to "view_post_panel"
            "meta" to LogUtils.getMetaObject()
            "entrance" to entrance
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //发布面板关闭按钮
    fun logBbsPostPanelCloseClick() {
        val json = json {
            "location" to "发布面板"
            "event" to "click_close"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入发帖子页
    fun logArticleEditEnter(entrance: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "发布帖子页"
            "event" to "view_post_article"
            "meta" to LogUtils.getMetaObject()
            "entrance" to entrance
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击帖子编辑页取消/发布按钮
    fun logArticleEditClick(
        event: String,
        bbsId: String,
        bbsType: String,
        activityTag: String,
        isOriginal: Boolean,
        quote: QuoteCountEntity
    ) {
        val json = json {
            "location" to "发布帖子页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "activity_tag" to activityTag
            "posts_is_original" to isOriginal
            "edit_text_num" to quote.textCount
            "edit_img_num" to quote.imageCount
            "edit_video_ref_num" to quote.videoCount
            "edit_answer_ref_num" to quote.answerCount
            "edit_content_ref_num" to quote.articleCount
            "edit_game_ref_num" to quote.gameCount
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击帖子草稿箱图标
    fun logArticleDraftClick() {
        val json = json {
            "location" to "发布帖子页"
            "event" to "click_article_draft"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入发问题页
    fun logQuestionEditEnter(entrance: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "发提问页"
            "event" to "view_post_question"
            "meta" to LogUtils.getMetaObject()
            "entrance" to entrance
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击问题编辑页取消/发布按钮
    fun logQuestionEditClick(
        event: String,
        bbsId: String,
        bbsType: String,
        activityTag: String,
        quote: QuoteCountEntity
    ) {
        val json = json {
            "location" to "发提问页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "activity_tag" to activityTag
            "edit_text_num" to quote.textCount
            "edit_img_num" to quote.imageCount
            "edit_video_ref_num" to quote.videoCount
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击问题草稿箱图标
    fun logQuestionDraftClick() {
        val json = json {
            "location" to "发提问页"
            "event" to "click_question_draft"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入发视频帖页
    fun logPublishVideoEnter(entrance: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "发视频帖页"
            "event" to "view_post_video"
            "meta" to LogUtils.getMetaObject()
            "entrance" to entrance
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击视频发布页取消/发布按钮
    fun logPublishVideoClick(
        event: String,
        bbsId: String,
        bbsType: String,
        activityTag: String,
        textCount: Int,
        originalType: String
    ) {
        val json = json {
            "location" to "发视频帖页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "activity_tag" to activityTag
            "edit_text_num" to textCount
            "original_type" to originalType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击视频草稿箱图标
    fun logVideoDraftClick() {
        val json = json {
            "location" to "发视频帖页"
            "event" to "click_video_draft"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入帖子详情页/点击更多按钮
    fun logArticleDetailClick(event: String) {
        val json = json {
            "location" to "帖子详情页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击头像/昵称/关注
    fun logArticleDetailClick(event: String, userId: String, contentType: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "帖子详情页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //滑动帖子/问题详情页
    fun logSlideArticleOrQuestionDetail(location: String, event: String, slideToBottom: Boolean) {
        val json = json {
            "location" to location
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "slide_to_bottom" to slideToBottom
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击帖子详情页论坛
    fun logArticleOrQuestionDetailForumClick(location: String, event: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to location
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入视频详情页/点击更多按钮/点击详情tab/点击评论tab/下拉箭头/上拉箭头
    fun logVideoDetailClick(event: String) {
        val json = json {
            "location" to "视频帖详情页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击视频详情头像/昵称/关注/赞同/收藏/分享/推荐视频
    fun logVideoDetailClick(
        event: String,
        userId: String,
        contentType: String,
        bbsId: String,
        bbsType: String,
        contentId: String = "",
        videoId: String = "",
        sequence: Int = -1
    ) {
        val json = json {
            "location" to "视频帖详情页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
            if (contentId.isNotEmpty()) {
                "content_id" to contentId
            }
            if (videoId.isNotEmpty()) {
                "video_id" to videoId
            }
            if (sequence >= 0) {
                "sequence" to sequence
            }
        }
        log(json, "bbs_community", false)
    }

    //点击游戏
    fun logVideoDetailGameClick(
        event: String,
        gameId: String,
        gameCategory: String,
        bbsId: String,
        contentId: String,
        downloadState: String
    ) {
        val json = json {
            "location" to "视频帖详情页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "game_id" to gameId
            "bbs_id" to bbsId
            "content_id" to contentId
            "game_category" to gameCategory
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
            if (downloadState.isNotEmpty()) {
                "download_state" to downloadState
            }
        }
        log(json, "bbs_community", false)
    }

    //视频详情滑动详情tab
    fun logSlideVideoDetail(slideVideoNum: Int) {
        val json = json {
            "location" to "视频帖详情页"
            "event" to "slide_detail_tab_page"
            "meta" to LogUtils.getMetaObject()
            "slide_video_num" to slideVideoNum
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入提问详情页/点击更多
    fun logQuestionDetailClick(event: String) {
        val json = json {
            "location" to "提问帖详情"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //提问详情页点击头像/昵称/关注
    fun logQuestionDetailClick(event: String, userId: String, contentType: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "提问帖详情"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入评论区
    fun logCommentAreaEnter(contentType: String) {
        val json = json {
            "location" to "评论区"
            "event" to "view_comment_area"
            "meta" to LogUtils.getMetaObject()
            "content_type" to contentType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击头像/昵称/评论/回复按钮/赞同按钮
    fun logCommentClick(
        event: String,
        userId: String,
        contentType: String,
        contentId: String,
        bbsId: String,
        bbsType: String
    ) {
        val json = json {
            "location" to "评论区"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "content_id" to contentId
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击更多/正序/倒序
    fun logCommentClick(event: String) {
        val json = json {
            "location" to "评论区"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入详情页分享面板
    fun logShareEnter(entrance: String) {
        val json = json {
            "location" to "分享面板"
            "event" to "view_detail_share_panel"
            "meta" to LogUtils.getMetaObject()
            "entrance" to entrance
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击分享方式
    fun logShareTypeClick(shareType: String) {
        val json = json {
            "location" to "分享面板"
            "event" to "share_type"
            "meta" to LogUtils.getMetaObject()
            "share_type" to shareType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }


    //分享面板点击
    fun logSharePanelClick(
        event: String,
        userId: String,
        contentType: String,
        contentId: String,
        bbsId: String,
        bbsType: String
    ) {
        val json = json {
            "location" to "分享面板"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "content_id" to contentId
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击分享面板取消按钮
    fun logSharePanelCancelClick() {
        val json = json {
            "location" to "分享面板"
            "event" to "click_detail_share_panel_cancel"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入选择论坛面板
    fun logChooseForumPanelEnter(publishContentType: String) {
        val json = json {
            "location" to "选择论坛面板"
            "event" to "view_select_forum_panel"
            "meta" to LogUtils.getMetaObject()
            "publish_content_type" to publishContentType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击搜索框/我的关注tab/热门论坛tab/论坛/关闭按钮
    fun logChooseForumPanelClick(event: String, entrance: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "选择论坛面板"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
            if (entrance.isNotEmpty()) {
                "entrance" to entrance
            }
            if (bbsId.isNotEmpty()) {
                "bbs_id" to bbsId
            }
            if (bbsType.isNotEmpty()) {
                "bbs_type" to bbsType
            }
        }
        log(json, "bbs_community", false)
    }

    //选择多媒体页
    fun logChooseMedia(event: String, publishContentType: String, publishMediaType: String) {
        val json = json {
            "location" to "多媒体页"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "publish_content_type" to publishContentType
            "publish_media_type" to publishMediaType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //记录跳出事件
    fun logActivityPause(
        location: String,
        event: String,
        stayTime: Long,
        bbsId: String,
        bbsType: String,
        contentType: String,
        contentId: String
    ) {
        val json = json {
            "location" to location
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "stay_time" to stayTime
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
            if (contentType.isNotEmpty()) {
                "content_type" to contentType
            }
            if (contentId.isNotEmpty()) {
                "content_id" to contentId
            }
        }
        log(json, "bbs_community", false)
    }

    //进入置顶内容页
    fun logForumLinkTopClick(bbsId: String, bbsType: String) {
        val json = json {
            "location" to "置顶内容页"
            "event" to "view_top_content"
            "meta" to LogUtils.getMetaObject()
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入社区页/点击推荐导航/点击论坛导航/点击活动导航
    fun logCommunityHomeEvent(event: String) {
        val json = json {
            "event" to event
            "location" to "社区"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击搜索框
    fun logCommunitySearchClick() {
        val json = json {
            "event" to "click_community_search_box"
            "location" to "社区"
            "entrance" to "社区搜索栏"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入推荐信息流/点击最近浏览更多按钮
    fun logRecommendFeedEvent(event: String) {
        val json = json {
            "event" to event
            "location" to "推荐信息流"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击推荐页最近浏览论坛、点击论坛页关注的论坛/热门的论坛/综合的论坛
    fun logForumClick(event: String, location: String, bbsId: String, bbsType: String) {
        val json = json {
            "event" to event
            "location" to location
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //推荐信息流点击头像/昵称/关注
    fun logRecommendFeedUserClick(event: String, userId: String, contentType: String) {
        val json = json {
            "location" to "推荐信息流"
            "event" to event
            "meta" to LogUtils.getMetaObject()
            "ref_user_id" to userId
            "content_type" to contentType
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //推荐信息流点击徽章
    fun logRecommendFeedBadgeClick(badgeId: String) {
        val json = json {
            "location" to "推荐信息流"
            "event" to "click_for_you_badge"
            "badge_id" to badgeId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //推荐信息流点击内容/评论/赞同
    fun logRecommendFeedContentClick(
        event: String,
        contentType: String,
        contentId: String,
        sequence: Int,
        bbsId: String,
        bbsType: String,
        userId: String,
        commentType: String = ""
    ) {
        val json = json {
            "location" to "推荐信息流"
            "event" to event
            "content_type" to contentType
            "content_id" to contentId
            "sequence" to sequence
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "ref_user_id" to userId
            if (commentType.isNotEmpty()) {
                "comment_type" to commentType
            }
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //推荐信息流点击论坛
    fun logRecommendFeedForumClick(contentType: String, contentId: String, bbsId: String, bbsType: String) {
        val json = json {
            "location" to "推荐信息流"
            "event" to "click_for_you_forum"
            "content_type" to contentType
            "content_id" to contentId
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //滑动信息流内容
    fun logRecommendFeedSlide(slideContentNum: Int) {
        val json = json {
            "location" to "推荐信息流"
            "event" to "slide_for_you_feed_content"
            "slide_content_num" to slideContentNum
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击发布按钮
    fun logRecommendFeedPublishClick() {
        val json = json {
            "event" to "click_for_you_post"
            "location" to "推荐信息流"
            "entrance" to "推荐页信息流"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入论坛页、点击关注论坛/热门论坛/综合论坛更多按钮、点击工具箱/礼包中心/游戏动态/资讯中心
    fun logForumPageEvent(event: String) {
        val json = json {
            "event" to event
            "location" to "论坛页"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入活动页
    fun logForumActivityEnter() {
        val json = json {
            "event" to "view_community_activity"
            "location" to "活动页"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击活动分类按钮
    fun logForumActivityCategoryClick(categoryId: String) {
        val json = json {
            "event" to "click_community_activity_sort"
            "location" to "活动页"
            "activity_category_id" to categoryId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击活动
    fun logForumActivityClick(
        categoryId: String,
        activityId: String,
        sequence: Int,
        contentType: String,
        contentId: String
    ) {
        val json = json {
            "event" to "click_community_activity"
            "location" to "活动页"
            "activity_category_id" to categoryId
            "activity_id" to activityId
            "sequence" to sequence
            "content_type" to contentType
            "content_id" to contentId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入搜索页
    fun logForumSearchEnter(entrance: String) {
        val json = json {
            "event" to "view_search"
            "location" to "搜索页"
            "entrance" to entrance
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击搜索按钮
    fun logForumSearchClick(key: String, entrance: String) {
        val json = json {
            "event" to "click_search"
            "location" to "搜索页"
            "search_key" to key
            "entrance" to entrance
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击搜索结果
    fun logForumSearchResultClick(
        tabType: String,
        bbsId: String,
        bbsType: String,
        contentId: String,
        contentType: String,
        userId: String,
        searchKey: String,
        sequence: Int
    ) {
        val json = json {
            "event" to "click_search_list"
            "location" to "搜索页"
            "tab_type" to tabType
            "content_type" to contentType
            "content_id" to contentId
            "sequence" to sequence
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "ref_user_id" to userId
            "search_key" to searchKey
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //搜索页点击关注按钮
    fun logForumSearchFollowClick(followType: String, bbsId: String, bbsType: String, userId: String) {
        val json = json {
            "event" to "click_follow"
            "location" to "搜索页"
            "follow_type" to followType
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "ref_user_id" to userId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入关注/热门/综合论坛页、点击返回按钮
    fun logForumPageEnterOrReturnClick(event: String, location: String) {
        val json = json {
            "event" to event
            "location" to location
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击论坛
    fun logForumListClick(event: String, location: String, bbsId: String, bbsType: String) {
        val json = json {
            "event" to event
            "location" to location
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入论坛详情页、点击搜索按钮/论坛图标/关注按钮/版规说明/版主成员/攻略专区/置顶内容/全部tab/精华tab/问答tab/视频tab/返回按钮
    fun logForumDetailEnterOrClick(
        event: String,
        bbsId: String = "",
        bbsType: String = "",
        userId: String = "",
        filterTag: String = "",
        entrance: String = ""
    ) {
        val json = json {
            "event" to event
            "location" to "论坛详情页"
            if (bbsId.isNotEmpty()) {
                "bbs_id" to bbsId
            }
            if (bbsType.isNotEmpty()) {
                "bbs_type" to bbsType
            }
            if (userId.isNotEmpty()) {
                "ref_user_id" to userId
            }
            if (filterTag.isNotEmpty()) {
                "filter_tag" to filterTag
            }
            if (entrance.isNotEmpty()) {
                "entrance" to entrance
            }
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //论坛详情信息流点击头像/昵称/关注按钮
    fun logForumDetailFeedUserClick(
        event: String,
        userId: String,
        contentType: String,
        tabInfo: String,
        bbsId: String,
        bbsType: String
    ) {
        val json = json {
            "event" to event
            "location" to "论坛详情页"
            "ref_user_id" to userId
            "content_type" to contentType
            "tab_info" to tabInfo
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //论坛详情信息流点击徽章
    fun logForumDetailFeedBadgeClick(badgeId: String, bbsId: String, bbsType: String) {
        val json = json {
            "event" to "click_forum_detail_badge"
            "location" to "论坛详情页"
            "badge_id" to badgeId
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //论坛详情信息流点击内容/评论/赞同
    fun logForumDetailFeedContentClick(
        event: String,
        userId: String,
        contentId: String,
        contentType: String,
        sequence: Int,
        bbsId: String,
        bbsType: String,
        tabInfo: String,
        commentType: String = ""
    ) {
        val json = json {
            "event" to event
            "location" to "论坛详情页"
            "ref_user_id" to userId
            "content_id" to contentId
            "content_type" to contentType
            "sequence" to sequence
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "tab_info" to tabInfo
            if (commentType.isNotEmpty()) {
                "comment_type" to commentType
            }
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //论坛详情点击发布按钮
    fun logForumDetailPublishClick(entrance: String) {
        val json = json {
            "event" to "click_forum_detail_post"
            "location" to "论坛详情页"
            "entrance" to entrance
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //论坛详情滑动信息流内容
    fun logForumDetailFeedSlide(slideContentNum: Int) {
        val json = json {
            "event" to "slide_forum_detail_feed_content"
            "location" to "论坛详情页"
            "slide_content_num" to slideContentNum
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入版规说明页
    fun logForumRuleEnter(bbsId: String, bbsType: String) {
        val json = json {
            "event" to "view_layout_description"
            "location" to "版规说明"
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入版主成员页
    fun logForumModeratorEnter(bbsId: String, bbsType: String) {
        val json = json {
            "event" to "view_forum_member"
            "location" to "版主成员"
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击申请版主按钮/您已是版主按钮/头像/昵称/关注按钮/已关注按钮
    fun logForumModeratorClick(event: String, userId: String = "") {
        val json = json {
            "event" to event
            "location" to "版主成员"
            if (userId.isNotEmpty()) {
                "ref_user_id" to userId
            }
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //进入申请基本条件页
    fun logApplyModeratorEnter(bbsId: String, bbsType: String) {
        val json = json {
            "event" to "view_apply_member"
            "location" to "申请基本条件页"
            "bbs_id" to bbsId
            "bbs_type" to bbsType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //申请基本条件页点击去完成按钮
    fun logApplyModeratorFinishClick(taskId: String, taskState: String) {
        val json = json {
            "event" to "click_finish"
            "location" to "申请基本条件页"
            "task_id" to taskId
            "task_state" to taskState
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //申请基本条件页点击申请版主按钮/QQ群号码
    fun logApplyModeratorFApplyOrQQClick(event: String, userId: String) {
        val json = json {
            "event" to event
            "location" to "申请基本条件页"
            "ref_user_id" to userId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //出现引导浮窗
    fun logGuidePopShow(guideId: String) {
        val json = json {
            "event" to "guide_pop_show"
            "payload" to json {
                "guide_pop_id" to guideId
            }
            "meta" to LogUtils.getMetaObject()
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //关闭引导浮窗
    fun logGuidePopClose(guideId: String) {
        val json = json {
            "event" to "guide_pop_close"
            "payload" to json {
                "guide_pop_id" to guideId
            }
            "meta" to LogUtils.getMetaObject()
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //点击引导浮窗链接
    fun logGuidePopLinkClick(guideId: String, linkType: String? = "", linkTitle: String? = "") {
        val json = json {
            "event" to "guide_pop_link_click"
            "payload" to json {
                "guide_pop_id" to guideId
                "link_type" to linkType
                "link_title" to linkTitle
            }
            "meta" to LogUtils.getMetaObject()
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //点击QA搜索按钮
    fun logClickQaSearchBtn(searchKey: String, isEmptyResult: Boolean) {
        val json = json {
            "event" to "qa_click_search_btn"
            "search_key" to searchKey
            "is_empty_result" to isEmptyResult
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //点击QA搜索结果
    fun logClickQaSearchItem(searchKey: String, contentId: String, contentTitle: String, helpId: String) {
        val json = json {
            "event" to "qa_click_search_result"
            "search_key" to searchKey
            "content_id" to contentId
            "content_title" to contentTitle
            "help_id" to helpId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //点击QA更多
    fun logClickQaMoreBtn(helpId: String) {
        val json = json {
            "event" to "qa_click_title_more"
            "help_id" to helpId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //进入QA内容详情
    fun logEnterQaContent(clickLocation: String, contentId: String, contentTitle: String, helpId: String) {
        val json = json {
            "event" to "qa_enter_content_detail"
            "click_location" to clickLocation
            "content_id" to contentId
            "content_title" to contentTitle
            "help_id" to helpId
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //在搜索结果列表点击游戏内容标签
    fun logSearchTagClick(
        searchType: String,
        key: String,
        gameId: String,
        gameName: String,
        tagId: String,
        tagName: String,
        linkType: String,
        linkTitle: String
    ) {
        val json = json {
            "event" to "search_click_tag"
            "search_type" to searchType
            "key" to key
            "game_id" to gameId
            "game_name" to gameName
            "tag_id" to tagId
            "tag" to tagName
            "link_type" to linkType
            "link_title" to linkTitle
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //搜索结果为空事件
    fun logSearchEmpty(searchType: String, key: String) {
        val json = json {
            "event" to "search_return_empty"
            "search_type" to searchType
            "key" to key
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //进入游戏详情-专区tab页/评论tab页/游戏评论页
    fun logGameDetailTabClick(
        event: String,
        entrance: String,
        gameId: String,
        gameType: String,
        bbsId: String
    ) {
        val json = json {
            "event" to event
            "entrance" to entrance
            "game_id" to gameId
            "game_type" to gameType
            "bbs_id" to bbsId
            "bbs_type" to "游戏论坛"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //跳出游戏详情-专区tab页/跳出游戏详情-评论tab页/跳出游戏评论详情页
    fun logGameDetailTabOrCommentDetailPause(event: String, stayTime: Long, gameId: String, gameType: String) {
        val json = json {
            "event" to event
            "stay_time" to stayTime
            "game_id" to gameId
            "game_type" to gameType
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //游戏详情-评论tab内的点击事件/游戏评论详情页内的点击事件/点击游戏评论编辑页的礼仪测试
    fun logCommentTabOrCommentDetailClick(event: String, gameId: String, gameType: String, userId: String = "") {
        val json = json {
            "event" to event
            "game_id" to gameId
            "game_type" to gameType
            if (userId.isNotEmpty()) {
                "ref_user_id" to userId
            }
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //滑动信息流评论
    fun logCommentFeedSlide(slideContentNum: Int) {
        val json = json {
            "event" to "slide_game_detail_feed_comment"
            "slide_content_num" to slideContentNum
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    // 论坛页点击轮播图
    @JvmStatic
    fun logClickBBSCarousel(contentType: String, contentId: String, sequence: Int, userId: String) {
        val json = json {
            "event" to "click_bbs_carousel"
            "content_type" to contentType
            "content_id" to contentId
            "sequence" to sequence
            "ref_user_id" to userId
            "location" to "论坛页"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "bbs_community", false)
    }

    //点击提交按钮
    fun logRatingEditClick(
        event: String,
        gameId: String,
        gameType: String,
        isDisplayPhone: Boolean,
        score: Float,
        commentTag: String,
        textNum: Int
    ) {
        val json = json {
            "event" to event
            "game_id" to gameId
            "game_type" to gameType
            "is_display_phone_model" to isDisplayPhone
            "game_score" to score
            "game_comment_tag" to commentTag
            "game_comment_edit_text_num" to textNum
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //进入游戏评论详情页
    fun logViewGameCommentDetail(gameId: String, gameType: String, bbsId: String) {
        val json = json {
            "event" to "view_game_comment_detail"
            "game_id" to gameId
            "game_type" to gameType
            "bbs_id" to bbsId
            "bbs_type" to "游戏论坛"
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //点击游戏下载状态按钮
    fun logDownloadBtnClick(gameId: String, gameType: String, downloadStatus: String) {
        val json = json {
            "event" to "click_game_comment_detail_game_status"
            "game_id" to gameId
            "game_type" to gameType
            "download_state" to downloadStatus
            "meta" to LogUtils.getMetaObject()
            "launch_id" to Tracker.launchId
            "session_id" to Tracker.sessionId
            "timestamp" to System.currentTimeMillis() / 1000
        }
        log(json, "event", false)
    }

    //进入通用链接合集详情
    fun logAccessToCommonCollectionDetail(
        collectionId: String,
        collectionName: String,
        entrance: String,
        blockId: String = "",
        blockName: String = ""
    ) {
        val json = json {
            "event" to "access_to_content_collection"
            "content_collection_id" to collectionId
            "content_collection_name" to collectionName
            "entrance" to entrance
            if (blockId.isNotEmpty()) {
                "block_id" to blockId
            }
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //通用链接合集内容点击跳转
    fun logCommonCollectionClick(
        collectionId: String,
        collectionName: String,
        blockId: String = "",
        blockName: String = "",
        entrance: String,
        location: String,
        titleText: String,
        firstLineText: String,
        secondLineText: String,
        linkType: String,
        linkTitle: String,
        sequence: Int,
    ) {
        val json = json {
            "event" to "content_collection_click_jump"
            "content_collection_id" to collectionId
            "content_collection_name" to collectionName
            "entrance" to entrance
            "location" to location
            if (blockId.isNotEmpty()) {
                "block_id" to blockId
            }
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            if (titleText.isNotEmpty()) {
                "title_text" to titleText
            }
            if (firstLineText.isNotEmpty()) {
                "first_line_text" to firstLineText
            }
            if (secondLineText.isNotEmpty()) {
                "second_line_text" to secondLineText
            }
            "link_type" to linkType
            "link_title" to linkTitle
            "sequence" to sequence
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //滑动合集内容，停止滑动时触发上报
    fun logSlideCommonCollection(
        collectionId: String,
        collectionName: String,
        blockId: String = "",
        blockName: String = "",
        entrance: String,
        location: String,
        titleText: String,
        firstLineText: String,
        secondLineText: String,
        slideNum: Int
    ) {
        val json = json {
            "event" to "slide_content_collection"
            "content_collection_id" to collectionId
            "content_collection_name" to collectionName
            "entrance" to entrance
            "location" to location
            if (blockId.isNotEmpty()) {
                "block_id" to blockId
            }
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            if (titleText.isNotEmpty()) {
                "title_text" to titleText
            }
            if (firstLineText.isNotEmpty()) {
                "first_line_text" to firstLineText
            }
            if (secondLineText.isNotEmpty()) {
                "second_line_text" to secondLineText
            }
            "slide_num" to slideNum
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //进入我的游戏单
    fun logEnterMyGameCollection() {
        val json = json {
            "event" to "enter_game_collect_self_location"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //进入创建游戏单
    fun logEnterGameCollectionEdit(entrance: String) {
        val json = json {
            "event" to "enter_game_collect_create_location"
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //进入游戏单广场
    fun logEnterGameCollectionSquare(entrance: String, forumName: String = "", title: String = "", id: String = "") {
        val json = json {
            "event" to "enter_game_collect_square"
            "entrance" to entrance
            "forum_name" to forumName
            "game_collect_title" to title
            "game_collect_id" to id
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //进入选择标签
    fun logEnterGameCollectionTag() {
        val json = json {
            "event" to "enter_game_collect_tag_location"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //筛选游戏单标签
    fun logFilterGameCollectionTag(tagCategory: String, tagName: String) {
        val json = json {
            "event" to "filter_game_collect_tag"
            "filter_tag_category" to tagCategory
            "filter_tag_name" to tagName
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击安利墙卡片
    fun logClickGameCollectionAmway() {
        val json = json {
            "event" to "click_game_collect_recommend_card"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //进入安利墙
    fun logEnterGameCollectionAmway() {
        val json = json {
            "event" to "enter_game_collect_recommend_card"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击卡片的游戏icon
    fun logClickGameCollectionGameIcon(title: String, id: String, gameName: String, gameId: String) {
        val json = json {
            "event" to "click_game_collect_recommend_card_icon"
            "game_collect_title" to title
            "game_collect_id" to id
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击卡片的作者信息
    fun logClickGameCollectionAuthor(title: String, id: String) {
        val json = json {
            "event" to "click_game_collect_recommend_card_author"
            "game_collect_title" to title
            "game_collect_id" to id
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击进入游戏单
    fun logEnterGameCollectionDetail(title: String, id: String) {
        val json = json {
            "event" to "enter_game_collect_detail"
            "game_collect_title" to title
            "game_collect_id" to id
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }


    //游戏单视频相关
    @JvmStatic
    fun logGameCollectionVideoEvent(
        event: String,
        title: String,
        id: String,
        progress: Double,
        playTime: Int,
        playAction: String = "",
        stopAction: String = "",
    ) {
        val json = json {
            "event" to event
            "game_collect_title" to title
            "game_collect_id" to id
            "progress" to progress
            "play_time" to playTime
            if (playAction.isNotEmpty()) {
                "play_action" to playAction
            }
            if (stopAction.isNotEmpty()) {
                "stop_action" to stopAction
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 自定义栏目点击跳转
    fun logCustomColumnClicked(
        gameId: String?,
        gameName: String?,
        title: String?,
        entrance: String?,
        linkType: String?,
        linkTitle: String?
    ) {
        val json = json {
            "event" to "custom_column_jump"
            "title" to title
            "game_id" to gameId
            "game_name" to gameName
            "link_type" to linkType
            "link_title" to linkTitle
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //成功预约游戏
    @JvmStatic
    fun logReserveGameSuccess(wechatConfigEntity: WechatConfigEntity) {
        val json = json {
            "event" to "appointment_wechat_appointment_game"
            "wechat_is_bind" to wechatConfigEntity.bind
            "wechat_is_follow" to wechatConfigEntity.follow
            "wechat_is_remind" to wechatConfigEntity.notice
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "appointment", false)
    }

    //引导设置微信提醒弹窗事件
    @JvmStatic
    fun logReserveWechatRemindPopShow(wechatConfigEntity: WechatConfigEntity) {
        val json = json {
            "event" to "appointment_wechat_remind_pop_show"
            "wechat_is_bind" to wechatConfigEntity.bind
            "wechat_is_follow" to wechatConfigEntity.follow
            "wechat_is_remind" to wechatConfigEntity.notice
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "appointment", false)
    }

    //引导设置微信提醒弹窗点击事件
    @JvmStatic
    fun logReserveWechatRemindPopClick(wechatConfigEntity: WechatConfigEntity, operationType: String) {
        val json = json {
            "event" to "appointment_wechat_remind_pop_click"
            "wechat_is_bind" to wechatConfigEntity.bind
            "wechat_is_follow" to wechatConfigEntity.follow
            "wechat_is_remind" to wechatConfigEntity.notice
            "operation_type" to operationType
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "appointment", false)
    }

    //预约成功弹窗事件
    @JvmStatic
    fun logReserveWechatSuccessPopShow() {
        val json = json {
            "event" to "appointment_wechat_success_pop_show"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "appointment", false)
    }

    //选择图片上传方式
    @JvmStatic
    fun logShowGameCollectionCoverTypeDialog() {
        val json = json {
            "event" to "dialog_game_collect_chose_picture"
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //选择图片上传方式点击
    @JvmStatic
    fun logClickGameCollectionChooseCoverDialog(action: String) {
        val json = json {
            "event" to "click_dialog_game_collect_chose_picture"
            "action" to action
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //默认封面点击事件
    @JvmStatic
    fun logClickGameCollectionDefaultCoverDialog(action: String) {
        val json = json {
            "event" to "click_dialog_game_collect_chose_default_picture"
            "action" to action
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击专题列表右上角按钮
    @JvmStatic
    fun logColumnListClickButton(
        buttonType: String,
        columnName: String,
        columnId: String,
        linkType: String,
        linkTitle: String,
        location: String,
        blockName: String
    ) {
        val json = json {
            "event" to "column_list_click_button"
            "button_type" to buttonType
            "column_name" to columnName
            "column_id" to columnId
            if (linkType.isNotEmpty()) {
                "link_type" to linkType
            }
            if (linkTitle.isNotEmpty()) {
                "link_title" to linkTitle
            }
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击游戏专题图片
    @JvmStatic
    fun logColumnPictureClick(
        displayType: String,
        columnName: String,
        columnId: String,
        linkId: String,
        linkType: String,
        linkText: String,
        location: String,
        blockName: String
    ) {
        val json = json {
            "event" to "column_picture_click"
            "display_type" to displayType
            "column_name" to columnName
            "column_id" to columnId
            "link_id" to linkId
            if (linkType.isNotEmpty()) {
                "link_type" to linkType
            }
            if (linkText.isNotEmpty()) {
                "link_text" to linkText
            }
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击专题合集右上角
    @JvmStatic
    fun logColumnCategoryHomeButtonClick(
        buttonType: String,
        categoryName: String,
        categoryId: String,
        location: String,
        blockName: String
    ) {
        val json = json {
            "event" to "column_category_home_button_click"
            "button_type" to buttonType
            "category_name" to categoryName
            "category_id" to categoryId
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击专题合集首页内容
    fun logColumnCategoryHomeContentClick(
        columnName: String,
        columnId: String,
        categoryName: String,
        categoryId: String,
        location: String,
        blockName: String = ""
    ) {
        val json = json {
            "event" to "column_category_home_content_click"
            "column_name" to columnName
            "column_id" to columnId
            "category_name" to categoryName
            "category_id" to categoryId
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击专题合集详情内容
    fun logColumnCategoryDetailContentClick(
        columnName: String,
        columnId: String,
        categoryName: String,
        categoryId: String,
    ) {
        val json = json {
            "event" to "column_category_detail_content_click"
            "column_name" to columnName
            "column_id" to columnId
            "category_name" to categoryName
            "category_id" to categoryId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击通用内容合集右上角
    @JvmStatic
    fun logCommonCategoryHomeButtonClick(
        buttonType: String,
        categoryName: String,
        categoryId: String,
        location: String,
        blockName: String = ""
    ) {
        val json = json {
            "event" to "common_category_home_button_click"
            "button_type" to buttonType
            "category_name" to categoryName
            "category_id" to categoryId
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击通用内容合集首页内容
    @JvmStatic
    fun logCommonCategoryHomeContentClick(
        title: String,
        linkType: String,
        linkId: String,
        linkText: String,
        categoryName: String,
        categoryId: String,
        location: String,
        blockName: String = ""
    ) {
        val json = json {
            "event" to "common_category_home_content_click"
            "title" to title
            "link_type" to linkType
            "link_text" to linkText
            "link_id" to linkId
            "category_name" to categoryName
            "category_id" to categoryId
            "location" to location
            if (blockName.isNotEmpty()) {
                "block_name" to blockName
            }
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击通用内容合集详情内容
    @JvmStatic
    fun logCommonCategoryDetailContentClick(
        title: String,
        linkType: String,
        linkId: String,
        linkText: String,
        categoryName: String,
        categoryId: String,
    ) {
        val json = json {
            "event" to "common_category_detail_content_click"
            "title" to title
            "link_type" to linkType
            "link_text" to linkText
            "link_id" to linkId
            "category_name" to categoryName
            "category_id" to categoryId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击首页安利墙的全部
    @JvmStatic
    fun logHomeShareWallButtonClick(entrance: String) {
        val json = json {
            "event" to "home_share_wall_button_click"
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击首页安利墙的卡片
    @JvmStatic
    fun logHomeShareWallCardClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "home_share_wall_card_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击安利墙广场的卡片
    @JvmStatic
    fun logShareWallSquareCardClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "share_wall_square_card_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击底部导航栏
    @JvmStatic
    fun logBottomNavigationClick(navigationName: String, linkType: String, linkText: String, linkId: String = "") {
        val json = json {
            "event" to "bottom_navigation_click"
            "navigation_name" to navigationName
            if (linkType.isNotEmpty()) {
                "link_type" to linkType
            }
            if (linkText.isNotEmpty()) {
                "link_text" to linkText
            }
            "link_id" to linkId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击tab
    @JvmStatic
    fun logGameDetailTabClick(gameName: String, gameId: String, tabName: String) {
        val json = json {
            "event" to "game_detail_tab_click"
            "game_name" to gameName
            "game_id" to gameId
            "tab_name" to tabName
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击大事件
    @JvmStatic
    fun logGameDetailMajorEventClick(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_major_event_click"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览大事件
    @JvmStatic
    fun logGameDetailMajorEventView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_major_event_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览更新内容
    @JvmStatic
    fun logGameDetailUpdatedView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_updated_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览历史版本
    @JvmStatic
    fun logGameDetailHistoryVersionView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_history_version_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击更新内容
    @JvmStatic
    fun logGameDetailUpdatedClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "game_detail_updated_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览开服表
    @JvmStatic
    fun logGameDetailOpenListView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_open_list_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击开服表
    @JvmStatic
    fun logGameDetailOpenListClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "game_detail_open_list_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览开服日历
    @JvmStatic
    fun logGameDetailOpenCalendarView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_open_calendar_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击开服日历
    @JvmStatic
    fun logGameDetailOpenCalendarClick(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_open_calendar_click"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览游戏礼包
    @JvmStatic
    fun logGameDetailGiftView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_gift_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击游戏礼包
    @JvmStatic
    fun logGameDetailGiftClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "game_detail_gift_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览玩家评论
    @JvmStatic
    fun logGameDetailCommentView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_comment_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击玩家评论
    @JvmStatic
    fun logGameDetailCommentClick(gameName: String, gameId: String, entrance: String) {
        val json = json {
            "event" to "game_detail_comment_click"
            "game_name" to gameName
            "game_id" to gameId
            "entrance" to entrance
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情浏览大家都在玩
    @JvmStatic
    fun logGameDetailPopularView(gameName: String, gameId: String) {
        val json = json {
            "event" to "game_detail_popular_view"
            "game_name" to gameName
            "game_id" to gameId
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //游戏详情点击大家都在玩
    @JvmStatic
    fun logGameDetailPopularClick(gameName: String, gameId: String, linkType: String, linkText: String) {
        val json = json {
            "event" to "game_detail_popular_click"
            "game_name" to gameName
            "game_id" to gameId
            "link_id" to gameId
            "link_type" to linkType
            "link_text" to linkText
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //我的光环点击事件
    @JvmStatic
    fun logHaloSelfClick(profile: String, entrance: String, linkType: String, linkId: String, linkText: String) {
        val json = json {
            "event" to "halo_self_click"
            "profile" to profile
            "entrance" to entrance
            "link_type" to linkType
            "link_id" to linkId
            "link_text" to linkText
            "timestamp" to System.currentTimeMillis() / 1000
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击消息通知
    @JvmStatic
    fun logMessageInformClick(
        contentId: String,
        newsId: String,
        gameId: String,
        gameCollectionId: String,
        messageType: String
    ) {
        val json = json {
            "event" to "message_inform_click"
            "content_id" to contentId
            "news_id" to newsId
            "game_id" to gameId
            "game_collect_id" to gameCollectionId
            "message_type" to messageType
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击消息中心-头部图标/赞同/系统图标
    @JvmStatic
    fun logMessageInformTopIconClick(
        isInform: Boolean,
        displayType: String,
    ) {
        val json = json {
            "event" to "message_inform_top_icon_click"
            "is_inform" to isInform
            "display_type" to displayType
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击消息提醒铃铛
    @JvmStatic
    fun logMessageInformBellClick(
        isInform: Boolean,
        entrance: String,
    ) {
        val json = json {
            "event" to "message_inform_bell_click"
            "is_inform" to isInform
            "entrance" to entrance
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    //点击消息通知信息用户头像/昵称
    @JvmStatic
    fun logMessageInformUserClick(event: String) {
        val json = json {
            "event" to event
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }

    // 游戏单活动成功创建游戏单事件
    @JvmStatic
    fun logCreateGameCollectionSuccess(
        gameIdList: List<String>,
        gameCollectionTitle: String,
        gameCollectionId: String,
        activityName: String
    ) {
        val json = json {
            "event" to "activity_game_list_create_success"
            "game_id_array" to gameIdList
            "game_collect_title" to gameCollectionTitle
            "game_collect_id" to gameCollectionId
            "activity_name" to activityName
            parseAndPutMeta().invoke(this)
        }
        log(json, "event", false)
    }
}