|
|
@@ -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);
|