|
|
@@ -32,6 +32,8 @@ import com.uuzuche.lib_zxing.activity.CodeUtils;
|
|
|
import org.json.JSONException;
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -225,15 +227,19 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
|
|
|
|
|
|
JSONObject paramJson = new JSONObject();
|
|
|
try {
|
|
|
- paramJson.put("whcode", strWhcode);
|
|
|
- paramJson.put("code ", strCode);
|
|
|
+ paramJson.put("whcode",URLEncoder.encode(strWhcode, "UTF-8"));
|
|
|
+ paramJson.put("code", URLEncoder.encode(strCode, "UTF-8"));
|
|
|
paramJson.put("type", type);
|
|
|
- } catch (JSONException e) {
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
//请求条码数据
|
|
|
requestType = VolleyUtil.FRAGMETN_WHTRANSFER_DATA;
|
|
|
- VolleyUtil.getVolleyUtil().requestCodeData(getActivity(), GloableParams.ADDRESS_WHTRANSFER_DATA, VolleyUtil.METHOD_GET, requestType, strWhcode, strCode, type);
|
|
|
+ try {
|
|
|
+ VolleyUtil.getVolleyUtil().requestCodeData(getActivity(), GloableParams.ADDRESS_WHTRANSFER_DATA, VolleyUtil.METHOD_GET, requestType, URLEncoder.encode(strWhcode, "UTF-8"), URLEncoder.encode(strCode, "UTF-8"), type);
|
|
|
+ } catch (UnsupportedEncodingException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//转移按钮点击事件/etNewLocation回车事件
|