|
@@ -7,6 +7,7 @@ import android.text.Editable;
|
|
|
import android.text.TextUtils;
|
|
|
import android.text.TextWatcher;
|
|
|
import android.util.ArrayMap;
|
|
|
+import android.util.Log;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewStub;
|
|
|
import android.widget.EditText;
|
|
@@ -56,6 +57,7 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
protected TextView tvSendRedPacket;
|
|
|
protected TextView tvRedPacketType;
|
|
|
private ImageView ivIconPin;
|
|
|
+ protected String mRoomId;
|
|
|
protected LinearLayout lytRemark;
|
|
|
protected String mRedPacketAcceptorId; //红包接收对象id 可以是roomId,也可以是userId
|
|
|
|
|
@@ -78,10 +80,13 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
@Override
|
|
|
protected void onActivityCreated(Bundle savedInstanceState, boolean createView) {
|
|
|
if (createView) {
|
|
|
- initView();
|
|
|
- if (isGroupChatType() && getArguments()!=null){
|
|
|
- mGroupMemberNumber = getArguments().getInt(SendRedPacketActivity.INTENT_GROUP_MEMBER_NUMBER);
|
|
|
+ Bundle bundle = getArguments();
|
|
|
+ if (isGroupChatType() && bundle!=null){
|
|
|
+ mRoomId =bundle.getString(SendRedPacketActivity.INTENT_ROOM_ID);
|
|
|
+ mGroupMemberNumber = bundle.getInt(SendRedPacketActivity.INTENT_GROUP_MEMBER_NUMBER);
|
|
|
}
|
|
|
+ initView();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -263,7 +268,12 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
return;
|
|
|
}
|
|
|
DialogHelper.showDefaulteMessageProgressDialog(getActivity());
|
|
|
- HashMap<String, String> params = getSendRedPacketParameters();
|
|
|
+ HashMap<String, String> params;
|
|
|
+ if (isExclusiveType()){
|
|
|
+ params = new HashMap<>();
|
|
|
+ }else {
|
|
|
+ params = getSendRedPacketParameters();
|
|
|
+ }
|
|
|
if (params==null){
|
|
|
params = new HashMap<>();
|
|
|
}
|
|
@@ -287,6 +297,10 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
DialogHelper.dismissProgressDialog();
|
|
|
ToastUtil.showToast(getContext(), getActivity().getString(R.string.tip_pay_secure_place_holder, t.getMessage()));
|
|
|
}, (p, code) -> {
|
|
|
+ if (isExclusiveType()){
|
|
|
+ HashMap<String,String> hashMap = getSendRedPacketParameters();
|
|
|
+ p.putAll(hashMap);
|
|
|
+ }
|
|
|
HttpUtils.get().url(coreManager.getConfig().REDPACKET_SEND)
|
|
|
.params(p)
|
|
|
.build()
|
|
@@ -323,4 +337,8 @@ public abstract class BaseRedPacketFragment extends EasyFragment {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ public boolean isExclusiveType(){
|
|
|
+ return mRedPacketType == 4;
|
|
|
+ }
|
|
|
+
|
|
|
}
|