|
|
|
@ -181,7 +181,7 @@ $(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//上传文件
|
|
|
|
|
//excel导出抓取
|
|
|
|
|
$('#contentbyexcel').click(function(){
|
|
|
|
|
var fileArray = document.getElementById("file_excel").files;
|
|
|
|
|
var formData = new FormData();
|
|
|
|
@ -208,20 +208,42 @@ $(function(){
|
|
|
|
|
html += '<p>'+jsondata[i].list_data[j][0]+'</p>';
|
|
|
|
|
html += '<p>团名:'+jsondata[i].list_data[j][1]+'</p>';
|
|
|
|
|
html += '<p>导游:'+jsondata[i].list_data[j][2]+'</p>';
|
|
|
|
|
html += '<p id="reviews_user_'+num+'"></p>';
|
|
|
|
|
html += '<p id="reviews_loc_'+num+'"></p>';
|
|
|
|
|
html += '<p id="reviews_stars_'+num+'"></p>';
|
|
|
|
|
html += '</div>';
|
|
|
|
|
html += '<div class="col-md-20">';
|
|
|
|
|
html += '<p id="excel_title_'+num+'"></p>';
|
|
|
|
|
html += '<p id="excel_reviewed_'+num+'"></p>';
|
|
|
|
|
html += '<p id="excel_content_'+num+'"></p>';
|
|
|
|
|
html += '<p id="excel_pic_'+num+'"></p>';
|
|
|
|
|
html += '<p id="excel_vistiedtime_'+num+'"></p>';
|
|
|
|
|
ta_url = jsondata[i].list_data[j][3];
|
|
|
|
|
//console.log(ta_url);
|
|
|
|
|
if(ta_url.indexOf('ShowUserReviews') != -1){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'/info.php/apps/tripadvisor_spider/index/get_reviews_detail',
|
|
|
|
|
data:{url:ta_url,html_num:num,destination:jsondata[i].list_data[j][0],group_name:jsondata[i].list_data[j][1]},
|
|
|
|
|
data:{url:ta_url,html_num:num,destination:jsondata[i].list_data[j][0],group_name:jsondata[i].list_data[j][1],guidename:jsondata[i].list_data[j][2]},
|
|
|
|
|
success:function(json_detail,status){
|
|
|
|
|
var data = $.parseJSON(json_detail);
|
|
|
|
|
$('#excel_title_'+data.html_id).html(data.title);
|
|
|
|
|
$('#excel_content_'+data.html_id).html(data.content);
|
|
|
|
|
$('#reviews_user_'+data.html_id).html('评论用户:'+data.review_name);
|
|
|
|
|
$('#reviews_loc_'+data.html_id).html('评论用户地区:'+data.user_loc);
|
|
|
|
|
$('#excel_reviewed_'+data.html_id).html('Reviewed:'+data.rating_date);
|
|
|
|
|
$('#excel_vistiedtime_'+data.html_id).html('Date of experience:'+data.experience_date);
|
|
|
|
|
var stars_html = '';
|
|
|
|
|
for(var i=0;i<data.star_nums;i++){
|
|
|
|
|
stars_html += '<span class="glyphicon glyphicon-star"></span>';
|
|
|
|
|
}
|
|
|
|
|
$('#reviews_stars_'+data.html_id).html('星级:'+stars_html);
|
|
|
|
|
if($.parseJSON(data.pic).length > 0){
|
|
|
|
|
var pic_html = '';
|
|
|
|
|
for(var j=0;j<$.parseJSON(data.pic).length;j++){
|
|
|
|
|
pic_html += '<p><a href="'+$.parseJSON(data.pic)[j]+'" target="_blank"><img src="'+$.parseJSON(data.pic)[j]+'"/></a></p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$('#excel_pic_'+data.html_id).html(pic_html);
|
|
|
|
|
console.log(html);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|