CINXE.COM

佳贺精机

<!doctype html> <html lang="zh-cn"> <head> <base href="https://wx.inuoyun.com/Watch/63331?indep_key=9E508857A9AE6F47162EC0247731F156"> <!--设置字符编码--> <meta charset="utf-8"> <meta property="og:title" content="佳贺精机"> <meta property="og:description" content="视频直播解决方案提供商"> <meta property="og:image" content="https://nyfs.oss.nuoyun.tv/Wechat/Live/ny_default_logo.png"> <meta desc="description" content="视频直播解决方案提供商"><!--确保以最新的IE内核渲染网页--> <meta http-equiv="X-UA-Compatible" content="IE=Edge"><!--点播视频需要加refer才能播放,防盗链--> <meta name="refer" content="always"><!--默认以webkit内核渲染网页--> <meta name="renderer" content="webkit"><!--定义用户不可对视口进行缩放--> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><!--使ie8支持html5元素和媒体查询,该判断的意思是如果小于ie9版本--> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js?v=V5.16.563" type="text/javascript"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js?v=V5.16.563" type="text/javascript"></script> <![endif]--> <!--引入css文件--> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Js/Swiper/dist/css/swiper.min.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Css/bootstrap.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Js/layui/css/layui.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Mobile/css/awesome/css/font-awesome.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Simditor/site/assets/styles/simditor.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Css/custom.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Css/annualmeeting.pc.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Css/sign.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Dplayerssss/dist/DPlayer.min.css?v=V5.16.563"> <link rel="stylesheet" href="https://s.nuoyun.tv/Public/Home/Css/punchClock.css?v=V5.16.563"> <script src="https://s.nuoyun.tv/Public/Home/Js/elastic-apm-rum.umd.min.js" crossorigin="anonymous"></script> <script> function initEsApm() { let env = "prod"; if (window.location.host === "cc.nuoyun.tv") { env = "dev"; } elasticApm.init({ serviceName: 'live-pc-page', serverUrl: 'https://es-apm.nuoyun.tv', serviceVersion: "1.0.0", environment: env, transactionSampleRate: 0.3, eventsLimit: 3000, ignoreTransactions: [/aliyuncs/, /duration_report/, /.ts/, /.m3u8/, /.svga/] }) } initEsApm(); </script> <style type="text/css"> #vr_player{ z-index: 100; } .qrcode-bg-none { background: none !important; width: auto !important; } .cursor-auto { cursor: auto !important; } .no-close-icon .layui-layer-close { display: none; } .maturity_pc{ position: absolute; left: 0; bottom: 0; width: 100%; height: 40px; } .goods-dis-price{ font-size: 12px; color: rgba(115,115,115,1); line-height: 20px; } .goods-dis-price span{ text-decoration: line-through; margin-left: 4px; } .start-vr-play{ width: 50px; height: 50px; position: absolute; left: 50%; top: 50%; margin-left: -25px; margin-top: -25px; /*background: url(https://i.nuoyun.tv/Public/Home/Images/start-play.png) rgba(255,255,255,.5) 18px center no-repeat; background-size: 20px;*/ background: url(https://i.nuoyun.tv/Public/Home/Images/start-play.png) rgba(255,255,255,.5) center no-repeat; background-size: 100%; z-index: 999; line-height: 50px; text-align: center; font-size: 0; text-indent: -10000px; border-radius: 25px; } .start-play{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 70px; display: none; z-index: 999; cursor: pointer; } @keyframes moreTip{from {top:0.75rem;} to{top:1rem}} .speedBox{ position: absolute; z-index: 1001; top: 35px; right: 152px; height: 30px; } .speedTxt{ color: #fff; font-size: 14px; font-weight: 600; line-height: 34px; cursor: pointer; } .speedUl{ position: absolute; left: 50%; transform: translateX(-50%); bottom: 30px; background: rgba(0,0,0,0.5); border-radius: 8px; width: 54px; padding: 8px 0; text-align: center; cursor: pointer; font-size: 14px; display: none; } .speedLi{ line-height: 20px; margin-bottom: 16px; font-weight: 400; color: rgba(255,255,255,.5); } .speedLi.active{ font-weight: 600; color: #fff; } .speedLi:last-child{ margin-bottom: 0; } .dplayer-icon-content{ display: block; width: 22px; height: 22px; } .dplayer-icon-content>img{ width: 100%; height: 100%; } .return-live{ background: url(https://nyfs.oss.nuoyun.tv/Public/Home/Images/pc-to-live-1.png) no-repeat; background-size: 100% 100%; width: 96px; height: 36px; display: none; align-items: center; justify-content: center; position: fixed; bottom: 10%; left: -4px; font-size: 14px; color: #005CD7; cursor: pointer; box-shadow: 0px 2px 4px 0px rgba(43,56,129,0.14); border-radius: 0px 100px 100px 0px; overflow: hidden; z-index: 999; } .return-live>img{ width: 16px; height: 16px; margin-right: 4px; } </style><!--[if IE 7]><![endif]--> <title>佳贺精机</title> <meta name="__hash__" content="96290db4ccbf636eca8290c609e9583a_d2ca22a04abb5414ed08d3918461da34"> <script> function IEVersion() { var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器 var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; if(isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if(fIEVersion == 7) { return 7; } else if(fIEVersion == 8) { return 8; } else if(fIEVersion == 9) { return 9; } else if(fIEVersion == 10) { return 10; } else { return 6;//IE版本<=7 } } else if(isEdge) { return 'edge';//edge } else if(isIE11) { return 11; //IE11 }else{ return -1;//不是ie浏览器 } } if(IEVersion() != -1){ alert('提示:检测到当前浏览器版本不支持,建议更换谷歌、360、搜狐等主流浏览器!'); } var LIVETYPE = 'default'; var LIVETYPEMOD = ''; var screen_type = '1'; /*观看奖励弹框*/ var rewardSwitch = '0', rewardTipSwitch = '0', rewardMin = '0', rewardMoney = '0.01', onlineTime = 0; </script> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="de"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.1hbgkFx4Qn8.O/am=DgY/d=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/m=corsproxy" data-sourceurl="https://wx.inuoyun.com/Watch/63331?indep_key=9E508857A9AE6F47162EC0247731F156"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.1hbgkFx4Qn8.O/am=DgY/d=1/exm=corsproxy/ed=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://wx.inuoyun.com/Watch/63331?indep_key=9E508857A9AE6F47162EC0247731F156"></script> <meta name="robots" content="none"> </head> <body class="pc watch " ondragstart="window.event.returnValue=false;"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.1hbgkFx4Qn8.O/am=DgY/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfqlmAPxwfG457BPbRXwNq39oSMGHg/m=navigationui" data-environment="prod" data-proxy-url="https://wx-inuoyun-com.translate.goog" data-proxy-full-url="https://wx-inuoyun-com.translate.goog/Watch/63331?indep_key=9E508857A9AE6F47162EC0247731F156&amp;_x_tr_sl=zh-CN&amp;_x_tr_tl=de&amp;_x_tr_hl=en" data-source-url="https://wx.inuoyun.com/Watch/63331?indep_key=9E508857A9AE6F47162EC0247731F156" data-source-language="zh-CN" data-target-language="de" data-display-language="en" data-detected-source-language="" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=https://wx.inuoyun.com/Watch/63331?indep_key%3D9E508857A9AE6F47162EC0247731F156&amp;anno=2" data-client="tr"></script><button id="TencentCaptcha" data-appid="2073945775" data-cbfn="callback" type="button" class="none">验证</button> <div> <div class="screen"></div><button class="btn btn-primary btn-block none" id="socket_btn">关闭连接</button> <div class="header"> <div class="header-content"> <div class="room-data"> <div class="icon"><img src="https://nyfs.oss.nuoyun.tv/Wechat/Live/ny_default_logo.png" width="40" height="40"> </div><span style="font-size: 18px;max-width: 60%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">佳贺精机</span> <div class="video-type" style="background:#188FFF;font-size:12px;border-radius:3px;padding:0 4px;margin-left:5px;line-height:20px;height:20px;"> 回放 </div> </div> </div> </div> <div class="box pt-60"><!--顶部--> <!-- <div class="top-box"> <div> <span class="start-time"> <img src="/Public/Home/Images/Watch/live-time.png" style="width:16px;height:16px;margin-right:10px;" alt=""> <span class="show-time"></span> </span> <img style="width: 16px;height: 16px;" src="https://i.nuoyun.tv/Public/Home/Images/Watch/user-num.png"> <span class="ml-10 num">0</span> <span class="ml-10" id="visit_number_txt">0</span> </div> <div> 手机端二维码 <div class="mobile-play right"> <div class="mobile-img"> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/moblie-live.png" style="vertical-align: top;width: 16px;height: 16px;margin-top: 2px;"> 手机观看 </div> </div> 二维码 <div class="qrcode-box"> <p>扫码观看</p> <img src="https://i.nuoyun.tv/Public/Home/Images/qrcode.png"> <img src="" style="vertical-align:initial;border-radius:4px;padding: 10px;background-color: #ffffff;"> </div> </div> </div> --> <!--左侧--> <div class="box-left left"><!-- <div class="box-title"> <div class="box-live"> <p class="box-point"></p> <p class="box-status">直播中</p> </div> <p class="box-live-title">佳贺精机</p> </div> --> <!-- 用户登录 --> <div class="login-user-box"> <div class="mobile_qr"><!--手机端二维码--> <div class="mobile-play right"> <div class="mobile-img"><img src="https://i.nuoyun.tv/Public/Home/Images/Watch/mobile.png" class="mobile_icon"> <p class="login-txt">手机看</p> </div> </div><!--二维码--> <div class="qrcode-box"><!-- <p>扫码观看</p> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/qrcode.png"> --> <img src="" style="vertical-align:initial;border-radius:4px;padding: 10px;background-color: #ffffff;"> </div> </div> <div class="login_line"></div> <div class="login_btn"><a class="login-btn-right" style="color:white;" href="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=https://open.weixin.qq.com/connect/qrconnect?appid%3Dwxaeab6dafa1571a4f%26redirect_uri%3Dhttps://console.nuoyun.tv/Watch/63331%26response_type%3Dcode%26scope%3Dsnsapi_login%26state%3D2017%23wechat_redirect"> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/wxlogin.png" style="vertical-align:top;margin-top:14px;"> --> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/static-avatar.png" class="login_icon"> <span class="login-txt">未登录</span> </a> <!--退出登录--> <div class="logout-box"><!-- <p>扫码观看</p> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/qrcode.png"> --> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/pc/logout.png" class="logout-icon"> <p class="logout-txt">退出</p> </div> </div> </div> <div class="upper-box"> <div class="upper-left"><img src="https://nyfs.oss.nuoyun.tv/Wechat/Live/ny_default_logo.png" style="width: 54px;height: 54px;border-radius: 4px;"> <div class="upper-info"> <div class="upper-info-top"> <p class="box-live-title">佳贺精机</p> <div class="box-live"> <p class="box-point"></p> <p class="box-status video-type"></p> </div> </div> <div class="upper-info-bottom"><span class="start-time"> <img src="/Public/Home/Images/Watch/live-time.png" style="width:16px;height:16px;margin-right:10px;" alt=""> <span class="show-time"></span> </span> <img style="width: 16px;height: 16px;" src="https://i.nuoyun.tv/Public/Home/Images/Watch/user-fire.png"> <!-- <span class="ml-10 num">0</span> --> <span class="ml-10" id="visit_number_txt">0</span> </div> </div> </div> <div class="upper-right"><!-- 多语言切换 --> <div class="languageSwitching"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/englishLanguageIcon.png" alt="" class="englishLanguages"> <img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/chineseLanguageIcon.png" alt="" class="chineseLanguages"> <p class="" style="display: none;">语言切换</p> </div><!--分享--> <div class="left share-box"> <div class="left share"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/partake.png" class="share_btn"> <p class="share_text">分享</p> </div> <div class="shareBox"> <div class="shareQrCode"><img src="" alt=""> </div> <p class="shareTip">微信扫码观看</p> <div class="shareBottom"> <p>观看地址</p> <div class="copyHrefBox"> <p class="copyHref"></p> <p class="copyBtn">复制</p> </div> </div> </div> </div> </div><!-- <div class="box-live"> <p class="box-point"></p> <p class="box-status">直播中</p> </div> <p class="box-live-title">佳贺精机</p> --> </div> <div class="middle-box watch-bg"><!-- 跑马灯 --> <marquee class="horse-lamp"> 诺云提供技术支持! </marquee><!--播放器--> <div class="cover" style="display:none;"> https://i.nuoyun.tv/Public/Uploads/Cover/20200628/5ef85cefa99ba.png </div> <div id="video_player"> </div> <div class="barrage"> <div class="show"><!-- 弹幕内容 --> </div> </div><img class="cover-app" src="" hidden style="width:100%;height:100%;object-fit:cover;position: absolute;top: 0;left: 0;z-index: 999;"> <img class="cover-cantReplay" src="" hidden style="width: auto;height:100%;object-fit:cover;position: absolute;top: 0;left: 50%;z-index: 999;transform: translateX(-50%);"> <img class="start-play" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/pc-play-1.png" alt=""> <!-- 倒计时 --> <div class="new-annualmeeting-countdown countdown" style="display: none;"><span>距开始直播</span> <span class="countdown-time"></span> </div> <div class="live-pause" style="display: none;"> <div><img src="/Public/Home/Images/live-pasue-l.png" alt=""> <p>主播暂时离开,请稍等片刻!</p> </div> </div> </div> <div class="bottom-box watch-bg" style="background:#222;"> <div class="left gift"><!-- <ul class="gift-item"> </ul> <div class="gift-info"> <span class="arrow-down"></span> </div> --> <!--开关--> <form class="layui-form left" style="margin-top:7px;display:none;"><input type="checkbox" id="barage_switch" lay-skin="switch" lay-text="" lay-filter="barages_switch"> <input type="hidden" name="__hash__" value="96290db4ccbf636eca8290c609e9583a_d2ca22a04abb5414ed08d3918461da34"> </form><!--分享--> <!-- <div class="left share-box"> <p class="left share"> <span class="layui-icon" style="color:rgba(255, 255, 255, 0.5);">&#xe641;</span> <span>分享</span> </p> <div class="bdsharebuttonbox left none" data-tag="share_1"> <p style="margin-bottom: 10px;">分享这一刻,共享精彩快乐~</p> <a class="wx fa" data-cmd="weixin"></a> <a class="qq fa" data-cmd="qzone"></a> <a class="wb fa" data-cmd="tsina"></a> </div> </div> --> </div> <div class="right" style="margin-top:5px;margin-bottom:5px;"><!-- 电脑端禁止送礼物、发红包,防止数据混乱 --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/gift.png" height="30px" class="left envelope ml-10"> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/rewards.png" width="30px" class="left reward ml-10"> --> </div><!-- <div class="clearfix"></div> --> </div> <div class="left-bottom"><!-- 分会场 --> <div class="hallRoomBox"> <p>其他分会场 <span class="hallRoomIndex">2</span>/<span class="hallRoomNum">9</span></p> <ul class="hallRoomUlBox"></ul> </div><!--选项卡--> <div class="tab-box"><!--菜单区域--> </div> </div> </div><!--右侧--> <div class="box-right right"><!--投票--> <div class="vote"> <div class="vote-start cursor-auto"><!-- <marquee scrollamount="2" onMouseOver="this.stop();" onMouseOut="this.start();">正在投票:身份</marquee> --> </div><!-- 投票 --> <div class="vote-box vote-going vote-type-text"> <div class="vote-title" style="text-align:right;"><span class="left">(单选)</span> <span class="vote-close icon-close"></span> <!-- <button type="button" class="close vote-close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> --> </div> <div class="vote-content"> </div><!-- <div class="vote-submit">投票</div> --> </div><!-- <div class="vote-box"> <div class="vote-title" style="text-align:right;"> <span class="left"></span> <button type="button" class="close vote-close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> </div> <div class="vote-content"> </div> <div class="vote-not-allowed">投票</div> </div> --> </div> <div class="chat-height watch-bg"><a href="https://wx-inuoyun-com.translate.goog/Watch/63331?_x_tr_sl=zh-CN&amp;_x_tr_tl=de&amp;_x_tr_hl=en" class="tab-window" style="display:none;"> <img src="/Public/Home/Images/Watch/word-switch.png" alt=""> <span>切换窗口</span> </a> <!--文档直播--> <div class="pdf-live-area" style="display:none;"></div> <div class="pdf-live" style="display:none;"><img class="pdf-live-img" src="" class="img-responsive"> <div class="word-full"><img src="/Public/Home/Images/Watch/word-full.png" alt=""> </div> <div class="word-prev"><img src="/Public/Home/Images/Watch/word-prev.png" alt=""> </div> <div class="word-next"><img src="/Public/Home/Images/Watch/word-next.png" alt=""> </div> <div class="page-num"><span>0</span> <span></span> <span>0</span> </div> </div><!--聊天头部--> <div class="chat-title"><!-- <div class="top-border"></div> --> <!-- <div class="left none">共 <span class="blue">1</span> 条聊天</div> --> <!-- <div class="right">昵称:<span class="blue"></span></div> --> <p class="chat_tab chat_active">互动</p> <p class="rank_tab">排行榜</p> <p class="game_tab" style="display: none;">互动游戏</p><!-- <div class="right"> <a class="login-btn-right" style="color:white;" href="https://open.weixin.qq.com/connect/qrconnect?appid=wxaeab6dafa1571a4f&redirect_uri=https://console.nuoyun.tv/Watch/63331&response_type=code&scope=snsapi_login&state=2017#wechat_redirect"> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/wxlogin.png" style="vertical-align:top;margin-top:14px;"> --> <!-- <span class="fa fa-wechat" style="font-size:18px;vertical-align:middle;margin-right:6px;"></span> 登录 </a> </div> --> </div><!-- 观看奖励开始 --> <div class="view-reward-tip"><span>观看奖励</span> <span class="amount">¥1.00</span> </div><!-- 观看奖励结束 --> <div class="enter-msg-tip-box"> <ul></ul> </div><!--聊天内容--> <ul class="chat" id="dialog"><!-- --> <li class="more-chat mb-15" style="display: none;">点击加载更多</li><!-- 消息提醒 --> <div id="msgNotice"><span class="msg-notice-container"> <span class="msg-number">0</span> 条新消息 </span> </div><!-- --> </ul><!-- 排行榜区域 --> <div class="menu_rank_con"> <div class="rank-box"> <div class="rank-tab-box"> <div> <div class="rank-tab rank-tab-invite"> 邀请榜 </div> <div class="rank-tab rank-tab-reward"> 打赏榜 </div> <div class="rank-tab rank-tab-gift"> 礼物榜 </div> <div class="rank-tab rank-tab-consume"> 消费榜 </div> </div> </div> <div class="rank-content-box"> <div class="rank-content" id="inviteRankContent"> <div class="invite-rank-prize rank-prize"> <div class="invite-rank-prize-header rank-prize-header"></div> <div class="prize-box"> <div class="prize-box-header"> <div></div> <p class="prize-txt-box-btn invite-prize-txt-box-btn" data-type="invite" data-switch="down">领奖说明 <img src="https://i.nuoyun.tv/Public/Home/Images/prize-bottom.png" alt=""></p> <div></div> </div> <div class="prize-txt-box invite-prize-txt-box"></div> </div> </div> <ul></ul> <div class="to-more-invite more-rank"> <span>查看更多</span><img src="https://i.nuoyun.tv/Public/Home/Images/to-more-rank.png" alt=""> </div> </div> <div class="rank-content" id="rewardRankContent"> <div class="reward-rank-prize rank-prize"> <div class="reward-rank-prize-header rank-prize-header"></div> <div class="prize-box"> <div class="prize-box-header"> <div></div> <p class="prize-txt-box-btn reward-prize-txt-box-btn" data-type="reward" data-switch="down">领奖说明 <img src="https://i.nuoyun.tv/Public/Home/Images/prize-bottom.png" alt=""></p> <div></div> </div> <div class="prize-txt-box reward-prize-txt-box"></div> </div> </div> <ul></ul> <div class="to-more-reward more-rank"> <span>查看更多</span><img src="https://i.nuoyun.tv/Public/Home/Images/to-more-rank.png" alt=""> </div> </div> <div class="rank-content" id="giftRankContent"> <div class="gift-rank-prize rank-prize"> <div class="gift-rank-prize-header rank-prize-header"></div> <div class="prize-box"> <div class="prize-box-header"> <div></div> <p class="prize-txt-box-btn gift-prize-txt-box-btn" data-type="gift" data-switch="down">领奖说明 <img src="https://i.nuoyun.tv/Public/Home/Images/prize-bottom.png" alt=""></p> <div></div> </div> <div class="prize-txt-box gift-prize-txt-box"></div> </div> </div> <ul></ul> <div class="to-more-gift more-rank"> <span>查看更多</span><img src="https://i.nuoyun.tv/Public/Home/Images/to-more-rank.png" alt=""> </div> </div> <div class="rank-content" id="consumptionRankContent"> <div class="consumption-rank-prize rank-prize"> <div class="consumption-rank-prize-header rank-prize-header"></div> <div class="prize-box"> <div class="prize-box-header"> <div></div> <p class="prize-txt-box-btn consumption-prize-txt-box-btn" data-type="consumption" data-switch="down">领奖说明 <img src="https://i.nuoyun.tv/Public/Home/Images/prize-bottom.png" alt=""></p> <div></div> </div> <div class="prize-txt-box consumption-prize-txt-box"></div> </div> </div> <ul></ul> <div class="to-more-consumption more-rank"> <span>查看更多</span><img src="https://i.nuoyun.tv/Public/Home/Images/to-more-rank.png" alt=""> </div> </div> </div> </div> </div><!-- game区域 --> <div class="menu_game_con"> <div class="visitor_game_con"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/index/visitor_game.png"> <p>请点击<a href="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=https://open.weixin.qq.com/connect/qrconnect?appid%3Dwxaeab6dafa1571a4f%26redirect_uri%3Dhttps://console.nuoyun.tv/Watch/63331%26response_type%3Dcode%26scope%3Dsnsapi_login%26state%3D2017%23wechat_redirect">【登录】</a>后可参与互动游戏</p> </div> </div><!--输入区域--> <div class="input-box"> <form class="chat-form"> <div class="something"><!-- <div class="something-left"> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/face_1.png" class="face"> 发送图片 <div class="chat-img"> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/send_img_1.png" alt=""> <input type="file" accept="image/*" name="photo" id="file" onchange="uploadimg(this)"> </div> </div> --> <!--清屏/滚动--> <div class="icon-top-right"><span class="txt-clear btn btn-default btn-xs"><span class="fa fa-trash-o"></span> 清屏</span> <span class="txt-scroll btn btn-default btn-xs myactive"><span class="fa fa-chevron-circle-down ml-5"></span> 滚动</span> </div><!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/envelope.png" class="envelope left ml-10"> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/reward.png" class="reward left ml-10"> --> <!-- <span class="layui-icon face left">&#xe650;</span> --> </div> <div class="input-box-container"><!-- <select id="client_list" class="form-control left none"> <option value="all">所有人</option> </select> --> <!-- <textarea class="form-control left" id="chat_box" style="width:100%;"></textarea> --> <!-- <input type="text" class="form-control left" id="chat_box" placeholder="禁言中…" disabled="disabled"> --> <div class="something-left"><img src="https://i.nuoyun.tv/Public/Home/Images/Watch/face_1.png" class="face"> <!-- send picture --> <div class="chat-img"><!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/send_img_1.png" alt=""> <input type="file" accept="image/*" name="photo" id="file" onchange="uploadimg(this)"> --> </div> </div><!-- 非管理员 --> <div class="chat-inp-box"> <div class="messageEditor shutup form-control" id="chat_box" disabled placeholder="禁言中…"></div> </div><!-- <input type="text" class="form-control left" id="chat_box" placeholder="来说点什么吧…"> --> <button type="submit" class="btn btn-primary btn-sm right sendRight">发送</button> </div><input type="hidden" name="__hash__" value="96290db4ccbf636eca8290c609e9583a_d2ca22a04abb5414ed08d3918461da34"> </form> <div class="faces"><!-- 表情包 --> </div> </div> <div class="pcPunchClockIcon"><!-- 未打卡图标 --> <div class="openNotClockedIn"><img class="img-lazy-load" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/notClockedIn.png" alt=""> </div><!-- 已打卡图标 --> <div class="openCheckedIn"><img class="img-lazy-load" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/clockedIn.png" alt=""> </div> </div> </div><!--在线用户头部--> <!-- <div class="chat-title watch-bg none">在线用户</div> --> <!--在线用户列表--> <!-- <div class="online-user watch-bg none"> <div id="userlist"></div> </div> --> <!--送礼物动画--> <div class="gift-abox default-gift-box"> <ul><!-- <li> <p class="left ml-20 mt-10 gift-atxt"><span class="gift-auname white">悲歌</span><br><span class="gift-agname yellow">送 鲜花</span></p> <p class="left mt-10"><img src="https://i.nuoyun.tv/Public/Home/Images/Gifts/3.png" width="36px" height="36px"></p> <p class="left ml-10 txt-28"><span class="gift-ax"></span><span class="gift-anumber"></span></p> </li> --> <!-- <li class="goods-li"> 恭喜 <i class="buy-goods-user-name">小酒杯</i> 成功购买 <i class="buy-goods-name">翡翠项链1条</i> </li> --> </ul> </div><!-- 用户登录 --> <div class="login-user-box"> <div class="mobile_qr"><!--手机端二维码--> <div class="mobile-play right"> <div class="mobile-img"><img src="https://i.nuoyun.tv/Public/Home/Images/Watch/mobile.png" class="mobile_icon"> <p class="login-txt">手机看</p> </div> </div><!--二维码--> <div class="qrcode-box"><!-- <p>扫码观看</p> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/qrcode.png"> --> <img src="" style="vertical-align:initial;border-radius:4px;padding: 10px;background-color: #ffffff;"> </div> </div> <div class="login_line"></div> <div class="login_btn"><a class="login-btn-right" style="color:white;" href="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=https://open.weixin.qq.com/connect/qrconnect?appid%3Dwxaeab6dafa1571a4f%26redirect_uri%3Dhttps://console.nuoyun.tv/Watch/63331%26response_type%3Dcode%26scope%3Dsnsapi_login%26state%3D2017%23wechat_redirect"> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/wxlogin.png" style="vertical-align:top;margin-top:14px;"> --> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/static-avatar.png" class="login_icon"> <span class="login-txt">未登录</span> </a> <!--退出登录--> <div class="logout-box"><!-- <p>扫码观看</p> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/qrcode.png"> --> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/pc/logout.png" class="logout-icon"> <p class="logout-txt">退出</p> </div> </div> </div> </div> <div class="clearfix"></div> </div><!--底部语言选项--> <div class="watch-footer watch-bg none"> <div class="box"> <div class="language-box right"><select class="form-control input-sm"> <option>简体中文</option> <option>English</option> </select> </div> </div> </div> <div class="go-top"> <span class="layui-icon"></span> </div><!--打赏开始--> <div class="modal fade" id="reward"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">打赏</h4> </div> <div class="modal-body" style="padding-right: 0;"> <div class="form-group"><input type="number" class="form-control left" id="amount" placeholder="金额" style="width:50%;"> <button class="btn btn-warning do-reward ml-10" type="button">微信支付</button> </div> <ul class="reward-row mt-20" style="padding-right: 15px;"><!-- --> </ul> <div class="txt-center reward-loading"></div> </div> <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div> </div> </div> </div><!--打赏结束--> <!--创建二维码开始--> <div class="modal fade" id="info"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">打赏</h4> </div> <div class="modal-body text-center"> <p>微信扫码支付</p> <p><input id="out_trade_no" type="hidden" value=""> <img id="wxpay" src=""></p> </div> <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div> </div> </div> </div><!--创建二维码结束--> <!--发红包开始--> <div class="modal fade" id="envelope"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">普通红包</h4> </div> <div class="modal-body"> <div class="form-group"><input type="number" class="form-control mb-10" id="amount_envelope" placeholder="金额"> <input type="number" class="form-control mb-10" id="number_envelope" placeholder="个数"> <textarea class="form-control mb-10" id="remark_envelope" placeholder="祝福语" style="resize:none;" maxlength="20">恭喜发财,大吉大利</textarea> <p class="mb-10" style="overflow:hidden;line-height:24px;"><span class="left">共抢到红包<i class="fa fa-rmb"></i> <var id="robed_total" style="font-style:normal;" class="red"></var>元</span> <span class="right blue robed-btn">我抢到的红包 <i class="fa fa-angle-right txt-16"></i></span></p><button class="btn btn-danger btn-block do-envelope" type="button">塞钱(微信支付)</button> </div> </div> <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div> </div> </div> </div><!--发红包结束--> <!--我的红包开始--> <div class="modal fade" id="robed"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">我抢到的红包</h4> </div> <div class="modal-body"> <ul class="envelope-row mt-20"><!-- --> </ul> <div class="txt-center envelope-loading"></div> </div> <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div> </div> </div> </div><!--我的红包结束--> <!--创建二维码开始--> <div class="modal fade" id="info_envelope"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title">发红包</h4> </div> <div class="modal-body text-center"> <p>微信扫码支付</p> <p><input id="out_trade_no_envelope" type="hidden" value=""> <img id="wxpay_envelope" src=""></p> </div> <div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> </div> </div> </div> </div><!--创建二维码结束--> <!--拆红包弹窗开始--> <div class="open-envelope-box txt-center"> <div class="open-envelope-close"> <span class="common-close-icon"></span> </div><input type="hidden" id="eid"> <div class="open-envelope-photo"><img src="" width="40px" height="40px"> <p class="txt-14 open-envelope-name"></p> <p class="txt-18 mt-20 open-envelope-remark"></p> </div> <div class="open-envelope-btn"> 開 </div> <div class="mt-20"> <a href="javascript:void(0);?_x_tr_sl=zh-CN&amp;_x_tr_tl=de&amp;_x_tr_hl=en" class="look-luck">查看领取详情 <span class="fa fa-angle-right"></span></a> </div> </div><!--拆红包弹窗结束--> <!--中奖金额弹窗开始--> <div class="winner-envelope-box txt-center"> <div class="winner-envelope-close"> <span class="common-close-icon"></span> </div> <div class="winner-envelope-photo"><img src="" width="40px" height="40px"> <p class="txt-12 winner-envelope-name"></p> <p class="txt-18 mt-20 winner-envelope-remark"></p> </div> <div class="winner-envelope-amount"> <span class="txt-28"></span>元 </div> </div><!--中奖金额弹窗结束--> <!--关注二维码开始--> <style type="text/css"> .qrcode-boxs-style { border-radius: 8px; } </style> <div class="qrcode-boxs" style="padding:20px;display:none;"> <p class="txt-16"><span class="green">关注诺云直播</span></p><img class="mt-10" src="https://nyfs.oss.nuoyun.tv/Wechat/Live/nuoyun_wechat_h5.png" width="80%"> <p class="mt-10">做直播 用诺云</p> </div><!--关注二维码结束--> <!--手气开始--> <div class="look-luck-box txt-center"> <div class="look-luck-close"> <span>×</span> </div> <div class="look-luck-photo"><img src="" width="40px" height="40px" style="border-radius: 50%;width: 40px;height: 40px;"> <p class="txt-12 look-luck-name"></p> <p class="txt-12 look-luck-remark"></p> <p class="txt-12 look-luck-amount"><span class="txt-18"></span>元</p> </div><!-- <div class="look-luck-total">已领取<span class="look-luck-consume"></span>/<span class="look-luck-totals"></span>个,共<span class="look-luck-amounts"></span>元</div> --> <div class="look-luck-total"> <span class="total-all none">金额<span class="look-luck-amounts"></span>元, </span>已领取<span class="look-luck-consume"></span>/<span class="look-luck-totals"></span> </div> <ul class="look-luck-row"><!--数据--> </ul> </div><!--手气结束--> <!--充值二维码开始--> <div class="wechatpay-box" style="display: none;padding:15px;"> <div style="position:relative;background:white;padding:0 32px;border-radius:8px;" id="wechat_login_pay"><img src="https://i.nuoyun.tv/Public/Home/Images/android.jpg" class="img-responsive" style="margin:0 auto;margin-top:20px;width:205px;padding: 15px;"> <p class="txt-center" style="line-height:55px;margin-top:-18px;">请扫码到手机端支付</p> </div> </div><!--充值二维码结束--> <!--登录二维码开始--> <div class="wechatlogin-box" style="display:none;"> <div id="wechat_login"><!-- <img src="/Wechat/Index/qrcodePng?data=https://open.weixin.qq.com/connect/qrconnect?appid=wxaeab6dafa1571a4f&redirect_uri=https://console.nuoyun.tv/Watch/63331&response_type=code&scope=snsapi_login&state=2017#wechat_redirect" class="img-responsive" width="200px" height="200px" style="margin:0 auto;"> --> <!-- <img src="https://i.nuoyun.tv/Public/Home/Images/wechat.png" style="position:absolute;top:50%;left:50%;margin-top:-25px;margin-left:-25px;"> --> <img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/layui-close.png" alt="" class="layui-close"> <div class="codeLoginBox"> <p class="txt-center codeLogin" data-type="1">微信登录</p> <p class="txt-center codeLogin DdLogin" style="display: none;" data-type="2">钉钉登录</p> </div><img src="" class="img-responsive img-codeLogin"> <div id="login_container" style="display: none;"></div> <p class="txt-center weChatCodeLogin">请使用微信扫描二维码登录</p> </div><!-- <p>请使用微信扫描二维码登陆后观看</p> --> </div><!--登录二维码结束--> <!--体验版人数限制开始--> <div class="user-limit-box"> <div class="user-limit"> <p class="user-limit-title">提示</p> <p class="user-limit-content">当前观看人数已达上限</p> <p class="user-limit-img mt-10"><img src="https://i.nuoyun.tv/Public/Home/Images/user-limit.png" width="100px"></p> </div> </div><!--体验版人数限制结束--> <!-- 抽奖开始 --> <div class="luckydraw-box"><img src="https://i.nuoyun.tv/Public/Home/Images/lottery-open.gif"> </div> <div class="luckydraw-winner-box"><span class="close-icon"></span> <img src="https://i.nuoyun.tv/Public/Home/Images/Watch/winner_header.png" class="header-bg"> <div class="winner-list"> <p class="txt">获奖名单</p> <p class="prize-title"></p> <div class="user-list"> </div> </div> </div><!-- 抽奖结束 --> <!-- 商品购买的小程序链接开始 --> <div class="goods-purchase-mini-link"><span class="close-icon"></span> <img src=""> <div class="mini-bt-bg"> 请使用微信扫码进行购买 </div> </div><!-- 商品购买的小程序链接结束 --> <!-- 生成二维码 --> <div id="qrcode" hidden></div> <div class="guardBox"> <div class="guardBc"></div> <div class="guardContent"><img src="/Public/Home/Images/guard-top.png" alt=""> <p>你已经观看达到今日提醒时间,建议休息减少观看。如需解除提醒限制,可以前往微信H5或诺云直播IOS版个人中心青少年守护模式中验证调整</p> </div> </div> <div class="quote-bottom"></div> <div class="quote-btn"> 引用 </div> </div> <div class="briefIntroductionDialogBox"> <div class="briefIntroductionDialogBc"></div> <div class="briefIntroductionDialogC"> <div class="briefIntroductionDialog"><img class="bIDialogHeader bIDialogCompany" src="" alt=""> <div class="bIName"> <p></p> </div> <p class="bIIdentity"></p> <p class="DialogIntroduce"></p><img class="closeBriefIntroductionDialog" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/pc-close.png" alt=""> </div> </div> </div> <div class="return-live"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/pc-live-ing.webp" alt=""> <p>返回直播</p> </div><!-- 图片直播 图片播放轮播图 --> <div class="pic-live-list-con"> <div class="pic-live-list-con-bc"></div> <div class="picDetailContent"> <div class="picSwiperMsg"> <p>尺寸:<span class="picSwiperSize1"></span></p> <p>大小:<span class="picSwiperSize2"></span></p> <p>时间:<span class="picSwiperTime"></span></p> <p>地点:<span class="picSwiperAddr"></span></p> </div> <div class="closePicSwiper"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pc-pic-detail-colse.png" alt=""> </div> <div class="picSwiperPaginationBox"> <p class="picSwiperPagination">0</p> <p style="margin: 0 8px;">/</p> <p class="picSwiperPaginationNum">0</p> </div> <div class="swiper-container" id="gallerySwiper"> <div class="swiper-wrapper"></div> </div> <div class="pic-swiper-left"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pc-pic-detail-left.png" alt=""> </div> <div class="pic-swiper-right"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pc-pic-detail-right.png" alt=""> </div> <div class="picSwiperBottom"> <div class="picSwiperLike"> <div class="picSwiperLikeImg"><img class="picSwiperLikeImg1" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pic-like.png" alt=""> <img class="picSwiperLikeImg2" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pic-like-1.png" alt=""> </div> <p>0人喜欢</p> </div> <div class="lookBigImg"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/look-pc-pic.png" alt=""> <p>查看原图</p> </div> <div class="picSwiperPlay"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/newPicture/pic-play.png" alt=""> <p>自动播放</p> </div> </div> <div class="picBuyBottom"> <div class="downloadBtn payPerMoney"> <span class="moneyBtn">付费下载</span> ¥<span class="moneyNum"></span> </div> <div class="downloadBtn freeDownload"> 免费下载 (剩<span class="freeNum"></span>次) </div> <div class="downloadBtn downloadImg"> 下载原图 </div> <p class="validityTime">下载有效期:<span>永久有效</span></p> </div> <div class="picBuyCover"></div> </div> </div> <div class="gameModal"> <div class="mask"></div> <div class="info"><i aria-label="icon: close"> <svg viewbox="64 64 896 896" focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path> </svg></i> <img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/index/warn.svg"> <p>请使用手机微信打开直播间参与活动</p> </div> </div> <div class="picFoldWrapBox"> <div class="picFoldWrap"> <div class="picItem picDownload"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/num/picDownload.png" alt=""> <p>下载</p> </div> </div> </div> <div class="picDownLoadWrap"> <div class="cancelDownBtn"> 取消 </div> <div class="payDownBtn"><span class="moneyBtn">付费下载</span> <span class="moneyTotal"></span> </div> </div><!-- 付费提示弹框 --> <div class="payPicWarnModal"> <div class="payBg"></div> <div class="payPicWarn"> <p class="tipText">高清无水印大图需付费后可下载,付费后<span></span>可查看并下载</p> <p class="momey">¥ <span>345.78</span></p> <div class="payGoBtn"> 立即支付 </div> <div class="payWarnCheck"><img src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/sign-checked.png" alt=""> <p>不再提醒</p> </div> </div><img class="close" src="https://nyfs.oss.nuoyun.tv/Wechat/Live/LivePicture/closeModal.png" alt=""> </div><!-- 微信支付弹框 --> <div class="weChatPayModal"><img class="wechatPayClose" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/layui-close.png" alt=""> <div class="title"><img src="https://nyfs.oss.nuoyun.tv/Wechat/Live/LivePicture/wechat.png" alt=""> <span>微信支付</span> </div> <p class="momey">¥ <span>345.78</span></p><img src="" class="payCode"> <p class="txt-center wechatPayTip">请使用微信扫码支付</p> <p class="txt-center wechatPayTip1">支付过程中请不要关闭该窗口!</p> </div><!-- 微信支付成功弹框 --> <div class="weChatPaySuccessModal"><img class="wechatPaySuccessClose" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/layui-close.png" alt=""> <div class="title"> 支付成功 </div> <div class="tip"> 可批量下载高清无水印大图或前往 <span>个人中心-付费图片</span> 查看已购买图片 </div> <div class="batchDownload"> 批量下载 </div> </div> <div class="batchDownPicModal"><img class="batchDownPicClose" src="https://nyfs.oss.nuoyun.tv/Public/Home/Images/ebusiness/layui-close.png" alt=""> <div class="title"> 批量下载须知 </div> <div class="tip"> 批量下载前请确保浏览器已关闭每次询问下载位置,否则每下载一张照片都将询问一次下载位置 <!-- <span class="lookSetting">查看设置方法</span> --> </div> <div class="batchDownloadBox"><span class="cancelBatchDownBtn">取消</span> <span class="startDownBtn">开始下载</span> </div> </div><!-- 用户打卡开始 --> <div class="PCpunchClockUserModelBg punchClockUserModelBg"></div><!-- 强制打卡通知 --> <div class="PCpunchClockUserDialog forceClockDialog"><img class="punchClockUserDialogIconClose forceClockDialogClose" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/PCicon_close.png" alt=""> <img class="forceClockIcon" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/notClocking.png" alt=""> <div class="forceClockDialogTip"> 您未完成打卡,已暂停观看直播 </div> <div class="punchClockUserDialogBtn forceClockDialogClose"> 继续观看 </div> </div><!-- 打卡弹窗 --> <div class="PCpunchClockUserDialog openNotClockedInDialog"><img class="punchClockUserDialogIconClose punchClockUserDialogClose" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/PCicon_close.png" alt=""> <img class="icon_clockedinbefore" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/beforeClocking.png" alt=""> <!-- <div class="punchClockUserDialogTitle"> 打卡标题打卡标题打卡标题打卡标题打卡标题 </div> --> <div class="pcCountdownTimer"><span class="pcCountdownNumber pcCountdownTimerHour">00</span> <span>时</span> <span class="pcCountdownNumber pcCountdownTimerMinute">00</span> <span>分</span> <span class="pcCountdownNumber pcCountdownTimerSecond">00</span> <span>秒</span> <span>后结束</span> </div> <div class="forceClockTip"> 为避免直播观看暂停,请及时打卡~ </div> <div class="punchClockUserDialogBtn punchClockUserSessions"> 点击打卡 </div> </div><!-- 结果弹窗 --> <div class="PCpunchClockUserDialog ClockedInDialogSuc"><img class="punchClockUserDialogIconClose punchClockUserDialogClose" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/PCicon_close.png" alt=""> <img class="icon_clockedinsuc" src="https://translate.google.com/website?sl=zh-CN&amp;tl=de&amp;hl=en&amp;u=http://nyfs.oss.nuoyun.tv/Public/PunchClock/sucIcon.png" alt=""> <div class="H20"></div><!-- <div class="punchClockUserDialogTitleSuc"> 打卡标题打卡标题打卡标题打卡标题打卡标题 </div> --> <div class="punchClockUserDialogBtn punchClockUserDialogClose"> 关闭 </div> <div class="H12"></div> <p class="CountDownTips">5秒后自动关闭</p> </div><!-- 用户打卡结束 --> <script> // 播放器加载图片 var player_cover_url = ''; var whitelist_sms_verify = ''; //手机白名单短信验证开关 var room_uid = "39612"; //主播id var is_sms = '1';//短信 </script> <script> var verify_switch = ''; </script> <script src="https://s.nuoyun.tv/Public/Home/Js/layui/layui.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/jquery.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Mobile/js/layer/layer.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/bootstrap.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/swfobject.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/websocket.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/CkplayerX/ckplayer/ckplayer.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/jquery.nicescroll.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/Game/jquery.easing.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/qrcode.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/jquery-cookie-js/jquery.cookie.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/config.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/TcPlayer-2.3.3.js?v=V5.16.563" charset="utf-8" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/greensock-js-2.1.2/greensock-js/src/minified/TweenMax.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/VR/three.js" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/VR/mxreality.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/CkplayerX/ckplayer/hls/hls.min.js?v=V5.16.563" crossorigin="anonymous"></script><!-- <script src="https://s.nuoyun.tv/Public/Home/Js/flv.min.js"></script> --> <script src="https://s.nuoyun.tv/Public/Home/Js/flv.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/adapter.js" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/RTCPlayer.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/swiper.4.5.0.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/tencentIM/tencentcloud/index.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/tencentIM/timUploadPlugin/index.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/tencentIM/guid.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/tencentIM/tencentIM.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/k8sLog.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/moblie/ImSay.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Mobile/js/clipboard.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/moblie/reportQueue.js?v=V5.16.563" crossorigin="anonymous"></script> <script> var flvPlayer = undefined; let show_admin_tag = '1'; let showViewReward; var vote_single_switch = ''; //单个投票开启 let openapi_token = ''; var room_id = '63331'; var vr; let isWeChatBlo = false; var sign_switch = '',forceSwitch = ''; var qrcode = new QRCode(document.getElementById("qrcode")); ms_time = new Date().getTime(); let wuspid = getQueryString("wuspid"),password = getQueryParam("password_way"); let wusid = getCookie('wusid'); let pictureSource = "room"; let link_str = `${window.location.origin}/Watch/63331?loginId=${ms_time}${wuspid ? `&wuspid=${wuspid}` : ''}${password ? `&password_way=${password}` : ""}`; qrcode.makeCode(link_str); let goodsPage = 1,goods_list_arr = [],ebusinessMenuId = "",activeMenuId = 0,is_single_menu = 0; $(".copyHref").text(link_str); let nuoyun_sid = ''; let onlineBol = true; let isPc = true; var clipboard = new Clipboard('.copyBtn',{ text:function(trigger){ return link_str; } }); let sensitiveWordList = [] // 4056敏感词需求 let isAlbum = false; var pictureLiveDownConf = {}; // 图片下载配置 var manageAuth = ''; // 获取用户角色信息 let countdownInterval; //开播倒计时 clipboard.on('success',function(e){ layer.msg('复制成功'); e.clearSelection(); }); function getCookie(cname){ var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i++){ var c = ca[i].trim(); if (c.indexOf(name)==0) return c.substring(name.length,c.length); } return ""; } // 获取系统敏感词 $(function() { getSensitiveWordList() }) function getSensitiveWordList() { $.ajax({ url:`${gwApi}/Wx/NuoYun/SystemConfig/getSensitiveWordList`, method: 'POST', headers:{ OpenapiToken:openapi_token }, success: function(res) { if (res.code == 200 && res.data && Array.isArray(res.data.list) && res.data.list.length) { sensitiveWordList = res.data.list // 4056需求添加敏感词过滤 } } }) } // 开启间隔10s的日志上报 const onLiveRoomReportQueue = new ReportQueue(); // 钉钉登录和微信登陆 function weChatOrDdLogin() { // 如果选择微信和钉钉登录 $('.codeLoginBox').css('display','flex'); $('.wechatlogin-box #wechat_login').css('padding','48px 90px'); $('.codeLoginBox p:first-child').addClass('activeLogin'); $('.DdLogin').show().css('margin-left','60px'); $('.img-codeLogin').css('margin','32px auto 0'); $('#wechat_login .codeLogin').css('font-size','20px'); $('.codeLogin').click(function (){ $(this).addClass('activeLogin'); $(this).siblings('').removeClass('activeLogin'); // 说明选择的钉钉登录 if($(this).attr('data-type') == '2'){ $('.weChatCodeLogin').text('请使用钉钉扫描二维码登录'); $('.img-codeLogin').hide(); $('#login_container').show(); $('.weChatCodeLogin').hide(); $('#login_container').css({ 'marginLeft':'-25px', 'position':'relative', 'top':'-8px', }); $('#wechat_login').css('padding','48px 70px 26px 90px'); } else { $('.weChatCodeLogin').text('请使用微信扫描二维码登录'); $('#login_container').hide(); $('.img-codeLogin').show(); $('.weChatCodeLogin').show(); $('#wechat_login').css('padding','48px 90px'); } }) } // 钉钉登录 function DdLogin() { $('.codeLoginBox p:first-child').hide(); $('.DdLogin').show(); $('#login_container').show(); $('.img-codeLogin').hide(); $('.weChatCodeLogin').hide(); $('#wechat_login').css('padding','48px 67.5px 26px 67.5px'); $('#login_container').css({ 'position':'relative', 'top':'-8px', }); } // 获取钉钉登录信息 function dingTalkWeb(){ $.ajax({ url:`/Login/dingTalkWeb`, type:'GET', dataType:'json', data:{ uid:room_uid, room_id:room_id }, success:function(res){ if(res.code == 200){ url = res.data.url;//回调地址 app_id = res.data.app_id;//应用id // 钉钉授权登录 var url = encodeURIComponent(url); var goto = encodeURIComponent(`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=${app_id}&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=`+url); var obj = DDLogin({ id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id,例如<div id="login_container"></div>或<span id="login_container"></span> goto: goto, //请参考注释里的方式 style: "border:none;background-color:#FFFFFF;", width : "265", height: "300" }); var handleMessage = function (event) { var origin = event.origin; // console.log("origin", event.origin); if( origin == "https://login.dingtalk.com" ) { //判断是否来自ddLogin扫码事件。 var loginTmpCode = event.data; //获取到loginTmpCode后就可以在这里构造跳转链接进行跳转了 console.log("loginTmpCode", loginTmpCode); if(loginTmpCode){ window.location.href = `https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=${app_id}&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=${url}&loginTmpCode=${loginTmpCode}`; } } }; if (typeof window.addEventListener != 'undefined') { window.addEventListener('message', handleMessage, false); } else if (typeof window.attachEvent != 'undefined') { window.attachEvent('onmessage', handleMessage); } } } }); } let load_type; // 获取直播间配置信息 $.ajax({ url:`${openapi}/wx/room/getLoadPageInfo`, type:'GET', dataType:'json', data:{ room_id:room_id }, success:function(res){ if(res.code == 200){ load_type = res.data.load_type; // 登录方式 1--仅微信 2--仅钉钉 3 微信和钉钉 if(res.data.pc_login_type == '2'){ DdLogin(); dingTalkWeb(); } else if(res.data.pc_login_type == '3'){ weChatOrDdLogin(); dingTalkWeb(); } } } }); function init() { var scene, renderer; var container; renderer = new THREE.WebGLRenderer(); renderer.setPixelRatio( window.devicePixelRatio ); container = document.getElementById('vr_player'); container.appendChild(renderer.domElement); scene = new THREE.Scene(); // fov 选项可调整初始视频远近 vr=new VR(scene,renderer,container,{"fov":50}); vr.vrbox.radius=600; if(AVR.isCrossScreen()) { // 调整vr视窗偏移量 vr.effect.separation=1.2; } vr.loadProgressManager.onLoad=function () { vr.video.setAttribute("loop","loop"); vr.video.crossOrigin="Anonymous"; } vr.init(function () { }); if(roomInfoData.room_info.live_info.live_status == '直播中'){ if(roomInfoData.room_info.is_fake_live == 1){ vr.play(hls_url,vr.resType.sliceVideo); let nowTime = parseInt(new Date().getTime() / 1000); vr.video.currentTime = nowTime - roomInfoData.room_info.live_info.fake_start_time; }else{ vr.playPanorama(flv_url,vr.resType.flvVideo); } $('#vr_player>div').remove(); let play_html = '<div class="vr_play_content"><button class="dplayer-icon dplayer-play-icon stoplay" onclick="vrPlayerStop()"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32"><path d="M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"></path></svg></button><button class="dplayer-icon dplayer-play-icon play" onclick="vrPlayerPlay()"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 32"><path d="M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"></path></svg></button></div>'; $('#vr_player').append(play_html); }else if(roomInfoData.room_info.live_info.live_status == '回放'){ vr.play(hls_url,vr.resType.sliceVideo); $('#vr_player>div:last-child').remove(); } let app_cover_src = "https://i.nuoyun.tv/Public/Uploads/Cover/20200628/5ef85cefa99ba.png"; let app_cover_img = '<div class="cover_img"><img src="'+app_cover_src+'" /></div>'; let play_btn = '<div class="start-vr-play" onclick="vrPlayerPlay()"></div>'; $('#vr_player').append(app_cover_img); $('#vr_player').append(play_btn); vr.video.onended=function () { } } function vrPlayerPlay(){ vr.video.play(); $('#vr_player .cover_img').hide(); $('#vr_player .start-vr-play').hide(); $('.vr_play_content .play').hide(); $('.vr_play_content .stoplay').show(); } function vrPlayerStop(){ vr.video.pause(); $('.vr_play_content .play').show(); $('.vr_play_content .stoplay').hide(); } let vr_play_content_time; $('#vr_player').on('click',function(){ if(vr_play_content_time){ clearTimeout(vr_play_content_time); } $('.vr_play_content ').show(); vr_play_content_time = setTimeout(function(){ $('.vr_play_content ').hide(); },2000); }); var jwplayer_row = "2"; var user_uid = "39612"; if("{$.global_config.show_admin_tag}" == 2){ $('.is-masters').hide(); } // 获取直播间观看设置还有直播间在线人数 getWatchLimitInfo(); function getWatchLimitInfo() { $.ajax({ url:`${gwApi}/Wx/Room/getWatchLimitInfo`, type:'get', dataType:'json', headers: { OpenapiToken: openapi_token }, data: { room_id:room_id }, success: function(res){ if(res.code == 200){ watchInfo = res.data; if(watchInfo.watch_limit_switch == '1' && watchInfo.online_number >= watchInfo.watch_limit_num){ location.href = `/Watch/getWatchLimitInfoPc?room_id=${room_id}`; } } else { layer.msg(res.msg); } } }) } //跑马灯设置 let horseLampId = ""; var horseLampObj = { switch:'2', type:'2', colorArr:'one', font_size:'20', transpa_value:'100', self_cont:'诺云提供技术支持', color:"" }; switch (horseLampObj.colorArr){ case 'one': horseLampObj.color = '#FF4191'; break; case 'two': horseLampObj.color = '#F91746'; break; case 'three': horseLampObj.color = '#FFBA46'; break; case 'four': horseLampObj.color = '#DBB76B'; break; case 'five': horseLampObj.color = '#9900CC'; break; case 'six': horseLampObj.color = '#248EF4'; break; case 'seven': horseLampObj.color = '#0056C8'; break; case 'eight': horseLampObj.color = '#009999'; break; case 'nine': horseLampObj.color = '#330099'; break; case 'ten': horseLampObj.color = '#000000'; break; } if(horseLampObj.switch == 1){ if(nuoyun_sid){ if(horseLampObj.type == 1){ $('.horse-lamp').text('ID: ' + horseLampId + '用户正在观看'); }else{ $('.horse-lamp').text(horseLampObj.self_cont); } horseLampObj.transpa_value = horseLampObj.transpa_value / 100; $('.horse-lamp').css({'font-size':horseLampObj.font_size + 'px','opacity':horseLampObj.transpa_value,'color':horseLampObj.color}).show(); } } function getCustomMenuGoodsCategory(){ return new Promise((resolve)=>{ $.ajax({ url: `${gwApi}/Wx/AppInfo/customMenuGoodsCategory`, type: 'get', dataType: 'json', data:{ custom_menu_id:ebusinessMenuId }, success:function(res){ resolve(res); } }); }); } function getGoodsByCategory(id,categoryId = ""){ goodsLoad = true; let menuId = id,boxId = ""; if(screen_type == "2"){ boxId = categoryId; }else{ boxId = id; } $.ajax({ url: `${openapi}/Wx/AppInfo/getGoodsByCategory`, type: 'get', dataType: 'json', data:{ room_id:room_id, custom_menu_id:menuId, custom_menu_goods_category_id:categoryId, uid:room_uid, pageCurrent:goodsPage, pageNum:30 }, success:function(res){ if(res.code == 200){ goods_list_arr = [...goods_list_arr,...res.data]; let good_str = ""; res.data.forEach((t,index)=>{ good_str += `<li><div class="goods-thumb"><img src="${t.img}" class="img-responsive"></div><div class="goods-info-box"><div style="" class="goods-info"><p class="goods-name">${t.name}</p><p class="goods-price">¥<span>${t.lowest_price.split(".")[0]}</span>.${t.lowest_price.split(".")[1]}</p></div><div class="goods-oper">`; switch (t.linkType){ case 'pic': good_str += `<a href="javascript:void(0);" class="goods-btn mini-purchase" data-src="${t.linkPicPath}">立即购买</a>`; break; case 'text': good_str += ` <a href="${t.link}" class="goods-btn">立即购买</a>`; break; case 'local': case 'applet': good_str += `<a href="javascript:void(0);" class="goods-btn local">立即购买</a>`; break; } // good_str += ` </div><div class="goods-dis-price"><span>${t.underlined_price > 0 ? t.underlined_price : ""}</span></div></div></li>`; good_str += ` </div></div></li>`; }); if(goodsPage == 1){ $(`.goods-content-${boxId}`).html(good_str); }else{ $(`.goods-content-${boxId}`).append(good_str); } if(res.page.total <= 0){ $(`.goods-content-no-data`).show(); }else{ $(`.goods-content-no-data`).hide(); } } goodsLoad = false; }, error:function(){ goodsLoad = false; } }); } // 判断直播间类型是否显示发送图片 if(LIVETYPE == 'ebusiness'){ $('.vote-start').css('left','42px'); } function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) { return unescape(r[2]); } return null; } function getQueryParam(name) { var reg = new RegExp('(^|&|/|\\?)' + name + '[=/]([^&/\\?]*)(&|$|/|\\?)', "i"); var r = window.location.href.match(reg); if (r != null) return (r[2]); return null; } // 发送图片 // 上传图片 function uploadimg(obj){ if(!nuoyun_sid){ wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); return false; } if(is_shut_up === '1' || is_shut_up_all === '1'){ // 禁言 if('' != 'is'){ //非管理员 return false; } } var selectedFile = obj.files[0];//文件对象 //解决上传相同图片不触发onchange事件 var nf = obj.cloneNode(true); nf.value=''; obj.parentNode.replaceChild(nf, obj); $.ajax({ url:openapi + '/Wx/AliOss/liveImgPolicy', type:'post', dataType:'json', data: { room_id: room_id, }, success:function(res) { var ossConfig = { policy:res.policy, OSSAccessKeyId:res.accessid, callback:res.callback, signature:res.signature, url:res.host, dir:res.dir, }; // var photoName = selectedFile.name; // 原图片的名称 var pointIndex = selectedFile.name.lastIndexOf('.'); var suffixName = selectedFile['name'].substring(pointIndex);//后缀名 var photoName = new Date().getTime() + (Math.floor(Math.random()) * 3665668) + suffixName; // 原图片的名称 var key = ossConfig.dir + photoName; // 存储到oss的图片名称 自己定,必须确保唯一性,不然会覆盖oss中原有的文件 var policy = ossConfig.policy; // 服务器端同事调oss的API,通过接口返回给前端的 policy var OSSAccessKeyId = ossConfig.OSSAccessKeyId; // 服务器端同事调oss的API,通过接口返回给前端的 OSSAccessKeyId var callback = ossConfig.callback; // 服务器端同事调oss的API,通过接口返回给前端的 callback。这个是需要 oss 触发这个回调来通知服务器操作结果。 var signature = ossConfig.signature; // 服务器端同事调oss的API,通过接口返回给前端的 signature。这个就是签名,最关键的。 var url = ossConfig.url; var dir = ossConfig.dir; var formData = new FormData(); formData.append('name', photoName) formData.append('key', key) formData.append('policy', policy) formData.append('OSSAccessKeyId', OSSAccessKeyId) formData.append('success_action_status', 200) // 不要问为什么,照做 formData.append('callback', callback) formData.append('signature', signature) formData.append('file', selectedFile, photoName); // 这个 $.ajax({ url:url, type:'post', processData: false, // 增加这一行,不处理参数 contentType: false, data: formData, success:function(res) { if(res.code == 200){ if (roomInfoData.user_config.live_wss_type == "tencent" && IMLiveObj.isReady) { let sendData = saySendData({ img_src: res.data.full_url }, "image") IMLiveObj.sendMessage(JSON.stringify(sendData.data), sendData.priority); wsSay(sendData.data); } else { var obj = { msg_type: 'image', content: { img_src: res.data.full_url } } ws.send('{"image":"image","type":"say","to_client_id":"all","to_client_name":"所有人","content":'+JSON.stringify(obj)+'}'); } }else{ layer.msg(res.msg); } }, error: function(data, status, e){ console.log(e); } }) } }); } // 点击看大图 $(document).on('click','.wx-upload-images',function(){ var wx_upload_images_now = ''; if($(this).attr('src').indexOf('x-oss-process') > -1){ wx_upload_images_now = $(this).attr('src').split('?x-oss-process')[0]; }else{ if($(this).attr('src').indexOf('http') > -1){ wx_upload_images_now = $(this).attr('src'); }else{ wx_upload_images_now = 'https://console.nuoyun.tv/'+$(this).attr('src'); } } let img_html = `<img src="${wx_upload_images_now}" style="object-fit: contain;width:100%;height:100%;">`; layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: 1, title:false, shade: 0.4, shadeClose:true, area:['1000px','600px'], content: img_html }); }); }); }); var visit_number_txt = ""; var qrcode_has_show = false; $(window).load(function(){ // if (rewardSwitch == 1 && rewardTipSwitch == 1) { // showViewRewardTip(); // } }); /* 购买商品的小程序二维码 */ $(document).on('click','.mini-purchase',function(){ var src = $(this).data('src'); $('.goods-purchase-mini-link img').attr('src', src); $('.goods-purchase-mini-link').show(); }); $('.goods-purchase-mini-link .close-icon').click(function() { $('.goods-purchase-mini-link').hide(); }); $("#chat_box").keydown(function(e){ if (e.keyCode == 13) { $(".chat-form").submit(); return false; } }); let tourist_speak = '1'; //进入直播间提醒 var enterTip = '0'; //签到样式 function signCommon() { /*var input = '<div class="txt-center"><img src="https://i.nuoyun.tv/Public/Home/Images/sign_top.png" width="120"></div>'; input += '<div class="item"><label></label><input type="text" placeholder="" class="form-control mb-10 sign-name"></div>'; input += '<div class="item"><label></label><input type="text" placeholder="" class="form-control mb-10 sign-mobile"></div>'; input += '<input type="button" value="签到" class="btn btn-block sign-btn">'; input += '<img src="https://i.nuoyun.tv/Public/Home/Images/sign_bottom.png" width="120" class="sign-bottom"/>'; var params = { type: 1, title: '签到', skin: 'sign-style', content: input, btn: false, closeBtn: 1, style: '', offset: 'auto' }; layer.open(params);*/ } function wechatLoginQrcode(){ /*var obj = new WxLogin({ id: "wechat_login", appid: "wxaeab6dafa1571a4f", scope: "snsapi_login", redirect_uri: "https://console.nuoyun.tv/Watch/63331", state: "2017", style: "white", href: "https://api.nuoyun.tv/static/qrcode.css?v=V5.16.563" });*/ $('#wechat_login').find('.img-codeLogin').attr('src',$('#qrcode img').attr('src')); wechat_login_timer = setInterval(function(){ $.ajax({ url:"/Watch/loginStatus", type:'post', dataType:'json', data:{ ms_time:ms_time }, success:function(result){ if(result.code == 1){ window.location.reload(); clearInterval(wechat_login_timer); return false; } } }); },1000); } // 签到 var signed = ''; $('.sign-img').click(function(){ var openid = ''; if(!openid){ wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); return false; } if(signed == 1){ layer.msg('签到过了'); return false; } // signCommon(); window.location.href = '/Watch/signPage/room_id/63331'; }); // 取消支付 $('#info button').click(function(){ // 打赏 clearInterval(timer); }); $('#info_envelope button').click(function(){ // 红包 clearInterval(timer_envelope); }); // 观看限制 var charge_timer = false; // 判断是否支付成功 var chargeIsComplete = function(){ var appid = '63331'; var unionid = ''; $.ajax({ url:"/Watch/chargeIsComplete", type:'post', dataType:'text', data:{ appid:appid, unionid:unionid }, success:function(result){ result = JSON.parse(result); if(result.code == 200){ clearInterval(charge_timer); layer.alert('支付成功!',{icon: 1},function(){ window.location.reload(); }); return false; } } }); } $(document).on('click','.sign-btn',function(){ var sign_name = $('.sign-name').val(); var sign_mobile = $('.sign-mobile').val(); if(!sign_name || !sign_mobile){ // layer的话会关闭输入框,体验不好,给不需要关闭的layer弹层加上type:1也可以解决这个问题 layer.msg('信息不完整'); return false; } // 手机号格式是否正确 // var pattern = /^1[3|4|5|6|7|8|9]\d{9}$/; var pattern = /(^(\d{11})$|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d)|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d))$|^(\d{12,20})$)/; if(!pattern.test(sign_mobile)){ layer.msg('手机号格式不正确'); // $('.sign-mobile').focus(); return false; } var patterns = /^[\u4e00-\u9fa5A-Za-z]+$/; if(!patterns.test(sign_name)){ layer.msg('姓名格式不正确'); // $('.sign-name').focus(); return false; } $.ajax({ url:'/Watch/sign', type:'post', dataType:'text', data:{ 'appid':'63331', 'sign_name':sign_name, 'sign_mobile':sign_mobile }, success:function(result){ if(result == 'success'){ layer.msg('签到完成'); setTimeout(function(){ layer.closeAll(); signed = 1; },1000); }else if(result == 'signed'){ layer.msg('签到过了'); }else if(result == 'signed_mobile'){ layer.msg('该手机号已签到'); }else if(result.indexOf('signed_other') > -1){ var arr = result.split(','); layer.msg('该' + arr[1] + '已签到'); } } }); }); $(document).on('click','.play-code-btn',function(){ // 输入密码 var play_code = $('.play-code').val(); $.ajax({ url:'/Watch/setLimitPwd', type:'post', dataType:'text', data:{ 'appid':'63331', 'play_code':play_code }, success:function(result){ if(result == 'success'){ window.location.reload(); }else if(result == 'pwd_err'){ layer.msg('亲,密码不对哦!'); } } }); }); $(document).on('click','.whitelist-btn',function(){ // 手机白名单提交验证 var whitelist_input = $('.whitelist-input').val(); // 手机号格式是否正确 // var pattern = /^1[3|4|5|6|7|8|9]\d{9}$/; var pattern = /(^(\d{11})$|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d)|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d))$|^(\d{12,20})$)/; if(!pattern.test(whitelist_input)){ layer.msg('手机号格式不正确'); return false; } if($('.sms-container .sms-input').length > 0){ if($('.sms-container .sms-input').val() == '' || $('.sms-container .sms-input').val().trim() == ''){ layer.msg('验证码不能为空'); return false; } } var whiteData = { 'appid':'63331', 'whitelist_input':whitelist_input }; //判断手机短信验证码是否开启 if(whitelist_sms_verify == 1){ //开启 whiteData = { 'appid':'63331', 'whitelist_input':whitelist_input, 'sms_code':$('.sms-container .sms-input').val(), 'room_uid':room_uid } } $.ajax({ url:'/Watch/setLimitWhitelist', type:'post', dataType:'text', data:whiteData, success:function(result){ if(result == 'success'){ window.location.reload(); }else if(result == 'whitelist_err'){ layer.msg('抱歉,该手机号码不在授权名单中,您无权观看直播'); }else if(result == 'whitelist_used'){ layer.msg('抱歉,该手机号码已被占用,请更换'); }else if(result == 'sms_code_err'){ layer.msg('抱歉,验证码错误'); } } }); }); /******手机白名单短信验证******/ //验证白名单手机号 function confirmWhiteTel(){ var rs; var whitelist_input = $('.whitelist-input').val(); // 手机号格式是否正确 // var pattern = /^1[3|4|5|6|7|8|9]\d{9}$/; var pattern = /(^(\d{11})$|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d)|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d))$|^(\d{12,20})$)/; if(!pattern.test(whitelist_input)){ layer.msg('手机号格式不正确'); rs = false; return false; } $.ajax({ url:'https://openapi.nuoyun.tv/Wx/AppInfo/checkWhitelist', // url:'http://116.62.62.85:9501/Wx/AppInfo/checkWhitelist', type:'post', dataType:'json', data:{ 'room_id':room_id, 'mobile':whitelist_input }, async:false, success:function(result){ if(result.code == 200){ // window.location.href = window.location.href + '?t=' + Math.random(); // return true if(result.data.is_in_whitelist == 1){ //在白名单里 但是已经被占用了 if(result.data.is_mobile_used == 1){ //被占用了 rs = false; layer.msg('抱歉,该手机号码已被占用,请更换'); }else{ //没有被占用 rs = true; } }else{ rs = false; layer.msg('抱歉,该手机号码不在授权名单中,您无权观看直播'); } // showPop(); } } }); return rs; } //获取短信验证码 function getSms(type){ $.ajax({ url:openapi+'/Mobile/Tools/sendVerifyCode', type:'post', dataType:'json', headers: { OpenapiToken: openapi_token }, data:{ "phone_number":type == 1 ? $('.whitelist-input').val() : type == 3 ? $('.empower-phone').val() : '', "uid":room_uid, "room_id":room_id, "type":type }, success:function(result){ if(result.code == 200){ layer.msg('验证码发送成功'); }else{ layer.msg(result.msg+'['+result.code+']'); } }, error:function(res) { layer.msg('网络出现问题,请稍后再试'); } }); } $(document).on('click','.sms-container .get-verify',function(){ var isAllow = confirmWhiteTel(); //手机号符合条件 if(isAllow){ //允许获取验证码 //先验证手机号格式 再获取验证码 $('.sms-container .get-verify').hide(); $('.sms-container #ticker').css('display', 'inline-block'); var time = 60; var ticker = setInterval(function() { time -= 1; $('#ticker').text(time + 's后可重发'); if (time == 0) { $('.get-verify').css('display', 'inline-block');; $('#ticker').hide(); clearInterval(ticker); } }, 1000); //获取短信验证码 getSms(1); } }) $(document).on("click",".get-empower-code", function(){ let Ajaxdata = { check:true, room_id:room_id, first:$(".empower-first").val(), second:$(".empower-second").val(), third:$(".empower-third").val() } Ajaxdata[phoneKey] = $(".empower-phone").val(); if(Ajaxdata[phoneKey]){ $('.sms-container .get-empower-code').hide(); $('.sms-container #empowerTicker').css('display', 'inline-block'); var time = 60; var ticker = setInterval(function() { time -= 1; $('#empowerTicker').text(time + 's后可重发'); if (time == 0) { $('.sms-container .get-empower-code').css('display', 'inline-block');; $('#empowerTicker').hide(); clearInterval(ticker); } }, 1000); $.ajax({ url:`${openapi}/Wx/Room/customLimit`, type:"post", dataType:"json", data:Ajaxdata, headers: { OpenapiToken: openapi_token }, success:function(res){ if(res.code == 200){ //获取短信验证码 getSms(3); }else{ layer.msg(res.msg); } } }); }else{ layer.msg("请输入手机号"); } }); //手机白名单短信验证码输入 $(document).on('focus','.sms-container .sms-input',function(){ // var isAllow = confirmWhiteTel(); // if(isAllow){ //手机号通过验证 // 按钮颜色变化 $('.whitelist-btn').removeAttr('disabled'); // } }) $(document).on('click','.limit-money-amount-btn',function(){ // 付费观看 var limit_money_amount = $('.limit-money-amount').text(); ms_time = new Date().getTime(); $('#wechat_login_pay img').attr('src',$('#qrcode img').attr('src')); layer.open({ type: '1', title: false, content: $('.wechatpay-box'), btn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none no-close-icon', style: 'txt-center' }); charge_timer = setInterval(function(){ chargeIsComplete(); },3000); }); // 登录 $('.login-btn-right,.menu_game_con .visitor_game_con a').click(function(){ wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, // closeBtn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); $('.layui-layer-page').find('.layui-layer-setwin').hide(); $('#wechat_login .layui-close').show(); return false; }); // 关注公众号 $('.pc-focus-qrcode').click(function () { layer.open({ type: 1, title: false, closeBtn: 0, shadeClose: true, area: '240px', skin: 'txt-center qrcode-boxs-style', // offset: 'b', content: $('.qrcode-boxs') }); }); let IMLiveObj,chatGuid = ""; var isSubscriptOpen = '0'; var isSubscriptAutoPopup = '0'; var limit = ''; let empower_whitelist_sms_verify,empowerConfig,phoneKey,roomInfoData,main_hall_sw,roomHallListId = ""; $.ajax({ url:`${openapi}/Wx/Room/pageInfo`, type:"post", dataType:"json", headers: { OpenapiToken: openapi_token }, data:{ uid:room_uid, room_id:room_id, password_way:password }, success:function(res){ if(res.code == 200){ localStorage.setItem('show_bullet',res.data.room_info.show_bullet); localStorage.setItem('show_bullet_style',res.data.room_info.show_bullet_style); roomInfoData = res.data; chatGuid = new GUID(); IMLiveObj = new IMLive({nuoyunSid: nuoyun_sid, roomUid: room_uid, roomId: room_id, onMessageReceived: ImOnMessageReceived}); IMLiveObj.init(); if(roomInfoData.user_config.is_lite == 1){ $(".start-time").hide(); }else{ $(".start-time").css("display","flex"); } if(roomInfoData.room_info.version == -1) { maturity_pc = 'https://i.nuoyun.tv/Public/Home/Images/maturity-pc.png'; maturity_html = '<img src="'+maturity_pc+'" class="maturity_pc">'; $('.middle-box').append(maturity_html); } if(!nuoyun_sid && ('no' == 'yes' || horseLampObj.switch == 1 || load_type == '3')){ qrcode_has_show = true; setTimeout(function(){ wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none no-close-icon', style: 'txt-center' }); }); }); },500) }else{ if(!roomInfoData.is_allowed_watch && is_master != "is"){ setTimeout(function(){ wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, // closeBtn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none no-close-icon', style: 'txt-center' }); }); }); },500) } } if(roomInfoData.room_info.live_info.live_status == '已结束' && roomInfoData.room_info.able_watch_in_live == 1 && is_master != "is"){ window.location.href = "/Watch/pcLiveEnd"; } // 默认显示第一个菜单 $('.tab-menu').eq(0).addClass('active'); if($('.tab-menu').eq(0).data("type") == "profile"){ getBriefIntroduction(); } // 默认显示第一个卡片 // if($('.tab-menu').eq(0).data("type") == "card"){ // getCardList($('.tab-menu').eq(0).attr('data-menu-id')); // $('.card-type').css('display','flex'); // } if(screen_type == "2"){ $.ajax({ url: openapi + '/MiniProgram/Menu/index?req_client=2&id=' + room_id+'&wechat_user_space_id='+wusid, type:'get', dataType:'json', success:function(ret){ if(ret.code == 1){ for(let i = 0;i < ret.data.length;i++){ if(ret.data[i].type == "goods"){ ebusinessMenuId = ret.data[i].id; break; } } getCustomMenuGoodsCategory().then((res)=>{ if(res.code == 200){ is_single_menu = res.data.length; let menuDom = `<div class="goods-content-menu-item active" data-id="0">全部</div>`,contentDom = `<div class="goods-content goods-content-box-0"><ul class="goods-content-box goods-content-0"></ul></div>`; if(is_single_menu > 0){ res.data.forEach((item,index)=>{ menuDom += `<div class="goods-content-menu-item" data-id="${item.id}">${item.category_name}</div>`; contentDom += `<div class="goods-content goods-content-box-${item.id}"><ul class="goods-content-box goods-content-${item.id}"></ul></div>`; }); $(".goods-content-menu-box").html(menuDom); $(".goods-content-menu-box").css("display","flex"); }else{ $(".goods-content-menu-box").html(menuDom); } $(".goodsContentSwiper").html(contentDom); $(".goodsContentSwiper").show(); $(`.goodsContentSwiper .goods-content-box-${activeMenuId}`).show(); getGoodsByCategory(ebusinessMenuId,activeMenuId); } }) } } }) }else{ if($('.tab-menu').eq(0).data("type") == "goods"){ getGoodsByCategory($('.tab-menu').eq(0).attr('data-menu-id'),""); } } $('.tab-content-s').eq(0).addClass('active'); if(roomInfoData.room_info.live_info.live_status == '未开始' && '0' > 0) { var startTime = '1593334996'; if (countdownInterval && clearInterval(countdownInterval), startTime) { $(".countdown").show(); var timeDelta = Math.floor((startTime - (new Date).getTime() / 1e3)); countdownInterval = setInterval(function() { if (timeDelta && timeDelta > 0) { timeDelta -= 1; if(Math.floor(timeDelta / 24 / 3600)>0){ $(".countdown-time").html(Math.floor(timeDelta / 24 / 3600) + "天" + newCalCountDown(timeDelta)); }else{ $(".countdown-time").html(newCalCountDown(timeDelta)); } } else { setTimeout(function() { location.reload(); }, 1000); $(".countdown").hide(); clearInterval(countdownInterval); } }, 1e3); } } else { $(".countdown").hide(); } if(roomInfoData.room_info.chat_msg_switch == 1 || is_master == "is"){ $('.more-chat').click(); }else{ $(".more-chat").hide(); } roomHallListId = roomInfoData.room_info.main_hall_room_id; main_hall_sw = res.data.room_info.main_hall_sw == 1 ? res.data.room_info.main_hall_sw : res.data.room_info.branch_hall_switch == 1 ? res.data.room_info.branch_hall_switch : ""; if(main_hall_sw == 1){ hallRoomHtml(); } if(res.data.room_info.global_config.live_status == 1){ $(".video-type").show(); $(".upper-left .upper-info .upper-info-top .box-live").css("display","flex"); }else{ $(".video-type").hide(); $(".upper-left .upper-info .upper-info-top .box-live").hide(); } autoplay = roomInfoData.is_allowed_watch; if(roomInfoData.is_allowed_watch || '' == 'is'){ // setPlayUrl(); videoInit(); } visit_number_txt = res.data.room_info.visit_number; $("#visit_number_txt").text(visit_number_txt); // if(''){ // $.ajax({ // url:`${openapi}/Wx/YouthModel/youthModelInfo`, // type:"get", // dataType:"json", // headers:{ // OpenapiToken:openapi_token // }, // success:function(ret){ // if(ret.data.youth_model_is_open == 1){ // let guardTime = ret.data.duration_today * 1; // let timeNum = ret.data.youth_model_watch_duration - guardTime; // let nowTime = new Date(ret.data.current_time*1000).getHours(); // let startHour = new Date(ret.data.youth_model_watch_over_time*1000).getHours(),endHour = new Date(ret.data.youth_model_watch_begin_time*1000).getHours(); // if(nowTime >= startHour || nowTime < endHour){ // window.location.href = "/Watch/pcGuard"; // }else{ // if(timeNum > 0){ // let guardtimeData = setInterval(() =>{ // timeNum--; // if(timeNum <= 0){ // // $(".guardBox").fadeIn(200); // clearInterval(guardtimeData); // guardVideo(); // } // },1000); // }else{ // // $(".guardBox").fadeIn(200); // guardVideo(); // } // } // } // } // }); // } if(roomInfoData.room_info.wallFlag){ if(nuoyun_sid){ $.ajax({ url:window.location.origin + '/watch/wallFlagLogin', type:'post', dataType:'json', data: { room_id: room_id, id: '63331', nickName: roomInfoData.user_info ? roomInfoData.user_info.nick_name : "", headImg: '', wallFlag: roomInfoData.room_info.wallFlag }, success:function(res){ if(res.code == 200){ let iframe = `<iframe width="100%" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src=${res.data} id="gameIframe"></iframe>`; $(".menu_game_con").html(iframe); // iframe 实现跳转功能 document.getElementById("gameIframe").onload = function(){ // 监听事件示例 window.addEventListener( 'message', (e) => { switch(e.data.type){ case 'HXC_ONLY_MOBILE': $(".pc.watch .gameModal").show(); break; } }, false, ) }; } } }) }else{ $(".menu_game_con .visitor_game_con").css("display",'flex'); } } if (roomInfoData.room_info.force_check_in == 1) { $(".forceClockTip").show(); } // 多语言切换 默认开关开启并且是中文 if(roomInfoData.room_info.lang_switch == '1' && roomInfoData.room_info.default_lang == '1'){ $('.languageSwitching').find('.englishLanguages').show(); $('.languageSwitching').find('p').show(); setTimeout(() => { chineseLanguages(); }, 300); } else if(roomInfoData.room_info.lang_switch == '1' && roomInfoData.room_info.default_lang == '2'){ $('.languageSwitching').find('.chineseLanguages').show(); $('.languageSwitching').find('p').show(); setTimeout(() => { englishLanguage(); }, 300); } if(localStorage.getItem('languagesType') == 'true'){ $('.chineseLanguages').hide(); $('.englishLanguages').show(); setTimeout(() => { chineseLanguages(); }, 300); } else { $('.chineseLanguages').show(); $('.englishLanguages').hide(); setTimeout(() => { englishLanguage(); }, 300); } if(roomInfoData.room_info.lang_switch == 2){ $('.englishLanguages').hide(); $('.chineseLanguages').hide(); setTimeout(() => { chineseLanguages(); }, 300); } if(isSubscriptOpen == 1 && isSubscriptAutoPopup == 1){ setTimeout(function(){ $('.pc-focus-qrcode').click(); },2000); } // 临时处理简版控制台多语言处理问题 if(roomInfoData.user_config.is_lite == 1){ localStorage.setItem('languagesType','true') } } } }); $(document).on("click",".goods-content-menu-item",function(){ if(!$(this).hasClass("active")){ $(".goods-content-menu-item").removeClass("active"); $(`.goods-content-box-${activeMenuId}`).hide(); activeMenuId = $(this).data("id"); goodsPage = 1; getGoodsByCategory(ebusinessMenuId,activeMenuId); $(this).addClass("active"); $(`.goods-content-box-${activeMenuId}`).show(); } }); function guardVideo(){ $('.start-play').hide(); $('.cover-app').show(); $('#video_player').remove(); } $(document).on("click",".empower-btn",function(){ // get-empower-code let Ajaxdata = { room_id:room_id, first:$(".empower-first").val(), second:$(".empower-second").val(), third:$(".empower-third").val(), sms_code:"" } if(phoneKey){ Ajaxdata[phoneKey] = $(".empower-phone").val(); if(!Ajaxdata[phoneKey]){ layer.msg("请输入手机号"); return; } } if(empower_whitelist_sms_verify == 1){ if($(".empower-code").val()){ Ajaxdata.sms_code = $(".empower-code").val(); }else{ layer.msg("请输入验证码"); return; } } $.ajax({ url:`${openapi}/Wx/Room/customLimit`, type:"post", dataType:"json", data:Ajaxdata, headers: { OpenapiToken: openapi_token }, success:function(res){ if(res.code == 200){ window.location.href = window.location.href + '?t=' + Math.random(); }else{ layer.msg(res.msg); } } }); }); var txt_scroll = true; // 滚动 $('.txt-scroll').click(function(){ if(!txt_scroll){ $(this).addClass('myactive'); txt_scroll = true; }else{ $(this).removeClass('myactive'); txt_scroll = false; } }); // 清屏 $('.txt-clear').click(function(){ $('#dialog li.mb-4').remove(); $('#dialog li.msg-type-pc').remove(); }); // 礼物 $('li.gift-item').hover(function(){ var index = $(this).index(); var offset_x = - 176 + index * 44 + 22; $('.gift-info').show().stop().animate({'left':offset_x + 'px'}); },function(){ $('.gift-info').hide(); }); $('li.gift-item').click(function(){ $(this).addClass('active').siblings().removeClass('active'); }); // 查看手气 $('.look-luck').click(function(){ var eid = $('.open-envelope-box #eid').val(); var eshare = $('.open-envelope-name').text(); var ephoto = $('.open-envelope-photo img').attr('src'); var eremark = $('.open-envelope-remark').text(); $.ajax({ url:'/Watch/lookLuck', type:'post', dataType:'json', data:{ eid:eid }, success:function(result){ if(result){ $('.look-luck-name').text(eshare); $('.look-luck-remark').text(eremark); $('.look-luck-photo img').attr('src',ephoto); $('.look-luck-amount span').text(result.amount); $('.look-luck-consume').text(result.get_number); $('.look-luck-totals').text(result.total_number); $('.look-luck-amounts').text(result.get_amount); $('.look-luck-row').html(result.html); if(result.get_number == result.total_number){ //抢完了 $('.total-all').removeClass('none'); $('.total-all').addClass('show-in'); }else{ $('.total-all').removeClass('show-in'); $('.total-all').addClass('none'); } } } }); layer.open({ type: 1, title: false, closeBtn: 0, area: ['240px','340px'], content: $('.look-luck-box') }); return false; }); // 发红包 $('.envelope').click(function(){ var openid = ''; if(!openid){ // layer.alert('请先登录',function(){ // window.location.href = "https://open.weixin.qq.com/connect/qrconnect?appid=wxaeab6dafa1571a4f&redirect_uri=https://console.nuoyun.tv/Watch/63331&response_type=code&scope=snsapi_login&state=2017#wechat_redirect"; // }); // return false; wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, // closeBtn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); return false; } // mleft,mright,mbottom $('#envelope').attr('class','modal fade').addClass('mbottom').modal(); }); var pay_is_process_envelope = false; var timer_envelope = false; $('.do-envelope').click(function(){ // 获取金额 var amount = $('#amount_envelope').val(); var number = $('#number_envelope').val(); var remark = $('#remark_envelope').val(); if(!amount){ layer.msg('还没有输入金额!'); return false; } if(amount < 1){ layer.msg('金额不能小于1元!'); return false; } if(!number){ layer.msg('请输入红包个数!'); return false; } if(number > 500){ layer.msg('个数不能大于500!'); return false; } if((amount - number * 0.01) < 0){ var msg_envelope = amount + '元,最多只能发' + amount * 100 + '个红包'; layer.msg(msg_envelope); return false; } amount = amount + '.00'; $.ajax({ url:'/Envelope/recharge', type:'post', dataType:'json', async:false, data:{ 'amount':amount, 'number':number, 'remark':remark, 'master_txt':master_txt }, success:function(result){ $('#wxpay_envelope').attr('src',"/Wechat/Index/qrcodePng?data="+result.url2); $('#out_trade_no_envelope').val(result.out_trade_no); pay_is_process_envelope = 'process'; } }); if(pay_is_process_envelope == 'process'){ $('#info_envelope').modal(); timer_envelope = setInterval(function(){envelopeIsComplete();},3000); } }); // 判断是否支付成功 var envelopeIsComplete = function(){ } // 抢红包 var robEnable = true; var redData; var redInterval; // 处理时间戳 function formatDate(now) { now = new Date(now); var year=now.getFullYear(); var month=now.getMonth()+1; var date=now.getDate(); var hour=now.getHours(); var minute=now.getMinutes(); var second=now.getSeconds(); return month+"月"+date+"日"+hour+"时"+minute+"分"; } //计算倒计时 function DateDifference(timeStart,timeEnd){ var usedTime = (timeEnd - timeStart) * 1000; var days = Math.floor(usedTime/(24*3600*1000)); var leave1 = usedTime%(24*3600*1000); var hours = Math.floor(leave1/(3600*1000)); var leave2 = leave1%(3600*1000); var minutes = Math.floor(leave2/(60*1000)); var leave3 = leave2%(60*1000); var second = Math.floor(leave3/1000); let timedata = { day:days, hours:hours < 10 ? `0${hours}` : hours, minutes:minutes < 10 ? `0${minutes}` : minutes, second:second < 10 ? `0${second}` : second } return timedata; } // 抢红包 $(document).on('click','.envelope-box',function(){ let redType = $(this).data("type"); if (redType == 6 || redType == 5) { layer.msg("请点击右下方【手机看】扫码领取红包!"); return } var openid = ''; if(!openid){ // layer.alert('请先登录',function(){ // window.location.href = "https://open.weixin.qq.com/connect/qrconnect?appid=wxaeab6dafa1571a4f&redirect_uri=https://console.nuoyun.tv/Watch/63331&response_type=code&scope=snsapi_login&state=2017#wechat_redirect"; // }); // return false; wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, // closeBtn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); return false; } var eparent_obj = $(this).parents('li'); var eid = $(this).prev().val(); // var eshare = eparent_obj.find('.chat-name').text(); var eshare = eparent_obj.find('.chat-photo-box').data('nick'); var ephoto = eparent_obj.find('.chat-photo').attr('src'); var eremark = $(this).find('.envelope-remark').text(); $.ajax({ url:'/watch/robInfo', type:'post', dataType:'json', data:{ eid:eid }, success:function(result){ redData = result.data; var detailTxt = '',tipTxt = ''; if (result.rob_status == 6) { detailTxt = '看看大家的手气'; tipTxt = '您已经抢过该红包了'; }else if(result.rob_status == 5){ detailTxt = '查看领取详情'; tipTxt = '该红包已被领完'; }else if(result.rob_status == 3){ detailTxt = '查看领取详情'; tipTxt = '未领完红包已退回,无法领取'; }else if(result.rob_status == 2){ detailTxt = '查看领取详情'; tipTxt = '该红包暂时无法领取'; } var html = '<div class="open-envelope-close">'+ '<span class="common-close-icon">'+ '</span></div><div class="envelop-is-none">' + '<div class="envelop-top">' + '<div class="avatar"><img src="' + ephoto + '" alt="avatar" style="width:45px;height:45px;border-radius:50%;"></div>' + '<div class="nick">' + eshare + '的红包' + '</div>' + '<div class="nick note">发了一个红包,金额随机</div>' + '</div>' + '<div class="envelop-middle">' + '<div class="tip">' + tipTxt + '</div>' + '</div>' + '<div class="envelop-bottom">' + '<div class="view-detail">' + detailTxt + ' <span class="fa fa-angle-right"></span></div>' + '</div>' + '</div>'; if(result.msg == 'envelope is none'){ layer.open({ type: 1, skin: 'layui-layer-envelop', //样式类名 area: ['300px','397px'], closeBtn: 0, anim: 2, shadeClose: true, //开启遮罩关闭 content: html, success: function() { $('.envelop-is-none .view-detail').click(function() { layer.closeAll(); $.ajax({ url:'/Watch/lookLuck', type:'post', dataType:'json', data:{ eid:eid }, success:function(result){ if(result){ $('.look-luck-name').text(eshare + '的红包'); $('.look-luck-remark').text(eremark); $('.look-luck-photo img').attr('src',ephoto); $('.look-luck-amount span').text(result.amount); $('.look-luck-consume').text(result.get_number); $('.look-luck-totals').text(result.total_number); $('.look-luck-amounts').text(result.get_amount); $('.look-luck-row').html(result.html); if(result.get_number == result.total_number){ //抢完了 $('.total-all').removeClass('none'); $('.total-all').addClass('show-in'); }else{ $('.total-all').removeClass('show-in'); $('.total-all').addClass('none'); } } } }); layer.open({ type: 1, title: false, closeBtn: 0, area: ['240px','340px'], content: $('.look-luck-box') }); }); } }); return false; } if(result.msg == 'envelope can not repeat'){ layer.open({ type: 1, skin: 'layui-layer-envelop', //样式类名 anim: 2, area: ['300px','397px'], closeBtn: 0, shadeClose: true, //开启遮罩关闭 content: html, success: function() { $('.envelop-is-none .view-detail').click(function() { layer.closeAll(); $.ajax({ url:'/Watch/lookLuck', type:'post', dataType:'json', data:{ eid:eid }, success:function(result){ if(result){ $('.look-luck-name').text(eshare + '的红包'); $('.look-luck-remark').text(eremark); $('.look-luck-photo img').attr('src',ephoto); $('.look-luck-amount span').text(result.amount); $('.look-luck-consume').text(result.get_number); $('.look-luck-totals').text(result.total_number); $('.look-luck-amounts').text(result.get_amount); $('.look-luck-row').html(result.html); if(result.get_number == result.total_number){ //抢完了 $('.total-all').removeClass('none'); $('.total-all').addClass('show-in'); }else{ $('.total-all').removeClass('show-in'); $('.total-all').addClass('none'); } } } }); layer.open({ type: 1, title: false, closeBtn: 0, area: ['240px','340px'], content: $('.look-luck-box') }); }); } }); return false; } $('.open-envelope-box #eid').val(eid); $('.open-envelope-photo img').attr('src',ephoto); let envelopext = JSON.parse(redData.envelopext); if(result.data.type == 2 && envelopext.timing_switch == 2){ $('.open-envelope-name').html(eshare+' 将于<br>'+formatDate(envelopext.switch_time * 1000)+'发送一个红包'); let redNowTime = new Date() / 1000; if(redNowTime < envelopext.switch_time){ let dateD = DateDifference(redNowTime,envelopext.switch_time); let redIntervalHtml = `<div class="red${eid}">倒计时:${dateD.day > 0 ? `<span>${dateD.day}天</span>` : ""}<span>${dateD.hours}时</span><span>${dateD.minutes}分</span><span>${dateD.second}秒</span></div>`; $('.open-envelope-box .look-luck').hide(); $('.open-envelope-box>.mt-60').append(redIntervalHtml); redInterval = setInterval(function(){ let redNowTimeIn = new Date() / 1000; if(redNowTimeIn >= envelopext.switch_time){ $('.open-envelope-box .look-luck').show(); $(`.red${eid}`).remove(); } dateD = DateDifference(redNowTimeIn,envelopext.switch_time); let redIntervalHtml = `倒计时:${dateD.day > 0 ? `<span>${dateD.day}天</span>` : ""}<span>${dateD.hours}时</span><span>${dateD.minutes}分</span><span>${dateD.second}秒</span>`; $(`.red${eid}`).html(redIntervalHtml); },1000); } }else{ $('.open-envelope-name').text(eshare+'的红包'); $('.open-envelope-remark').text(eremark); } layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: 1, title: false, closeBtn: 0, //关闭按钮隐藏 // area: ['240px','320px'], area: ['300px','397px'], skin: 'open-envelope-style', content: $('.open-envelope-box') }); }); }); } }); }); $('.open-envelope-btn').click(function(){ if(redData.type == 2){ let envelopext = JSON.parse(redData.envelopext); let nowTime = Date.parse(new Date()) / 1000; if(envelopext.timing_switch == 2 && nowTime < envelopext.switch_time){ layer.msg('定时红包未开始!'); return; } } var eid = $(this).parents('.open-envelope-box').find('#eid').val(); $.ajax({ url:'/Watch/rob', type:'post', dataType:'json', data:{ eid:eid }, success:function(result){ if(result.code == 'success'){ $.ajax({ url:'/Watch/robChat', type:'post', dataType:'text', data:{ eid:eid, rob:result.rob, share:result.share, amount:result.amount }, success:function(res){ if(res == 'success'){ var eshare = $('.open-envelope-name').text(); var ephoto = $('.open-envelope-photo img').attr('src'); var eremark = $('.open-envelope-remark').text(); $('.winner-envelope-name').text(eshare + '的红包'); $('.winner-envelope-photo img').attr('src',ephoto); $('.winner-envelope-remark').text(eremark); $('.winner-envelope-amount span').text(result.amount); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: 1, title: false, closeBtn: 0, skin: 'envelop-already', //样式类名 // area: ['240px','340px'], area: ['300px','397px'], content: $('.winner-envelope-box') }); }); }); // 抢到红包更新共抢到红包金额 var robed_total = $('#robed_total').text() * 1 + result.amount * 1; robed_total = Math.floor(robed_total * 100) / 100; $('#robed_total').text(robed_total); }else{ layer.alert(result.msg,function(){ layer.closeAll(); }); } }, error:function(xmlHttpRequest,textStatus,errorThrown){ layer.alert(textStatus+"出错!"+errorThrown,function(){ layer.closeAll(); }); } }); }else{ layer.alert(result.msg,function(){ layer.closeAll(); }); } // if(result.msg == 'envelope is none'){ // layer.alert('红包已被抢光了',function(){ // layer.closeAll(); // }); // } // if(result.msg == 'envelope can not repeat'){ // layer.alert('您已经抢过该红包了',function(){ // layer.closeAll(); // }); // } }, error:function(xmlHttpRequest,textStatus,errorThrown){ layer.alert(textStatus+"出错!"+errorThrown,function(){ layer.closeAll(); }); } }); }); // 拆红包 $(document).on('click','.open-envelope-close',function(){ if(redData){ let envelopext = JSON.parse(redData.envelopext); if(redData.type == 2 && envelopext.timing_switch == 2){ clearInterval(redInterval); $(`.red${redData.id}`).remove(); } } layer.closeAll(); }) $('.open-envelope-close,.winner-envelope-close,.look-luck-close').click(function(){ layer.closeAll(); }); //点击聊天记录中的红包进行抢红包操作 $(document).on('click','.rob-chat-container .receive-red-txt',function(){ //获取聊天红包 data-eid var chat_click_eid = $(this).parent().parent().parent().parent().find('input').data('eid'); var envelop_html = $('#dialog .redpackage-chat-container .chat-content input[value="'+chat_click_eid+'"]').next('.envelope-box'); // console.log(envelop_html) $(envelop_html).click(); }); // 我的红包 $('.robed-btn').click(function(){ p_envelope = 1; $.ajax({ url:'/Watch/indexLog', type:'get', dataType:'text', data:{ do:'ajax_envelope', p_envelope:p_envelope }, success:function(result){ if(result){ $('.envelope-row').html(result); li_height_envelope = $('.envelope-row li').length * (40 + 1 + 10 + 10) - 250; p_envelope ++; }else{ $('.envelope-row').html('<li class="txt-center">暂无记录</li>'); } } }); $('#robed').modal(); }); var p_envelope = 1,scroll_top_envelope = 0,li_height_envelope = 0; // 上拉加载 $('.envelope-row').scroll(function(){ scroll_top_envelope = $('.envelope-row').scrollTop(); if(scroll_top_envelope == li_height_envelope){ $('.envelope-loading').text('加载中……'); $.ajax({ url:'/Watch/indexLog', type:'get', dataType:'text', data:{ do:'ajax_envelope', p_envelope:p_envelope }, success:function(result){ if(result){ $('.envelope-row').append(result); li_height_envelope = $('.envelope-row li').length * (40 + 1 + 10 + 10) - 250; $('.envelope-loading').text(''); p_envelope ++; }else{ $('.envelope-loading').text('没有更多了'); $('.envelope-row').unbind('scroll'); } } }); } }); var barage = false; // 开关 layui.use('form',function(){ var form = layui.form(); // 弹幕开关 $('#barage_switch').next().find('i').text('弹'); // 弹幕 form.on('switch(barages_switch)',function(result){ if(result.elem.checked){ barage = true; }else{ barage = false; $('.barrage .show').empty(); } }); }); // 设置下载图片的位置和底部批量下载的位置和宽度 if (LIVETYPE == "picture") { let _width = $('.box-left').width(); let _marginL = parseFloat($(".box").offset().left); $(".picDownLoadWrap").css({ left: `${_marginL}px`, width: `${_width}px` }); $('.picFoldWrapBox').css('left', `${_width + _marginL - 74}px`) $(window).resize(function(){ _width = $('.box-left').width(); _marginL = parseFloat($(".box").offset().left); $('.picFoldWrapBox').css('left', `${_width + _marginL - 74}px`) $(".picDownLoadWrap").css({ left: `${_marginL}px`, width: `${_width}px` }); }) } // 返回顶部 let littleVideo = false; $(window).scroll(function(){ var browse_height = $(window).height()-500; // $(window).height()代表了当前可见区域的大小,而$(document).height()则代表了整个文档的高度 var scroll_height = $(document).scrollTop(); // $(document).scrollTop()获取垂直滚动的距离,即当前滚动的地方的窗口顶端到整个页面顶端的距离 if(scroll_height >= browse_height){ $(".go-top").fadeIn(500); if (LIVETYPE == "picture" && $(".picDownLoadWrap").css('display') == 'none' && pictureLiveDownConf.pay_switch == 1 && !manageAuth) { $(".picFoldWrapBox").fadeIn(500); } }else{ $(".go-top").fadeOut(500); $(".picFoldWrapBox").fadeOut(500); } if(roomInfoData.room_info.live_info.live_status == "直播中" || roomInfoData.room_info.live_info.live_status == "回放" || roomInfoData.room_info.live_info.live_status == "预告"){ var obj = $('.middle-box'); var clientHeight = $(window).height(); var scrollTop = $(document).scrollTop(); var offsetTop = obj.offset().top; var objHeight = obj.height(); if(offsetTop < scrollTop + clientHeight && offsetTop + objHeight > scrollTop) { if(littleVideo){ littleVideo = false; $("#video_player").removeClass("fixed-video"); } }else{ if(!littleVideo){ littleVideo = true; $("#video_player").addClass("fixed-video"); } } } if($(".tab-menu.active").data("type") == "goods"){ let menuId = $(".tab-menu.active").attr('data-menu-id'); var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; var documentHeight = document.documentElement.scrollHeight || document.body.scrollHeight; var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; if((windowHeight + scrollTop) >= documentHeight) { goodsPage++; if(screen_type == "2"){ getGoodsByCategory(ebusinessMenuId,activeMenuId); }else{ getGoodsByCategory(menuId); } } } }); $(".go-top").click(function(){ $("html,body").animate({scrollTop:0}); }); // 表情开关 $(".face").click(function(e){ /*if('' === '1'){ // 禁言 return false; }*/ if(is_shut_up === '1' || is_shut_up_all === '1'){ // 禁言 if('' != 'is'){ //非管理员 return false; } } var img_str = ''; var img_arr = new Array(); for(var i = 1; i <= 75; i++) { img_arr.push(i); } for(var i in img_arr){ // img_str += '<img src="https://i.nuoyun.tv/Public/Home/Images/Faces/'+img_arr[i]+'.png" mark="[em_'+img_arr[i]+']">'; img_str += '<img src="https://i.nuoyun.tv/Public/Home/Images/Faces/transparent.png" mark="[em_'+img_arr[i]+']" class="face-'+img_arr[i]+'">'; } $(".faces").html(img_str); $(".faces").toggle(); var face_img_arr = [50,51,48,49,52,55,56,53,54,41,42,39,40,43,46,47,44,45,57,69,70,67,68,71,74,75,72,73,60,61,58,59,62,65,66,63,64,38,12,13,10,11,14,17,18,15,16,3,4,1,2,5,8,9,6,7,19,31,32,29,30,33,36,37,34,35,22,23,20,21,24,27,28,25,26]; for(var i in face_img_arr){ $('img.face-'+face_img_arr[i]).css('background-position','0 '+(-22*i)+'px'); } e.stopPropagation(); // 阻止时间冒泡 }); // setTimeout(function(){$(".face").click();},1000); // 调试代码 $(document).click(function(){ $(".faces").hide(); $(".quote-bottom").hide(); $(".quote-btn").hide(); $(".img-list-type").hide(); $(".img-list-type-sort").hide(); }); // 手机观看 $(".mobile-play").hover(function(){ if(!$(".qrcode-box img").attr('src')){ $(".qrcode-box img").attr("src",$('#qrcode img').attr('src')); } $(".qrcode-box").show(); },function(){ $(".qrcode-box").hide(); }); // 选项卡 $(".tab-menu").click(function(){ if($(this).find('a').length > 0){ window.location.href = $(this).find('a').attr('href'); return false; } let type = $(this).data("type"); var index = $(this).index(".tab-box .tab-menu"); $(this).addClass('active').siblings().removeClass('active'); $(".tab-box .tab-content-s").eq(index).addClass('active').siblings().removeClass('active'); if(type == "profile"){ getBriefIntroduction(); } // 如果是卡片的话就显示 if(type == 'card'){ $('.card-type').css('display','flex'); getCardList($(this).attr('data-menu-id')); } else { $('.card-type').css('display','none'); } if(type == "goods"){ goodsPage = 1; getGoodsByCategory($(this).attr('data-menu-id'),""); } }); $(document).on("click",".sendCard",function(e){ e.stopPropagation(); let cardData = { title:$(this).data("title"), desc:$(this).data("desc"), img:$(this).data("img"), link:$(this).data("link") } let obj = { msg_type: "card", content: cardData } if (roomInfoData.user_config.live_wss_type == "tencent" && IMLiveObj.isReady) { let sendData = saySendData(cardData, "card") IMLiveObj.sendMessage(JSON.stringify(sendData.data), sendData.priority).then(() => { layer.msg("卡片分享成功"); wsSay(sendData.data); }).catch(() => { ws.send(`{"type":"say","to_client_id":"all","to_client_name":"所有人","content":${JSON.stringify(obj)}}`); }); } else { ws.send(`{"type":"say","to_client_id":"all","to_client_name":"所有人","content":${JSON.stringify(obj)}}`); } }); $(document).on("click",".chatCard",function(){ window.location.href = $(this).attr("data-link"); }); $(document).on("click",".cardItem",function(){ window.location.href = $(this).attr("data-link"); }); function briefIntroductionTime(time){ let timeData = new Date(time * 1000); let year = timeData.getFullYear(); let month = timeData.getMonth() + 1; let day = timeData.getDate(); let hours = timeData.getHours(); let minutes = timeData.getMinutes(); let second = timeData.getSeconds(); return `${year}.${month}.${day} ${hours >= 10 ? hours : '0'+hours}:${minutes >= 10 ? minutes : '0'+minutes}:${second >= 10 ? second : '0'+second}`; } let profileInfo; function getBriefIntroduction(){ $.ajax({ url:`${gwApi}/Wx/Room/getProfileInfo`, type:"post", headers:{ OpenapiToken:openapi_token }, data:{ room_id:room_id }, success:function(res){ if(res.code == 200){ profileInfo = res.data.template_list; $(".briefIntroductionLiveTitle").text(roomInfoData.room_info.push_app_nick); $(".briefIntroductionLiveStatus").text(roomInfoData.room_info.live_info.live_status); $(".briefIntroductionNum").text(visit_number_txt); $(".briefIntroductionLiveTime>p").text(`时间:${briefIntroductionTime(roomInfoData.room_info.start_time)} ~ ${briefIntroductionTime(roomInfoData.room_info.end_time)}`); $(".briefIntroductionTopHtml").html(res.data.content); let li = ""; res.data.template_list.forEach(function(item,index){ if(item.type == 1){ li += `<div class="briefIntroductionCenter"><p class="briefIntroductionTitle">${item.name}</p><div class="briefIntroductionVipUlBox"><ul class="briefIntroductionVipUl swiper-no-swiping">`; item.list.forEach(function(t,i){ li += `<li class="briefIntroductionVipLi" data-index="${index}" data-i="${i}"><img class="vipLiPhoto" src="${t.guest_photo ? t.guest_photo : '/Public/Home/Images/vip-photo.png'}" alt=""><p class="vipLiName">${t.guest_name}</p><p class="vipLiIntroduce">${t.academic}</p><div class="vipLiRight"></div></li>`; }); li += `</ul></div></div>`; }else if(item.type == 2){ li += `<div class="briefIntroductionCenter"><p class="briefIntroductionTitle">${item.name}</p><ul class="companyUl">`; item.list.forEach(function(t,i){ li += `<li class="companyLi" data-index="${index}" data-i="${i}"><img src="${t.organizer_logo}" alt=""></li>`; }); li += `</ul></div>`; } }); $(".briefIntroductionList").html(li); } } }); } $(document).on("click",".briefIntroductionVipLi",function(){ let index = $(this).data("index"),i = $(this).data("i"); $(".bIDialogHeader").removeClass("bIDialogCompany").addClass("bIDialogVip").attr("src",profileInfo[index].list[i].guest_photo ? profileInfo[index].list[i].guest_photo : '/Public/Home/Images/vip-photo.png'); $(".bIName>p").text(profileInfo[index].list[i].guest_name); $(".bIIdentity").show().text(profileInfo[index].list[i].academic); $(".DialogIntroduce").html(profileInfo[index].list[i].profile); $(".briefIntroductionDialogBox").fadeIn(200); }); $(document).on("click",".companyLi",function(){ let index = $(this).data("index"),i = $(this).data("i"); $(".bIDialogHeader").removeClass("bIDialogVip").addClass("bIDialogCompany").attr("src",profileInfo[index].list[i].organizer_logo); $(".bIName>p").text(profileInfo[index].list[i].organizer_name); $(".bIIdentity").hide(); $(".DialogIntroduce").html(profileInfo[index].list[i].profile); $(".briefIntroductionDialogBox").fadeIn(200); }); $(".briefIntroductionDialogBox").click(function(){ $(".briefIntroductionDialogBox").fadeOut(200); }); $(".closeBriefIntroductionDialog").click(function(){ $(".briefIntroductionDialogBox").fadeOut(200); }); // 封面 if("https://i.nuoyun.tv/Public/Uploads/Cover/20200628/5ef85cefa99ba.png"){ var cover_url = $('.cover').text(); }else{ var cover_url = 'https://i.nuoyun.tv/Public/Home/Images/cover.jpg'; } $('.cover-app').attr('src',cover_url); // 播放器 var autoplay = false; var rtmp_url,hls_url,player; let isLiveEnd = false; // function setPlayUrl(){ // rtmp_url = ''; // hls_url = ''; // flv_url = ''; // } // 获取拉流名称 function getFilenameFromUrl(url) { const pathname = url.split("?")[0] return pathname } function LiveEndMsg() { $('#video_player').html('') if (roomInfoData.room_info.live_info.live_status != "回放" && roomInfoData.room_info.live_info.live_status != "预告") { $('.live-pause').hide(); $('.cover-app').show(); $('#video_player').hide(); } if(roomInfoData.room_info.live_info.live_status == '已结束' && roomInfoData.room_info.able_watch_in_live == 1 && is_master != "is"){ window.location.href = "/Watch/pcLiveEnd"; } } function setTCplay(){ let durationObj, duration = 0, pauseTime = 0; let option = { autoplay: true, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的 coverpic: cover_url, live: true, flash: false, h5_flv: true, listener: function(msg){ if(msg.type == 'error'){ if (isLiveEnd) { isLiveEnd = false; player.destroy(); LiveEndMsg(); canPlay(); } else { setTimeout(function(){ player.load();//进行重连 },5000); } } if (msg.type == "ended") { if (isLiveEnd) { isLiveEnd = false; LiveEndMsg(); canPlay(); } } if(msg.type == 'loadedmetadata'){ setTimeout(function(){ $('.vcp-loading').hide(); },600); } if(msg.type == "play"){ $(".start-play").hide(); $(".cover-app").hide(); if(durationObj){ clearInterval(durationObj); player.currentTime(pauseTime + duration) duration = 0; durationObj = undefined; } } if(msg.type == "playing"){ $(".start-play").hide(); $(".cover-app").hide(); onLiveRoomReportQueue.addMark(); forceClockHide(); } if(msg.type == "pause"){ $(".start-play").show(); onLiveRoomReportQueue.endMark(); pauseTime = player.currentTime() if(!durationObj){ durationObj = setInterval(() => { duration++; }, 1000); } } } }; // if(roomInfoData.room_info.live_info.live_multi_bitrate_urls && roomInfoData.room_info.live_info.live_multi_bitrate_urls.length > 0){ // roomInfoData.room_info.live_info.live_multi_bitrate_urls.forEach((item,index)=>{ // if(item.name == "标清"){ // option.flv_sd = item.live_url.flv_url; // } // if(item.name == "高清"){ // option.flv_hd = item.live_url.flv_url; // option.flv = item.live_url.flv_url; // } // if(item.name == "超清"){ // option.flv_od = item.live_url.flv_url; // } // }) // option.clarityLabel = { // od:"超清", // hd:"高清", // sd:"标清" // } // option.clarity = "hd"; // }else if(roomInfoData.room_info.live_info.live_urls && roomInfoData.room_info.live_info.live_urls.length > 0){ // option.flv_hd = roomInfoData.room_info.live_info.live_urls[1].flv_url; // option.clarityLabel = { // od:"线路一", // hd:"线路二" // } // option.flv = flv_url; // }else{ // option.flv = flv_url; // } option.flv = flv_url; player = new TcPlayer('video_player', option); player.play(); $(".start-play").click(function(){ player.play(); }); //控制台 直播中暂停/播放按钮为关时,需隐藏暂停播放按钮 if(roomInfoData.room_info.pause_display_switch == 2) { $('.dplayer-icons.dplayer-icons-left').hide() $('.vcp-playtoggle').hide() $('.vcp-bigplay').remove() //解除播放器画面按钮点击事件(暂停直播) } } let webRTCPlayer; function setWebRTC(){ let streamUrl = roomInfoData.room_info.live_info.live_url.webrtc_url; webRTCPlayer = new RTCPlayer({streamUrl:streamUrl,dom:'#video_player',equipment:'PC'}); webRTCPlayer.init(); window.onbeforeunload = function () { webRTCPlayer.stopStream(); }; webRTCPlayer.on('playType',function(e){ //控制台 直播中暂停/播放按钮为关时,需隐藏暂停播放按钮 if(roomInfoData.room_info.pause_display_switch == 2) { $('.dplayer-icons.dplayer-icons-left').hide() $('.vcp-playtoggle').hide() $('.vcp-bigplay').remove() //解除播放器画面按钮点击事件(暂停直播) } webRTCBlo = e; if(!e){ $('#video_player').html(''); if(webRTCPlayer.peerConnection){ webRTCPlayer.stopStream(); } // $(".start-play").show(); setTCplay(); }else{ let video = $('video')[0]; if(video.videoWidth <= video.videoHeight){ video.style.cssText = "width: 100%;height: 100%;position:absolute;object-fit:contain;"; } } }); } function localStorageGETExtend (k){ let data = window.localStorage.getItem(k); try { data = JSON.parse(data); } catch (error) { } return data; } function localStorageGET (k){ let storage=window.localStorage; return storage[k]; } function localStorageSave (k,val){ var storage=window.localStorage; if(typeof val == 'object') val = JSON.stringify(val); storage[k] = val; } let isPlay = false,playCode = 0,video_arr = []; function canPlay(){ isPlay = true; if(roomInfoData.room_info.live_info.live_status == '直播中'){ hls_url = roomInfoData.room_info.live_info.live_url.hls_url; flv_url = roomInfoData.room_info.live_info.live_url.flv_url; $('.video-type').text('直播中'); $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText", "display: flex;background: rgba(0, 92, 215, 0.1);color: #999999;min-width: 58px;"); $('.box-status.video-type').css("cssText", "color: #005CD7;"); if(LIVETYPEMOD == 'panorama'){ init(); }else{ if(roomInfoData.room_info.is_fake_live == 1 && roomInfoData.room_info.fake_live_mod == 1){ let durationObj,duration = 0, pauseTime = 0; let option = { autoplay: true, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的 coverpic: cover_url, live: true, flash: false, listener: function(msg){ if(msg.type == 'loadeddata'){ let nowTime = parseInt(new Date().getTime() / 1000); player.currentTime(nowTime - roomInfoData.room_info.live_info.fake_start_time); setTimeout(function(){ $('.vcp-loading').hide(); },600); } if(msg.type == "play"){ $(".start-play").hide(); $(".cover-app").hide(); onLiveRoomReportQueue.addMark(); if(durationObj){ clearInterval(durationObj); player.currentTime(pauseTime + duration) duration = 0; durationObj = undefined; } } if(msg.type == "pause"){ $(".start-play").show(); onLiveRoomReportQueue.endMark(); pauseTime = player.currentTime() if(!durationObj){ durationObj = setInterval(() => { duration++; }, 1000); } } } } if(hls_url.indexOf(".mp4") != -1){ option.mp4 = hls_url; }else{ option.m3u8 = hls_url; } player = new TcPlayer('video_player',option); $(".start-play").click(function(){ player.play(); }); //控制台 直播中暂停/播放按钮为关时,需隐藏暂停播放按钮 if(roomInfoData.room_info.pause_display_switch == 2) { $('.dplayer-icons.dplayer-icons-left').hide() $('.vcp-playtoggle').hide() $('.vcp-bigplay').remove() //解除播放器画面按钮点击事件(暂停直播) } }else{ if(roomInfoData.room_info.is_webrtc == 1){ setWebRTC(); }else{ $(".start-play").show(); setTCplay(); } } } }else if(roomInfoData.room_info.live_info.live_status == '回放'){ $(".start-play").show(); hls_url = roomInfoData.room_info.live_info.live_url; video_id = getFilenameFromUrl(hls_url); if(localStorageGET('video_last_oper')){ video_arr = JSON.parse(localStorageGET('video_last_oper')); } $('.video-type').text('回放'); // 显示回放标志 $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText","display: flex;background: rgba(242, 110, 0, 0.1)"); $('.box-status.video-type').css("cssText", "color: #F26E00;"); // 回放限制观看一次的逻辑 const isLoop = roomInfoData.room_info.play_limit_switch == '2' ? true : false; // 如果直播间设置了回放限制 let replayLimitIds = localStorageGETExtend('replayLimitIds') if(!isLoop) { $('.cover-cantReplay').attr('src', roomInfoData.room_info.play_limit_img) // 如果本地localstorge中的replaylimitids中存储了此直播间的id,则不能播放 if(replayLimitIds && typeof replayLimitIds === 'object' && hls_url.includes(replayLimitIds[roomInfoData.room_info.id]) ) { cantReplay() return } } // console.log('roomInfoData', roomInfoData, isLoop) if(LIVETYPEMOD == 'panorama'){ init(); }else{ $('#video_player').empty(); let option = { autoplay: true, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的 coverpic: cover_url, live: false, flash: false, listener: function(msg){ if(msg.type == 'error'){ setTimeout(function(){ player.load();//进行重连 },5000); }else if(msg.type == 'ended'){ if(!isLoop) { cantReplay() const id = roomInfoData.room_info.id if(!replayLimitIds || typeof replayLimitIds !== 'object'){ replayLimitIds = {} } replayLimitIds[id] = hls_url.split('?')[0] localStorageSave("replayLimitIds", replayLimitIds); return } // 没有循环播放的参数,监听停止事件重新播放实现循环播放的效果 player.play(); }else if(msg.type == 'loadeddata'){ video_arr.forEach(function(item,index){ if(item.id == video_id && room_id == item.room_id){ player.currentTime(item.seek); } }); } if(msg.type == "play"){ $(".start-play").hide(); $(".cover-app").hide(); onLiveRoomReportQueue.addMark(); forceClockHide(); } if(msg.type == "pause"){ $(".start-play").show(); onLiveRoomReportQueue.endMark(); } } } if(hls_url.indexOf(".mp4") != -1){ option.mp4 = hls_url; }else{ option.m3u8 = hls_url; } player = new TcPlayer('video_player',option); window.onbeforeunload = function() { let video_index = -1; video_arr.forEach(function(item,index){ if(item.id == video_id && room_id == item.room_id){ item.seek = player.currentTime(); video_index = index; } }); if(video_index == -1){ let obj = { room_id:room_id, id:video_id, seek:player.currentTime() } video_arr.push(obj); } localStorageSave("video_last_oper",JSON.stringify(video_arr)); } $(".vcp-volume").before("<div class='speedBox'><p class='speedTxt'>倍速</p><div class='speedUl'><p class='speedLi' data-speed='2'>2x</p><p class='speedLi' data-speed='1.5'>1.5x</p><p class='speedLi' data-speed='1.25'>1.25x</p><p class='speedLi active' data-speed='1'>1x</p><p class='speedLi' data-speed='0.5'>0.5x</p></div></div>"); $(".start-play").click(function(){ player.play(); }); } }else if(roomInfoData.room_info.live_info.live_status == '预告'){ $(".start-play").show(); hls_url = roomInfoData.room_info.live_info.live_url; $('.video-type').text('预告'); // 显示预告标志 $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText","display: flex;background: rgba(0, 144, 196, 0.1)"); $('.box-status.video-type').css("cssText", "color: #0090C4;"); /*var videoObject = { container: '#video_player',//“#”代表容器的ID,“.”或“”代表容器的class variable: 'player',//该属性必需设置,值等于下面的new chplayer()的对象 autoplay: autoplay,//自动播放 poster: cover_url,//封面 video: hls_url//视频地址 }; var player = new ckplayer(videoObject);*/ // 回放限制观看一次的逻辑 const isLoop = roomInfoData.room_info.play_limit_switch == '2' ? true : false; // 如果直播间设置了回放限制 let replayLimitIds = localStorageGETExtend('replayLimitIds') if(!isLoop) { $('.cover-cantReplay').attr('src', roomInfoData.room_info.play_limit_img) // 如果本地localstorge中的replaylimitids中存储了此直播间的id,则不能播放 if(replayLimitIds && typeof replayLimitIds === 'object' && hls_url.includes(replayLimitIds[roomInfoData.room_info.id]) ) { cantReplay() return } } let option = { autoplay: true, //iOS下safari浏览器,以及大部分移动端浏览器是不开放视频自动播放这个能力的 coverpic: cover_url, live: false, listener: function(msg){ if(msg.type == 'error'){ setTimeout(function(){ player.load();//进行重连 },5000); }else if(msg.type == 'ended'){ if(!isLoop) { cantReplay() const id = roomInfoData.room_info.id if(!replayLimitIds || typeof replayLimitIds !== 'object'){ replayLimitIds = {} } replayLimitIds[id] = hls_url.split('?')[0] localStorageSave("replayLimitIds", replayLimitIds); return } // 没有循环播放的参数,监听停止事件重新播放实现循环播放的效果 player.play(); } if(msg.type == "play"){ $(".start-play").hide(); onLiveRoomReportQueue.addMark(); forceClockHide(); } if(msg.type == "pause"){ $(".start-play").show(); onLiveRoomReportQueue.endMark(); } } } if(hls_url.indexOf(".mp4") != -1){ option.mp4 = hls_url; }else{ option.m3u8 = hls_url; } player = new TcPlayer('video_player',option); $(".vcp-volume").before("<div class='speedBox'><p class='speedTxt'>倍速</p><div class='speedUl'><p class='speedLi' data-speed='2'>2x</p><p class='speedLi' data-speed='1.5'>1.5x</p><p class='speedLi' data-speed='1.25'>1.25x</p><p class='speedLi active' data-speed='1'>1x</p><p class='speedLi' data-speed='0.5'>0.5x</p></div></div>"); $(".start-play").click(function(){ player.play(); }); }else{ $('.video-type').text(roomInfoData.room_info.live_info.live_status); switch(roomInfoData.room_info.live_info.live_status){ case '已结束': $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText", "display: flex;background: rgba(153, 153, 153, 0.1);color: #999999;min-width: 58px;"); $('.box-status.video-type').css("cssText", "color: #999999;"); break; case '未直播': $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText", "display: flex;background: rgba(55, 166, 0, 0.1);color: #999999;min-width: 58px;"); $('.box-status.video-type').css("cssText", "color: #37A600;"); break; case '未开始': $('.box-point').hide(); $('.upper-left .upper-info .upper-info-top .box-live').css("cssText", "display: flex;background: rgba(255, 14, 76, 0.1);color: #999999;min-width: 58px;"); $('.box-status.video-type').css("cssText", "color: #FF0E4C;"); break; } $('#video_player').hide(); $('.cover-app').show(); } } // 回放限制观看一次 function cantReplay(){ $('.cover-cantReplay').show() $(".start-play").hide(); if(player) player.destroy(); $('#video_player').html('').hide(); } // tcplayer直播时暂停事件无效,所以以此方式实现类似的暂停效果 // if(roomInfoData.room_info.live_info.live_status == '直播中'){ // $(document).on('click','.vcp-playtoggle',function(){ // if(!$('.vcp-player').hasClass('vcp-playing')){ // player.load(); // }else{ // $('.vcp-player').removeClass('vcp-playing'); // player.pause(); // } // }); // } $(document).on("mouseover",".speedBox",function(){ $(".speedUl").show(); }); $(document).on("mouseout",".speedBox",function(){ $(".speedUl").hide(); }); $(document).on("click",".speedLi",function(){ if(!$(this).hasClass("active")){ $(".speedLi").removeClass("active"); $(this).addClass("active"); let speed = $(this).data("speed"); let video = $("#video_player video")[0]; video.playbackRate = speed; $(".speedTxt").text(`${speed}x`); $(".speedUl").hide(); } }); function videoInit (){ $.ajax({ url:`${gwApi}/Wx/Room/isPlay`, type:"get", dataType: 'json', headers: { OpenapiToken: openapi_token }, data:{ room_id:room_id }, success:function(res){ playCode = res.code; if(res.code == 200){ canPlay(); }else{ $('.start-play').hide(); $(".video-type").hide(); $('.cover-app').show(); } }, error:function(){ canPlay(); } }) } var uid = '39612'; //到期提醒 var maturity_pc = ''; //默认是空图片 只有过期了才显示图片 var maturity_html = '<img src="'+maturity_pc+'" class="maturity_pc">'; // 格式化日期函数 var getDateFormat = function(time){ var date_obj = new Date(); if (time) { date_obj = new Date(time * 1000); } var Y = date_obj.getFullYear(), m = date_obj.getMonth()+1, d = date_obj.getDate(), H = date_obj.getHours(), i = date_obj.getMinutes(), s = date_obj.getSeconds(); m = m < 10 ? '0'+m : m; d = d < 10 ? '0'+d : d; H = H < 10 ? '0'+H : H; i = i < 10 ? '0'+i : i; s = s < 10 ? '0'+s : s; var date_format = Y + '-' + m + '-' + d + ' ' + H + ':' + i + ':' + s; return date_format; } // 聊天消息时间格式化日期函数 function getChatDateFormat(time){ var date_obj = new Date(); if (time) { date_obj = new Date(time * 1000); } var Y = date_obj.getFullYear(), m = date_obj.getMonth()+1, d = date_obj.getDate(), H = date_obj.getHours(), i = date_obj.getMinutes(), s = date_obj.getSeconds(); m = m < 10 ? '0'+m : m; d = d < 10 ? '0'+d : d; H = H < 10 ? '0'+H : H; i = i < 10 ? '0'+i : i; s = s < 10 ? '0'+s : s; var date_format = m + '-' + d + ' ' + H + ':' + i; return date_format; } window.addEventListener("visibilitychange", function(){ if(document.visibilityState == "hidden"){ // 停止上报 onLiveRoomReportQueue.stop() }else if(document.visibilityState == "visible"){ // 重新开始上报 onLiveRoomReportQueue.start() } }); /*倒计时*/ //开始时间 var showStartTime = '1593334996'; $('.show-time').text(getDateFormat(showStartTime)); function calCountDown(timestamp) { var hour = (Math.floor(timestamp / 3600) % 24).toString(), min = (Math.floor(timestamp / 60) - 60 * Math.floor(timestamp / 3600)).toString(), second = Math.floor(timestamp % 60).toString(); hour = 1 === hour.length ? '<span style="left: 8%;">0</span><span style="left: 22%;">' + hour + "</span>" : '<span style="left: 8%;">' + hour[0] + '</span><span style="left: 22%;">' + hour[1] + "</span>"; min = 1 === min.length ? '<span style="left: 39%;">0</span><span style="left: 53%;">' + min + "</span>" : '<span style="left: 39%;">' + min[0] + '</span><span style="left: 53%;">' + min[1] + "</span>"; second = 1 === second.length ? '<span style="left: 70%;">0</span><span style="left: 84%;">' + second + "</span>" : '<span style="left: 70%;">' + second[0] + '</span><span style="left: 84%;">' + second[1] + "</span>"; return hour + min + second; } function newCalCountDown(timestamp) { var hour = (Math.floor(timestamp / 3600) % 24).toString(), min = (Math.floor(timestamp / 60) - 60 * Math.floor(timestamp / 3600)).toString(), second = Math.floor(timestamp % 60).toString(); return `${hour >= 10 ? hour : `0${hour}`}时${min >= 10 ? min : `0${min}`}分${second >= 10 ? second : `0${second}`}秒` } // 表情转字符 $(document).on("click",".faces img",function(){ var chat_txt = $("#chat_box").html(); var mark = $(this).attr('mark'); $("#chat_box").html(chat_txt+mark); }); $(".share-box").hover(function(){ $(".shareQrCode>img").attr("src",$('#qrcode img').attr('src')); $(".shareBox").show(); },function(){ $(".shareBox").hide(); }); // 打赏 $('.reward').click(function(){ var openid = ''; if(!openid){ // layer.alert('请先登录',function(){ // window.location.href = "https://open.weixin.qq.com/connect/qrconnect?appid=wxaeab6dafa1571a4f&redirect_uri=https://console.nuoyun.tv/Watch/63331&response_type=code&scope=snsapi_login&state=2017#wechat_redirect"; // }); // return false; wechatLoginQrcode(); layui.use('layer',function(){ var layer = layui.layer; layer.ready(function(){ layer.open({ type: '1', title: false, content: $('.wechatlogin-box'), btn: false, // closeBtn: false, shade: 0.4, resize: false, move: false, skin: 'qrcode-bg-none', style: 'txt-center' }); }); }); return false; } p = 1; $.ajax({ url:'/Watch/indexLog', type:'get', dataType:'text', data:{ do:'ajax_reward', appid:'63331', p:p }, success:function(result){ if(result){ $('.reward-row').html(result); li_height = $('.reward-row li').length * (40 + 1 + 10 + 10) - 250; p ++; }else{ $('.reward-row').html('<li class="txt-center">暂无记录</li>'); } } }); $('#reward').modal(); }); var pay_is_process = false; var timer = false; $('.do-reward').click(function(){ // 获取金额 var amount = $('#amount').val(); if(!amount){ layer.msg('还没有输入金额!'); return false; } if(amount < 0.01){ layer.msg('金额不能小于0.01元!'); return false; } amount = amount + '.00'; $.ajax({ url:'/Recharge/recharge', type:'post', dataType:'json', async:false, data:{ 'isReward':'yes', 'amount':amount, 'master_txt':master_txt }, success:function(result){ $('#wxpay').attr('src',"/Wechat/Index/qrcodePng?data="+result.url2); $('#out_trade_no').val(result.out_trade_no); pay_is_process = 'process'; } }); if(pay_is_process == 'process'){ $('#info').modal(); timer = setInterval(function(){rewardIsComplete();},3000); } }); // 判断是否支付成功 var rewardIsComplete = function(){ var out_trade_no = $("#out_trade_no").val(); $.ajax({ url:"/Recharge/rewardIsComplete", type:'post', dataType:'json', data:{ out_trade_no:out_trade_no }, success:function(result){ if(result.sql_is_has === true){ clearInterval(timer); layer.alert('支付成功!',{icon: 1},function(){ $('#info').modal('hide'); $('#reward').modal('hide'); layer.closeAll(); // 内容 var content = "<span class='reward-chat'><span class='envelope-icon-new'></span>打赏了一个 <span class='reward-amount'>"+result.amount+" 元红包</span></span>"; content = encodeURIComponent(content); // var content = 'reward'; /* new version content 打赏*/ var obj = { msg_type: 'reward', content: { name: "", reward_money: result.amount } } ws.send('{"reward":"reward","type":"say","to_client_id":"all","to_client_name":"所有人","content":'+JSON.stringify(obj)+'}'); }); return false; } } }); } var p = 1,scroll_top = 0,li_height = 0; // 上拉加载 $('.reward-row').scroll(function(){ scroll_top = $('.reward-row').scrollTop(); if(scroll_top == li_height){ $('.reward-loading').text('加载中……'); $.ajax({ url:'/Watch/indexLog', type:'get', dataType:'text', data:{ do:'ajax_reward', appid:'63331', p:p }, success:function(result){ if(result){ $('.reward-row').append(result); li_height = $('.reward-row li').length * (40 + 1 + 10 + 10) - 250; $('.reward-loading').text(''); p ++; }else{ $('.reward-loading').text('没有更多了'); $('.reward-row').unbind('scroll'); } } }); } }); </script> <script type="text/javascript"> if(typeof console == "undefined"){this.console = {log:function(msg){}};} // 如果浏览器不支持websocket,会使用这个flash自动模拟websocket协议,此过程对开发者透明 WEB_SOCKET_SWF_LOCATION = "https://o.nuoyun.tv/Public/Home/Swf/WebSocketMain.swf"; // 开启flash的websocket debug WEB_SOCKET_DEBUG = true; var ws,name = "",client_list = {}; var ws_url = "wss://wss.nuoyun.tv"; // 登录 var client_photo = ''; /*if(client_photo.search('http') < 0){ client_photo = 'https://i.nuoyun.tv/Public/'; }*/ $('.photo-img').attr('src',client_photo); var path_public = 'https://i.nuoyun.tv/Public'; var code_domain = 'https://s.nuoyun.tv/Public'; // 点赞 var window_width = $(window).width(); var window_height = $(window).height(); var is_shut_up = ''; var is_shut_up_all = '1'; var unionid = ''; var is_master = ''; $.cookie('is_master', is_master, { path: '/' }); var shut_up_url = '/Watch/shutUp'; var forbid_url = '/Watch/doForbid'; var forbid_url_show = '/Watch/forbid'; var cancel_shut_up_forbid_url = '/Watch/cancelShutUpForbid'; var row_delete_url = '/Watch/rowDelete'; var place_top_url = '/Watch/placeTop'; var cancel_place_top_url = '/Watch/cancelPlaceTop'; var pdf_switch = '0'; var pdf_cur_row_id = ''; //首次获取文档直播id var zoom_enabled = '0'; var base_count = '1'; var increase_min = '1' * 1; var increase_max = '1' * 1; var vote_info_url = '/Watch/voteInfo'; var user_limit = 'yes'; var like_url = '/Watch/likeNumber'; var master_txt = ''; var need_robot_speak = ''; var get_robot_info_url = '/Watch/getRobotInfo'; // 排行榜 let rank_switch = '0'; let wallFlag = ""; let invite_sw = 1,reward_sw = 1,gift_sw = 1,consume_sw = 1; var isFirstLoadRank = true; let login_id = $.cookie("pc_login_id") window.onload = function(){ connect(); }; </script> <script src="https://s.nuoyun.tv/Public/Home/Js/chat.js?v=V5.16.563" crossorigin="anonymous"></script> <script> //退出登录 $(".login_btn").hover(function(){ if(client_photo){ //登录 $(".logout-box").css("display","flex"); } },function(){ $(".logout-box").hide(); }); $('.logout-box').click(function(){ $.ajax({ url:'/Wechat/login/roomLogOut', type:'post', dataType:'json', async:false, data:{}, success:function(result){ if(result.code == 200){ location.reload(); }else{ layer.msg(result.msg); } }, error(msg){ console.log(msg); } }); }) var chatData = [] var chat_page = 0; // 聊天内容点击加载更多 $('.more-chat').on('click',function(){ var h_ago = 0,h_now = 0; $('.chat li').each(function(){ h_ago += $(this).height(); }); var _this = $(this); _this.text('正在加载…'); chat_page ++; $.ajax({ url: openapi + '/Wx/Interact/getChatRecord', type:'get', dataType:'json', data:{ // do:'ajax_chat', appid:'63331', // appid: 3094, 'chat_page':chat_page }, async:false, success:function(result){ $('.more-chat').show() if(result.code == 1) { if (result.data && result.data.length) { chatData = [...chatData,...result.data]; if(result.has_more){ _this.text('点击加载更多'); }else{ if(chat_page == 1){ _this.hide() } _this.text('没有更多内容'); _this.off('click'); } _this.after(formatMsgHistory(result.data)); $('.chat-content .wx-upload-images').css("max-width","100%"); $('.chat-content .wx-upload-images').parent('.chat-content').css("max-width","30%"); handleEnvelopeStyle(); $('.chat li').each(function(){ h_now += $(this).height(); }); $('.chat').scrollTop(h_now - h_ago); } else { _this.text('没有更多内容'); _this.off('click'); if(chat_page == 1){ _this.hide() } } } else { _this.text('没有更多内容'); _this.off('click'); if(chat_page == 1){ _this.hide() } } } }); }); var allow; //是否允许获取验证码 function isAllowSms(){ $.ajax({ url: openapi + '/Wx/User/allowSmsVerify', // url:'http://116.62.62.85:9501/Wx/User/allowSmsVerify', type:'post', dataType:'json', async:false, data:{ "uid":room_uid, "room_id":room_id }, success:function(result){ if(result.code == 200){ if(result.data.allow_sms_verify == 1){ //可以发送 allow = true; return true; }else{ //不可以发送 隐藏验证码输入框 allow = false; return false; } } }, error(msg){ console.log(msg); } }); return allow; } let png_path_list = [],png_cur = 0; let pdf_slide_switch = ''; function getDoc(){ $.ajax({ url:gwApi+'/MiniProgram/Live/getDocLivePng', type:'post', dataType:'json', data:{ doc_id:pdf_cur_row_id }, success:function(res){ if(res.code == 200){ png_path_list = res.data.png_path_list; $('.pdf-live-img').attr('src',res.data.png_path_list[res.data.png_cur - 1]); //当前页 png_cur = res.data.png_cur - 1; if(png_cur == 0){ $('.word-prev').hide(); } if(png_cur == png_path_list.length){ $('.word-next').hide(); } if(pdf_slide_switch != 1){ $('.word-prev').hide(); $('.word-next').hide(); } $('.page-num>span:nth-child(1)').text(res.data.png_cur); $('.page-num>span:nth-child(3)').text(res.data.png_path_list.length); } } }); } $(function() { //iframe if(room_id == '1094159661' || room_id == '65779'){ //新增表头样式 $('.pc .box-title').css("display","flex"); $('.box-left').css("cssText","width:calc(100% - 320px)"); $('.box-right').css("cssText","width:320px"); $('.middle-box').css("cssText","height:calc(100% - 60px - 48px)"); // $('.middle-box .cover-app').show(); $('.bottom-box').css("cssText","height:60px;background-image: linear-gradient(to right, #262626 , #626262);border-bottom-left-radius: 10px;"); $('.pc').css("background","#fff"); $('.box').css("cssText","max-height:603px;height:603px;background: #16171B;border-radius: 10px;"); $('.box-right .input-box').css("cssText","border-bottom-right-radius: 10px;"); $('.pc').css("padding-top","35px"); } if(room_id == '1094159661' || room_id == '65779' || room_id == '3071972583'){ $('.pc.watch .box').removeClass('pt-60'); $('.top-box,.pc-focus-qrcode,.fa-weixin,.share-box,.pc.watch .header,.tab-box,.chat-img').hide(); $('.box-left,.box-right').css("height","100%"); $('.middle-box').css('min-height','unset'); $('.txt-scroll.myactive,.countdown,.countdown-time').css("color","#c7000b"); $('.txt-scroll.myactive').css("cssText","color:#c7000b !important"); $('.input-box-container button').css("cssText","color:white !important"); $('.input-box-container button').css("cssText","background:#c7000b !important"); // $('.middle-box .cover-app').css('object-fit','fill'); //新建悬浮按钮 追加到聊天区域 // let question_hover = `<a style="position:absolute;bottom:20px;right:20px;width:30px;height:30px" href="https://www.wjx.cn/vj/OtuTOKZ.aspx" target="_blank"><img style="width:30px;height:30px" src="https://i.nuoyun.tv/Public/Home/Images/Chat/question-icon.png" /></a>`; // $('.box-right').append(question_hover); } if(room_id == '3071972583'){ //全屏展示 $('.box').css("height",document.documentElement.clientHeight); $('.pc.watch .box-right,.pc.watch .box-left .bottom-box').hide(); $('.pc.watch .box-left').css("width","100%"); $('.pc.watch .box-left .middle-box').css("height","100%"); $('.pc .box-title').hide(); $('.pc.watch').css("background","#fff"); } // if('6' == 2){ // window.location.replace('https://console.nuoyun.tv/Watch/applet.html?id=' + room_id); // } /***短信验证***/ if(whitelist_sms_verify == 1){ //短信验证按钮开启 请求验证码是否可以发送短信 控制验证码样式是否显示 if(!isAllowSms()){ //不可以发送验证码 $('.sms-container').hide(); $('.whitelist-btn').removeAttr('disabled'); whitelist_sms_verify = 0; //重置为关闭 is_sms = '0'; }else{ //可以发送验证码 $('.sms-container').show(); $('.whitelist-btn').attr('disabled','disabled'); is_sms = '1'; } } setTimeout(function() { $('#dialog').stop().animate({scrollTop:$('#dialog')[0].scrollHeight},200); }, 1000); $('.luckydraw-winner-box .close-icon').click(function() { $('.luckydraw-winner-box').hide(); }); if(pdf_switch == '1'){ var pdf_str = ''; //开启文档直播 getDoc(); } if(room_id == 93640 || room_id == 93418){ $('.watch-bg.chat-height').hide(); } }); window_resize(); function window_resize(){ $(".quote-bottom").hide(); $(".quote-btn").hide(); let w_h = window.innerWidth; if(w_h >= 1801){ if(pdf_switch == 1){ $('.chat').css('height','57%'); $('.menu_game_con').css('height','74%'); }else{ $('.chat').css('height','83%'); $('.menu_game_con').css('height','93.5%'); } }else if(w_h >= 1601 && w_h <= 1800){ if(pdf_switch == 1){ $('.chat').css('height','57%'); $('.menu_game_con').css('height','74%'); }else{ $('.chat').css('height','83%'); $('.menu_game_con').css('height','93.5%'); } }else if(w_h >= 1441 && w_h <= 1600){ if(pdf_switch == 1){ $('.chat').css('height','57%'); $('.menu_game_con').css('height','74%'); }else{ $('.chat').css('height','83%'); $('.menu_game_con').css('height','93.5%'); } }else if(w_h >= 1201 && w_h <= 1440){ if(pdf_switch == 1){ $('.chat').css('height','57%'); $('.menu_game_con').css('height','74%'); }else{ $('.chat').css('height','83%'); $('.menu_game_con').css('height','93.5%'); } }else{ if(pdf_switch == 1){ $('.chat').css('height','57%'); $('.menu_game_con').css('height','74%'); }else{ $('.chat').css('height','83%'); $('.menu_game_con').css('height','93.5%'); //iframe if(room_id == '1094159661' || room_id == '65779' || room_id == '3071972583'){ $('.chat').css('height','100%'); } if(room_id == '1094159661' || room_id == '65779'){ $('.pc .box-right .chat').css("cssText","height:calc(100% - 50px)"); } } } } window.onresize = window_resize; $('.word-prev').click(function(){ $('.word-next').show(); if(png_cur != 0){ png_cur--; $('.pdf-live-img').attr('src',png_path_list[png_cur]); if(png_cur == 0){ $('.word-prev').hide(); } } $('.page-num>span:nth-child(1)').text(png_cur + 1); }); $('.word-next').click(function(){ $('.word-prev').show(); if(png_cur *1 + 1 < png_path_list.length){ png_cur++; $('.pdf-live-img').attr('src',png_path_list[png_cur]); if(png_cur == png_path_list.length){ $('.word-next').hide(); } } $('.page-num>span:nth-child(1)').text(png_cur + 1); }); let word_full = document.getElementsByClassName('word-full')[0]; let fullarea = document.getElementsByClassName('pdf-live')[0]; let fullscreen = false; word_full.addEventListener('click',function(){ if (fullscreen) { // 退出全屏 if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } } else { // 进入全屏 if (fullarea.requestFullscreen) { fullarea.requestFullscreen(); } else if (fullarea.webkitRequestFullScreen) { fullarea.webkitRequestFullScreen(); } else if (fullarea.mozRequestFullScreen) { fullarea.mozRequestFullScreen(); } else if (fullarea.msRequestFullscreen) { // IE11 fullarea.msRequestFullscreen(); } } fullscreen = !fullscreen; }); // 自定义滚动条(如需兼容IE必须放置于最后) $(".chat").niceScroll({ // background:"rgba(255,255,255,.1)", cursorcolor:"#515454", cursorwidth:"6px", cursorborder:"0", cursorborderradius:"0px", autohidemode:false }); // 关灯 function closelights(){ $('.screen').show(); } // 开灯 function openlights(){ $('.screen').hide(); } </script> <script> var max_allowed_choice = ''; var is_daily_enabled = ''; var vote_id = ''; var vote_url = '/Vote/vote'; </script> <script type="text/javascript"> $(function() { handleEnvelopeStyle(); var wH = $(window).height(); $('body').css({ minHeight: wH + 'px' }); $(document).on('click','.vote-start',function(){ if(!$('.vote-start').text().trim()) { return false; } $('.vote').css("cssText","position: absolute;height: 100%;"); $('.vote-box').show(); /*setTimeout(function() { // var voteBox = $('.vote-box').css('height').replace('px', ''), // voteTitle = $('.vote-title').css('height').replace('px', ''); var voteBox = $('.vote-box').height(), voteTitle = $('.vote-title').height(); $('.vote-content').height(voteBox - voteTitle - 40); }, 1000);*/ }); $(document).on('click','.vote-close',function(){ $('.vote').css("cssText","position: static;height: 0px;"); $('.vote-box').hide(); }); }); //解决div contenteditable 问题 (function(){ $('[contenteditable]').each(function() { try { // 干掉IE http之类地址自动加链接 document.execCommand("AutoUrlDetect", false, false);   } catch (e) {} $(this).on('paste', function(e) { e.preventDefault(); var text = null; if (window.clipboardData && clipboardData.setData) { // IE text = window.clipboardData.getData('text'); } else { text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('在这里输入文本'); } if (document.body.createTextRange) {     if (document.selection) { textRange = document.selection.createRange(); } else if (window.getSelection) { sel = window.getSelection(); var range = sel.getRangeAt(0); // 创建临时元素,使得TextRange可以移动到正确的位置 var tempEl = document.createElement("span"); tempEl.innerHTML = "&#FEFF;"; range.deleteContents(); range.insertNode(tempEl); textRange = document.body.createTextRange(); textRange.moveToElementText(tempEl); tempEl.parentNode.removeChild(tempEl); } if (text) { text = text.replace(/[\r\n]/g, " "); } textRange.text = text; textRange.collapse(false); textRange.select(); } else { // Chrome之类浏览器 if (text) { text = text.replace(/[\r\n]/g, " "); } document.execCommand("insertText", false, text); } }); }); })(); if(LIVETYPE == "picture"){ let scriptPicture = document.createElement('script'); scriptPicture.src = "https://s.nuoyun.tv/Public/Home/Js/picture-live.js?v=V5.16.563"; scriptPicture.crossOrigin = "anonymous"; document.getElementsByTagName('body')[0].appendChild(scriptPicture); } </script> <script src="https://s.nuoyun.tv/Public/Home/Js/vote-old.js?v=V5.16.563" crossorigin="anonymous"></script> <script type="text/javascript"> function flashChecker(){ var hasFlash = 0; //是否安装了flash var flashVersion = 0; //flash版本 if(document.all){ var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); if(swf){ hasFlash = 1; VSwf = swf.GetVariable("$version"); flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]); } }else{ if(navigator.plugins && navigator.plugins.length > 0){ var swf = navigator.plugins["Shockwave Flash"]; if(swf){ hasFlash = 1; var words = swf.description.split(" "); for(var i = 0; i < words.length; ++i){ if(isNaN(parseInt(words[i]))) continue; flashVersion = parseInt(words[i]); } } } } return { f: hasFlash, v: flashVersion }; } var fls = flashChecker(); var s = ""; // if("1" != 1 && !fls.f){ // /*if(confirm("您的浏览器未安装Flash插件,现在安装?")){ // window.location.href = "http://get.adobe.com/cn/flashplayer/"; // }*/ // $('.barrage').append('<p class="txt-center flash">您尚未安装或开启Flash,无法正常播放,请点击<a href="http://get.adobe.com/cn/flashplayer/">安装/开启</a><br>(安装完成后,请重启浏览器)</p>'); // } // 预上线标识 if($.cookie('unstable') != 'off'){ // $('.input-box-container button').css('background','red !important'); // 设置无效 $('.input-box-container button').css('cssText','background:red !important;'); } function englishLanguage() { $('.languageSwitching').find('p').text('Language switching'); // if(LIVETYPE == "ebusiness"){ //说点什么吧~ $('.messageEditor').attr('placeholder','Say something~'); $('#chat_box').attr('placeholder','Say something~'); //禁言中... $('.shutup').attr('placeholder','No speaking...'); //优惠券 $('.my-coupon-list').find('p').text('Coupons'); //提现 $('.withdraw').find('p').text('Withdrawals'); //发红包 $('.envelope').find('p').text('Red packet'); //排行榜 $('.rank-list').find('p').text('Leaderboard'); //推广员 $('.oper-promote').find('p').text('Promoter'); //订单 $('.goods-order').find('p').text('Orders'); //积分商城 $('.integralShop').find('p').text('Points mall'); //修改昵称 $('.edit-nick').find('p').text('Modify the nickname'); //直播间动效 $('.fireworks').find('p').text('Live stream animation'); //马甲 $('.oper-vest').find('p').text('Virtual identity'); //用户管理 $('.user-manage').find('p').text('User management'); //竞拍 $('.up-auction-btn').find('p').text('Auctions'); //评论抽奖 $('.commentLottery').find('p').text('Raffle in comments'); //立即开奖 $('.open-prize').find('p').text('Draw a lottery now'); //打卡 $('.open-punch-clock').find('p').text('Clock in'); //中奖记录 $('.luckydraw-winner-list').find('p').text('Winning record'); //评论记录 $('.masterChat').find('p').text('Comment history'); //全员禁言 if($('.shut-up-all').find('p').text() == '全员禁言'){ $('.shut-up-all').find('p').text('Mute all'); } else { $('.shut-up-all').find('p').text('Turn off mute'); } //清除数据 $('.clearData').find('p').text('Clear data'); //抽奖 $('.lottery').find('p').text('Roulette draw'); //推送优惠券 $('.push-coupon-header').find('.push-coupons').text('Coupons push'); $('.push-coupon').find('p').text('push-coupon'); //竞拍记录 $('.auctionRecord').find('p').text('Auction history'); $('.myAuction').find('p').text('Auction history'); //发红包 $('.envelope').find('p').text('Red packet'); //隐藏特效 if($('.giftSvgaBtn').find('p').text() == '隐藏特效'){ $('.giftSvgaBtn').find('p').text('Turn off the effects'); } else { $('.giftSvgaBtn').find('p').text('Turn on the effects'); } //分享至 $('.shareBottom').find('span').text('Share content to'); //生成邀请函 $('.shareImg').find('p').text('Invitation'); //微信分享 $('.shareWechat').find('p').text('WeChat'); //生成链接 $('.shareLink').find('p').text('URL'); //保存二维码 $('.shareCode').find('p').text('QR code'); //店铺 $('.to-store').find('p').text('Shop'); //投诉 $('.oper-complain').find('p').text('Report'); //图片 $('.wx-choose-img').find('p').text('Photos'); //基础功能 $('.wxjs-list-basics').find('.wxjs-list-bottom-title').text('Basic functionality'); //管理员功能 $('.wxjs-list-master').find('.wxjs-list-bottom-title').text('Administrator features'); // 关注 $('.att_text').text('follow with interest'); // 分享 $('.share_text').text('Share'); // 发送 $('.btn-sm').text('Send'); } function chineseLanguages() { $('.languageSwitching').find('p').text('语言切换'); // if(LIVETYPE == "ebusiness"){ //说点什么吧~ $('.messageEditor').attr('placeholder', '来说点什么吧~'); $('#chat_box').attr('placeholder', '来说点什么吧~'); //禁言中... $('.shutup').attr('placeholder', '禁言中...'); //优惠券 $('.my-coupon-list').find('p').text('我的优惠券'); //提现 $('.withdraw').find('p').text('提现'); //发红包 $('.envelope').find('p').text('发红包'); //排行榜 $('.rank-list').find('p').text('排行榜'); //推广员 $('.oper-promote').find('p').text('推广员'); //订单 $('.goods-order').find('p').text('我的订单'); //积分商城 $('.integralShop').find('p').text('积分商城'); //修改昵称 $('.edit-nick').find('p').text('修改昵称'); //直播间动效 $('.fireworks').find('p').text('直播间动效'); //马甲 $('.oper-vest').find('p').text('马甲'); //用户管理 $('.user-manage').find('p').text('用户管理'); //竞拍 $('.up-auction-btn').find('p').text('竞拍'); //评论抽奖 $('.commentLottery').find('p').text('评论抽奖'); //立即开奖 $('.open-prize').find('p').text('立即开奖'); //打卡 $('.open-punch-clock').find('p').text('打卡'); //中奖记录 $('.luckydraw-winner-list').find('p').text('中奖记录'); //评论记录 $('.masterChat').find('p').text('评论记录板'); //全员禁言 if ($('.shut-up-all').find('p').text() == 'Mute all') { $('.shut-up-all').find('p').text('全员禁言'); } else { $('.shut-up-all').find('p').text('取消禁言'); } //清除数据 $('.clearData').find('p').text('清除数据'); //抽奖 $('.lottery').find('p').text('抽奖'); //推送优惠券 $('.push-coupon-header').find('.push-coupons').text('推送优惠券'); $('.push-coupon').find('p').text('推送优惠券'); //竞拍记录 $('.auctionRecord').find('p').text('竞拍记录'); $('.myAuction').find('p').text('竞拍记录'); //发红包 $('.envelope').find('p').text('发红包'); //隐藏特效 if ($('.giftSvgaBtn').find('p').text() == 'Turn off the effects') { $('.giftSvgaBtn').find('p').text('隐藏特效'); } else { $('.giftSvgaBtn').find('p').text('开启特效'); } //分享至 $('.shareBottom').find('span').text('分享至'); //生成邀请函 $('.shareImg').find('p').text('生成邀请函'); //微信分享 $('.shareWechat').find('p').text('微信分享'); //生成链接 $('.shareLink').find('p').text('生成链接'); //保存二维码 $('.shareCode').find('p').text('保存二维码'); //店铺 $('.to-store').find('p').text('店铺'); //投诉 $('.oper-complain').find('p').text('投诉'); //图片 $('.wx-choose-img').find('p').text('图片'); //基础功能 $('.wxjs-list-basics').find('.wxjs-list-bottom-title').text('基础功能'); //管理员功能 $('.wxjs-list-master').find('.wxjs-list-bottom-title').text('管理员功能'); // 关注 $('.att_text').text('关注'); // 分享 $('.share_text').text('分享'); // 发送 $('.btn-sm').text('发送'); } // 多语言切换,点击切换英文 $(document).on('click', '.languageSwitching', function (e) { e.stopPropagation(); if ($('.englishLanguages').is(':hidden')) { $(this).find('.chineseLanguages').hide(); $('.englishLanguages').show(); chineseLanguages(); localStorage.setItem('languagesType','true') } else { $(this).find('.englishLanguages').hide(); $('.chineseLanguages').show(); englishLanguage(); localStorage.setItem('languagesType','false') } }); $('.layui-close').click(function (){ $('.layui-layer-shade').remove(); layer.closeAll();//关闭所有层 }) let menuData = [] $.ajax({ url: openapi + '/MiniProgram/Menu/index?req_client=2&id=' + room_id + '&wechat_user_space_id=' + wusid, type: 'get', dataType: 'json', success: function (res) { if (res.code == 1){ menuData = res.data console.log(menuData) } } }) function hotspotHandle() { $(document).ready(function () { // 文档加载完毕后执行的代码 console.log('文档加载完毕', menuData) // const menus = $('.tab-content-s') $('.tab-content-s').each(function (index, element) { // 在这里对每个元素执行操作 console.log(index, element) const roomid = $(element).data('id') const images = $(element).find('img') console.log('each', roomid, images) images.on('click', function (e) { const menuItemData = menuData.find((item) => item.id == roomid) const areaData = menuItemData.img_hot_area var $image = $(this) var offsetX = e.pageX - $image.offset().left var offsetY = e.pageY - $image.offset().top var ratio = 418 / e.target.width var imageIndex = images.index($image) // console.log('点击位置相对于图片的坐标:', ratio, e.target.width, offsetX, offsetY) console.log('ratio:', ratio, 'width', e.target.width, '点击位置相对于图片的坐标:', offsetX, offsetY) console.log('点击的是第', imageIndex, '张图片') var imageSrc = $image.attr('src') console.log('图片的src属性:', imageSrc) const areas = areaData[`${imageSrc}?index=${imageIndex}`] console.log('areas', areas) console.log('ratio', ratio) // /根据比例计算点击位置在哪个选区中 for (var i = areas.length - 1; i >= 0; i--) { var area = areas[i] var scaledX = offsetX * ratio var scaledY = offsetY * ratio if (scaledX >= area.x && scaledX <= area.x + area.width && scaledY >= area.y && scaledY <= area.y + area.height) { console.log('点击位置在选区', i) console.log('area.link', area.link) if (area.link) { window.open(area.link, '_blank'); } break } } }) }) }) } hotspotHandle() </script> <script src="https://s.nuoyun.tv/Public/Home/Js/moblie/punchClock.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Home/Js/Swiper/dist/js/swiper.jquery.min.js?v=V5.16.563" crossorigin="anonymous"></script> <script src="https://s.nuoyun.tv/Public/Mobile/js/moment.min.js?v=V5.16.563" crossorigin="anonymous"></script><!-- <script src="https://s.nuoyun.tv/Public/Home/Js/picture-live.js?v=V5.16.563"></script> --> <script type="text/javascript"> // 公用js代码 </script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('zh-CN', 'de', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&amp;hl=en&amp;client=wt" type="text/javascript"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10