|
@@ -153,13 +153,15 @@ function initJrttList(data) {
|
|
|
$('#jrttList').empty();
|
|
|
var html = '';
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- html += '<div class="news-item" onclick="openUrl(\''+ data[i].url +'\')">'
|
|
|
+ // html += '<div class="news-item" onclick="openUrl(\''+ data[i].url +'\')">'
|
|
|
+ html += '<div class="news-item" data-url="' + data[i].url + '">'
|
|
|
+' <div class="jigou"><span>'+ data[i].officialAccount +'</span></div>'
|
|
|
+' <p>'+ data[i].title +'</p>'
|
|
|
+' <span class="time">'+ data[i].createTime +'</span>'
|
|
|
+' </div>';
|
|
|
}
|
|
|
$('#jrttList').append(html)
|
|
|
+ jrttClick();
|
|
|
}
|
|
|
|
|
|
function wechartClick(that) {
|
|
@@ -500,6 +502,17 @@ function renderBoxNav() {
|
|
|
$('.box-nav').empty().append(html);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 几日头条点击事件
|
|
|
+ */
|
|
|
+function jrttClick() {
|
|
|
+ $('#jrttList .news-item').click(function () {
|
|
|
+ console.log($(this));
|
|
|
+ console.log($(this).attr('data-url'));
|
|
|
+ window.open($(this).attr('data-url'))
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
function diffDays(date,days){
|
|
|
var nd = new Date(date);
|
|
|
nd = nd.valueOf();
|