ajax
2018-06-19 本文已影响6人
Web的美容师
$.ajax({
url: 'http://m.uzhuang.com/index.php?m=wap&f=zxkt_index&v=guess_you_like',
type: 'get',
dataType: 'json',
data: {},
success: function(res) {
// console.log(res.data)
if (res.code == 0) {
var data = res.data
var list = template('template-box', {
data: data
})
$('#box').html(list)
$(".container_biaot").click(function() {
window.location.href = res.data.url
});
} else {
console.log(res.message)
}
},
error: function(err) {
console.log(err)
}
});
