得物.apk(点击下载) / ApplySellFragmentPage1.java
package com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.MutableLiveData;
import cd.c;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.bean.IdentifyOptionalModel;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.modules.du_mall_common.model.TextHyperlinkModel;
import com.shizhuang.duapp.modules.mall_seller.http.SellerApi;
import com.shizhuang.duapp.modules.mall_seller.http.SellerFacade;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.dialog.AddProductExistDialogV2;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ASDateModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ApplyBrandModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ApplyProductInfoModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ApplyProductModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ApplySellImgTipsItemModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.ApplySellImgTipsModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.model.TipsModel;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.view.ASProductImageView;
import com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.viewmodel.ApplySellViewModel;
import df.q;
import j60.d0;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.Reflection;
import kotlin.text.StringsKt__StringNumberConversionsJVMKt;
import kotlin.text.StringsKt__StringNumberConversionsKt;
import kotlin.text.StringsKt__StringsKt;
import rd.l;
import td.j;
import td.p;
import td.s;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_seller/sell/apply_sell/fragment/ApplySellFragmentPage1;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "<init>", "()V", "du_mall_seller_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ApplySellFragmentPage1.kt */
public final class ApplySellFragmentPage1 extends BaseFragment {
public static ChangeQuickRedirect changeQuickRedirect;
public final Lazy b = FragmentViewModelLazyKt.createViewModelLazy(this, Reflection.getOrCreateKotlinClass(ApplySellViewModel.class), new ApplySellFragmentPage1$$special$$inlined$activityViewModels$1(this), new ApplySellFragmentPage1$$special$$inlined$activityViewModels$2(this));
/* renamed from: c reason: collision with root package name */
public final List<IdentifyOptionalModel> f20486c;
public int d;
public long e;
public HashMap f;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(ApplySellFragmentPage1 applySellFragmentPage1, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{applySellFragmentPage1, bundle}, null, changeQuickRedirect, true, 230028, new Class[]{ApplySellFragmentPage1.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ApplySellFragmentPage1.c(applySellFragmentPage1, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (applySellFragmentPage1.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment.ApplySellFragmentPage1")) {
jn.b.f34396a.fragmentOnCreateMethod(applySellFragmentPage1, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull ApplySellFragmentPage1 applySellFragmentPage1, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{applySellFragmentPage1, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 230030, new Class[]{ApplySellFragmentPage1.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View e = ApplySellFragmentPage1.e(applySellFragmentPage1, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (applySellFragmentPage1.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment.ApplySellFragmentPage1")) {
jn.b.f34396a.fragmentOnCreateViewMethod(applySellFragmentPage1, currentTimeMillis, currentTimeMillis2);
}
return e;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(ApplySellFragmentPage1 applySellFragmentPage1) {
if (!PatchProxy.proxy(new Object[]{applySellFragmentPage1}, null, changeQuickRedirect, true, 230031, new Class[]{ApplySellFragmentPage1.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ApplySellFragmentPage1.f(applySellFragmentPage1);
long currentTimeMillis2 = System.currentTimeMillis();
if (applySellFragmentPage1.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment.ApplySellFragmentPage1")) {
jn.b.f34396a.fragmentOnResumeMethod(applySellFragmentPage1, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(ApplySellFragmentPage1 applySellFragmentPage1) {
if (!PatchProxy.proxy(new Object[]{applySellFragmentPage1}, null, changeQuickRedirect, true, 230029, new Class[]{ApplySellFragmentPage1.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ApplySellFragmentPage1.d(applySellFragmentPage1);
long currentTimeMillis2 = System.currentTimeMillis();
if (applySellFragmentPage1.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment.ApplySellFragmentPage1")) {
jn.b.f34396a.fragmentOnStartMethod(applySellFragmentPage1, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull ApplySellFragmentPage1 applySellFragmentPage1, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{applySellFragmentPage1, view, bundle}, null, changeQuickRedirect, true, 230032, new Class[]{ApplySellFragmentPage1.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ApplySellFragmentPage1.g(applySellFragmentPage1, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (applySellFragmentPage1.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.fragment.ApplySellFragmentPage1")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(applySellFragmentPage1, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: ApplySellFragmentPage1.kt */
public static final class a extends s<ApplyProductModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ApplySellFragmentPage1 b;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public a(ApplySellFragmentPage1 applySellFragmentPage1, Fragment fragment) {
super(fragment);
this.b = applySellFragmentPage1;
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
public void onBzError(@org.jetbrains.annotations.Nullable l<ApplyProductModel> lVar) {
if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 230034, new Class[]{l.class}, Void.TYPE).isSupported) {
super.onBzError(lVar);
this.b.removeProgressDialog();
}
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
public void onSuccess(Object obj) {
String str;
String str2;
String str3;
String str4;
String str5;
Long longOrNull;
Integer intOrNull;
Integer intOrNull2;
Float floatOrNull;
Long first;
Integer first2;
Long first3;
Long first4;
TipsModel tipsModel;
ApplyProductModel applyProductModel = (ApplyProductModel) obj;
int i = 0;
if (!PatchProxy.proxy(new Object[]{applyProductModel}, this, changeQuickRedirect, false, 230033, new Class[]{ApplyProductModel.class}, Void.TYPE).isSupported) {
super.onSuccess(applyProductModel);
if (applyProductModel == null || applyProductModel.getType() != 1) {
String str6 = null;
String tips = (applyProductModel == null || (tipsModel = applyProductModel.getTipsModel()) == null) ? null : tipsModel.getTips();
if (tips == null) {
tips = "";
}
q.n(tips);
ApplySellFragmentPage1 applySellFragmentPage1 = this.b;
if (!PatchProxy.proxy(new Object[0], applySellFragmentPage1, ApplySellFragmentPage1.changeQuickRedirect, false, 230012, new Class[0], Void.TYPE).isSupported) {
SellerFacade sellerFacade = SellerFacade.f20177a;
Pair<Long, String> value = applySellFragmentPage1.j().getLevel2CategoryLiveData().getValue();
long longValue = (value == null || (first4 = value.getFirst()) == null) ? 0 : first4.longValue();
Pair<Long, ApplyBrandModel> value2 = applySellFragmentPage1.j().getBrandLiveData().getValue();
long longValue2 = (value2 == null || (first3 = value2.getFirst()) == null) ? 0 : first3.longValue();
String value3 = applySellFragmentPage1.j().getProductNameLiveData().getValue();
if (value3 != null) {
str = value3;
} else {
str = "";
}
String realProductCode = applySellFragmentPage1.j().getGlobalStatus().getRealProductCode();
String value4 = applySellFragmentPage1.j().getProductSizeLiveData().getValue();
if (value4 != null) {
str2 = value4;
} else {
str2 = "";
}
Pair<Integer, List<IdentifyOptionalModel>> value5 = applySellFragmentPage1.j().getProductImageLiveData().getValue();
int intValue = (value5 == null || (first2 = value5.getFirst()) == null) ? 1 : first2.intValue();
String value6 = applySellFragmentPage1.j().getProductImageUrlLiveData().getValue();
if (value6 != null) {
str3 = value6;
} else {
str3 = "";
}
String value7 = applySellFragmentPage1.j().getWebLinkLiveData().getValue();
if (value7 != null) {
str4 = value7;
} else {
str4 = "";
}
Pair<Long, String> value8 = applySellFragmentPage1.j().getPeopleLiveData().getValue();
long longValue3 = (value8 == null || (first = value8.getFirst()) == null) ? 0 : first.longValue();
Pair<ASDateModel, String> value9 = applySellFragmentPage1.j().getDateLiveData().getValue();
if (value9 != null) {
str6 = value9.getSecond();
}
if (str6 != null) {
str5 = str6;
} else {
str5 = "";
}
String value10 = applySellFragmentPage1.j().getPriceLiveData().getValue();
long floatValue = (value10 == null || (floatOrNull = StringsKt__StringNumberConversionsJVMKt.toFloatOrNull(value10)) == null) ? 0 : (long) (floatOrNull.floatValue() * ((float) 100));
String value11 = applySellFragmentPage1.j().getStockLiveData().getValue();
Integer valueOf = Integer.valueOf((value11 == null || (intOrNull2 = StringsKt__StringNumberConversionsKt.toIntOrNull(value11)) == null) ? 0 : intOrNull2.intValue());
String value12 = applySellFragmentPage1.j().getPredictStockLiveData().getValue();
if (!(value12 == null || (intOrNull = StringsKt__StringNumberConversionsKt.toIntOrNull(value12)) == null)) {
i = intOrNull.intValue();
}
Integer valueOf2 = Integer.valueOf(i);
String value13 = applySellFragmentPage1.j().getPredictPriceLiveData().getValue();
sellerFacade.o(longValue, longValue2, realProductCode, str, str2, intValue, str3, str4, longValue3, str5, floatValue, valueOf, valueOf2, (value13 == null || (longOrNull = StringsKt__StringNumberConversionsKt.toLongOrNull(value13)) == null) ? 0 : longOrNull.longValue() * ((long) 100), new cv0.a(applySellFragmentPage1, applySellFragmentPage1));
return;
}
return;
}
ApplyProductInfoModel spuModel = applyProductModel.getSpuModel();
if (spuModel != null) {
AddProductExistDialogV2.d.a(this.b.getChildFragmentManager(), spuModel);
}
}
}
}
/* compiled from: ApplySellFragmentPage1.kt */
public static final class b extends p<ApplySellImgTipsModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ ApplySellFragmentPage1 b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ int f20487c;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public b(ApplySellFragmentPage1 applySellFragmentPage1, int i, Activity activity, boolean z) {
super(activity, z);
this.b = applySellFragmentPage1;
this.f20487c = i;
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
public void onBzError(@org.jetbrains.annotations.Nullable l<ApplySellImgTipsModel> lVar) {
if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 230038, new Class[]{l.class}, Void.TYPE).isSupported) {
super.onBzError(lVar);
Pair<Integer, List<IdentifyOptionalModel>> value = this.b.j().getProductImageLiveData().getValue();
if ((value != null ? value.getSecond() : null) == null) {
this.b.j().getProductImageLiveData().setValue(TuplesKt.to(Integer.valueOf(this.f20487c), this.b.f20486c));
}
}
}
/* JADX DEBUG: Failed to insert an additional move for type inference into block B:35:0x0077 */
/* JADX DEBUG: Multi-variable search result rejected for r2v1, resolved type: java.lang.Object */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r2v12, types: [java.util.List<com.shizhuang.duapp.common.bean.IdentifyOptionalModel>] */
/* JADX WARN: Type inference failed for: r2v13, types: [java.util.ArrayList] */
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
public void onSuccess(Object obj) {
Object obj2;
List<ApplySellImgTipsItemModel> imgTips;
ApplySellImgTipsItemModel applySellImgTipsItemModel;
List<ApplySellImgTipsItemModel> imgTips2;
ApplySellImgTipsModel applySellImgTipsModel = (ApplySellImgTipsModel) obj;
if (!PatchProxy.proxy(new Object[]{applySellImgTipsModel}, this, changeQuickRedirect, false, 230037, new Class[]{ApplySellImgTipsModel.class}, Void.TYPE).isSupported) {
super.onSuccess(applySellImgTipsModel);
Pair<Integer, List<IdentifyOptionalModel>> value = this.b.j().getProductImageLiveData().getValue();
String str = null;
if ((value != null ? value.getSecond() : null) == null) {
if (applySellImgTipsModel == null || (imgTips2 = applySellImgTipsModel.getImgTips()) == null) {
obj2 = this.b.f20486c;
} else {
obj2 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(imgTips2, 10));
Iterator<T> it2 = imgTips2.iterator();
while (it2.hasNext()) {
obj2.add(it2.next().toIdentifyModel());
}
}
this.b.j().getProductImageLiveData().setValue(TuplesKt.to(Integer.valueOf(this.f20487c), obj2));
ASProductImageView aSProductImageView = (ASProductImageView) this.b._$_findCachedViewById(R.id.asImgView);
String upperLevelTitle = (applySellImgTipsModel == null || (imgTips = applySellImgTipsModel.getImgTips()) == null || (applySellImgTipsItemModel = (ApplySellImgTipsItemModel) CollectionsKt___CollectionsKt.getOrNull(imgTips, 0)) == null) ? null : applySellImgTipsItemModel.getUpperLevelTitle();
if (upperLevelTitle == null) {
upperLevelTitle = "";
}
if (!PatchProxy.proxy(new Object[]{upperLevelTitle}, aSProductImageView, ASProductImageView.changeQuickRedirect, false, 230626, new Class[]{String.class}, Void.TYPE).isSupported) {
int indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) upperLevelTitle, "*", 0, false, 6, (Object) null);
if (indexOf$default < 0) {
((TextView) aSProductImageView.b(R.id.tvTitle)).setText(upperLevelTitle);
} else {
d0.f34187a.c((TextView) aSProductImageView.b(R.id.tvTitle), upperLevelTitle, CollectionsKt__CollectionsJVMKt.listOf(new TextHyperlinkModel(indexOf$default, 1, null, null, "#FF4657", null, 44, null)), null);
}
}
MutableLiveData<String> productSizeHintLiveData = this.b.j().getProductSizeHintLiveData();
if (applySellImgTipsModel != null) {
str = applySellImgTipsModel.getSpecificationTips();
}
productSizeHintLiveData.setValue(str);
}
}
}
}
public ApplySellFragmentPage1() {
IdentifyOptionalModel identifyOptionalModel = new IdentifyOptionalModel();
identifyOptionalModel.title = "正面白底图";
identifyOptionalModel.icon = "https://cdn.poizon.com/node-common/3c334cce833e5c6f7ecbe0a547c726bf.png";
Unit unit = Unit.INSTANCE;
this.f20486c = CollectionsKt__CollectionsJVMKt.listOf(identifyOptionalModel);
this.d = -1;
this.e = -1;
}
public static void c(ApplySellFragmentPage1 applySellFragmentPage1, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, applySellFragmentPage1, changeQuickRedirect, false, 230017, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void d(ApplySellFragmentPage1 applySellFragmentPage1) {
if (!PatchProxy.proxy(new Object[0], applySellFragmentPage1, changeQuickRedirect, false, 230019, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View e(ApplySellFragmentPage1 applySellFragmentPage1, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, applySellFragmentPage1, changeQuickRedirect, false, 230021, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void f(ApplySellFragmentPage1 applySellFragmentPage1) {
if (!PatchProxy.proxy(new Object[0], applySellFragmentPage1, changeQuickRedirect, false, 230023, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void g(ApplySellFragmentPage1 applySellFragmentPage1, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, applySellFragmentPage1, changeQuickRedirect, false, 230025, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public View _$_findCachedViewById(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 230014, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f == null) {
this.f = new HashMap();
}
View view = (View) this.f.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i);
this.f.put(Integer.valueOf(i), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230002, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_apply_sell_page1;
}
public final void h() {
String str;
String str2;
String str3;
Integer first;
Long first2;
Long first3;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230013, new Class[0], Void.TYPE).isSupported) {
SellerFacade sellerFacade = SellerFacade.f20177a;
Pair<Long, String> value = j().getLevel2CategoryLiveData().getValue();
long j = 0;
long longValue = (value == null || (first3 = value.getFirst()) == null) ? 0 : first3.longValue();
Pair<Long, ApplyBrandModel> value2 = j().getBrandLiveData().getValue();
if (!(value2 == null || (first2 = value2.getFirst()) == null)) {
j = first2.longValue();
}
String value3 = j().getProductNameLiveData().getValue();
if (value3 == null) {
value3 = "";
}
String realProductCode = j().getGlobalStatus().getRealProductCode();
String value4 = j().getProductSizeLiveData().getValue();
if (value4 != null) {
str = value4;
} else {
str = "";
}
Pair<Integer, List<IdentifyOptionalModel>> value5 = j().getProductImageLiveData().getValue();
int intValue = (value5 == null || (first = value5.getFirst()) == null) ? 1 : first.intValue();
String value6 = j().getProductImageUrlLiveData().getValue();
if (value6 != null) {
str2 = value6;
} else {
str2 = "";
}
String value7 = j().getWebLinkLiveData().getValue();
if (value7 != null) {
str3 = value7;
} else {
str3 = "";
}
a aVar = new a(this, this);
Object[] objArr = {new Long(longValue), new Long(j), value3, realProductCode, str, new Integer(intValue), str2, str3, aVar};
ChangeQuickRedirect changeQuickRedirect2 = SellerFacade.changeQuickRedirect;
Class cls = Long.TYPE;
if (!PatchProxy.proxy(objArr, sellerFacade, changeQuickRedirect2, false, 222779, new Class[]{cls, cls, String.class, String.class, String.class, Integer.TYPE, String.class, String.class, s.class}, Void.TYPE).isSupported) {
j.doRequest(((SellerApi) j.getJavaGoApi(SellerApi.class)).applyProductPage1(c.b(TuplesKt.to("brandId", Long.valueOf(j)), TuplesKt.to("articleNumber", realProductCode), TuplesKt.to(PushConstants.TITLE, value3), TuplesKt.to("imageUrls", str2), TuplesKt.to("entityType", Integer.valueOf(intValue)), TuplesKt.to("level2CategoryId", Long.valueOf(longValue)), TuplesKt.to("properties", str), TuplesKt.to("website", str3))), aVar);
}
}
}
public final void i() {
Long first;
Integer first2;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230010, new Class[0], Void.TYPE).isSupported) {
Pair<Integer, List<IdentifyOptionalModel>> value = j().getProductImageLiveData().getValue();
int intValue = (value == null || (first2 = value.getFirst()) == null) ? 0 : first2.intValue();
Pair<Long, String> value2 = j().getLevel1CategoryLiveData().getValue();
long longValue = (value2 == null || (first = value2.getFirst()) == null) ? 1 : first.longValue();
if (intValue != this.d || longValue != this.e) {
this.e = longValue;
this.d = intValue;
SellerFacade.f20177a.s(longValue, intValue, new b(this, intValue, requireActivity(), false));
}
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initData() {
boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230003, new Class[0], Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 230004, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
j().getProductImageLiveData().observe(getViewLifecycleOwner(), new ApplySellFragmentPage1$initView$1(this));
j().getOptionalLiveData().observe(getViewLifecycleOwner(), new ApplySellFragmentPage1$initView$2(this));
if (j().getProductImageLiveData().getValue() == null) {
i();
}
di.b.c(requireActivity(), new ApplySellFragmentPage1$initView$3(this));
ViewExtensionKt.h((TextView) _$_findCachedViewById(R.id.tvSubmit), new ApplySellFragmentPage1$initView$4(this));
}
}
public final ApplySellViewModel j() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230001, new Class[0], ApplySellViewModel.class);
return (ApplySellViewModel) (proxy.isSupported ? proxy.result : this.b.getValue());
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 230016, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 230020, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
HashMap hashMap;
super.onDestroyView();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230015, new Class[0], Void.TYPE).isSupported && (hashMap = this.f) != null) {
hashMap.clear();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230022, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 230018, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 230024, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
}