1.测试了好久,用网页都可以访问,但是用手机访问却没有数据
2.代码如下:
$.post(head, {
startTime:startTime,
endTime:endTime
},function (resData, textStatus, jqXHR) {
showInfo(resData.data)
})
或者
$.ajax({
url: head,
type: "POST",
async: true,
dataType:'text',
contentType: 'text/html',
options: {
'Access-Control-Allow-Origin': '*',
'Pragma': 'No-cache'
},
data: {
startTime:startTime,
endTime:endTime
},
success: function (resData) {
if (resData.result == '0'){
showInfo(resData.data)
}else {
$.alert('请求失败,请刷新重试!')
}
},
error: function (e) {
$.alert('请求失败,请刷新重试!'+e)
}
})
3.还是移动端没有数据,它并没有跳到success,不知道哪位大侠可以帮忙解答?
调试呗,下载个微信开发者工具