PageSourceSearch

https://www.mechrevo.com/na/_nuxt/Dswc6xSi.js

js mechrevo.com collected 2026-09-24 22:57:23 UTC 2,998 bytes, 1 lines download raw bytes

1import{_ as V}from"./CxMCNjUa.js";import{p as k}from"./COga03Um.js";import{u as z,h as y,c as a,a as s,f as l,F as p,D as b,k as d,l as x,o as t,C,t as r,g as A,w as D,d as L,b as $,H as m,x as F}from"./C4-mtOfP.js";import{_ as H}from"./DlAUqK2U.js";const q={class:"products-page"},E={class:"container"},I={key:0,class:"loading"},S={class:"filter-section"},T={class:"filter-tabs"},G=["onClick"],J={class:"products-list"},K={class:"product-image"},M=["src","alt"],O={class:"product-info"},Q={class:"product-name"},R={key:0,class:"product-category"},U={key:1,class:"product-series"},W={key:2,class:"product-slogan"},X={key:3,class:"product-description"},Y={key:0,class:"empty-state"},Z={__name:"index",async setup(ee){let i,u;z({title:"产品中心 - 机械革命"});const c=F(null),{data:_,pending:w}=([i,u]=y(()=>x("product-categories",()=>k.getProductCategories(),{server:!0,lazy:!1})),i=await i,u(),i),{data:g,pending:P,refresh:se}=([i,u]=y(()=>x("products",()=>k.getProductList({q:{status_is:"online"},limit:100,order_by:"sort desc, id desc"}),{server:!0,lazy:!1})),i=await i,u(),i);console.log("productsData",g,g.value),console.log("categoriesData",_,_.value);const N=m(()=>{const n=[{id:null,name:"全部产品"}];return _.value?.objects&&n.push(..._.value.objects.map(o=>({id:o.id,name:o.name}))),n}),v=m(()=>g.value?.objects||[]),f=m(()=>c.value?v.value.filter(n=>n.product_category_id===c.value):v.value),j=m(()=>w.value||P.value),B=n=>{c.value=n};return(n,o)=>{const h=V;return t(),a("div",q,[s("div",E,[o[3]||(o[3]=s("div",{class:"page-header"},[s("h1",{class:"page-title"},"产品中心"),s("p",{class:"page-subtitle"},"探索机械革命全系列产品")],-1)),l(j)?(t(),a("div",I,[...o[0]||(o[0]=[s("p",null,"加载中...",-1)])])):(t(),a(p,{key:1},[s("div",S,[s("div",T,[(t(!0),a(p,null,b(l(N),e=>(t(),a(p,{key:e.id},[e.id===null?(t(),a("button",{key:0,class:C(["filter-tab",{active:l(c)===e.id}]),onClick:te=>B(e.id)},r(e.name),11,G)):(t(),A(h,{key:1,to:`/categories/${e.id}`,class:C(["filter-tab filter-tab-link",{active:l(c)===e.id}])},{default:D(()=>[L(r(e.name),1)]),_:2},1032,["to","class"]))],64))),128))])]),s("div",J,[(t(!0),a(p,null,b(l(f),e=>(t(),a("div",{key:e.id,class:"product-item"},[$(h,{to:`/products/${e.id}`,class:"product-link"},{default:D(()=>[s("div",K,[s("img",{src:e.main_image_urls?.medium||e.main_image_urls?.original||"/placeholder.jpg",alt:e.name},null,8,M)]),s("div",O,[s("h3",Q,r(e.name),1),e.product_category_name?(t(),a("p",R,r(e.product_category_name),1)):d("",!0),e.product_serial_name?(t(),a("p",U,r(e.product_serial_name),1)):d("",!0),e.slogan?(t(),a("p",W,r(e.slogan),1)):d("",!0),e.description?(t(),a("div",X,r(e.description),1)):d("",!0),o[1]||(o[1]=s("div",{class:"product-footer"},[s("span",{class:"view-detail"},"查看详情 →")],-1))])]),_:2},1032,["to"])]))),128))]),l(f).length===0?(t(),a("div",Y,[...o[2]||(o[2]=[s("p",null,"暂无产品",-1)])])):d("",!0)],64))])])}}},re=H(Z,[["__scopeId","data-v-ad3e4994"]]);export{re as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.