var footlogo = '    技术支持 '; if (window.location.origin.indexof("uemo.net") != -1 && !$("#flogo")[0]) { $(footlogo).appendto("#footer>p"); $("#assistbtn ._fa-qq").attr("href", "tel:010-69557550"); $("#assistbtn ._fa-qq").attr( "href", "tencent://message/?uin=2852263145&site=uemo&menu=yes" ); $("#contactinfo .contact_name").text("魔艺(uemo)极速建站系统"); $("#contactinfo .contact_add").text("地址:北京市建外soho东区2号楼"); $("#contactinfo .contact_zip").text("邮编:100000"); $("#contactinfo .contact_tel").text("电话:010-69557550"); $("#contactinfo .contact_mob").text("手机:13121672111 / 13121889333"); $("#contactinfo .contact_eml").text("邮箱:touch@uelike.com"); $("#online_lx #olx_qq a") .attr("href", "tencent://message/?uin=2852263145&site=uemo&menu=yes") .text("2852263145"); $("#online_lx #olx_tel p").text("010-69557550"); var add = ''; $(add).insertafter($("#header .content .nav>.navitem:last")); $(add).insertafter($("#navmini .content .nav>.navitem:last")); $("#copyright").remove(); } if (window.location.origin.indexof("jsmo.xin") != -1) { $("#flogo,#flogodes").remove(); } if (promise) { function testautoplay() { // 杩斿洖涓€涓猵romise浠ュ憡璇夎皟鐢ㄨ€呮娴嬬粨鏋� return new promise(resolve => { if (!$("#topslider video").length) return; let audio = $("video")[0]; let autoplay = true; // play杩斿洖鐨勬槸涓€涓猵romise audio .play() .then(() => { // 鏀寔鑷姩鎾斁 autoplay = true; }) .catch(err => { // 涓嶆敮鎸佽嚜鍔ㄦ挱鏀� autoplay = false; }) .finally(() => { // 鍛婅瘔璋冪敤鑰呯粨鏋� resolve(autoplay); }); }); } testautoplay() .then(res => { if (!res) { $("#topslider video").each(function(i, e) { let timer; timer = setinterval(function() { if (e.paused) { e.muted = true; e.play(); } else { clearinterval(timer); } }, 400); }); } }) .catch(err => { console.log(err); }); }