wx.request({ url: 'wxapp.php', data: { x: '12' , y: '34'
}, header: { 'Content-Type': 'application/json'
}, success: function(res) {
console.log(res.data)
}
})php:<?php$x=$_GET['x'];
$y=$_GET['y'];
$z=['x'=>$x,'y'=>$y];echo json_encode($z);当 data: { x: '12' ,
y: '34'
}返回1234当 data: { x: '123' ,
y: '343'
}返回Object {x: "123", y: "343"}再次修改 data: { x: '12' ,
y: '34'
}编译,清空缓存,重启返回1234这是怎么一种情况?
添加回答
举报
0/150
提交
取消