|
|
@@ -36,6 +36,7 @@ import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.MyGridview;
|
|
|
+import com.sheep.gamegroup.util.QQUtil;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
@@ -84,6 +85,7 @@ public class RechargeAct extends BaseActivity {
|
|
|
private boolean forResult = false;
|
|
|
private String fromPackage;
|
|
|
private String fromToken;
|
|
|
+ private int fromOrient;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle b) {
|
|
|
@@ -115,6 +117,7 @@ public class RechargeAct extends BaseActivity {
|
|
|
if (getIntent().hasExtra("from_package")) {
|
|
|
fromPackage = getIntent().getStringExtra("from_package");
|
|
|
}
|
|
|
+ fromOrient = getIntent().getIntExtra("from_orient", -1);
|
|
|
TitleBarUtils.getInstance()
|
|
|
.setShowOrHide(this, true)
|
|
|
.setTitle(this, "充值")
|
|
|
@@ -144,13 +147,13 @@ public class RechargeAct extends BaseActivity {
|
|
|
//todo 出口三
|
|
|
configView(userEntity.getInvitation_code(), userEntity.getNickname());
|
|
|
} else {
|
|
|
- Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, null, "查询不到用户信息,请登录");
|
|
|
+ Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, fromOrient, null, "查询不到用户信息,请登录");
|
|
|
finish();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, null, "用户授权已过期,请登录");
|
|
|
+ Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, fromOrient, null, "用户授权已过期,请登录");
|
|
|
finish();
|
|
|
}
|
|
|
});
|
|
|
@@ -158,7 +161,7 @@ public class RechargeAct extends BaseActivity {
|
|
|
// todo 出口二
|
|
|
UserEntity user = DataUtil.getInstance().getUserEntity();
|
|
|
if (user == null) {
|
|
|
- Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, null, "请登录");
|
|
|
+ Jump2View.getInstance().goRechargeResult(RechargeAct.this, "9002", fromPackage, fromOrient, null, "请登录");
|
|
|
finish();
|
|
|
return;
|
|
|
}
|
|
|
@@ -310,7 +313,7 @@ public class RechargeAct extends BaseActivity {
|
|
|
}
|
|
|
if (forResult) {
|
|
|
String result = resp.respCode.equals("00") ? "9000" : resp.respCode;
|
|
|
- Jump2View.getInstance().goRechargeResult(RechargeAct.this, result, fromPackage, null);
|
|
|
+ Jump2View.getInstance().goRechargeResult(RechargeAct.this, result, fromPackage, fromOrient, null);
|
|
|
} else {
|
|
|
String result = resp.respCode.equals("00") ? "9000" : resp.respCode;
|
|
|
Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, result);
|
|
|
@@ -329,6 +332,9 @@ public class RechargeAct extends BaseActivity {
|
|
|
return;
|
|
|
}
|
|
|
String attach = jsonObject.getString("attach").split("_")[1];
|
|
|
+ QQUtil.saveWxPayFrom(SheepApp.getInstance(), jsonObject.getString("prepayid"), fromPackage);
|
|
|
+ QQUtil.saveWxPayOrderNo(SheepApp.getInstance(), jsonObject.getString("prepayid"), "");
|
|
|
+ QQUtil.saveWxPayOrient(SheepApp.getInstance(), jsonObject.getString("prepayid"), fromOrient);
|
|
|
CommonUtil.getInstance().wxpay(SheepApp.getInstance().getWxApi(this, attach), jsonObject);
|
|
|
finish();
|
|
|
}
|
|
|
@@ -371,7 +377,7 @@ public class RechargeAct extends BaseActivity {
|
|
|
setResult(777, intent);
|
|
|
} else {
|
|
|
if (forResult) {
|
|
|
- Jump2View.getInstance().goRechargeResult(RechargeAct.this, result, fromPackage, null);
|
|
|
+ Jump2View.getInstance().goRechargeResult(RechargeAct.this, result, fromPackage, fromOrient, null);
|
|
|
} else {
|
|
|
Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, result);
|
|
|
}
|