class Utils { footer() { var footerArr = [ {title: '首页', icon: 'icon-home', href: 'index.html'}, {title: '机构', icon: 'icon-jigou', href: 'mechanism.html'}, {title: '模特', icon: 'icon-me', href: 'model.html'}, {title: '我的', icon: 'icon-wo', href: 'my.html'}, ]; // 用户当前正在访问的页面地址 // http://localhost:63342/page/mechanism.html var currentPath = location.href; $("body").innerHTML += ` ` } header(title, action = "") { $("body").innerHTML = `
${title}
${action}
` + $("body").innerHTML; $(".icon-back1").onclick = () => { history.back(); } } item(el, data) { data.forEach((item, i) => { el.append( `
${item.title}
养 ${ typeof item.label == "string" || item.label == null ? '' : `

${item.label.desc}

` }
${ Array.isArray(item.author) ? '' : `
${item.author.nickname}
${item.total_amount}
` }
` ) }) } query(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i