热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 EventHandlerKt.java 源代码,内容仅作参考
package component.dancefitme.wechat;
import com.bumptech.glide.gifdecoder.a;
import com.dancefitme.cn.api.Api;
import com.dancefitme.cn.api.Response;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import fb.h;
import java.util.LinkedHashMap;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONObject;
import sa.g;
import t3.b;
import wa.c;
@Metadata(bv = {}, d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u001b\u0010\u0002\u001a\u00020\u00002\u0006\u0010\u0001\u001a\u00020\u0000H\u0086@ø\u0001\u0000¢\u0006\u0004\b\u0002\u0010\u0003\u001a\u001b\u0010\u0004\u001a\u00020\u00002\u0006\u0010\u0001\u001a\u00020\u0000H\u0086@ø\u0001\u0000¢\u0006\u0004\b\u0004\u0010\u0003\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0005"}, d2 = {"Lra/a;", "auth", a.f5913u, "(Lra/a;Lwa/c;)Ljava/lang/Object;", "b", "app_dancefitRelease"}, k = 2, mv = {1, 6, 0})
public final class EventHandlerKt {
@Nullable
public static final Object a(@NotNull ra.a aVar, @NotNull c<? super ra.a> cVar) {
EventHandlerKt$accessToken$1 eventHandlerKt$accessToken$1;
int i10;
String str;
if (cVar instanceof EventHandlerKt$accessToken$1) {
eventHandlerKt$accessToken$1 = (EventHandlerKt$accessToken$1) cVar;
int i11 = eventHandlerKt$accessToken$1.f29437c;
if ((i11 & Integer.MIN_VALUE) != 0) {
eventHandlerKt$accessToken$1.f29437c = i11 - Integer.MIN_VALUE;
Object obj = eventHandlerKt$accessToken$1.f29436b;
Object c10 = xa.a.c();
i10 = eventHandlerKt$accessToken$1.f29437c;
if (i10 != 0) {
g.b(obj);
LinkedHashMap linkedHashMap = new LinkedHashMap();
linkedHashMap.put(HiAnalyticsConstant.HaKey.BI_KEY_APPID, "wx01b7b9eaf1e392b3");
linkedHashMap.put("secret", "67c707d571bedd73efc85d835a9449b3");
linkedHashMap.put("code", aVar.e());
linkedHashMap.put("grant_type", "authorization_code");
b e10 = Api.f7399a.e();
eventHandlerKt$accessToken$1.f29435a = aVar;
eventHandlerKt$accessToken$1.f29437c = 1;
obj = e10.a("https://api.weixin.qq.com/sns/oauth2/access_token", linkedHashMap, eventHandlerKt$accessToken$1);
if (obj == c10) {
return c10;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
aVar = (ra.a) eventHandlerKt$accessToken$1.f29435a;
g.b(obj);
}
str = (String) ((Response) obj).c();
if (str != null) {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("access_token");
String str2 = "";
if (optString == null) {
optString = "";
} else {
h.e(optString, "jsonObject.optString(\"access_token\") ?: \"\"");
}
aVar.k(optString);
String optString2 = jSONObject.optString("openid");
if (optString2 != null) {
h.e(optString2, "jsonObject.optString(\"openid\") ?: \"\"");
str2 = optString2;
}
aVar.p(str2);
}
return aVar;
}
}
eventHandlerKt$accessToken$1 = new EventHandlerKt$accessToken$1(cVar);
Object obj2 = eventHandlerKt$accessToken$1.f29436b;
Object c102 = xa.a.c();
i10 = eventHandlerKt$accessToken$1.f29437c;
if (i10 != 0) {
}
str = (String) ((Response) obj2).c();
if (str != null) {
}
return aVar;
}
@Nullable
public static final Object b(@NotNull ra.a aVar, @NotNull c<? super ra.a> cVar) {
EventHandlerKt$userinfo$1 eventHandlerKt$userinfo$1;
int i10;
String str;
if (cVar instanceof EventHandlerKt$userinfo$1) {
eventHandlerKt$userinfo$1 = (EventHandlerKt$userinfo$1) cVar;
int i11 = eventHandlerKt$userinfo$1.f29440c;
if ((i11 & Integer.MIN_VALUE) != 0) {
eventHandlerKt$userinfo$1.f29440c = i11 - Integer.MIN_VALUE;
Object obj = eventHandlerKt$userinfo$1.f29439b;
Object c10 = xa.a.c();
i10 = eventHandlerKt$userinfo$1.f29440c;
if (i10 != 0) {
g.b(obj);
LinkedHashMap linkedHashMap = new LinkedHashMap();
linkedHashMap.put("openid", "wx01b7b9eaf1e392b3");
linkedHashMap.put("access_token", aVar.c());
b e10 = Api.f7399a.e();
eventHandlerKt$userinfo$1.f29438a = aVar;
eventHandlerKt$userinfo$1.f29440c = 1;
obj = e10.a("https://api.weixin.qq.com/sns/userinfo", linkedHashMap, eventHandlerKt$userinfo$1);
if (obj == c10) {
return c10;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
aVar = (ra.a) eventHandlerKt$userinfo$1.f29438a;
g.b(obj);
}
str = (String) ((Response) obj).c();
if (str != null) {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("unionid");
String str2 = "";
if (optString == null) {
optString = "";
} else {
h.e(optString, "jsonObject.optString(\"unionid\") ?: \"\"");
}
aVar.s(optString);
String optString2 = jSONObject.optString("nickname");
if (optString2 == null) {
optString2 = "";
} else {
h.e(optString2, "jsonObject.optString(\"nickname\") ?: \"\"");
}
aVar.o(optString2);
aVar.r(jSONObject.optInt("sex"));
String optString3 = jSONObject.optString("province");
if (optString3 == null) {
optString3 = "";
} else {
h.e(optString3, "jsonObject.optString(\"province\") ?: \"\"");
}
aVar.q(optString3);
String optString4 = jSONObject.optString("city");
if (optString4 == null) {
optString4 = "";
} else {
h.e(optString4, "jsonObject.optString(\"city\") ?: \"\"");
}
aVar.l(optString4);
String optString5 = jSONObject.optString("country");
if (optString5 == null) {
optString5 = "";
} else {
h.e(optString5, "jsonObject.optString(\"country\") ?: \"\"");
}
aVar.m(optString5);
String optString6 = jSONObject.optString("headimgurl");
if (optString6 != null) {
h.e(optString6, "jsonObject.optString(\"headimgurl\") ?: \"\"");
str2 = optString6;
}
aVar.n(str2);
}
return aVar;
}
}
eventHandlerKt$userinfo$1 = new EventHandlerKt$userinfo$1(cVar);
Object obj2 = eventHandlerKt$userinfo$1.f29439b;
Object c102 = xa.a.c();
i10 = eventHandlerKt$userinfo$1.f29440c;
if (i10 != 0) {
}
str = (String) ((Response) obj2).c();
if (str != null) {
}
return aVar;
}
}