标签:cli cal hone cti call param function index.php host
function from_reg_phone(user_id,phone){
var mehtod = "<?=base64_encode("reg_phone")?>";
var j = "mehtod="+mehtod+"&user_id="+user_id+"&phone="+phone;
$.ajax({
type: ‘GET‘, //这里用GET
url: ‘<?=Yii::$app->params[‘hosts‘]."/index.php?r=verify/phonemsg"?>‘,
dataType: ‘jsonp‘, //类型
data: j,
jsonp: ‘callback‘, //jsonp回调参数,必需
async: false,
success: function(result) {//返回的json数据
if(result.re == "success"){
ye_msg.open(result.msg,2,1);
window.location.reload();
}else if(result.re == "fail"){
ye_msg.open(result.msg,2,2);
}else if(result.re == "error_phone"){
ye_msg.open(result.msg,2,2);
}else if(result.re == "protect_null"){
ye_msg.open(result.msg,2,2);
}
},
timeout: 3000
});
from_reg_phone = clickTwo;
return false;
}
标签:cli cal hone cti call param function index.php host
原文地址:http://www.cnblogs.com/too123/p/7029099.html