|
@@ -35,6 +35,8 @@ import com.xuan.xuanhttplibrary.okhttp.callback.BaseCallback;
|
|
|
import com.xuan.xuanhttplibrary.okhttp.result.ObjectResult;
|
|
|
import com.xuan.xuanhttplibrary.okhttp.result.Result;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+
|
|
|
import okhttp3.Call;
|
|
|
|
|
|
|
|
@@ -92,7 +94,7 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
String money = mEdtPacketMoney.getText().toString();
|
|
|
String words = mEdtRemark.getText().toString();
|
|
|
PaySecureHelper.inputPayPassword(getActivity(), getString(R.string.chat_redpacket), money, password -> {
|
|
|
- sendRedPacket(String.valueOf(tvRedPacketType), money, String.valueOf(mRedPacketCount), words, password);
|
|
|
+ sendRedPacket(String.valueOf(mRedPacketType), money, String.valueOf(mRedPacketCount), words, password);
|
|
|
});
|
|
|
}else {
|
|
|
setPayPassword();
|
|
@@ -223,7 +225,7 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
}
|
|
|
|
|
|
//获取发送红包不同的参数
|
|
|
- protected abstract ArrayMap<String, String> getSendRedPacketParameters();
|
|
|
+ protected abstract HashMap<String, String> getSendRedPacketParameters();
|
|
|
|
|
|
|
|
|
private void sendRedPacket(final String type, String pMoney, String count, final String words, String payPassword) {
|
|
@@ -231,14 +233,16 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
return;
|
|
|
}
|
|
|
DialogHelper.showDefaulteMessageProgressDialog(getActivity());
|
|
|
- ArrayMap<String, String> params = getSendRedPacketParameters();
|
|
|
+ HashMap<String, String> params = getSendRedPacketParameters();
|
|
|
if (params==null){
|
|
|
- params = new ArrayMap<>();
|
|
|
+ params = new HashMap<>();
|
|
|
}
|
|
|
- params.put("access_token", coreManager.getSelfStatus().accessToken);
|
|
|
+// params.put("access_token", coreManager.getSelfStatus().accessToken);
|
|
|
params.put("moneyStr", pMoney);
|
|
|
params.put("greetings", words);
|
|
|
- params.put("count",String.valueOf(mRedPacketCount));
|
|
|
+ params.put("count",count);
|
|
|
+ params.put("type",type);
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -270,7 +274,8 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
message.setObjectId(objectId); // 红包id
|
|
|
Intent intent = new Intent();
|
|
|
intent.putExtra(AppConstant.EXTRA_CHAT_MESSAGE, message.toJsonString());
|
|
|
-// getActivity().setResult(viewPager.getCurrentItem() == 0 ? ChatActivity.REQUEST_CODE_SEND_RED_PT : ChatActivity.REQUEST_CODE_SEND_RED_KL, intent);
|
|
|
+
|
|
|
+ getActivity().setResult(mRedPacketType !=4 ? ChatActivity.REQUEST_CODE_SEND_RED_PT : ChatActivity.REQUEST_CODE_SEND_RED_KL, intent);
|
|
|
getActivity().finish();
|
|
|
}
|
|
|
}
|