'
+ '
'
+ ' 冀时新闻
'
+ ' ' + templateSDK.dateFormatAddCalc({ date: item.publishtime, format: 'YYYY-MM-DD HH:mm' }) + '
'
+ ' '
+ '
'
+ (imgs ? '' + text + '
' +''
+'
'
+ ' ...
'
+`展开
`
+'' + imgs + '
' : '')
+ (videos ? '' + videos + '
' : '')
+ '
冀时新闻
');
}
}
//showLive(data.data)
$('#launch-btn').attr('extinfo', '{"id":"' + data.data.articleId + '","type":"15","url":"' + data.data.h5Url + '"}')
templateSDK.wx_share({ share_title: data.data.title, share_summary: data.data.intro, share_logo:data.data.shareThumbnail || data.data.imagepath });
//}
},
error: function () {
// getLiveDetailNew()
}
})
//直播Websocket
templateSDK.liveWebsocket({ id: articleId, callBack: wsMessage })
//访问量增加
// let timer = getRandomNumber(0, 3000);
// setTimeout(function () {
// $.ajax({
// url: apiUrl + '/cmsapi/api/content/read?article_id=' + articleId + '&tenantid=' + tenantId + '&type=1',
// method: 'get',
// }).then(res => {
// if (res.state) {
// $(".hitCount").html((res.data.reads_format || 0) + '人次观看');
// }
// })
// }, timer)
}
onLoadFn()
function showGoodsData() {
$('.shopModel').removeClass('slideDown');
$('.shopModel').addClass('slideUp');
if (goodsData.length > 0) {
renderGoods(goodsData)
} else {
$.ajax({
url: apiUrl + '/cms/api/micro/live/productBindList',
type: 'get',
headers: {
"Content-Type": "application/json;charset=utf-8",
'tenantId': tenantId,
},
data: {
dataType: 'page',
liveId: articleId,
// tenantId: '4bf814b5cd921e2b38adb414e6b8303',
pageNumber: 1,
pageSize: 200,
},
success: function (res) {
if (res.state == 200 || res.state == "200") {
goodsData = res.data
renderGoods(res.data)
}
}
})
}
}
function renderGoods(goodsData) {
let goodsHtml = ''
if (goodsData.length == 0) {
goodsHtml = '
讲解中
讲解中
${data.msg.nickName}:${data.msg.content}