网上说的什么:escape 、encodeURI、encodeURIComponent 都不行!!!
解决办法:
直接上代码:
$.ajax({
type: "POST",
url: "/wxmpapi/v1/getStartResponse",
data: {loginId:${loginId},openId:'${openId}',stationName:'${stationName}',stationAddress:'${stationAddress}'},
dataType: "json",
success: function (rs) {
if (rs == '1') {
// 启动成功
if (respTimer != null) {
clearInterval(respTimer);
}
gotoChargeDetailPage();
}
}
});
凡事包含特殊字符“# + _。。。。。”、汉字等参数的地方,均使用单引号'' 标起来。
比如代码中的:
data: {loginId:${loginId},openId:'${openId}',stationName:'${stationName}',stationAddress:'${stationAddress}'},
OK了~~~~~~