← 쇼룸

더셀 · 네이버 스토어 원클릭사장님 전용 · SEO 1초 세팅

1상품

상품명 3안 · 메인 키워드 3 · 세부 키워드 10 · SEO 점수가 여기에 나옵니다.
속성 10행 · 태그 10개가 여기에 나옵니다.
상세 스토리 7블록이 여기에 나옵니다.
대량등록용 엑셀·CSV가 여기에 나옵니다.
'], { type: 'text/html;charset=utf-8' }), '스토어상세_' + base() + '.html'); } function dlXlsx(){ K.download(KTS_XLSX.xlsxBlob('스마트스토어', HEAD, [exRow(S.res)]), '스마트스토어_등록_' + base() + '.xlsx'); } function dlCsv(){ K.download(K.csvBlob(HEAD, [exRow(S.res)]), '스마트스토어_등록_' + base() + '.csv'); } async function aiPolish(){ try { var o = await aiJson('네이버 스마트스토어 상품명 3개를 자연스럽게 다듬어 JSON {"titles":["..","..",".."]}로만 답하세요. 메인 키워드 "' + S.res.kw + '" 맨 앞, 50자 이내, 특수문자·중복 단어·과장어 금지.\n' + S.res.seo.titles.map(function(t){ return t.t; }).join('\n')); var n = 0; (o.titles || []).slice(0, 3).forEach(function(t, i){ t = clean(t); var c = tcheck(t, S.res.kw); if (c.len <= 50 && c.kw && !c.ban && !c.dup && t.indexOf(S.res.kw) === 0){ S.res.seo.titles[i].t = t; n++; } }); S.res.score = score(S.res); draw(S.res); $('#aiMsg').textContent = 'AI 다듬기: ' + n + '안 채택 · ' + (window.__aiModel || ''); } catch(e){ $('#aiMsg').textContent = aiErr(e); K.toast(aiErr(e)); } } async function go(){ if ($('#btnGo').disabled) return; var inp = { name: $('#inName').value.trim(), cat: $('#inCat').value, cost: K.num($('#inCost').value), price: K.num($('#inPrice').value), ship: K.num($('#inShip').value), brand: $('#inBrand').value.trim(), origin: $('#inOrigin').value.trim(), spec: S.spec || '' }; var L = lookup(inp.name, inp.cat), F = K.D.fees.naver; var r = { inp: inp, kw: L.kw, rate: F.defaultRate }; r.seo = makeSeo(inp, L); r.attr = makeAttr(inp, L); r.story = makeStory(inp, L); r.price = inp.price || Math.ceil((inp.cost + inp.ship) / (1 - F.defaultRate - 1 / 11 - 0.03 - 0.22) / 100) * 100; r.code = 'KTS-N-' + K.stamp() + '-' + (K.seed(inp.name) % 100000); r.score = score(r); r.cust = K.customerCheck(storyText(r.story)); S.res = r; draw(r); var all = r.seo.mains.concat(r.seo.details.map(function(d){ return d.t; }), r.seo.tags); window.__res = { kw: r.kw, titles: r.seo.titles.map(function(t){ var c = tcheck(t.t, r.kw); return { t: t.t, len: c.len, kw: c.kw, ban: c.ban, dup: c.dup }; }), mains: r.seo.mains, details: r.seo.details.map(function(d){ return d.t; }), tags: r.seo.tags, all23: all.length, uniq23: K.uniq(all.map(function(x){ return x.replace(/\s/g, ''); })).length, tagMaxLen: Math.max.apply(null, r.seo.tags.map(function(x){ return x.length; })), score: { total: r.score.total, items: r.score.items.map(function(x){ return x[2]; }), filled: r.score.filled, dup: r.score.dup, banN: r.score.banN, titleLen: r.seo.titles[0].t.length, titleHasKw: r.seo.titles[0].t.indexOf(r.kw) >= 0, firstHasKw: r.story[0].p[0].indexOf(r.kw) >= 0 }, story: r.story.map(function(b){ return b.t; }), storyEmpty: r.story.filter(function(b){ return !storyText([b]).trim(); }).length, cust: r.cust, exCols: HEAD.length, exRow: exRow(r).map(function(v){ return typeof v === 'string' ? v.slice(0, 60) : v; }), photos: S.photos.length }; window.__done = true; K.goTab('tabSeo'); K.toast('4탭을 모두 만들었습니다'); } function curCopy(){ if (!S.res){ K.toast('먼저 [1방 생성]을 눌러 주세요'); return; } var t = K.activeTab, r = S.res; if (t === 'tabSeo') K.copy(r.seo.titles.map(function(x){ return x.t; }).concat(['', '메인: ' + r.seo.mains.join(', '), '세부: ' + r.seo.details.map(function(d){ return d.t; }).join(', ')]).join('\n')); else if (t === 'tabAttr') K.copy(r.attr.map(function(x){ return x[0] + '\t' + x[1]; }).join('\n') + '\n\n태그: ' + r.seo.tags.join(',')); else if (t === 'tabStory') K.copy(storyText(r.story), storyHtml(r.story, false)); else K.copy([HEAD.join('\t'), exRow(r).join('\t')].join('\n')); } function curDl(){ if (!S.res){ K.toast('먼저 [1방 생성]을 눌러 주세요'); return; } var t = K.activeTab; if (t === 'tabStory') dlHtml(); else if (t === 'tabExcel') dlXlsx(); else K.download(new Blob(['' + (t === 'tabSeo' ? S.res.seo.titles.map(function(x){ return x.t; }).join('\r\n') : S.res.attr.map(function(x){ return x.join('\t'); }).join('\r\n'))], { type: 'text/plain' }), '스토어_' + (t === 'tabSeo' ? 'SEO' : '속성') + '_' + base() + '.txt'); } async function boot(){ await K.loadData(['fees', 'tags_ko', 'copy_ko', 'sample_products']); $('#inCat').innerHTML = Object.keys(K.D.tags_ko.categories).map(function(c){ return ''; }).join(''); K.shell(); K.tabs('#tabs'); K.gate('#btnGo', '#need', function(){ var m = []; if (!$('#inName').value.trim()) m.push('상품명'); if (!K.num($('#inCost').value)) m.push('매입가'); return m.length ? m.join('·') + ' — 넣어 주세요' : ''; }); $('#inPhoto').addEventListener('change', async function(){ S.photos = await K.readPhotos(this.files, 6); $('#thumbs').innerHTML = S.photos.map(function(p){ return ''; }).join(''); }); $('#btnGo').addEventListener('click', go); $('#btnCopy').addEventListener('click', curCopy); $('#btnDl').addEventListener('click', curDl); if (K.qs('sample') === '1'){ var idx = Math.min(2, Math.max(0, parseInt(K.qs('s') || '1', 10) || 0)), p = K.D.sample_products.products[idx]; $('#inName').value = p.name; $('#inCost').value = p.cost; $('#inCat').value = p.cat; $('#inShip').value = p.ship; $('#inBrand').value = p.brand; $('#inOrigin').value = p.origin; S.spec = p.spec; if (K.qs('nophoto') !== '1'){ S.photos = [K.samplePhoto(p.name, [28, 210, 140][idx])]; $('#thumbs').innerHTML = '샘플 사진'; } K.regate(); if (K.qs('auto') === '1') await go(); } } boot(); })();