.class public Lcom/moji/credit/util/GoToCreditPage;
.super Ljava/lang/Object;
.source "GoToCreditPage.java"


# direct methods
.method public constructor <init>()V
    .locals 0

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

    return-void
.end method

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

    const-string v0, "&wapType"

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

    move-result p1

    return p1
.end method


# virtual methods
.method public a(Landroid/content/Context;Ljava/lang/String;Lcom/moji/credit/util/GetDuiBaUrlListener;)V
    .locals 3

    .line 110
    new-instance v0, Lcom/moji/credit/util/CreditSharedPref;

    invoke-direct {v0, p1}, Lcom/moji/credit/util/CreditSharedPref;-><init>(Landroid/content/Context;)V

    .line 115
    invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/account/data/AccountProvider;->f()Z

    move-result p1

    const/4 v1, -0x1

    if-eqz p1, :cond_0

    .line 116
    invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/account/data/AccountProvider;->d()Ljava/lang/String;

    move-result-object p1

    .line 117
    sget-object v2, Lcom/moji/credit/util/CreditSharedPref$KeyConstant;->USER_CREDIT:Lcom/moji/credit/util/CreditSharedPref$KeyConstant;

    invoke-virtual {v0, v2, v1}, Lcom/moji/credit/util/CreditSharedPref;->a(Lcom/moji/tool/preferences/core/IPreferKey;I)I

    move-result v1

    goto :goto_0

    :cond_0
    const-string p1, "not_login"

    .line 122
    :goto_0
    new-instance v0, Lcom/moji/http/cs/DuibaURLRequest;

    invoke-direct {v0, p1, v1, p2}, Lcom/moji/http/cs/DuibaURLRequest;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 123
    new-instance p1, Lcom/moji/credit/util/GoToCreditPage$3;

    invoke-direct {p1, p0, p3}, Lcom/moji/credit/util/GoToCreditPage$3;-><init>(Lcom/moji/credit/util/GoToCreditPage;Lcom/moji/credit/util/GetDuiBaUrlListener;)V

    invoke-virtual {v0, p1}, Lcom/moji/http/cs/DuibaURLRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method

.method public a(Ljava/lang/String;Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 20
    invoke-virtual {p0, p1, p2, v0, v1}, Lcom/moji/credit/util/GoToCreditPage;->a(Ljava/lang/String;Landroid/content/Context;ZLcom/moji/credit/util/GetDuiBaUrlListener;)V

    return-void
.end method

.method public a(Ljava/lang/String;Landroid/content/Context;ZLcom/moji/credit/util/GetDuiBaUrlListener;)V
    .locals 10

    .line 58
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 61
    :cond_0
    new-instance v0, Lcom/moji/credit/util/CreditSharedPref;

    invoke-direct {v0, p2}, Lcom/moji/credit/util/CreditSharedPref;-><init>(Landroid/content/Context;)V

    const-string v1, ""

    .line 65
    invoke-direct {p0, p1}, Lcom/moji/credit/util/GoToCreditPage;->a(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    const-string v2, "dbredirect="

    .line 66
    invoke-virtual {p1, v2}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v2

    const-string v3, "&wapType"

    .line 67
    invoke-virtual {p1, v3}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v3

    if-ge v2, v3, :cond_2

    const-string v1, "dbredirect="

    .line 69
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    add-int/2addr v2, v1

    invoke-virtual {p1, v2, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_1
    const-string v2, "dbredirect="

    .line 72
    invoke-virtual {p1, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 73
    array-length v3, v2

    const/4 v4, 0x2

    if-lt v3, v4, :cond_2

    const/4 v1, 0x1

    .line 74
    aget-object v1, v2, v1

    .line 78
    :cond_2
    :goto_0
    invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;

    move-result-object v2

    invoke-virtual {v2}, Lcom/moji/account/data/AccountProvider;->f()Z

    move-result v2

    const/4 v3, -0x1

    if-eqz v2, :cond_3

    .line 79
    invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;

    move-result-object v2

    invoke-virtual {v2}, Lcom/moji/account/data/AccountProvider;->d()Ljava/lang/String;

    move-result-object v2

    .line 81
    sget-object v4, Lcom/moji/credit/util/CreditSharedPref$KeyConstant;->USER_CREDIT:Lcom/moji/credit/util/CreditSharedPref$KeyConstant;

    invoke-virtual {v0, v4, v3}, Lcom/moji/credit/util/CreditSharedPref;->a(Lcom/moji/tool/preferences/core/IPreferKey;I)I

    move-result v3

    goto :goto_1

    :cond_3
    const-string v2, "not_login"

    .line 87
    :goto_1
    new-instance v0, Lcom/moji/http/cs/DuibaURLRequest;

    invoke-direct {v0, v2, v3, v1}, Lcom/moji/http/cs/DuibaURLRequest;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 88
    new-instance v1, Lcom/moji/credit/util/GoToCreditPage$2;

    move-object v4, v1

    move-object v5, p0

    move v6, p3

    move-object v7, p2

    move-object v8, p1

    move-object v9, p4

    invoke-direct/range {v4 .. v9}, Lcom/moji/credit/util/GoToCreditPage$2;-><init>(Lcom/moji/credit/util/GoToCreditPage;ZLandroid/content/Context;Ljava/lang/String;Lcom/moji/credit/util/GetDuiBaUrlListener;)V

    invoke-virtual {v0, v1}, Lcom/moji/http/cs/DuibaURLRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method

.method public b(Ljava/lang/String;Landroid/content/Context;)V
    .locals 4

    .line 24
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    :cond_0
    const-string v0, ""

    .line 28
    invoke-direct {p0, p1}, Lcom/moji/credit/util/GoToCreditPage;->a(Ljava/lang/String;)Z

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_1

    const-string v1, "dbredirect="

    .line 29
    invoke-virtual {p1, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v1

    const-string v3, "&wapType"

    .line 30
    invoke-virtual {p1, v3}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v3

    if-ge v1, v3, :cond_2

    const-string v0, "dbredirect="

    .line 32
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    add-int/2addr v1, v0

    invoke-virtual {p1, v1, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    move-object v0, p1

    goto :goto_0

    :cond_1
    const-string v1, "dbredirect="

    .line 35
    invoke-virtual {p1, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    .line 36
    array-length v1, p1

    const/4 v3, 0x2

    if-lt v1, v3, :cond_2

    .line 37
    aget-object v0, p1, v2

    .line 41
    :cond_2
    :goto_0
    new-instance p1, Lcom/moji/http/cs/DuibaURLRequest;

    const-string v1, "0"

    const/4 v3, 0x0

    invoke-direct {p1, v1, v3, v0, v2}, Lcom/moji/http/cs/DuibaURLRequest;-><init>(Ljava/lang/String;ILjava/lang/String;I)V

    .line 42
    new-instance v0, Lcom/moji/credit/util/GoToCreditPage$1;

    invoke-direct {v0, p0, p2}, Lcom/moji/credit/util/GoToCreditPage$1;-><init>(Lcom/moji/credit/util/GoToCreditPage;Landroid/content/Context;)V

    invoke-virtual {p1, v0}, Lcom/moji/http/cs/DuibaURLRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method
