微信卡券核销
chbwl 2016-08-26 07:59:48 lib.inc.php代码
public function getCardDetail(){
// if(!IS_POST){
// $this->error('非法请求');
// }
if(!isset($_POST['encrypt_code'])){
$access_token = $this->wxAccessToken();
$url4 = 'https://api.weixin.qq.com/card/get?access_token='.$access_token; //批量卡券详情
$s = json_encode(array('card_id'=>$_POST['card_id']));
$r = $this->http_post_data($url4,$s);
echo $r[1];
// p(json_decode($r[1],true));
}
}
html代码
$.ajax({
type: 'post',
url: ,
data: {
card_id: choose_card_info[0].card_id
},
dataType: 'json',
success: function(da)
--------------------------------------------------------------
我想知道html里面的 ajax怎么写,吧choose_card_info[0].card_id的数据传到lib.inc.php里面执行getCardDetail(),然后把处理的结果再返回给这个ajax继续做下面的处理