.class public Lcom/moji/mjweather/weather/index/LifeIndexOnListener;
.super Ljava/lang/Object;
.source "LifeIndexOnListener.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private final a:Ljava/lang/String;

.field private b:Lcom/moji/weatherprovider/data/IndexList$Index;

.field private c:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lcom/moji/mjad/common/control/CommonAdControl;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lcom/moji/weatherprovider/data/IndexList$Index;Ljava/util/HashMap;Ljava/lang/String;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/moji/weatherprovider/data/IndexList$Index;",
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Lcom/moji/mjad/common/control/CommonAdControl;",
            ">;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .line 44
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    iput-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    .line 46
    iput-object p2, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    .line 47
    iput-object p3, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->a:Ljava/lang/String;

    return-void
.end method

.method private a(Lcom/moji/weatherprovider/data/Weather;)Ljava/lang/String;
    .locals 0

    .line 147
    invoke-virtual {p1}, Lcom/moji/weatherprovider/data/Weather;->isLocation()Z

    move-result p1

    if-eqz p1, :cond_0

    const-string p1, "1"

    goto :goto_0

    :cond_0
    const-string p1, "0"

    :goto_0
    return-object p1
.end method

.method private a(Ljava/lang/String;)Ljava/lang/String;
    .locals 1

    const-string v0, "?"

    .line 106
    invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 107
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "&"

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto :goto_0

    .line 109
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "?"

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 111
    :goto_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "{areaInfo}"

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 112
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "lang="

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Lcom/moji/preferences/units/SettingCenter;->a()Lcom/moji/preferences/units/SettingCenter;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/preferences/units/SettingCenter;->b()Lcom/moji/preferences/units/ELanguage;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "&tu="

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 113
    invoke-static {}, Lcom/moji/preferences/units/UNIT_TEMP;->getSymbolByCurrentUnitTemp()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "&wu="

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 114
    invoke-static {}, Lcom/moji/preferences/units/SettingCenter;->a()Lcom/moji/preferences/units/SettingCenter;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/preferences/units/SettingCenter;->g()Lcom/moji/preferences/units/UNIT_SPEED;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/preferences/units/UNIT_SPEED;->getHttpTag()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "&au="

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 115
    invoke-static {}, Lcom/moji/preferences/units/UNIT_PRESSURE;->getSymbolByCurrentUnitPressure()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method private b(Ljava/lang/String;)Ljava/lang/String;
    .locals 6

    .line 119
    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;

    move-result-object v0

    .line 120
    invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;

    move-result-object v1

    if-eqz v0, :cond_1

    if-eqz v1, :cond_1

    .line 122
    new-instance v2, Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    invoke-direct {v2, p1}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;-><init>(Ljava/lang/String;)V

    const-string p1, "{cond}"

    .line 123
    iget-object v3, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v3, v3, Lcom/moji/weatherprovider/data/Detail;->mCondition:Lcom/moji/weatherprovider/data/Condition;

    iget v3, v3, Lcom/moji/weatherprovider/data/Condition;->mTemperature:I

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, p1, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v3, "{aqi}"

    iget-object v4, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v4, v4, Lcom/moji/weatherprovider/data/Detail;->mAqi:Lcom/moji/weatherprovider/data/Aqi;

    .line 124
    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p1, v3, v4}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v3, "{timestamp}"

    .line 125
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p1, v3, v4}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v3, "{areaInfo}"

    iget v0, v0, Lcom/moji/common/area/AreaInfo;->cityId:I

    .line 126
    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v3, v0}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{platform}"

    const-string v3, "Android"

    .line 127
    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{identify}"

    .line 128
    invoke-static {}, Lcom/moji/tool/DeviceTool;->A()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{net}"

    .line 129
    invoke-static {}, Lcom/moji/tool/DeviceTool;->J()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{width}"

    .line 130
    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{height}"

    .line 131
    invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I

    move-result v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{device}"

    sget-object v3, Landroid/os/Build;->MODEL:Ljava/lang/String;

    .line 132
    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{isloc}"

    .line 133
    invoke-direct {p0, v1}, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->a(Lcom/moji/weatherprovider/data/Weather;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p1, v0, v3}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    .line 135
    iget-object p1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    if-eqz p1, :cond_0

    iget-object p1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;

    if-eqz p1, :cond_0

    iget-object p1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;

    if-eqz p1, :cond_0

    iget-object p1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;

    .line 137
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    const/4 v0, 0x2

    if-le p1, v0, :cond_0

    const-string p1, "{forecastHigh}"

    .line 138
    iget-object v0, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;

    iget-object v0, v0, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;

    const/4 v3, 0x1

    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;

    iget v0, v0, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureHigh:I

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, p1, v0}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    move-result-object p1

    const-string v0, "{forecastLow}"

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/Detail;->mForecastDayList:Lcom/moji/weatherprovider/data/ForecastDayList;

    iget-object v1, v1, Lcom/moji/weatherprovider/data/ForecastDayList;->mForecastDay:Ljava/util/List;

    .line 139
    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;

    iget v1, v1, Lcom/moji/weatherprovider/data/ForecastDayList$ForecastDay;->mTemperatureLow:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/moji/mjweather/weather/index/util/UrlBuilder;

    .line 141
    :cond_0
    invoke-virtual {v2}, Lcom/moji/mjweather/weather/index/util/UrlBuilder;->a()Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_1
    return-object p1
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 5

    .line 52
    iget-object v0, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    if-nez v0, :cond_0

    return-void

    .line 54
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget v0, v0, Lcom/moji/weatherprovider/data/IndexList$Index;->mCode:I

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    .line 55
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v2, "property1"

    .line 57
    invoke-virtual {v1, v2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v2

    const-string v3, "LifeIndexOnListener"

    .line 59
    invoke-static {v3, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 61
    :goto_0
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v2

    sget-object v3, Lcom/moji/statistics/EVENT_TAG;->WEATHER_INDEX_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v2, v3, v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)Lcom/moji/statistics/EventManager;

    .line 63
    iget-object v0, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-wide v0, v0, Lcom/moji/weatherprovider/data/IndexList$Index;->id:J

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    .line 64
    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-boolean v1, v1, Lcom/moji/weatherprovider/data/IndexList$Index;->isAd:Z

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    if-eqz v1, :cond_3

    if-eqz v0, :cond_3

    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    .line 65
    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v1}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v1

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v1}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/data/AdCommon;

    iget-object v1, v1, Lcom/moji/mjad/common/data/AdCommon;->clickUrl:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_3

    .line 67
    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v1}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/data/AdCommon;

    iget-object v1, v1, Lcom/moji/mjad/common/data/AdCommon;->clickUrl:Ljava/lang/String;

    const-string v2, "\"ids\":\"w5\""

    .line 68
    invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 70
    :try_start_1
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, v1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v1, "propertys"

    .line 72
    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string v1, "propertys"

    .line 73
    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    if-eqz v1, :cond_1

    const-string v3, "sense"

    .line 75
    iget-object v4, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->a:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 77
    :cond_1
    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v1}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/common/data/AdCommon;

    invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/moji/mjad/common/data/AdCommon;->clickUrl:Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_1

    :catch_1
    move-exception v1

    const-string v2, "LifeIndexOnListener"

    .line 80
    invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v1

    invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 83
    :cond_2
    :goto_1
    iget-object v1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->c:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v0, p1}, Lcom/moji/mjad/common/control/CommonAdControl;->setClick(Landroid/view/View;)V

    goto/16 :goto_2

    .line 85
    :cond_3
    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    const/4 v0, 0x1

    if-eqz p1, :cond_4

    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    const-string v1, "forum"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_4

    .line 86
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object p1

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->FORUM_CLICK_CIRCLE:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 87
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1, v0}, Lcom/moji/forum/ui/ForumMainActivity;->startMe(Landroid/content/Context;I)V

    goto :goto_2

    .line 88
    :cond_4
    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    if-eqz p1, :cond_5

    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    const-string v1, "typhoon"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_5

    goto :goto_2

    .line 90
    :cond_5
    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    if-nez p1, :cond_6

    return-void

    .line 93
    :cond_6
    iget-object p1, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget-object p1, p1, Lcom/moji/weatherprovider/data/IndexList$Index;->mUrl:Ljava/lang/String;

    .line 94
    new-instance v1, Landroid/content/Intent;

    sget-object v2, Lcom/moji/mjweather/MJApplication;->sContext:Landroid/content/Context;

    const-class v3, Lcom/moji/webview/BrowserActivity;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 95
    iget-object v2, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget v2, v2, Lcom/moji/weatherprovider/data/IndexList$Index;->mCode:I

    if-ne v2, v0, :cond_7

    const-string v0, "title"

    const v2, 0x7f0e0428

    .line 96
    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    :cond_7
    const-string v0, "index_code"

    .line 98
    iget-object v2, p0, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->b:Lcom/moji/weatherprovider/data/IndexList$Index;

    iget v2, v2, Lcom/moji/weatherprovider/data/IndexList$Index;->mCode:I

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v0, "target_url"

    .line 99
    invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/index/LifeIndexOnListener;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, v0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const/high16 p1, 0x10000000

    .line 100
    invoke-virtual {v1, p1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 101
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object p1

    invoke-virtual {p1, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    :goto_2
    return-void
.end method
