// 跳转 /gcw/xxx.html 播放页面 if (window.location.pathname.indexOf("/") > -1) { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp = sUserAgent.match(/midp/i) == "midp"; var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; if (!bIsIpad && ( bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM )){ var a = window.location.href; window.location.href=a.replace('https://www','https://m'); } } document.writeln(""); $(function () { // 搜索 $("#search_btn").click(function () { var keyword = $('#search_keyword').val(); var search_type = $("#search_type").val(); if (keyword == '' || keyword == 'undefined') { alert("请填写您想搜索的关键词"); return false; } else { if (search_type == "gcw") { location.href = "/search/gcw?word=" + encodeURIComponent(keyword); } else if (search_type == "taiji") { location.href = "/search/taiji?word=" + encodeURIComponent(keyword); } else { location.href = "/search/index?word=" + encodeURIComponent(keyword); } // window.open("http://so.cntaijiquan.com/cse/search?q=" + keyword + "&s=12525413316480353993"); } }) }) ; /*改变字体大小*/ var curfontsize = 10; var curlineheight = 18; function fontZoomA() { if (curfontsize > 8) { document.getElementById('fontzoom').style.fontSize = (--curfontsize) + 'pt'; document.getElementById('fontzoom').style.lineHeight = (--curlineheight) + 'pt'; } } function fontZoomB() { if (curfontsize < 64) { document.getElementById('fontzoom').style.fontSize = (++curfontsize) + 'pt'; document.getElementById('fontzoom').style.lineHeight = (++curlineheight) + 'pt'; } } /* 改变图片大小 */ function resizepic(thispic) { if (thispic.width > 550) { thispic.height = thispic.height * 550 / thispic.width; thispic.width = 550; } } function addfavorite() { var url = window.location.href; var tname = document.title if (document.all) { try { window.external.addFavorite(url, tname); } catch (e) { try { window.sidebar.addPanel(tname, url, ""); } catch (e) { alert("请使用Ctrl+D键收藏本页"); } } } else if (window.sidebar) { alert("请使用Ctrl+D键收藏本页"); } } function Show_Menu(thisObj, Num) { if (thisObj.className == "active")return; var dhObj = thisObj.parentNode.id; var dhList = document.getElementById(dhObj).getElementsByTagName("li"); for (i = 0; i < dhList.length; i++) { if (i == Num) { thisObj.className = "active"; document.getElementById(dhObj + "_content" + i).style.display = "block" } else { dhList[i].className = "normal"; document.getElementById(dhObj + "_content" + i).style.display = "none" } } } $(function () { // 返回顶部 $("#gotop").click(function (e) { //以1秒的间隔返回顶部 $('body,html').animate({scrollTop: 0}, 1000); }); //*****------------------------ 查看太极拳馆联系方式- $("#show_quanguan_contact").click(function () { // 获取内容 $.ajax({ type:'get', url:'/user/ajax-get-quanguan-contact', data: {'id':g_main_id}, dataType: 'json', cache:true, success:function(res) { // 提示登录 if (res.code == -1) { layer.open({ title:'登录', type: 2, scrollbar:false, area: ['666px', '475px'], content: 'http://www.cntaijiquan.com/user/login?is_mini=1', }); } // 显示信息 else { layer.open({ title:false, type: 1, area: ['300px', '100px'], shade: 0.5, content: '
' + '
电 话:'+ res.data.contact +'
' + '
微 信:'+res.data.weixin+'
' + '
网 址:'+res.data.site+'
' + '
' }); } } }); }); // *----------------------------- // *---------------- 拳馆点击跳到相册 $("#goto-xiangce").click(function(){ $("html,body").animate({scrollTop:$("#xiangce").offset().top},1000); }); // *---------------- 下载广场舞歌曲 $('.tjq_download > li:eq(1)').click(function(){ $.ajax({ url:"/api/apply-down-music?id="+g_main_id, type:'GET', dataType:'json', success:function(res) { if (res.status == 1) { passwd = res.passwd; layer.open({ type: 1, skin: 'down-class', //样式类名 anim: 1, area: ['380px', '390px'], shadeClose: true, title: '温馨提示', content: '
' + '

1、打开微信扫一扫,关注“广场舞教学

' + '

' + '

2、关注后回复“' + res.data + '”验证码,再点击下载

' + '

已回复开始下载

' + '
', }); } else { layer.alert(res.data); } } }); // end ajax return false; }); // 广场舞-点击下载 $("body").on("click", "#ajax_down_btn", function(){ var passwd = $("#passwd").text(); $.ajax({ url:"/api/do-down-music", type:'GET', data:{'passwd': passwd}, dataType:'json', success:function(res) { if (res.status == 1) { window.location.href = res.data; // 关闭窗口 layer.closeAll(); } else { layer.tips(res.data, '#ajax_down_btn'); } } }); // end ajax }); // *---------------- 下载太极拳视频 - 展示二维码 $('#tjq_video_show_qr').click(function(){ $.ajax({ url:"/api/apply-down-video?id="+g_main_id, type:'GET', dataType:'json', success:function(res) { if (res.status == 1) { passwd = res.passwd; layer.open({ type: 1, skin: 'down-class', anim: 1, area: ['380px', '390px'], shadeClose: true, title: '温馨提示', content: '
' + '

1、打开微信扫一扫,关注“太极拳教学网

' + '

' + '

2、关注后回复“' + res.data + '”验证码,再点击下载

' + '

已回复开始下载

' + '
', }); } else { layer.alert(res.data); } } }); // end ajax return false; }); // 太极视频回复后-点击下载 $("body").on("click", "#ajax_down_video_btn", function(){ var passwd = $("#passwd").text(); $.ajax({ url:"/api/do-down-video", type:'GET', data:{'passwd': passwd}, dataType:'json', success:function(res) { if (res.status == 1) { window.location.href = res.data; // 关闭窗口 layer.closeAll(); } else { layer.tips(res.data, '#ajax_down_video_btn'); } } }); // end ajax }); // *---------------- 关注大师 var _f_click = false; $("#tj_dashi_follower").click(function () { var dashi_id = $(this).attr('data-id'); if (_f_click) return false; // 获取内容 $.ajax({ type:'get', url:'/dashi/follower', data: {'dashi_id':dashi_id}, dataType: 'json', success:function(res) { // 提示登录 if (res.code == -1) { layer.open({ title:'登录', type: 2, scrollbar:false, area: ['666px', '475px'], content: '/user/login?is_mini=1', }); } // 显示信息 else { layer.msg('关注成功!'); var $cmt = $("#folloer_cmt"); $cmt.text(parseInt($cmt.text()) + 1); _f_click = true; } } }); }); //-- end // *---------------- 关注大师 var _f_l_click = false; $("#tj_wait_learn").click(function () { var dashi_id = $(this).attr('data-id'); if (_f_l_click) return false; // 获取内容 $.ajax({ type:'get', url:'/dashi/wait-learn', data: {'dashi_id':dashi_id}, dataType: 'json', success:function(res) { // 提示登录 if (res.code == -1) { layer.open({ title:'登录', type: 2, scrollbar:false, area: ['666px', '475px'], content: '/user/login?is_mini=1', }); } // 显示信息 else { layer.msg('成功!'); var $cmt = $("#tj_wait_learn_cmt"); $cmt.text(parseInt($cmt.text()) + 1); _f_l_click = true; } } }); }); //-- end // *---------------- 点赞大师 var _f_ll_click = false; $("#tj_like").click(function () { var dashi_id = $(this).attr('data-id'); if (_f_ll_click) return false; // 获取内容 $.ajax({ type:'get', url:'/dashi/like', data: {'dashi_id':dashi_id}, dataType: 'json', success:function(res) { layer.msg('成功!'); var $cmt = $("#tj_like_cmt"); $cmt.text(parseInt($cmt.text()) + 1); _f_ll_click = true; } }); }); //-- end }); function post_error(id) { alert('感谢反馈!'); return false; } // 检测flash是否安装 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 }; }