| | |
| | | "use strict"; |
| | | var startInfoPlayVideo = function() { |
| | | var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(actid, code) { |
| | | var sadata, userName, token, cookiedata, result, ppToken, PPKey, PPName, UDI, udi, udiarr, UDR; |
| | | return regeneratorRuntime.wrap(function(_context) { |
| | | for (;;) switch (_context.prev = _context.next) { |
| | | case 0: |
| | | return _context.next = 2, shadowAccount(actid, code); |
| | | case 2: |
| | | if (sadata = _context.sent, console.info("shadowAccount:", sadata), "0" == sadata.errorcode) { |
| | | _context.next = 8; |
| | | break |
| | | } |
| | | playVideo(), _context.next = 19; |
| | | break; |
| | | case 8: |
| | | if (userName = sadata.userName, token = sadata.token, VIDEO_INFO.userName = userName, VIDEO_INFO.token = |
| | | token, $.cookie("PPName", userName, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), $.cookie("ppToken", token, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), userName && token) return _context.next = 16, cookiesQuery(sadata.userName, sadata.token); |
| | | _context.next = 19; |
| | | break; |
| | | case 16: |
| | | cookiedata = _context.sent, "0" == cookiedata.errorCode && (result = cookiedata.result, ppToken = result.ppToken, |
| | | PPKey = result.PPKey, PPName = result.PPName, UDI = result.UDI, udi = decodeURIComponent(UDI), udiarr = |
| | | udi.split("$"), (UDR = udiarr[udiarr.length - 1]) && (UDR = (UDR = UDR.replace(/\'/g, "")).replace( |
| | | /(\w+)(\:)(\w+)/g, '"$1":"$3"')), VIDEO_INFO.ppToken = ppToken, VIDEO_INFO.PPKey = PPKey, VIDEO_INFO.PPName = |
| | | PPName, VIDEO_INFO.UDI = UDI, VIDEO_INFO.UDR = UDR, $.cookie("PPKey", PPKey, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), $.cookie("UDI", UDI, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), $.cookie("UDR", UDR, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), onNotification(VIDEO_INFO)), playVideo(); |
| | | case 19: |
| | | case "end": |
| | | return _context.stop() |
| | | } |
| | | }, _callee, this) |
| | | })); |
| | | return function(_x3, _x4) { |
| | | return _ref.apply(this, arguments) |
| | | } |
| | | }(); |
| | | #Sample Logstash configuration for creating a simple |
| | | # Beats - > Logstash - > Elasticsearch pipeline. |
| | | |
| | | function _toConsumableArray(arr) { |
| | | if (Array.isArray(arr)) { |
| | | for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; |
| | | return arr2 |
| | | input { |
| | | beats { |
| | | port => 5044 |
| | | } |
| | | return Array.from(arr) |
| | | } |
| | | |
| | | function _asyncToGenerator(fn) { |
| | | return function() { |
| | | var gen = fn.apply(this, arguments); |
| | | return new Promise(function(resolve, reject) { |
| | | return function step(key, arg) { |
| | | try { |
| | | var info = gen[key](arg), |
| | | value = info.value |
| | | } catch (error) { |
| | | return void reject(error) |
| | | filter { |
| | | |
| | | ruby { |
| | | code => "event.set('timestamp', event.get('@timestamp').time.localtime + 8*60*60)" |
| | | } |
| | | ruby { |
| | | code => "event.set('@timestamp',event.get('timestamp'))" |
| | | } |
| | | if [fields][app] == "buwan" { |
| | | if [fields][type] == "videoPlay" { |
| | | grok { |
| | | match => { |
| | | "message" => |
| | | "%{TIMESTAMP_ISO8601:time}\s*\[%{DATA:thread}\]\s*%{LOGLEVEL:logLevel}\s*%{WORD:logName}\s*-\s*%{WORD:method}\:%{NUMBER:detailSystemId}#%{NUMBER:videoId}#" |
| | | } |
| | | if (!info.done) return Promise.resolve(value).then(function(value) { |
| | | step("next", value) |
| | | }, function(err) { |
| | | step("throw", err) |
| | | }); |
| | | resolve(value) |
| | | }("next") |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | function ModThridMovTemp(index, data) { |
| | | try { |
| | | var tempcont = data.tempcont, |
| | | statistics = tempcont.statistics, |
| | | height = tempcont.height, |
| | | newdata = JSON.stringify(Object.assign({}, { |
| | | index: index, |
| | | statistics: statistics, |
| | | height: height |
| | | })), |
| | | html = '<div class="layout layout' + index + '" index="' + index + '" id="' + statistics + '" sap-modid="' + |
| | | statistics + '" newdata="' + (newdata = newdata.replace(/\"/gi, "'")) + '" style="height:56.25vw;"></div>'; |
| | | $("#main-laycontent").append(html); |
| | | var ppi = void 0 === $.cookie("ppi") ? "" : $.cookie("ppi"), |
| | | _tempcont$paylink = tempcont.paylink, |
| | | paylink = void 0 === _tempcont$paylink ? "" : _tempcont$paylink, |
| | | channel = tempcont.channel, |
| | | _tempcont$videoType = tempcont.videoType, |
| | | videoType = void 0 === _tempcont$videoType ? "vod" : _tempcont$videoType, |
| | | pid = tempcont.pid, |
| | | autoplay = tempcont.autoplay; |
| | | Object.assign(VIDEO_INFO, { |
| | | autoplay: 1 == autoplay, |
| | | channel: channel, |
| | | paylink: paylink |
| | | }), $.cookie("sctx", "o=" + channel, { |
| | | expires: 7, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }), ppi || $.getJSON("//ppi.api.pptv.com/ppi.php?format=jsonp&cb=?", function(data) { |
| | | $.cookie("ppi", String(data.ppi), { |
| | | expires: 1, |
| | | path: "/", |
| | | domain: "pptv.com", |
| | | raw: 1 |
| | | }) |
| | | }), delppUserInfo(), window.H5Player = new ppliveplayer.H5Player({ |
| | | ctx: "suningDDP=1&autoplay=" + autoplay + "&o=" + channel + "&ppi=" + ppi, |
| | | videoType: videoType, |
| | | pid: pid |
| | | }, "pptv_playpage_box") |
| | | } catch (error) { |
| | | checkActivity("ModThridMovTemp(error):", error) |
| | | } |
| | | } |
| | | |
| | | function onNotification() { |
| | | var opt = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}; |
| | | H5Player && H5Player.setCallback("userinfo", { |
| | | header: { |
| | | type: "userinfo" |
| | | }, |
| | | body: { |
| | | data: { |
| | | PPKey: opt.PPKey, |
| | | PPName: opt.userName, |
| | | ppToken: opt.ppToken, |
| | | UDI: opt.UDI, |
| | | UDR: opt.UDR |
| | | mutate { |
| | | remove_field => ["message"] |
| | | remove_field => ["input"] |
| | | remove_field => ["tags"] |
| | | remove_field => ["meta"] |
| | | remove_field => ["host"] |
| | | remove_field => ["timestamp"] |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function playVideo() { |
| | | var opt = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : VIDEO_INFO; |
| | | H5Player && H5Player.playVideo({ |
| | | cid: opt.cid, |
| | | autoPlay: opt.autoplay |
| | | }) |
| | | } |
| | | |
| | | function tryAgainPlayVideo() { |
| | | $("#xl_masks").hide(), delppUserInfo(), ppGetUserInfo() |
| | | } |
| | | |
| | | function delppUserInfo() { |
| | | ["PPName", "ppToken", "PPKey", "UDI", "UDR", "userName"].forEach(function(item) { |
| | | $.removeCookie(item, { |
| | | path: "/", |
| | | domain: "pptv.com" |
| | | }), VIDEO_INFO[item] = "" |
| | | }) |
| | | } |
| | | |
| | | function shadowAccount(actid, code) { |
| | | return new Promise(function(resolve, rebject) { |
| | | var u = navigator.userAgent, |
| | | type = "android"; - 1 < u.indexOf("Android") || -1 < u.indexOf("Adr") || (type = "ios"), $.getJSON( |
| | | "//acvip.api.pptv.com/api/thirdcoop/joinlogin?actId=" + actid + "&thirdId=third&code=" + code + "&type=" + type + |
| | | "&format=jsonp&cb=?", |
| | | function(data) { |
| | | resolve(data) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | function cookiesQuery(username, token) { |
| | | return new Promise(function(resolve, rebject) { |
| | | $.getJSON("//api.passport.pptv.com/v3/cookies/query.do?username=" + username + "&token=" + token + "&random=" + ( |
| | | new Date).getTime() + "&format=jsonp&cb=?", function(data) { |
| | | resolve(data) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | function onError(data) { |
| | | showDialog(data.data.errorcode || data.data.code) |
| | | } |
| | | |
| | | function showDialog(type) { |
| | | var $masks = $("#xl_masks"); |
| | | switch (String(type)) { |
| | | case "3006": |
| | | 2 == VIDEO_INFO.ptype ? $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip1">鏈墖涓轰細鍛樹笓灞炲奖鐗�</p></div><div class="btns"><a href="javascript:;" class="btn_ktvip xl_abtn_ktvip" onclick="show_ktvip()" sa-data="{\'eleid\':\'pay2watch\'}">寮€閫氫細鍛�</a></div></div></div>' |
| | | ) : $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip1">璇曠湅缁撴潫锛屽紑閫氫細鍛樺厤璐硅鐪�</p></div><div class="btns"><a href="javascript:;" class="left xl_abtn_agin" onclick="show_playagin()" sa-data="{\'eleid\':\'go2restart\'}">閲嶆柊璇曠湅</a><a href="javascript:;" class="right xl_abtn_ktvip" onclick="show_ktvip()" sa-data="{\'eleid\':\'pay2watch\'}">寮€閫氫細鍛�</a></div></div></div>' |
| | | ); |
| | | break; |
| | | case "89113": |
| | | case "89114": |
| | | $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip2">寰堟姳姝夛紝鐢变簬鍦板煙闄愬埗鏃犳硶鎾斁</p><p class="tip3">璇疯鐪嬪叾瀹冭棰�</p></div></div></div>' |
| | | ); |
| | | break; |
| | | case "10001": |
| | | $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip1">鐧诲綍瑙傜湅瀹屾暣鐗堣棰�</p></div><div class="btns"><a href="javascript:;" class="xl_abtn_login alogin" onclick="show_login()" sa-data="{\'eleid\':\'go2login\'}">绔嬪嵆鐧诲綍</a></div></div></div>' |
| | | ); |
| | | break; |
| | | case "10002": |
| | | $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip2">寰堟姳姝夛紝鐢变簬鐗堟潈鍘熷洜</p><p class="tip3">璇蜂娇鐢≒P瀹㈡埛绔垨APP瑙傜湅</p></div></div></div>' |
| | | ); |
| | | break; |
| | | default: |
| | | $masks.show().html( |
| | | '<div class="xl_dialog"><div class="warp"><div class="content"><p class="tip2">寰堟姳姝夛紝璇ヨ妭鐩俊鎭姞杞藉紓甯革紝鎮ㄥ彲浠ュ皾璇�</p><p class="tip3">璇峰埛鏂伴〉闈㈤噸璇�' + |
| | | type + "</p></div></div></div>") |
| | | } |
| | | } |
| | | window.VIDEO_INFO = { |
| | | isLogin: !1, |
| | | userID: "", |
| | | code: "", |
| | | cid: 0, |
| | | vid: 0, |
| | | pready: !1 |
| | | }; |
| | | var cHeight = window.innerHeight || document.body.clientHeight, |
| | | cWidth = window.innerWidth || document.body.clientWidth, |
| | | diaHeight = Number(cHeight - toFix(cWidth / 16 * 9)), |
| | | diaConHeightAbout = Number(diaHeight - toFix(cWidth / 100 * 23)), |
| | | diaConHeightList = Number(diaHeight - toFix(cWidth / 100 * 10)); |
| | | |
| | | function ModEpisodesTemp(index, data) { |
| | | try { |
| | | var tempcont = data.tempcont, |
| | | height = (tempcont.maximg, tempcont.height), |
| | | statistics = tempcont.statistics, |
| | | _tempcont$maximg_h = (tempcont.bgcolor, tempcont.maximg_h), |
| | | maximg_h = void 0 === _tempcont$maximg_h ? 10 : _tempcont$maximg_h; |
| | | height = Number(toFix(height / _ratio)), maximg_h = Number(toFix(maximg_h / _ratio)); |
| | | var newdata = JSON.stringify(Object.assign({}, { |
| | | index: index, |
| | | statistics: statistics, |
| | | height: height |
| | | })); |
| | | newdata = newdata.replace(/\"/gi, "'"); |
| | | var paramsBody = encodeURIComponent('{"seriesCodes":"' + _cid + '"}'), |
| | | html = '<div class="layout layout' + index + ' episodes" id="' + statistics + '" index="' + index + '" sap-modid="' + |
| | | statistics + '"></div>'; |
| | | $("#main-laycontent").append(html); |
| | | var url = "//acvip.api.pptv.com/api/cooperation/webDetail?paramsBody=" + paramsBody + "&pageId=" + pageId + |
| | | "&format=jsonp&cb=?"; |
| | | $.getJSON(url, function(result) { |
| | | var errorcode = result.errorcode, |
| | | data = result.data; |
| | | if ("0" === errorcode) { |
| | | var contentInfos = data.body.contentInfos, |
| | | len = contentInfos.length; |
| | | if (0 == len) return !1; |
| | | var newInfos = []; |
| | | len = (contentInfos = contentInfos.filter(function(item) { |
| | | return 0 == item.series_ContentType |
| | | })).length, newInfos = contentInfos.map(function(item) { |
| | | return item.series_programCode |
| | | }); |
| | | var frees = contentInfos.map(function(item) { |
| | | return item.series_free |
| | | }), |
| | | seriesNum = contentInfos.map(function(item, index) { |
| | | return ++index |
| | | }), |
| | | curIndex = newInfos.indexOf(_vid); - 1 == curIndex && (curIndex = 0); |
| | | var curpage = Math.floor(curIndex / 10), |
| | | seriesArr = chunk(seriesNum, 10), |
| | | setSeries = Object.assign({}, { |
| | | series_programCodes: newInfos, |
| | | series_frees: frees, |
| | | series_seriesNums: seriesNum, |
| | | seriesArr: seriesArr |
| | | }); |
| | | sessionStorage.setItem("series_programCodes", JSON.stringify(setSeries)); |
| | | for (var _contentInfos$ = contentInfos[0], actor = _contentInfos$.actor, free = _contentInfos$.free, series_free = |
| | | _contentInfos$.series_free, score = _contentInfos$.score, seriesCount = _contentInfos$.seriesCount, description = |
| | | _contentInfos$.description, name = (_contentInfos$.cover, _contentInfos$.name), releaseYear = _contentInfos$.releaseYear, |
| | | country = _contentInfos$.country, currentNum = _contentInfos$.currentNum, workState = _contentInfos$.workState, |
| | | programType2 = _contentInfos$.programType2, about = Object.assign({}, { |
| | | actor: actor, |
| | | free: free, |
| | | series_free: series_free, |
| | | score: score, |
| | | seriesCount: seriesCount, |
| | | description: description, |
| | | name: name, |
| | | releaseYear: releaseYear, |
| | | country: country, |
| | | currentNum: currentNum, |
| | | workState: workState, |
| | | programType2: programType2 |
| | | }), lihtml = episodes_diversity(curpage), pages = Math.ceil(len / 10), muluhtml = "", i = 0; i < pages; i++) { |
| | | var _curSeriesArr = seriesArr[i]; |
| | | muluhtml += '<li class="' + (i == curpage ? "current item" : "item") + '"><a href="javascript:;" cpage="' + |
| | | curpage + '" inx="' + i + '" class="drama-series" onclick="dramaseries(this)">' + (1 < _curSeriesArr.length ? |
| | | _curSeriesArr[0] + "-" + _curSeriesArr[_curSeriesArr.length - 1] : "" + _curSeriesArr[0]) + "</a><i></i></li>" |
| | | if [fields][type] == "videoPlayUser" { |
| | | grok { |
| | | match => { |
| | | "message" => |
| | | "%{TIMESTAMP_ISO8601:time}\s*\[%{DATA:thread}\]\s*%{LOGLEVEL:logLevel}\s*%{WORD:logName}\s*-\s*%{WORD:method}\:%{UUID:device}#(?<utdId>([\S+]*))#(?<loginUid>([0-9]*))#%{NUMBER:detailSystemId}#%{NUMBER:videoId}#%{NUMBER:resourceId}#(?<from>([\S+]*))" |
| | | } |
| | | 0 == workState && ""; |
| | | var conthtml = ""; |
| | | 0 < len && 2 == GetRequest().programtype && (conthtml = |
| | | '<div class="mod-box" style="margin-top:2.67vw;padding:3vw 2.67vw 2.67vw;background:#ffffff">\n <div class="mod-box-item" style="overflow:hidden;height:6vw;box-sizing: border-box;line-height:6vw;">\n <h3 class="c-title-des" style="display:inline-block;font-size:4vw;color:#7a7a7a">閫夐泦</h3>\n <a onclick="episodesChoose(this)" class="mod-box-amore" style="float:right;color:#7a7a7a;display: inline-block;height: 100%;">\n <span class="c-des" style="display: inline-block;height: 100%;">鏇村\n <i class="c-glyphicon c-glyphicon-arrowRight" style="display:block;float:right;height:100%;width:4vw;position:relative;">\n <svg class="icon" aria-hidden="true" style="width:4vw;height:4vw;position:absolute;top:0.8vw;right:0vw;">\n <use xlink:href="#icon-dibudaohanglan-"></use>\n </svg>\n </i></span>\n </a> \n </div> \n <div class="mox-box-data">\n <div class="list-mulu"><ul class="muluUI">' + |
| | | muluhtml + '</ul></div>\n <div class="list-desp"><ul class="despUI">' + lihtml + |
| | | "</ul></div>\n </div> \n </div> "); |
| | | var _html = |
| | | '\n <div class="videoInfoFold" style="box-sizing: border-box;padding:4.8vw 2.67vw 2.67vw;background:#ffffff;">\n <div class="videoInfoFold-title" style="line-height:8vw;height:8vw;overflow:hidden;">\n <div class="epiname" style="font-size:4.8vw;color:#363636;width:76%;display:inline-block;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">' + |
| | | name + '</div>\n <a class="openDesc c-more-link" desp=\'' + JSON.stringify(about) + |
| | | '\' style="float:right;width:auto;position:relative;margin-right:3vw;color:#8e8e8e" onclick="episodesAbout(this)">\n <span>绠€浠�</span>\n <i class="c-glyphicon c-glyphicon-arrowRight" style="position:absolute;top:0.5vw;right:-3.8vw;">\n <svg class="icon" aria-hidden="true" style="width:4vw;height:4vw;">\n <use xlink:href="#icon-dibudaohanglan-"></use>\n </svg>\n </i> \n </a>\n </div>\n <div class="videoInfoFold-data" style="padding-top:2.67vw;">\n <span class="data-item" style="color:#898989;font-size:12px;">鍏�' + |
| | | seriesCount + "闆� 路 " + programType2 + " 路 " + score + "鍒� 路 " + releaseYear + " 路 " + country + |
| | | "</span> \n </div> \n </div>\n " + conthtml + |
| | | " \n "; |
| | | $("#" + statistics).append(_html) |
| | | } |
| | | }) |
| | | } catch (error) { |
| | | checkActivity("ModEpisodesTemp(error):", error) |
| | | } |
| | | } |
| | | |
| | | function chunk(array, size) { |
| | | var length = array.length; |
| | | if (!length || !size || size < 1) return []; |
| | | for (var index = 0, resIndex = 0, result = new Array(Math.ceil(length / size)); index < length;) result[resIndex++] = |
| | | array.slice(index, index += size); |
| | | return result |
| | | } |
| | | |
| | | function episodes_diversity(curpage) { |
| | | var series = sessionStorage.getItem("series_programCodes"), |
| | | _JSON$parse = JSON.parse(series), |
| | | series_programCodes = _JSON$parse.series_programCodes, |
| | | series_frees = _JSON$parse.series_frees, |
| | | series_seriesNums = _JSON$parse.series_seriesNums, |
| | | lihtml = (_JSON$parse.seriesArr, ""), |
| | | ihtml = "", |
| | | seriesCodes = chunk(series_programCodes, 10), |
| | | seriesFrees = chunk(series_frees, 10), |
| | | seriesNums = chunk(series_seriesNums, 10), |
| | | numArr = seriesNums[curpage], |
| | | showClass = !1; |
| | | return numArr.forEach(function(item, index) { |
| | | 1 == seriesFrees[curpage][index] && (ihtml = '<i class="icon_vip"></i>'), showClass = _vid ? seriesCodes[curpage][ |
| | | index |
| | | ] == _vid : 0 == curpage && 0 == index, lihtml += '<li class="' + (showClass ? "current item" : "item") + |
| | | '">\n <a href="javascript:;" onclick="episodesplay(this)" programCode="' + seriesCodes[curpage][index] + |
| | | '">' + seriesNums[curpage][index] + ihtml + "</a>\n </li>" |
| | | }), lihtml |
| | | } |
| | | |
| | | function episodesAbout(that) { |
| | | $("body").css({ |
| | | "overflow-y": "hidden" |
| | | }); |
| | | var desp = $(that).attr("desp") || !1, |
| | | _desp = desp = desp && JSON.parse(desp), |
| | | actor = _desp.actor, |
| | | score = (_desp.free, _desp.series_free, _desp.score), |
| | | description = (_desp.seriesCount, _desp.description), |
| | | name = _desp.name, |
| | | releaseYear = _desp.releaseYear, |
| | | programType2 = (_desp.country, _desp.currentNum, _desp.workState, _desp.programType2), |
| | | html = '\n <div class="epabout" style="position:fixed;width:100%;left:0;top:56.25vw;height:' + diaHeight + |
| | | 'px;z-index:1000;overflow:hidden;background:#ffffff;font-size:3.2vw;">\n <div class="epabout-content" style="height:100%;box-sizing: border-box;padding:4.8vw 2.667vw 2.667vw;overflow:hidden;color:#969696">\n <div class="about-title" style="color:#363636;font-size:4.8vw;margin-bottom:2vw;height:8vw;line-height:8vw;width: 76%;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;">' + |
| | | name + '</div>\n <div class="about-desp line_3" style="margin-bottom:2vw;"><span>' + releaseYear + |
| | | " 路 </span><span>" + score + " 路 </span><span>" + programType2 + |
| | | '</span></div>\n <div class="star line_3" style="margin-bottom:2vw;">' + actor + |
| | | '</div>\n <div class="about-content" style="line-height:5.4vw;height:' + diaConHeightAbout + |
| | | 'px;">\n <div style="overflow:auto;height:' + diaConHeightAbout + |
| | | 'px;padding-bottom:20px;">\n ' + description + |
| | | '\n </div>\n </div>\n </div>\n <a onclick="_close(\'.epabout\')" href="javascript:;" class="close xl_close" style="position:absolute;top:4vw;right:2vw;width:8vw;height:8vw;display:block;color:#9a9a9a">\n <svg class="icon" aria-hidden="true" style="width:8vw;height:8vw;">\n <use xlink:href="#icon-close"></use>\n </svg>\n </a> \n </div>\n '; |
| | | $("body").append(html) |
| | | } |
| | | |
| | | function dramaseries(that) { |
| | | if ($("body").css({ |
| | | "overflow-y": "hidden" |
| | | }), !$(that).parent().hasClass("current")) { |
| | | $(that).parent().addClass("current").siblings().removeClass("current"); |
| | | var lihtml = episodes_diversity($(that).attr("inx")); |
| | | $("#main-laycontent .list-desp .despUI").html(lihtml) |
| | | } |
| | | } |
| | | |
| | | function episodesplay(that) { |
| | | var code = $(that).attr("programcode"); |
| | | $(that).parent().addClass("current").siblings().removeClass("current"), location.href = "" + location.origin + |
| | | location.pathname + "?cid=" + _cid + "&vid=" + code + "&programtype=" + _ptype |
| | | } |
| | | |
| | | function episodesChoose(that) { |
| | | $("body").css({ |
| | | "overflow-y": "hidden" |
| | | }); |
| | | var series = sessionStorage.getItem("series_programCodes"), |
| | | _JSON$parse2 = JSON.parse(series), |
| | | series_programCodes = _JSON$parse2.series_programCodes, |
| | | series_frees = _JSON$parse2.series_frees, |
| | | series_seriesNums = _JSON$parse2.series_seriesNums, |
| | | len = series_programCodes.length, |
| | | arr = series_programCodes, |
| | | frees = series_frees, |
| | | curIndex = arr.indexOf(_vid); |
| | | curIndex = -1 < curIndex ? curIndex : 0; |
| | | for (var lihtml = "", ihtml = "", i = 0; i < len && 0 < len; i++) 1 == frees[i] && (ihtml = '<i class="icon_vip"></i>'), |
| | | lihtml += '<li class="' + (i == curIndex ? "current item" : "item") + |
| | | '"><a href="javascript:;" onclick="episodesplay(this)" programCode="' + arr[i] + '">' + series_seriesNums[i] + ihtml + |
| | | "</a></li>"; |
| | | var html = '\n <div class="epabout" style="position:fixed;width:100%;left:0;top:56.25vw;height:' + diaHeight + |
| | | 'px;z-index:1000;overflow:hidden;background:#ffffff;font-size:3.2vw;">\n <div class="epabout-content" style="height:100%;box-sizing: border-box;padding:4.8vw 2.667vw 2.667vw;overflow:hidden;color:#969696">\n <div class="about-title" style="color:#363636;font-size:4vw;margin-bottom:2vw;">閫夐泦</div>\n <div class="about-content" style="line-height:5.4vw;height:100%">\n <div style="height:' + |
| | | diaConHeightList + 'px;overflow:auto;">\n <ul class="despUI" style="padding-bottom:20px;">' + |
| | | lihtml + |
| | | '</ul>\n </div>\n </div>\n </div>\n <a onclick="_close(\'.epabout\')" href="javascript:;" class="close xl_close" style="position:absolute;top:4vw;right:2vw;width:8vw;height:8vw;display:block;color:#9a9a9a">\n <svg class="icon" aria-hidden="true" style="width:8vw;height:8vw;">\n <use xlink:href="#icon-close"></use>\n </svg>\n </a> \n </div>\n '; |
| | | $("body").append(html) |
| | | } |
| | | |
| | | function _close(id) { |
| | | $("body").css({ |
| | | "overflow-y": "auto" |
| | | }), $(id).hide() |
| | | } |
| | | |
| | | function ModSimilarityTemp(index, data) { |
| | | try { |
| | | var tempcont = data.tempcont, |
| | | statistics = tempcont.statistics, |
| | | _tempcont$bgcolor = tempcont.bgcolor, |
| | | bgcolor = void 0 === _tempcont$bgcolor ? "#ffffff" : _tempcont$bgcolor, |
| | | martop = tempcont.martop, |
| | | marbom = tempcont.marbom, |
| | | _tempcont$number = tempcont.number, |
| | | number = void 0 === _tempcont$number ? "6" : _tempcont$number, |
| | | _tempcont$rankType = tempcont.rankType, |
| | | rankType = void 0 === _tempcont$rankType ? "climbing" : _tempcont$rankType, |
| | | _tempcont$appplt = tempcont.appplt, |
| | | appplt = void 0 === _tempcont$appplt ? "wap" : _tempcont$appplt, |
| | | _tempcont$offLineIds = tempcont.offLineIds, |
| | | offLineIds = void 0 === _tempcont$offLineIds ? [] : _tempcont$offLineIds; |
| | | martop = Number(toFix(martop / _ratio)) || 0, marbom = Number(toFix(marbom / _ratio)) || 0; |
| | | var newdata = JSON.stringify(Object.assign({}, { |
| | | index: index, |
| | | statistics: statistics, |
| | | bgcolor: bgcolor, |
| | | martop: martop, |
| | | marbom: marbom, |
| | | number: number, |
| | | rankType: rankType, |
| | | appplt: appplt, |
| | | offLineIds: offLineIds |
| | | })); |
| | | newdata = newdata.replace(/\"/gi, "'"); |
| | | var html = '\n <div class="layout layout' + index + " mod-similarity " + statistics + '" id="' + |
| | | statistics + '" index="' + index + '" sap-modid="' + statistics + |
| | | '" style="background-color:#ffffff;margin-top:2.67vw;margin-bottom:' + marbom + |
| | | 'vw;">\n <div class="recommend">\n <div class="layout_title" style="height:11.733vw;line-height:11.733vw;display:block">\n <span class="modtitle" style="display:block">鐑挱鎺掕</span>\n </div>\n <ul id="simcomUI_' + |
| | | index + '" class="simcomUI"></ul>\n </div>\n </div>\n '; |
| | | $("#main-laycontent").append(html); |
| | | var ico = ["榛樿", "浣撹偛浼氬憳", "浠樿垂", "SVIP涓撲韩", "SVIP", "SVIP鐢ㄥ埜", "VIP鐢ㄥ埜", "VIP浠樿垂", "VIP", "浣撹偛鐢ㄥ姷", "鍏泭", "鏂拌嫳", |
| | | "鐗规儬", "1鍏�", "鎵撴姌", "鎶藉", "浜掑姩", "璞ぜ", "澶у挅", "鍗曞満", "鏂硅█", "钃濆厜" |
| | | ]; |
| | | 0 < offLineIds.length && (offLineIds = offLineIds.split(",")); |
| | | var rankList = { |
| | | rankType: rankType, |
| | | appplt: appplt, |
| | | offLineIds: offLineIds |
| | | }; |
| | | rankList = encodeURIComponent(JSON.stringify(rankList)); |
| | | var Url = ajaxsrc + "/api/cooperation/rankinglist?rankList=" + rankList + "&pageId=" + pageid + "&format=jsonp&cb=?"; |
| | | $.getJSON(Url, function(res) { |
| | | console.log("===>", "recommendlist:", res); |
| | | var errorcode = res.errorcode, |
| | | data = res.data; |
| | | switch (parseInt(errorcode)) { |
| | | case 0: |
| | | if (0 == Object.keys(data.body).length) return !1; |
| | | var _data$body = data.body, |
| | | _data$body$movie = _data$body.movie, |
| | | movie = void 0 === _data$body$movie ? [] : _data$body$movie, |
| | | _data$body$teleplay = _data$body.teleplay, |
| | | teleplay = void 0 === _data$body$teleplay ? [] : _data$body$teleplay, |
| | | tico = "", |
| | | icodisplay = "block", |
| | | esphtml = "", |
| | | mov_len = movie.length, |
| | | tel_len = teleplay.length, |
| | | list = [], |
| | | num = number < mov_len + tel_len ? number : mov_len + tel_len; |
| | | list = 3 == _ptype ? [].concat(_toConsumableArray(movie), _toConsumableArray(teleplay)).slice(0, num) : [].concat( |
| | | _toConsumableArray(teleplay), _toConsumableArray(movie)).slice(0, num); |
| | | var lihtml = ""; |
| | | list.forEach(function(item, inx) { |
| | | tico = item.icons && item.icons[0] && ico[item.icons[0].id], icodisplay = tico ? "block" : "none", item.episodeTitle && |
| | | (esphtml = '<span class="sp_episodeTitle" style="font-size:2.6667vw">' + item.episodeTitle + "</span>"), |
| | | lihtml += |
| | | '\n <li style="float:left;border-radius:1.067vw;margin-left:2.667vw;margin-bottom:5.333vw;width:29.333vw;overflow:hidden;-webkit-border-radius:1.067vw;">\n <a onclick="similarityLink(this)" href="javascript:;" class="amov recom_movie" vt="' + |
| | | item.vt + '" type="" cid="' + item.cid + "\" sa-data=\"{'eleid':'" + statistics + "_" + (inx + 1) + |
| | | "','aid':'" + aid + |
| | | '\'}">\n <img style="display:block;width:29.333vw;height:40vw;border-radius:1.067vw;overflow:hidden;-webkit-border-radius:1.067vw;" src="' + |
| | | item.coverPic.replace(/http:/gi, "") + |
| | | '">\n <i class="ico" style="height:4vw;line-height:4.267vw;font-size:2.6667vw;padding:0 1.333vw; display:' + |
| | | icodisplay + '">' + tico + |
| | | '</i>\n <span class="sp_title" style="font-size:3.73vw;height:5.333vw;margin-top:1.067vw;width:29.333vw;overflow:hidden;font-weight:normal;display:block">' + |
| | | item.title + "</span>\n " + esphtml + |
| | | "\n </a>\n </li>\n " |
| | | }), $("#simcomUI_" + index).html(lihtml) |
| | | mutate { |
| | | remove_field => ["message"] |
| | | remove_field => ["input"] |
| | | remove_field => ["tags"] |
| | | remove_field => ["meta"] |
| | | remove_field => ["host"] |
| | | remove_field => ["timestamp"] |
| | | } |
| | | }) |
| | | } catch (error) { |
| | | checkActivity("ModSlipComTemp(error):", error) |
| | | } |
| | | } |
| | | |
| | | function similarityLink(that) { |
| | | var cid = $(that).attr("cid"), |
| | | programtype = 3; |
| | | 21 == $(that).attr("vt") && (programtype = 2), location.href = location.origin + location.pathname + "?cid=" + cid + |
| | | "&vid=&programtype=" + programtype |
| | | } |
| | | window._cid = queryParam("cid"), window._vid = queryParam("vid"), window._ptype = queryParam("programtype"), Object.assign( |
| | | VIDEO_INFO, { |
| | | cid: _cid, |
| | | vid: _vid, |
| | | ptype: _ptype |
| | | }), _vid && "undefined" != _vid && Object.assign(VIDEO_INFO, { |
| | | cid: _vid |
| | | }); |
| | | var isLogin = !1; |
| | | if (window.ppyestv) { |
| | | var userinfo = ppyestv.getUserInfo(); |
| | | if (userinfo) { |
| | | var _JSON$parse3 = JSON.parse(userinfo), |
| | | code = _JSON$parse3.code; |
| | | 1 == code && (isLogin = !0) |
| | | } |
| | | } |
| | | |
| | | function show_login() { |
| | | window.ppyestv.login() |
| | | } |
| | | |
| | | function show_ktvip() { |
| | | console.info("###########", isLogin), isLogin ? (console.info("#######", ppyestv.tryPlayFinish()), ppyestv.tryPlayFinish()) : |
| | | show_login() |
| | | } |
| | | |
| | | function show_playagin() { |
| | | $("#xl_masks").hide(), playVideo() |
| | | } |
| | | var userInfo = {}; |
| | | |
| | | function adPlayFinish() { |
| | | if (isLogin) { |
| | | userInfo = window.ppyestv.getUserInfo(); |
| | | var openid = JSON.parse(userInfo).data.code; |
| | | startInfoPlayVideo(actid, openid) |
| | | } else VIDEO_INFO.pready ? playVideo() : setTimeout(function() { |
| | | playVideo() |
| | | }, 1e3) |
| | | } |
| | | var tv = 0; |
| | | window.addEventListener("message", function(e) { |
| | | try { |
| | | var data = e.data && JSON.parse(e.data); |
| | | data.data; |
| | | switch (data.type) { |
| | | case "onReady": |
| | | VIDEO_INFO.pready = !0, console.info("play-onReady", data); |
| | | break; |
| | | case "onPlayStateChanged": |
| | | data && data.data; |
| | | break; |
| | | case "nextVideo": |
| | | break; |
| | | case "onError": |
| | | console.info("===>play-onError", data), onError(data) |
| | | } |
| | | } catch (e) {} |
| | | }, !1), $(function() { |
| | | loadingDataFunc(actModulePage, moduledata) |
| | | }); |
| | | if [fields][type] == "userActive" { |
| | | grok { |
| | | match => { |
| | | "message" => |
| | | "%{TIMESTAMP_ISO8601:time}\s*\[%{DATA:thread}\]\s*%{LOGLEVEL:logLevel}\s*%{WORD:logName}\s*-\s*%{NUMBER:detailSystemId}#%{NUMBER:version}#%{UUID:device}#(?<utdId>([\S+]*))#(?<loginUid>([0-9]*))#%{WORD:type}#(?<params1>([\S+]*))#(?<params2>([\S+]*))#(?<params3>([\S+]*))" |
| | | } |
| | | } |
| | | |
| | | mutate { |
| | | remove_field => ["message"] |
| | | remove_field => ["input"] |
| | | remove_field => ["tags"] |
| | | remove_field => ["meta"] |
| | | remove_field => ["host"] |
| | | remove_field => ["timestamp"] |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | output { |
| | | if [fields][app] == "buwan" { |
| | | if [fields][type] == "videoPlay" { |
| | | file { |
| | | path => "D:/logs/buwan/videoplay/%{+yyyy}_%{+MM}_%{+dd}.log" |
| | | } |
| | | |
| | | } else if [fields][type] == "videoPlayUser" { |
| | | file { |
| | | path => "D:/logs/buwan/videoplay-user/%{+yyyy}_%{+MM}_%{+dd}.log" |
| | | } |
| | | } else if [fields][type] == "userActive" { |
| | | file { |
| | | path => "D:/logs/buwan/user/active_%{+yyyy}_%{+MM}_%{+dd}.log" |
| | | } |
| | | } else if [fields][type] == "error" { |
| | | file { |
| | | path => "D:/logs/buwan/error/%{+yyyy}_%{+MM}_%{+dd}.log" |
| | | } |
| | | } else if [fields][type] == "videoUpdate" { |
| | | file { |
| | | path => "D:/logs/buwan/video_update/%{+yyyy}_%{+MM}_%{+dd}.log" |
| | | } |
| | | } |
| | | } |
| | | } |