hanjing преди 6 години
родител
ревизия
5cd02cbb50

+ 5 - 2
app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

@@ -2,6 +2,7 @@ package com.sheep.jiuyan.samllsheep.wxapi;
 
 import android.content.Intent;
 import android.os.Bundle;
+import android.util.Log;
 
 import com.sheep.gamegroup.event.WXLoginAuthEvent;
 import com.sheep.gamegroup.util.LogUtil;
@@ -17,12 +18,14 @@ public class WXEntryActivity extends WXCallbackActivity {
     @Override
     public void onCreate(Bundle bundle) {
         super.onCreate(bundle);
+        Log.i("wx auth", "wx auth intent");
         WXAPIUtil.handle(this, getIntent());
         finish();
     }
 
     @Override
     public void onNewIntent(Intent newIntent) {
+        Log.i("wx auth", "wx auth new intent");
         WXAPIUtil.handle(this, newIntent);
         finish();
     }
@@ -31,11 +34,11 @@ public class WXEntryActivity extends WXCallbackActivity {
     public void onResp(BaseResp resp) {
         if (resp instanceof SendAuth.Resp) {
             if (resp.errCode == BaseResp.ErrCode.ERR_OK) {
-                LogUtil.logI("wx auth ok");
+                Log.i("wx auth", "wx auth ok");
                 String code = ((SendAuth.Resp) resp).code;
                 EventBus.getDefault().post(new WXLoginAuthEvent(code));
             } else{
-                LogUtil.logI("wx auth error");
+                Log.i("wx auth", "wx auth error");
                 EventBus.getDefault().post(new WXLoginAuthEvent(null));
             }
         } else {

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/login/LoginAct.java

@@ -306,7 +306,7 @@ public class LoginAct extends BaseUMActivity implements LoginController {
     public void whenWXUserAuth(WXLoginAuthEvent ev) {
         if (TextUtils.isEmpty(ev.code)) {
             G.showToast("微信授权失败");
-            LogUtil.logI("wx auth result failed");
+            Log.i("wx auth", "wx auth result failed");
         } else {
             WXAPIUtil.loadWXUserToken(ev.code, (ret, openId, token) -> {
                 if (ret) {

+ 4 - 3
app/src/main/java/com/sheep/jiuyan/samllsheep/wxutil/WXAPIUtil.java

@@ -2,6 +2,7 @@ package com.sheep.jiuyan.samllsheep.wxutil;
 
 import android.content.Context;
 import android.content.Intent;
+import android.util.Log;
 import android.widget.Toast;
 
 import com.alibaba.fastjson.JSONObject;
@@ -60,7 +61,7 @@ public class WXAPIUtil {
 
                     @Override
                     public void onResponse(String response, int id) {
-                        LogUtil.logI("wx auth "+response);
+                        Log.i("wx auth", "wx auth "+response);
                         JSONObject resp = JSONObject.parseObject(response);
                         callback.callback(true, resp.getString("openid"), resp.getString("access_token"));
                     }
@@ -76,12 +77,12 @@ public class WXAPIUtil {
                     @Override
                     public void onError(Call call, Exception e, int id) {
                         callback.callback(false, null);
-                        LogUtil.logI("wx auth userinfo error");
+                        Log.i("wx auth", "wx auth userinfo error");
                     }
 
                     @Override
                     public void onResponse(String response, int id) {
-                        LogUtil.logI("wx user info: " + response);
+                        Log.i("wx auth", "wx user info: " + response);
                         JSONObject resultJson = JSONObject.parseObject(response);
                         if (resultJson.containsKey("errcode")) {
                             callback.callback(false, null);