package com.xty.common

import android.content.Context
import com.umeng.analytics.MobclickAgent
import com.xty.common.util.CommonUtils


/**
 * 友盟自定义事件上报
 *
 * @param event 事件名
 * @param params 自定义数据
 */
fun onEventObject(context: Context, event:UmengEventId, params: String = ""){
    val value: MutableMap<String, Any?> = HashMap()
    value["userId"] = CommonUtils.getMyUserId()//用户id
    value["userName"] = CommonUtils.getMyUserInfo()?.name //用户名称
    value["watchName"] = CommonUtils.getMyUserInfo()?.watchName
    value["params"] = params
    MobclickAgent.onEventObject(context, event.eventId, value)
}

enum class UmengEventId(val eventId: String) {
    /**健康方案**/
    HealthProgrammes("Android_Healthprogrammes"),
    /**佩戴管理**/
    WearManager("Android_WearManager"),
    /**操作指南**/
    OperGuide("Android_Operationguide"),
    /**健康监测**/
    HealthMonitor("Android_Healthmonitoring"),
    /**健康科普**/
    HealthScience("Android_Healthsciencepopularization"),
   /**健康报告**/
    HealthReport("Android_Healthreport"),
    /**24小时报告**/
    Health24HourReport("Android_24Hour"),
    /**健康榜单**/
    HealthRank("Android_Healthlist"),
    /**健康管家**/
    HealthAdmin("Android_HealthHousekeeper"),
    /**风险评估**/
    HealthRisk("Android_riskassessment"),
    /**家人**/
    Family("Android_family"),
    /**健康打卡**/
    HealthDk("Android_Healthpunch"),
    /**轮播图**/
    Banner("Android_banner"),
    /**预警消息**/
    WarningMsg("Android_WarningMsg"),
    /**30天预警**/
    Health30Day("Android_30day"),
    /**我的家人**/
    MyFamily("Android_Myfamily"),
}



