|
@@ -4,6 +4,7 @@ import android.content.Intent;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
import com.sheep.gamegroup.event.WXLoginAuthEvent;
|
|
import com.sheep.gamegroup.event.WXLoginAuthEvent;
|
|
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.jiuyan.samllsheep.wxutil.WXAPIUtil;
|
|
import com.sheep.jiuyan.samllsheep.wxutil.WXAPIUtil;
|
|
|
import com.tencent.mm.opensdk.modelbase.BaseResp;
|
|
import com.tencent.mm.opensdk.modelbase.BaseResp;
|
|
|
import com.tencent.mm.opensdk.modelmsg.SendAuth;
|
|
import com.tencent.mm.opensdk.modelmsg.SendAuth;
|
|
@@ -30,9 +31,11 @@ public class WXEntryActivity extends WXCallbackActivity {
|
|
|
public void onResp(BaseResp resp) {
|
|
public void onResp(BaseResp resp) {
|
|
|
if (resp instanceof SendAuth.Resp) {
|
|
if (resp instanceof SendAuth.Resp) {
|
|
|
if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
|
|
if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
|
|
|
|
|
+ LogUtil.logI("wx auth ok");
|
|
|
String code = ((SendAuth.Resp) resp).code;
|
|
String code = ((SendAuth.Resp) resp).code;
|
|
|
EventBus.getDefault().post(new WXLoginAuthEvent(code));
|
|
EventBus.getDefault().post(new WXLoginAuthEvent(code));
|
|
|
} else{
|
|
} else{
|
|
|
|
|
+ LogUtil.logI("wx auth error");
|
|
|
EventBus.getDefault().post(new WXLoginAuthEvent(null));
|
|
EventBus.getDefault().post(new WXLoginAuthEvent(null));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|