|
@@ -3,6 +3,7 @@ package com.sheep.gamegroup.util.js;
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
|
|
+import android.util.Log;
|
|
|
import android.webkit.JavascriptInterface;
|
|
import android.webkit.JavascriptInterface;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -120,24 +121,25 @@ public class KFZSJs {
|
|
|
|
|
|
|
|
@JavascriptInterface
|
|
@JavascriptInterface
|
|
|
public void paymentCompleted(String from, boolean ret, String msg, String orderNo) {
|
|
public void paymentCompleted(String from, boolean ret, String msg, String orderNo) {
|
|
|
- if (from.equals("sdk")) {
|
|
|
|
|
|
|
+ //1. app
|
|
|
|
|
+ //2. sdk
|
|
|
|
|
+ if (from.equals("2")) {
|
|
|
Intent intent = new Intent();
|
|
Intent intent = new Intent();
|
|
|
intent.putExtra("ret", ret);
|
|
intent.putExtra("ret", ret);
|
|
|
intent.putExtra("msg", msg);
|
|
intent.putExtra("msg", msg);
|
|
|
intent.putExtra("order_no", orderNo);
|
|
intent.putExtra("order_no", orderNo);
|
|
|
- activity.setResult(Activity.RESULT_OK);
|
|
|
|
|
- activity.setIntent(intent);
|
|
|
|
|
|
|
+ activity.setResult(Activity.RESULT_OK, intent);
|
|
|
}
|
|
}
|
|
|
activity.finish();
|
|
activity.finish();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@JavascriptInterface
|
|
@JavascriptInterface
|
|
|
- public void jumpGame(){
|
|
|
|
|
|
|
+ public void jumpGame() {
|
|
|
Jump2View.getInstance().goMainGame(activity);
|
|
Jump2View.getInstance().goMainGame(activity);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@JavascriptInterface
|
|
@JavascriptInterface
|
|
|
- public void jumpShop(){
|
|
|
|
|
|
|
+ public void jumpShop() {
|
|
|
Jump2View.getInstance().gotoYfShop(activity);
|
|
Jump2View.getInstance().gotoYfShop(activity);
|
|
|
}
|
|
}
|
|
|
|
|
|