class Info { constructor() { this.getInfo(); } async getInfo() { var res = await server.info({ url: query("url") }); $(".img_hidden img").attr({ src: res.backImg }) $(".list_title h2").text(res.title) $(".posttime").text(res.posttime) $(".list_text p").text(res.stepInfo.message) $(".list_text .more").click(function () { $(".list_text").css({ height: 'auto' }); $(this).hide(); }) res.stepInfo.arr.forEach(v => { $(".ddd").append(`
  • ${v.title}

  • `) }) res.material.main.forEach(v => { $(".main_l").append(`
  • ${v.title} ${v.nums}
  • `) }) res.material.accessories.forEach(v => { $(".accessories_l").append(`
  • ${v.title} ${v.nums}
  • `) }) res.DetailedSteps.forEach(v => { $(".content_list").append(`
  • ${v.step_title}

    ${v.step_text == null ? "" : v.step_text}

    ${ Array.isArray(v.step_img) ? `
    ${ v.step_img.map(item => { return `` }).toString().replaceAll(",","") }
    ` : '' }
  • `) }) $(".tabs_img img").click(function () { $(".change").attr({ src: $(this).attr("src") }) }) console.log(res) } } new Info();