"use strict"; /* * @Author: lvjing * @Date: 2018-12-14 14:25:05 * @LastEditTime: 2022-05-11 10:27:35 * @Version: 1.0 * @Description: 侧边导航 * @Import: require('../mods/nav2'); */ (function () { $("#share_btn").click(function () { page_share.showMenu(); }); $("#page_share_wb2").click(function () { page_share.shareWeibo(); }); $("#page_share_wx2").click(function () { page_share.shareWeixin(); }); $("#page_share_qzone2").click(function () { page_share.shareQzone(); }); $("#go_top2").click(function () { _goto(); }); function _goto() { $('body,html').animate({ scrollTop: 0 }, 50); return false; } ; $(window).scroll(function () { if ($(window).scrollTop() > 1000) { $(".m-money2").fadeIn(1000); $(".m-aside-nav").fadeIn(1000); $(".m-aside-nav2").fadeIn(1000); } else { $(".m-money2").fadeOut(1000); $(".m-aside-nav").fadeOut(1000); $(".m-aside-nav2").fadeOut(1000); } }); })(); "use strict"; /* * @Author: lvjing * @Date: 2018-12-21 17:33:29 * @LastEditTime: 2019-09-29 17:13:31 * @Version: 1.0 * @Description: 底部导航 * @Import: require('../mods/navBottom'); */ (function () { var W = { name: 'NavAside3', version: 1.0 }; var box = document.getElementById('m_footer_nav'); var boxChildren = box && box.getElementsByClassName('m-nav-item'); var curEle; W.init = function () { bindEvents(); if (!box) { return; } box.addEventListener("click", navShow, false); }; function navShow(e) { var target = event.target; curEle = target; if (target.classList.contains("m-nav-item") && target.children.length) { for (var i = 0; i < boxChildren.length; i++) { if (boxChildren[i] != target && boxChildren[i].children.length) { boxChildren[i].classList.remove('show'); } ; } ; if (!target.classList.contains('show')) { target.classList.add('show'); } else { target.classList.remove('show'); } ; document.body.addEventListener("click", navClose, false); } } function navClose(e) { var thisObj = e.target ? e.target : event.srcElement; do { if (thisObj == curEle) { return; } ; if (thisObj.tagName == "BODY") { break; } ; thisObj = thisObj.parentNode; } while (thisObj.parentNode); for (var i = 0; i < boxChildren.length; i++) { if (boxChildren[i].children.length) { boxChildren[i].classList.remove('show'); } ; } ; document.body.removeEventListener("click", navClose, false); } ; function bindEvents() { $("html").on('click', '#u_gotop', function () { $('body,html').animate({ scrollTop: 0 }, 50); return false; }); $("html").on('click', '#u_share', function () { page_share.showMenu(); }); $("#fixmenu").on("click", function () { if ($(this).hasClass("menushow")) $(this).removeClass("menushow");else $(this).addClass("menushow"); }); } window.navBottom = W; window.navBottom.init(); })(); "use strict"; // function video_play(vid, id, title, width, height) { // var $FlashConfig = { // container: id, // id: "myMovie" + id, // width: width || 1000, // height: height || 650, // params: { // allowNetworking: "all", // allowScriptAccess: "always", // wmode: "opaque", // allowFullScreen: "true", // quality: "high" // }, // attributes: {}, // flashvars: { // autoPlay: 0, //是否自动播放 // loop: 0, // autoLoad: 1, // // thumbUrl: 'http://p1.v.iask.com/0/267/137089255_2.jpg',//视频加载前欲加载的图片地址,即播放器一开始显示的截图 // tj: 1, // as: 0 // }, // h5attr: { // autoPlay: false, //是否自动播放 // controls: true, //是否显示控制条 // loop: false, // // poster: 'http://p1.v.iask.com/0/267/137089255_2.jpg', //视频加载前欲加载的图片地址,即播放器一开始显示的截图 // preload: 'auto' // } // }; // var $SCOPE = { // video1: { // video_id: vid, // pid: '1', // url: window.location.href, // title: title, // swfOutsideUrl: '' // } // }; // var player = playVideo($FlashConfig); // player.playVideo($SCOPE['video1']); // } $(function () { $('[data-vid]').each(function () { var _this = $(this); var _vid = _this.attr('data-vid'); var _id = _this.attr('id'); // var _id = 'video_' + (_this.attr('id') || +new Date()); // _this.attr('id', _id); var _type = _this.attr('data-type'); // var _width = _this.attr('data-width'); // var _height = _this.attr('data-height'); // var _title = _this.attr('data-title') || ''; if (_vid && _id) { // if (_type == 'live') { // window.$LivePlayer.playerInit({ // liveid: _vid, //视频id // container: _id, //播放器容器id // srckey: '0' //引用来源key值,默认是0 // }); // } else { // video_play(_vid, _id, _title, _width, _height) // } if (_type == 'live') { // 直播 sfv.live({ id: _id, vid: _vid }); } else { //录播 sfv.video({ id: _id, vid: _vid, //poster: "{{$params.pic}}", //poster图 autoplay为true无效 autoPlay: false }); } } }); });