/** * 获取参数 * @param name * @returns {string|null} * @constructor */ function GetQueryString(name) { let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); let r = window.location.search.substr(1).match(reg); if (r != null) { return decodeURIComponent(r[2]); }; return null; } function openCover(obj) { var hcode = ''; // layer.photos({ // anim:5, // }); layer.open({ type: 0, title: '预览封面', content: hcode, anim: 1, offset: '20px', isOutAnim: true, maxmin: false, fixed: true, resize: false, closeBtn: 1, shade: 0.5, shadeClose: true, success: function (layero, index) { } }); }