|
[superwebview]
ajax苹果data里接收不到传递的参数,安卓可以
[复制链接]
var tel = $(".hao").val()
api.ajax({
url: 'http://vip**.**/index/Index/applogin_getcode.html',
method: 'POST',
timeout: 30,
dataType: 'json',
returnAll: false,
data: {
values: {
tel: tel //这个tel是空取不到,但是安卓可以,苹果却不行
}
}
}, function (e) {
console.log(JSON.stringify(e), tel)
if (e.code == '1') {
} else {
api.alert({
msg: e.msg
});
}
})
苹果手机data-values-tel里的tel无法接收参数,
其他所有的传参都不能执行
只有这样写的时候tel才能传到后台
api.ajax({
url: 'http://vip**.**/index/Index/applogin_getcode.html?tel='+tel,
method: 'POST',
timeout: 30,
dataType: 'json',
returnAll: false,
}, function (e) {
console.log(JSON.stringify(e), tel)
if (e.code == '1') {
} else {
api.alert({
msg: e.msg
});
}
})
这个问题怎么解决
|
|