Upload index.html with huggingface_hub
Browse files- index.html +2 -24
index.html
CHANGED
|
@@ -1,15 +1,6 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="vi">
|
| 3 |
-
<head>
|
| 4 |
-
<script>
|
| 5 |
-
(function(){
|
| 6 |
-
var path=window.location.pathname;
|
| 7 |
-
var hash=window.location.hash;
|
| 8 |
-
if(path.match(//san-pham/[^/]+/$/)&&!path.endsWith("/index.html")){
|
| 9 |
-
window.location.replace(path+"index.html"+hash);
|
| 10 |
-
}
|
| 11 |
-
})();
|
| 12 |
-
</script>
|
| 13 |
<meta charset="UTF-8">
|
| 14 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 15 |
<title>V.AI STUDIO | Niềm tin khách hàng là tài sản của chúng tôi</title>
|
|
@@ -21,19 +12,6 @@
|
|
| 21 |
<meta property="og:image" id="ogImage" content="https://huggingface.co/spaces/bep40/V.AISTUDIO/resolve/main/logo/logo_600.png">
|
| 22 |
<link rel="canonical" id="canonicalUrl" href="https://bep40-v-aistudio.static.hf.space/">
|
| 23 |
<meta property="og:url" id="ogUrl" content="https://bep40-v-aistudio.static.hf.space/">
|
| 24 |
-
<script>
|
| 25 |
-
(function(){
|
| 26 |
-
var path=window.location.pathname;
|
| 27 |
-
var origin=window.location.origin;
|
| 28 |
-
if(path.indexOf("/san-pham/")!==-1&&path.endsWith("/index.html")){
|
| 29 |
-
var seoUrl=origin+path;
|
| 30 |
-
var ogUrlEl=document.getElementById("ogUrl");
|
| 31 |
-
if(ogUrlEl)ogUrlEl.setAttribute("content",seoUrl);
|
| 32 |
-
var canonicalEl=document.getElementById("canonicalUrl");
|
| 33 |
-
if(canonicalEl)canonicalEl.setAttribute("href",seoUrl);
|
| 34 |
-
}
|
| 35 |
-
})();
|
| 36 |
-
</script>
|
| 37 |
<meta name="twitter:card" content="summary_large_image">
|
| 38 |
<meta name="twitter:title" id="twTitle" content="V.AI STUDIO">
|
| 39 |
<meta name="twitter:description" id="twDesc" content="8000+ sản phẩm thiết bị nhà bếp & điện máy chính hãng">
|
|
@@ -3492,7 +3470,7 @@ function getData(){return (typeof D!=='undefined'&&Array.isArray(D))?D:[];}
|
|
| 3492 |
function localSearch(q,limit){var data=getData(), nq=nrm(q), cq=code(q);limit=limit||20;if(!data.length)return[];var terms=nq.split(/\s+/).filter(function(x){return x.length>1&&!/^(tim|tìm|cho|toi|tôi|sp|san|pham|sản|phẩm)$/.test(x);});var out=[];data.forEach(function(p,i){var name=nrm(p.name||p.n||''), cat=nrm(p.cat||p.c||''), brand=nrm(p.brand||''), sku=code((p.sku||p.mod||p.model||'')+' '+(p.slug||''));var score=0;if(cq&&sku&&(sku===cq||sku.indexOf(cq)!==-1||cq.indexOf(sku)!==-1))score+=1000;terms.forEach(function(t){if(name.indexOf(t)!==-1)score+=20;if(cat.indexOf(t)!==-1)score+=12;if(brand.indexOf(t)!==-1)score+=25;});if(score>0)out.push({p:p,score:score,idx:i});});out.sort(function(a,b){return b.score-a.score;});return out.slice(0,limit).map(function(x){return x.p;});}
|
| 3493 |
function renderCards(prods,res){if(!res)return;if(!prods.length){res.style.display='block';res.innerHTML='❌ Không tìm thấy sản phẩm phù hợp. Thử nhập mã SP hoặc mô tả khác.';return;}if(typeof _renderAIResults==='function'){_renderAIResults(prods,res);return;}res.style.display='block';res.innerHTML='<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px">'+prods.slice(0,20).map(function(p){var img=p.image||p.img||p.i||'', name=p.name||p.n||'', price=p.price||p.p||'LH', slug=p.slug||'', idx=Array.isArray(D)?D.indexOf(p):-1;var productUrl='/san-pham/'+slug+'/index.html';return '<a href="'+productUrl+'" onclick="event.preventDefault();showDetail('+idx+')" style="text-decoration:none;color:inherit;background:#fff;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;display:block"><div style="padding:8px"><b style="font-size:11px;color:#003f62;display:block;margin-bottom:4px">'+name.substring(0,60)+'</b>'+(img?'<img src="'+img+'" style="height:80px;max-width:100%;object-fit:contain;margin:auto;display:block">':'')+'<div style="color:#059669;font-weight:800;font-size:12px;margin-top:4px">'+price+'</div></div><div style="display:flex;gap:4px;padding:0 6px 6px"><button onclick="event.preventDefault();event.stopPropagation();if(typeof addToCart===\'function\')addToCart('+idx+')" style="flex:1;padding:4px;background:#db9815;color:#fff;border:none;border-radius:5px;font-size:9px;font-weight:700;cursor:pointer"><i class="fas fa-cart-plus"></i> + Giỏ</button></div></a>';}).join('')+'</div>';}
|
| 3494 |
window.doAISearch=function(){var input=document.getElementById('aiSearch'),res=document.getElementById('aiResults');if(!input||!res)return;var q=input.value.trim();res.style.display='block';if(!q){res.innerHTML='💡 Nhập mã SP hoặc mô tả sản phẩm';return;}res.innerHTML='⏳ Đang tìm...';setTimeout(function(){try{var qs=q.split(/[,;]+/).map(function(x){return x.trim();}).filter(Boolean), all=[];if(qs.length>1){qs.forEach(function(x){all=all.concat(localSearch(x,5));});}if(all.length){renderCards(all,res);return;}if(window._vaiNaturalSearch&&window._vaiRenderNaturalResults){var nr=window._vaiNaturalSearch(q,24);if(nr&&((nr.groups&&nr.groups.length)||(nr.combos&&nr.combos.length))){window._vaiRenderNaturalResults(nr,res);return;}}if(window._vaiSearchContext){var rr=window._vaiSearchContext(q,24).map(function(r){return r.p}).filter(Boolean);if(rr.length){renderCards(rr,res);return;}}renderCards(localSearch(q,24),res);}catch(e){console.error('AI fallback error',e);renderCards(localSearch(q,24),res);}},50);};
|
| 3495 |
-
box.innerHTML=rs.map(function(p){var img=p.image||p.img||p.i||'', name=p.name||p.n||'', price=p.price||p.p||'LH', slug=p.slug||'';return '<a href="/san-pham/'+slug+'/" data-slug="'+slug+'" style="display:flex;gap:8px;padding:8px;border-bottom:1px solid #f1f5f9;cursor:pointer;text-decoration:none;color:inherit"><img src="'+img+'" style="width:36px;height:36px;object-fit:contain;background:#f8fafc"><div style="flex:1"><div style="font-size:12px;font-weight:700;color:#003f62">'+name.substring(0,60)+'</div><div style="font-size:11px;color:#059669;font-weight:700">'+price+'</div></div></a>';}).join('');box.style.display='block';
|
| 3496 |
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',ensureDropdown);else ensureDropdown();setTimeout(ensureDropdown,1500);
|
| 3497 |
})();
|
| 3498 |
</script>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="vi">
|
| 3 |
+
<head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
<title>V.AI STUDIO | Niềm tin khách hàng là tài sản của chúng tôi</title>
|
|
|
|
| 12 |
<meta property="og:image" id="ogImage" content="https://huggingface.co/spaces/bep40/V.AISTUDIO/resolve/main/logo/logo_600.png">
|
| 13 |
<link rel="canonical" id="canonicalUrl" href="https://bep40-v-aistudio.static.hf.space/">
|
| 14 |
<meta property="og:url" id="ogUrl" content="https://bep40-v-aistudio.static.hf.space/">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
<meta name="twitter:card" content="summary_large_image">
|
| 16 |
<meta name="twitter:title" id="twTitle" content="V.AI STUDIO">
|
| 17 |
<meta name="twitter:description" id="twDesc" content="8000+ sản phẩm thiết bị nhà bếp & điện máy chính hãng">
|
|
|
|
| 3470 |
function localSearch(q,limit){var data=getData(), nq=nrm(q), cq=code(q);limit=limit||20;if(!data.length)return[];var terms=nq.split(/\s+/).filter(function(x){return x.length>1&&!/^(tim|tìm|cho|toi|tôi|sp|san|pham|sản|phẩm)$/.test(x);});var out=[];data.forEach(function(p,i){var name=nrm(p.name||p.n||''), cat=nrm(p.cat||p.c||''), brand=nrm(p.brand||''), sku=code((p.sku||p.mod||p.model||'')+' '+(p.slug||''));var score=0;if(cq&&sku&&(sku===cq||sku.indexOf(cq)!==-1||cq.indexOf(sku)!==-1))score+=1000;terms.forEach(function(t){if(name.indexOf(t)!==-1)score+=20;if(cat.indexOf(t)!==-1)score+=12;if(brand.indexOf(t)!==-1)score+=25;});if(score>0)out.push({p:p,score:score,idx:i});});out.sort(function(a,b){return b.score-a.score;});return out.slice(0,limit).map(function(x){return x.p;});}
|
| 3471 |
function renderCards(prods,res){if(!res)return;if(!prods.length){res.style.display='block';res.innerHTML='❌ Không tìm thấy sản phẩm phù hợp. Thử nhập mã SP hoặc mô tả khác.';return;}if(typeof _renderAIResults==='function'){_renderAIResults(prods,res);return;}res.style.display='block';res.innerHTML='<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px">'+prods.slice(0,20).map(function(p){var img=p.image||p.img||p.i||'', name=p.name||p.n||'', price=p.price||p.p||'LH', slug=p.slug||'', idx=Array.isArray(D)?D.indexOf(p):-1;var productUrl='/san-pham/'+slug+'/index.html';return '<a href="'+productUrl+'" onclick="event.preventDefault();showDetail('+idx+')" style="text-decoration:none;color:inherit;background:#fff;border:1px solid #e2e8f0;border-radius:10px;overflow:hidden;display:block"><div style="padding:8px"><b style="font-size:11px;color:#003f62;display:block;margin-bottom:4px">'+name.substring(0,60)+'</b>'+(img?'<img src="'+img+'" style="height:80px;max-width:100%;object-fit:contain;margin:auto;display:block">':'')+'<div style="color:#059669;font-weight:800;font-size:12px;margin-top:4px">'+price+'</div></div><div style="display:flex;gap:4px;padding:0 6px 6px"><button onclick="event.preventDefault();event.stopPropagation();if(typeof addToCart===\'function\')addToCart('+idx+')" style="flex:1;padding:4px;background:#db9815;color:#fff;border:none;border-radius:5px;font-size:9px;font-weight:700;cursor:pointer"><i class="fas fa-cart-plus"></i> + Giỏ</button></div></a>';}).join('')+'</div>';}
|
| 3472 |
window.doAISearch=function(){var input=document.getElementById('aiSearch'),res=document.getElementById('aiResults');if(!input||!res)return;var q=input.value.trim();res.style.display='block';if(!q){res.innerHTML='💡 Nhập mã SP hoặc mô tả sản phẩm';return;}res.innerHTML='⏳ Đang tìm...';setTimeout(function(){try{var qs=q.split(/[,;]+/).map(function(x){return x.trim();}).filter(Boolean), all=[];if(qs.length>1){qs.forEach(function(x){all=all.concat(localSearch(x,5));});}if(all.length){renderCards(all,res);return;}if(window._vaiNaturalSearch&&window._vaiRenderNaturalResults){var nr=window._vaiNaturalSearch(q,24);if(nr&&((nr.groups&&nr.groups.length)||(nr.combos&&nr.combos.length))){window._vaiRenderNaturalResults(nr,res);return;}}if(window._vaiSearchContext){var rr=window._vaiSearchContext(q,24).map(function(r){return r.p}).filter(Boolean);if(rr.length){renderCards(rr,res);return;}}renderCards(localSearch(q,24),res);}catch(e){console.error('AI fallback error',e);renderCards(localSearch(q,24),res);}},50);};
|
| 3473 |
+
box.innerHTML=rs.map(function(p){var img=p.image||p.img||p.i||'', name=p.name||p.n||'', price=p.price||p.p||'LH', slug=p.slug||'';return '<a href="/san-pham/'+slug+'/index.html" data-slug="'+slug+'" style="display:flex;gap:8px;padding:8px;border-bottom:1px solid #f1f5f9;cursor:pointer;text-decoration:none;color:inherit"><img src="'+img+'" style="width:36px;height:36px;object-fit:contain;background:#f8fafc"><div style="flex:1"><div style="font-size:12px;font-weight:700;color:#003f62">'+name.substring(0,60)+'</div><div style="font-size:11px;color:#059669;font-weight:700">'+price+'</div></div></a>';}).join('');box.style.display='block';
|
| 3474 |
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',ensureDropdown);else ensureDropdown();setTimeout(ensureDropdown,1500);
|
| 3475 |
})();
|
| 3476 |
</script>
|