<script type="text/javascript" src="{MODULE_URL}template/mobile2/js/mui.min.js"></script>
<script type="text/javascript" src="{MODULE_URL}template/mobile2/js/ady.js?v=1"></script>
<script type="text/javascript" src="{MODULE_URL}template/mobile2/js/demo_base.js"></script>
<script type="text/javascript" src="{MODULE_URL}template/mobile/js/swiper-3.3.1.jquery.min.js"></script>
<script>
function sendmsg(id,nickname){
if(id){
$("#msg_id").val(id);
$("#send_msg_text").attr('placeholder','对'+nickname+'说');
}
}
$(function() {
var mySwiper = new Swiper ('.swiper-container',{
loop: false,
autoplay: 3000
})
{if ($liveSetting['attention_type']==3 && ($limits['password'] == $viewer['password'] || $paylog['status']==1 || $limits['type']==0))}
if(getCookie('qrshow'+loginInfo.rid)!="{$liveSetting['days']}")
{
if("{$_W['fans']['follow']}"!=1)
{
$('.grap').show();
$('.qrcode').html('<span class = "focus-on-click">+</span><img src="{php echo tomedia($liveSetting['attention_code'])}"/><p>长按二维码关注公众号</p><p>"关注后可掌握直播最新动态哦"</p>');
$('.qrcode').show();
setCookie('qrshow'+loginInfo.rid,{$liveSetting['days']},{if $liveSetting['days']}{$liveSetting['days']}{else} 0 {/if});
}
}
{/if}
var liveurl = "{$rtmp}";
var livehttp = "{$hls}";
var linum = $(".TAstate li").length;
if (linum==1) {
$(".TAstate li").width("100%");
}else if(linum==2){
$(".TAstate li").width("50%");
}else if(linum==3){
$(".TAstate li").width("33%");
}else if(linum==4){
$(".TAstate li").width("25%");
}else if(linum==5){
$(".TAstate li").width("20%");
}
var ranknum = $(".rankpm div p").length;
if (ranknum==1) {
$(".rankpm div p").width("100%");
}else if(ranknum==2){
$(".rankpm div p").width("50%");
}else if(ranknum==3){
$(".rankpm div p").width("33%");
}else if(ranknum==4){
$(".rankpm div p").width("25%");
}
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: "{$jssdk['appId']}",
timestamp: "{$jssdk['timestamp']}",
nonceStr: "{$jssdk['nonceStr']}",
signature: "{$jssdk['signature']}",
jsApiList: ['getLocation','onMenuShareAppMessage','onMenuShareTimeline', "onMenuShareQQ",'hideMenuItems','previewImage'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
wx.ready(function(){
wx.onMenuShareAppMessage({
title: "{$sharesetting['title']}",
desc: "{$sharesetting['des']}",
link: "{php echo $_W['siteroot'].str_replace('./','app/',$this->createMobileurl('index',array('share_uid' => $uid,'rid'=>$liveSetting['rid'])))}",
imgUrl: "{$sharesetting['img']}",
success: function () {
$.post("{php echo $_W['siteroot'].str_replace('./','app/',$this->createMobileurl('mobileshare',array('rid'=>$liveSetting['rid'])))}", function(data) {
},'json');
},
cancel: function () {
}
});
wx.onMenuShareTimeline({
title: "{$sharesetting['title']}",
desc: "{$sharesetting['des']}",
link:"{php echo $_W['siteroot'].str_replace('./','app/',$this->createMobileurl('index',array('share_uid' => $uid,'rid'=>$liveSetting['rid'])))}",
imgUrl: "{$sharesetting['img']}",
success: function () {
$.post("{php echo $_W['siteroot'].str_replace('./','app/',$this->createMobileurl('mobileshare',array('rid'=>$liveSetting['rid'])))}", function(data) {
},'json');
},
cancel: function () {
}
});
wx.hideMenuItems({
menuList: [
'menuItem:readMode',
'menuItem:openWithSafari',
'menuItem:exposeArticle',
'menuItem:share:qq',
'menuItem:profile',
'menuItem:addContact',
'menuItem:share:QZone',
]
});
$('body').on('click', '.char_message>img', function(event) {
event.preventDefault();
var imgArray = [];
var thisimg = $(this).attr('src');
$('.char_message>img').each(function(index, el) {
var itemSrc = $(this).attr('src');
imgArray.push(itemSrc);
});
// alert(thisimg);
wx.previewImage({
current: thisimg,
urls: imgArray
});
});
});
function isWX() {
var u = navigator.userAgent, app = navigator.appVersion;
return u.indexOf("MicroMessenger") > -1;
}
var founder = {
uid:"{$reward['uid']}",
nickname:"{$reward['nickname']}",
headurl:"{$reward['images']}"
}
var tid='2201';
var minMoney = 0.01; //每人最小金额1元
var zbRedBag = {
randomBtn: '改为拼手气红包',
fixedBtn: '改为普通红包',
randomText: '金额随机',
fixedText: '金额固定',
bagMessage: '恭喜发财!',
msg1: '至少需要设置1个红包',
msg2: '平均每人不能少于' + minMoney + '元'
};
var msgbar = $("#msg-tipbar");
var bag_money_show = $(".bag-money-show");
var pd = {
bagAmount: 0,
bagMoney: 0,
bagType: 1, //1随机,默认 2固定
bagMessage: zbRedBag.bagMessage,
bagServiceMoney: 0, //平台服务费0%
};
var red = {
redid:0,
redtitle:'恭喜发财',
toredName:'',
toredHead:'',
redMoney:0,
rednum:0
};
var personal = {
uid:0,
nickname:'',
headurl:''
}
$(document).on('click','.gotoRecharge',function (event) {
window.location.href="{php echo $this->createMobileUrl('recharge',array('r' => 'page','live_id'=>$liveSetting['id'],'uid'=>$uid))}";
})
//聊天框
$(document).on('click', '.c
评论1