<script>
var data = {};
data.email = "abc@gmail.com";
data.password = "123abc";
data.mobile = "1234567890";
data = encodeURIComponent(window.btoa(JSON.stringify(data)));
console.log(data);
</script>
输出:eyJlbWFpbCI6InNqc2hpdjA0MDNAZ21haWwuY29tIiwicGFzc3dvcmQiOiJiaHV3YW45OTc2IiwibW9iaWxlIjoiODgyMzg0MTU1NCJ9
我需要在android中使用 encodeURIComponent(window.btoa(JSON.stringify(data)))。您可以在控制台中检查此部分的输出。提前谢谢