|
|
@@ -20,4 +20,18 @@ public class WXEntryActivity extends WXCallbackActivity {
|
|
|
finish();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onResp(BaseResp resp) {
|
|
|
+ if (resp instanceof SendAuth.Resp) {
|
|
|
+ if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
|
|
|
+ String code = ((SendAuth.Resp) resp).code;
|
|
|
+ EventBus.getDefault().post(new WXLoginAuthEvent(code));
|
|
|
+ } else{
|
|
|
+ EventBus.getDefault().post(new WXLoginAuthEvent(null));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ super.onResp(resp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|