|
|
@@ -6,6 +6,7 @@ import android.content.Intent;
|
|
|
import android.graphics.Bitmap;
|
|
|
import android.net.Uri;
|
|
|
import android.os.Build;
|
|
|
+import android.os.Bundle;
|
|
|
import android.os.Environment;
|
|
|
import android.provider.MediaStore;
|
|
|
import android.support.v7.app.ActionBar;
|
|
|
@@ -52,6 +53,7 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
+import com.uuzuche.lib_zxing.activity.CodeUtils;
|
|
|
import com.yalantis.ucrop.util.FileUtils;
|
|
|
import com.zhy.http.okhttp.OkHttpUtils;
|
|
|
import com.zhy.http.okhttp.callback.StringCallback;
|
|
|
@@ -559,6 +561,19 @@ public class FgtWeb extends BaseFgtWeb {
|
|
|
}
|
|
|
} else if (Constant.INTENT_RECHARGE == requestCode) {
|
|
|
mWebView.reload();
|
|
|
+ } else if (Constant.INTENT_CAPTURE_QRCODE == requestCode) {
|
|
|
+ if (null != data) {
|
|
|
+ Bundle bundle = data.getExtras();
|
|
|
+ if (bundle == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_SUCCESS) {
|
|
|
+ String result = bundle.getString(CodeUtils.RESULT_STRING);
|
|
|
+ loadJs("sendQRCode(\"" + result + "\")");
|
|
|
+ } else if (bundle.getInt(CodeUtils.RESULT_TYPE) == CodeUtils.RESULT_FAILED) {
|
|
|
+ G.showToast("解析二维码失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
return;
|