ng28南宫国际app下载成为国际米兰的官方合作伙伴IP
新闻纵横 / 滚动新闻 / 看丹观察ng28南宫国际app下载成为国际米' + o[i].name + '
', i % 4 == 3) yanjianSwiper.createSlide(c, "swiper-slide", "div").append() } yanjianSwiper.swipeTo(0, 0, !1) } } else { console.log(response.message) } } else { console.log(response.code) } }); $.ajax({ url: "/__xh__/pacc.cnr.cn/ygw/getlivebytype?chanType=1&pageIndex=1&perPage=5", method: "get", success: function (data) { var result = JSON.parse(data); if (result.code == 200) { var list = result.data.categories[0].detail; $('.middle .intro').eq('0').text(list[0].other_info5); $('.s1 a').text(list[0].other_info5); } } }); //二维码分享 $(document).on('click', '.btn_towcode', function () { var number = $(this).children().length; $('.btn_towcode').empty(); if (number == 0) { $(this).append('
') } return false }); $(document).on('click', function (evt) { $('.btn_towcode').empty(); }); var $liveList = $('#live_list') var radio = new CRadio('.voice-wrapper', { continuous: true, //连续播放 loop: false, // 禁止循环播放 controls: { playBtn: '.voice-btn-play', prevBtn: '.voice-btn-prev', nextBtn: '.voice-btn-next', muteBtn: '.voice-btn-mute', totalTime: '.voice-time-total', currentTime: '.voice-time-current', currentTitle: '.voice-title', volumeProgress: '.voice-volume-progress', audioProgress: '.voice-audio-progress', }, watchState: watchStateHandler }) function watchStateHandler(states) { //console.log('watchState', states) if (states.isPlay) { // 正在播放 $(LiveChannelSwiper.slides).removeClass('current'); if (states.live) { // 是直播 $(LiveChannelSwiper.slides).eq(states.currentIndex).addClass('current') if (states.currentIndex == 0) { $button1.addClass('current'); } } else { // 录播 mediaObj = { //"title": states.title, "appId": "ygwpc", "createTime": getYMDHMS(new Date()), "progress": states.audioObj.currentTime * 1000, "duration": states.audioObj.duration * 1000, "info": states.url, "operationType": "b3", "objectId": states.id, "objectType": "1001", "parentId":states.parentId, } currentTitle = states.title; $('.sound').eq(states.currentIndex).parents('.content').find('.live').show(); $('.sound').eq(states.currentIndex).parents('p').addClass('selected') $('.sound').eq(states.currentIndex).addClass('current') } } else { // 暂停 if (states.live) { // 直播 $button1.removeClass('current'); $(LiveChannelSwiper.slides).eq(states.currentIndex).removeClass('current') } else {console.log(mediaObj) // 录播 mediaObj.progress = states.audioObj.currentTime * 1000; $('.sound').eq(states.currentIndex).parents('.content').find('.live').hide(); $('.sound').eq(states.currentIndex).parents('p').removeClass('selected') $('.sound').eq(states.currentIndex).removeClass('current') //sendData() if (mediaObj.objectId) { sendData() } } } } $('.wrapper').on('click', '.sound', function () { var $this = $(this) var CURRENT = "record" var index = $soundList.index($this) if (currentTitle == $this.prev().text() && $this.hasClass('current')) { radio.pause() } else { if (lastRadioLoad !== CURRENT) { // 需要重新load radio.reload(dataArray) lastRadioLoad = CURRENT } radio.jump(index) } }) function getAllSound() { $soundList = $('.sound'); var regex = new RegExp(/_(\d+).s?html/); dataArray = $.map($soundList, function (ele, index) { var $a = $(ele).prev('a') var obj = {} var href = $a.attr('href'); var id = regex.exec(href) ? regex.exec(href)[1] : '' if ($a.attr('data-audioUrl')) { obj.title = $a.text() obj.url = $a.attr('data-audioUrl').replace('.m3u8', '.mp3'); obj.live = false; obj.id = $a.attr('id') ? $a.attr('id') : id; obj.parentId = $a.attr('parentId') ? $a.attr('parentId') : ""; return obj } else { obj.title = $a.text() || '暂无标题' obj.url = $a.attr('href') ? pareseUrl($a.attr('href')) : '/sources/20210420_CNRRevision/demo1.mp3' obj.live = false; obj.id = id; obj.parentId = ""; return obj } }) if (lastRadioLoad == "record") { // 需要重新load radio.load(dataArray) } } var $button1 = $('.button1'); var LiveChannelSwiper = new Swiper('#LiveChannel-swiper', { slidesPerView: 'auto', onSlideClick: function (mySwiper) { $soundList.removeClass('current') var index = $(LiveChannelSwiper.clickedSlide).index(); lastRadioLoad = 'live' radio.reload(channelList) radio.jump(index) } }); $.ajax({ url: '/__xh__/pacc.cnr.cn/ygw/getlivebytype', method: 'get', dataType: 'JSON', data:{ chanType: 1, pageIndex: 1, perPage: 100 } }) .done(function(resp, statusText, xhr){ if(resp.code == "200") { var details = resp.data.categories[0].detail for (var i = 0, len = details.length; i < len; i++) { var str = '
' + '' + '
' + details[i].name + '
' + '
'; var newSlide = LiveChannelSwiper.createSlide(str, 'swiper-slide', 'div'); newSlide.append(); channelList.push({ title: details[i].name, img: details[i].other_info6, url: details[i].other_info11[2].url, live: true, ele: $(str), objectId: details[i].id, objectType: details[i].newsType, parentId: details[i].parentId }) } } else { console.log(result.message) } }) var isInpage = false; $button1.click(function () { if ($(this).hasClass('current')) { radio.pause() } else { $liveList.css({ opacity: 1.0, visibility: "visible" }) lastRadioLoad = 'live' radio.reload(channelList) radio.jump(0) } }); $("#LiveChannel-left").click(function () { LiveChannelSwiper.swipePrev() }); $("#LiveChannel-right").click(function () { LiveChannelSwiper.swipeNext() }); // for (var i = 0, len = channelList.length; i < len; i++) { // var str = '
' + // '' + // '
' + channelList[i].title + '
' + // '
'; // LiveChannelSwiper.appendSlide(str); // } $('#LiveChannel-close').click(function () { $liveList.css({ opacity: 0, visibility: "hidden" }) }) $('.radio-live').click(function () { $liveList.css({ opacity: 1.0, visibility: "visible" }) }) function sendData() { $.ajax({ url: '/__xh__/iprofile.cnr.cn/businessAnalysis', type: 'post', headers: { "accesstoken": "6vA437b6vqetx6loJh/tAkYGbs82bvaelRmr+toQep9HsOiUQMzSTnnHIS9gTRQUrvr5e5y63yeEZhDZg3WRen7p6pdqevDfwJaLUfHjPS4=", }, data: JSON.stringify(mediaObj), success: function (data) { console.log(data) } }) } var getYMDHMS = function (timestamp) { let time = timestamp let year = time.getFullYear() let month = time.getMonth() + 1 let date = time.getDate() let hours = time.getHours() let minute = time.getMinutes() let second = time.getSeconds() if (month < 10) { month = '0' + month } if (date < 10) { date = '0' + date } if (hours < 10) { hours = '0' + hours } if (minute < 10) { minute = '0' + minute } if (second < 10) { second = '0' + second } return year + '-' + month + '-' + date + ' ' + hours + ':' + minute + ':' + second; } function pareseUrl(url) { var audioUrl = '' var regExp = /\/t(\d+)_(\d+)\.s?html/; if (regExp.test(url)) { var exec = regExp.exec(url) audioUrl = '/__xh__/audioweb.cnr.cn/' + RegExp.$1 + '/' + RegExp.$2 + '/1.mp3' //audioUrl = '/__xh__/audioweb.cnr.cn/' + RegExp.$1 + '/' + RegExp.$2 + '/index1.m3u8' } return audioUrl } $('.ipList li').hover(function () { $(this).addClass('selected'); }, function () { $(this).removeClass('selected'); }); // 图片懒加载 $.lazyImg(); })

相关阅读

以下内容与「ng28南宫国际app下载成为国际米兰的官方合作伙伴」同属公开资讯,可按栏目扩展阅读相关条目。 相关阅读

本站按公开材料组织页面。需要原文时请核对应栏目发布页。

列表适合快速定位,正文适合核对表述。 相关阅读两者都保留在站内即可形成完整阅读路径。

栏目入口

新闻纵横 / 滚动新闻 / 看丹观察 / 晶采观察

公开资讯滚动更新。建议通过站内栏目继续浏览,核对最新条目。