登录时把encryptedData发送给后端
wx.request({
url:‘http://127.0.0.1:5000/user/login/’,
header:{
‘content-type’:‘application/x-www-form-urlencoded’,
},
method:‘POST’,
data: “js_code=” + res.code + “&iv=” + data.iv + “&encryptedData=” + data.encryptedData,
success:function(mm) {
console.log(mm);
}
});
前端打印encryptedData为
NsKS5dLYpXjqtwP/0v3mMJCwg7EsFzYRDx/zqfDEU9+14RZdd4VT6dmREe/ugBE0iDwXmnoWXTtHQ81FQ4BqofeiyU1t6eTBtnP3BIv9dcC2uPAxGdBpbE0OsLwilnpMA+qt0nhJ+5OWNvEoBx0NVTwZFs9Ncq+ZkFhDtkqlhCe+FZBvecfROWSwhf9XjRHCXmQucGAOgrs9IsHmnefaUt66Wg5W3hLjS2/OX8za6Uo3J10haY4kaXDIBwyiiww7LjO70QB43H709f/zzUkns2k7BkEFrzbTrvdnSOj7hz4bwtt5V+VOQ07BYncwDixtoFXA1641S1JQQ7pMbGy9lp1XMKgu097Ad1Mad3evt/+vgpE4rzn3WTHgB+g6t/uPqU04G0Wl3Q5tKpY4Qfya4XkLB0Kz2AZkdCssci0JzzFw+vSfBN2VcpdiYFLAy1Rd
后端接受打印为
NsKS5dLYpXjqtwP/0v3mMJCwg7EsFzYRDx/zqfDEU9 14RZdd4VT6dmREe/ugBE0iDwXmnoWXTtHQ81FQ4BqofeiyU1t6eTBtnP3BIv9dcC2uPAxGdBpbE0OsLwilnpMA qt0nhJ 5OWNvEoBx0NVTwZFs9Ncq ZkFhDtkqlhCe FZBvecfROWSwhf9XjRHCXmQucGAOgrs9IsHmnefaUt66Wg5W3hLjS2/OX8za6Uo3J10haY4kaXDIBwyiiww7LjO70QB43H709f/zzUkns2k7BkEFrzbTrvdnSOj7hz4bwtt5V VOQ07BYncwDixtoFXA1641S1JQQ7pMbGy9lp1XMKgu097Ad1Mad3evt/ vgpE4rzn3WTHgB g6t/uPqU04G0Wl3Q5tKpY4Qfya4XkLB0Kz2AZkdCssci0JzzFw vSfBN2VcpdiYFLAy1Rd
“+”号全变成了空格,请问如何解决