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((v,i) => { el.innerHTML += `
  • ${v.total}套
    ${v.title}
    ${v.user}
    ${ v.source.length != 0 ? `
    ${v.source}
    ` : '' }
    ${ v.tags.map((item,index) => { return ` ${item.title || item.name} ` }).toString().replaceAll(",", '') }
  • ` }) } model(el, data) { data.forEach((v,i) => { $(el).innerHTML += `
  • ${v.total}
    ${v.title}
  • ` }); } query(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i