.class public Lcom/moji/member/helper/CouponHelper;
.super Ljava/lang/Object;
.source "CouponHelper.java"

# interfaces
.implements Lcom/moji/member/presenter/MemberExCodePresenter$MemberExCodeCallback;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/member/helper/CouponHelper$ChangeTabListener;
    }
.end annotation


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

.field private b:Lcom/moji/member/presenter/MemberExCodePresenter;

.field private c:Lorg/json/JSONObject;

.field private d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

.field private e:Lcom/moji/member/helper/CouponHelper$ChangeTabListener;

.field private f:Z

.field private g:Lcom/moji/preferences/ProcessPrefer;

.field private h:Z

.field private i:Landroid/app/Activity;


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

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

    return-void
.end method

.method private a()V
    .locals 2

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

    move-result-object v0

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

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

    .line 115
    :try_start_0
    sget-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    .line 116
    sget-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "CouponHelper"

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

    .line 121
    :cond_0
    :goto_0
    new-instance v0, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    iget-object v1, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    invoke-direct {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/moji/member/R$string;->dialog_title:I

    .line 122
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->dialog_helper_login_content:I

    .line 123
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    const/4 v1, 0x1

    .line 124
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->c(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->dialog_confirm_login:I

    .line 125
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/member/helper/CouponHelper$3;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$3;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 126
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->dialog_open_vip_cancel:I

    .line 151
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->e(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/member/helper/CouponHelper$2;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$2;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 152
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/member/helper/CouponHelper$1;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$1;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 160
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$OnDismissCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    .line 166
    invoke-virtual {v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    move-result-object v0

    sput-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    return-void
.end method

.method private a(Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;Landroid/content/Context;)V
    .locals 4

    const/4 v0, 0x1

    .line 251
    iput-boolean v0, p0, Lcom/moji/member/helper/CouponHelper;->f:Z

    .line 253
    :try_start_0
    sget-object v1, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    if-eqz v1, :cond_0

    .line 254
    sget-object v1, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    invoke-virtual {v1}, Landroid/app/Dialog;->dismiss()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    const-string v2, "CouponHelper"

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

    .line 259
    :cond_0
    :goto_0
    new-instance v1, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    invoke-direct {v1, p2}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;-><init>(Landroid/content/Context;)V

    sget v2, Lcom/moji/member/R$string;->dialog_title:I

    .line 260
    invoke-virtual {v1, v2}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

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

    sget v3, Lcom/moji/member/R$string;->use_card_success:I

    .line 261
    invoke-virtual {p2, v3}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

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

    iget-object p1, p1, Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;->codeSlaveDesc:Ljava/lang/String;

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

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

    move-result-object p1

    invoke-virtual {v1, p1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(Ljava/lang/CharSequence;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    .line 262
    invoke-virtual {p1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->c(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    sget v0, Lcom/moji/member/R$string;->cancel:I

    .line 263
    invoke-virtual {p1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->e(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    new-instance v0, Lcom/moji/member/helper/CouponHelper$7;

    invoke-direct {v0, p0}, Lcom/moji/member/helper/CouponHelper$7;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 264
    invoke-virtual {p1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    sget v0, Lcom/moji/member/R$string;->usecard_success_button_confirm:I

    .line 270
    invoke-virtual {p1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    new-instance v0, Lcom/moji/member/helper/CouponHelper$6;

    invoke-direct {v0, p0, p2}, Lcom/moji/member/helper/CouponHelper$6;-><init>(Lcom/moji/member/helper/CouponHelper;Landroid/content/Context;)V

    .line 271
    invoke-virtual {p1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    new-instance p2, Lcom/moji/member/helper/CouponHelper$5;

    invoke-direct {p2, p0}, Lcom/moji/member/helper/CouponHelper$5;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 281
    invoke-virtual {p1, p2}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$OnDismissCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object p1

    .line 289
    invoke-virtual {p1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    move-result-object p1

    sput-object p1, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    return-void
.end method

.method static synthetic a(Lcom/moji/member/helper/CouponHelper;)V
    .locals 0

    .line 45
    invoke-direct {p0}, Lcom/moji/member/helper/CouponHelper;->c()V

    return-void
.end method

.method static synthetic a(Lcom/moji/member/helper/CouponHelper;Z)Z
    .locals 0

    .line 45
    iput-boolean p1, p0, Lcom/moji/member/helper/CouponHelper;->f:Z

    return p1
.end method

.method static synthetic b(Lcom/moji/member/helper/CouponHelper;)Landroid/app/Activity;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    return-object p0
.end method

.method private b()V
    .locals 4

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

    move-result-object v0

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

    move-result v0

    iput-boolean v0, p0, Lcom/moji/member/helper/CouponHelper;->h:Z

    .line 171
    iget-boolean v0, p0, Lcom/moji/member/helper/CouponHelper;->h:Z

    if-nez v0, :cond_0

    .line 172
    invoke-direct {p0}, Lcom/moji/member/helper/CouponHelper;->a()V

    goto :goto_1

    .line 176
    :cond_0
    :try_start_0
    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->c:Lorg/json/JSONObject;

    const-string v1, "pro1"

    const-string v2, "0"

    invoke-virtual {v0, v1, v2}, 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 v0

    const-string v1, "CouponHelper"

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

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

    move-result-object v0

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

    iget-object v2, p0, Lcom/moji/member/helper/CouponHelper;->a:Ljava/lang/String;

    iget-object v3, p0, Lcom/moji/member/helper/CouponHelper;->c:Lorg/json/JSONObject;

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

    .line 181
    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    new-instance v1, Lcom/moji/member/helper/CouponHelper$4;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$4;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    :goto_1
    return-void
.end method

.method static synthetic c(Lcom/moji/member/helper/CouponHelper;)Ljava/lang/String;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/member/helper/CouponHelper;->a:Ljava/lang/String;

    return-object p0
.end method

.method private c()V
    .locals 2

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

    move-result-object v0

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

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

    .line 298
    :try_start_0
    sget-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    .line 299
    sget-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "CouponHelper"

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

    .line 304
    :cond_0
    :goto_0
    new-instance v0, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    iget-object v1, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    invoke-direct {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/moji/member/R$string;->dialog_title:I

    .line 305
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->code_login_fail:I

    .line 306
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    const/4 v1, 0x1

    .line 307
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->c(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->dialog_usecard_fail_button:I

    .line 308
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(I)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/member/helper/CouponHelper$9;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$9;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 309
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/member/helper/CouponHelper$8;

    invoke-direct {v1, p0}, Lcom/moji/member/helper/CouponHelper$8;-><init>(Lcom/moji/member/helper/CouponHelper;)V

    .line 315
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$OnDismissCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    .line 321
    invoke-virtual {v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    move-result-object v0

    sput-object v0, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    return-void
.end method

.method static synthetic d(Lcom/moji/member/helper/CouponHelper;)Lcom/moji/member/presenter/MemberExCodePresenter;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    return-object p0
.end method

.method static synthetic e(Lcom/moji/member/helper/CouponHelper;)Z
    .locals 0

    .line 45
    iget-boolean p0, p0, Lcom/moji/member/helper/CouponHelper;->f:Z

    return p0
.end method

.method static synthetic f(Lcom/moji/member/helper/CouponHelper;)Lcom/moji/member/helper/CouponHelper$ChangeTabListener;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/member/helper/CouponHelper;->e:Lcom/moji/member/helper/CouponHelper$ChangeTabListener;

    return-object p0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

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

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "[#A-Za-z0-9*]+"

    .line 59
    invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v0

    .line 60
    invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v0

    .line 61
    invoke-virtual {v0}, Ljava/util/regex/Matcher;->find()Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "#"

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

    move-result v0

    const-string v1, "*"

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

    move-result v1

    if-ge v0, v1, :cond_0

    add-int/lit8 v0, v0, 0x1

    .line 65
    invoke-virtual {p1, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_0
    const-string p1, ""

    return-object p1
.end method

.method public a(Landroid/app/Activity;Ljava/lang/String;Lcom/moji/member/helper/CouponHelper$ChangeTabListener;)V
    .locals 1

    .line 72
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    .line 73
    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/app/Activity;

    iput-object p1, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    .line 74
    iput-object p3, p0, Lcom/moji/member/helper/CouponHelper;->e:Lcom/moji/member/helper/CouponHelper$ChangeTabListener;

    .line 75
    iput-object p2, p0, Lcom/moji/member/helper/CouponHelper;->a:Ljava/lang/String;

    .line 76
    new-instance p1, Lorg/json/JSONObject;

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

    iput-object p1, p0, Lcom/moji/member/helper/CouponHelper;->c:Lorg/json/JSONObject;

    .line 77
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->g:Lcom/moji/preferences/ProcessPrefer;

    if-nez p1, :cond_0

    .line 78
    new-instance p1, Lcom/moji/preferences/ProcessPrefer;

    invoke-direct {p1}, Lcom/moji/preferences/ProcessPrefer;-><init>()V

    iput-object p1, p0, Lcom/moji/member/helper/CouponHelper;->g:Lcom/moji/preferences/ProcessPrefer;

    .line 80
    :cond_0
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    if-nez p1, :cond_1

    .line 81
    new-instance p1, Lcom/moji/member/presenter/MemberExCodePresenter;

    invoke-direct {p1, p0}, Lcom/moji/member/presenter/MemberExCodePresenter;-><init>(Lcom/moji/member/presenter/MemberExCodePresenter$MemberExCodeCallback;)V

    iput-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    .line 83
    :cond_1
    invoke-direct {p0}, Lcom/moji/member/helper/CouponHelper;->b()V

    return-void
.end method

.method public a(Z)V
    .locals 3

    .line 87
    iput-boolean p1, p0, Lcom/moji/member/helper/CouponHelper;->h:Z

    if-nez p1, :cond_0

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

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->ME_CARD_UNREGISTERED_ANONYMOUS_LOGIN_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v1, "0"

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

    .line 91
    invoke-direct {p0}, Lcom/moji/member/helper/CouponHelper;->c()V

    goto :goto_1

    .line 94
    :cond_0
    :try_start_0
    sget-object p1, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    if-eqz p1, :cond_1

    .line 95
    sget-object p1, Lcom/moji/base/MJActivityStack;->a:Landroid/app/Dialog;

    invoke-virtual {p1}, Landroid/app/Dialog;->dismiss()V

    .line 98
    :cond_1
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->c:Lorg/json/JSONObject;

    const-string v0, "pro1"

    const-string v1, "0"

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

    goto :goto_0

    :catch_0
    move-exception p1

    const-string v0, "CouponHelper"

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

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

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->ME_CARD_UNREGISTERED_ANONYMOUS_LOGIN_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v1, "1"

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

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

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->ME_CARD_USE_CLICK:Lcom/moji/statistics/EVENT_TAG;

    iget-object v1, p0, Lcom/moji/member/helper/CouponHelper;->a:Ljava/lang/String;

    iget-object v2, p0, Lcom/moji/member/helper/CouponHelper;->c:Lorg/json/JSONObject;

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

    .line 105
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->a:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/moji/member/presenter/MemberExCodePresenter;->c(Ljava/lang/String;)V

    :goto_1
    return-void
.end method

.method public getCouponDetailFailed(Lcom/moji/requestcore/MJException;)V
    .locals 4

    const-string v0, "CouponHelper"

    .line 242
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget-object v2, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    sget v3, Lcom/moji/member/R$string;->get_card_detail_fail:I

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

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

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

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

    move-result-object p1

    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public getCouponDetailSuccess(Lcom/moji/http/msc/entity/MemberCoupon;)V
    .locals 2

    .line 219
    invoke-virtual {p1}, Lcom/moji/http/msc/entity/MemberCoupon;->getCode()I

    move-result v0

    if-nez v0, :cond_3

    .line 220
    iget-object v0, p1, Lcom/moji/http/msc/entity/MemberCoupon;->convertCode:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    if-eqz v0, :cond_2

    .line 221
    iget-object v0, p1, Lcom/moji/http/msc/entity/MemberCoupon;->convertCode:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    iput-object v0, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    .line 222
    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    iget v0, v0, Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;->functionCode:I

    if-nez v0, :cond_1

    .line 224
    iget-boolean v0, p0, Lcom/moji/member/helper/CouponHelper;->h:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->g:Lcom/moji/preferences/ProcessPrefer;

    invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->g()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 225
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    iget-object v0, v0, Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;->convertCodeInfo:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/moji/member/presenter/MemberExCodePresenter;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 227
    :cond_0
    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    iget-object v1, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    invoke-virtual {v0, v1, p1}, Lcom/moji/member/presenter/MemberExCodePresenter;->a(Landroid/content/Context;Lcom/moji/http/msc/entity/MemberCoupon;)V

    goto :goto_0

    .line 230
    :cond_1
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    iget-object v0, v0, Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;->convertCodeInfo:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/moji/member/presenter/MemberExCodePresenter;->a(Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    const-string p1, "CouponHelper"

    .line 233
    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    sget v1, Lcom/moji/member/R$string;->coupon_null:I

    invoke-virtual {v0, v1}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

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

    move-result-object v0

    invoke-virtual {p1}, Lcom/moji/http/msc/entity/MemberCoupon;->getDesc()Ljava/lang/String;

    move-result-object p1

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :goto_0
    return-void
.end method

.method public onFailed(Lcom/moji/requestcore/MJException;)V
    .locals 4

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

    move-result-object v0

    sget v1, Lcom/moji/member/R$string;->use_card_fail:I

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    const-string v0, "CouponHelper"

    .line 204
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget-object v2, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    sget v3, Lcom/moji/member/R$string;->use_card_fail:I

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

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

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

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

    move-result-object p1

    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public onLockFailed(Lcom/moji/requestcore/MJException;)V
    .locals 4

    const-string v0, "CouponHelper"

    .line 214
    new-instance v1, Ljava/lang/StringBuilder;

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

    iget-object v2, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    sget v3, Lcom/moji/member/R$string;->lock_card_fail:I

    invoke-virtual {v2, v3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v2

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

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

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

    move-result-object p1

    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public onLockSuccess(Lcom/moji/requestcore/entity/MJBaseRespRc;)V
    .locals 1

    .line 209
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->b:Lcom/moji/member/presenter/MemberExCodePresenter;

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    invoke-virtual {p1, v0}, Lcom/moji/member/presenter/MemberExCodePresenter;->a(Landroid/content/Context;)V

    return-void
.end method

.method public onSuccess(Lcom/moji/requestcore/entity/MJBaseRespRc;)V
    .locals 2

    .line 192
    invoke-virtual {p1}, Lcom/moji/requestcore/entity/MJBaseRespRc;->getCode()I

    move-result v0

    if-nez v0, :cond_0

    .line 193
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    if-eqz p1, :cond_1

    .line 194
    iget-object p1, p0, Lcom/moji/member/helper/CouponHelper;->d:Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;

    iget-object v0, p0, Lcom/moji/member/helper/CouponHelper;->i:Landroid/app/Activity;

    invoke-direct {p0, p1, v0}, Lcom/moji/member/helper/CouponHelper;->a(Lcom/moji/http/msc/entity/MemberCoupon$MemberCouponDetail;Landroid/content/Context;)V

    goto :goto_0

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

    move-result-object v0

    invoke-virtual {p1}, Lcom/moji/requestcore/entity/MJBaseRespRc;->getDesc()Ljava/lang/String;

    move-result-object p1

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :cond_1
    :goto_0
    return-void
.end method
