/* empty css                  *//* empty css                 *//* empty css                        *//* empty css               *//* empty css                  *//* empty css                  *//* empty css                 */import{d as w,I as F,r as P,c as d,b as e,a as o,x as v,a5 as _,u as n,w as r,f as L,W,F as E,h as K,o as s,E as R,s as S,X as U,ag as z,Z as C,t as c,$ as N,a9 as T,a0 as I,_ as B}from"./index-hZHbf6Qq.js";import{P as $}from"./index-C__Mp2q5.js";/* empty css                                                              *//* empty css                    *//* empty css                             */import{T as q}from"./index-BqhCx7JE.js";/* empty css                      */const A={class:"page-container"},D={class:"search-bar"},M={class:"price-range"},O={class:"sort-bar"},Q={class:"product-grid"},X={class:"product-image"},Z={class:"image-placeholder"},j={class:"product-info"},G={class:"product-name"},H={class:"product-price"},J={key:0,class:"price-tag"},Y={class:"current-price"},ee={class:"original-price"},ae=["onClick"],te=w({__name:"index",setup(le){const l=F({pageNum:1,pageSize:15,keyword:"",minPrice:"",maxPrice:"",category:"",sortType:"default",priceSort:""}),f=P(100),p=P([{id:1,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"协议价",image:""},{id:2,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:3,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:4,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:5,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:6,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:7,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:8,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:9,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""},{id:10,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:""}]),y=()=>{},V=h=>{I.success("已加入购物车")};return(h,t)=>{const m=R,u=L,i=U,g=W,x=C,b=T;return s(),d("div",A,[e(n($),{title:"协议供货"}),o("div",D,[e(u,{modelValue:l.keyword,"onUpdate:modelValue":t[0]||(t[0]=a=>l.keyword=a),placeholder:"搜索",style:{width:"180px"},clearable:""},{prefix:r(()=>[e(m,null,{default:r(()=>[e(n(S))]),_:1})]),_:1},8,["modelValue"]),o("div",M,[e(u,{modelValue:l.minPrice,"onUpdate:modelValue":t[1]||(t[1]=a=>l.minPrice=a),placeholder:"¥ 最高价",style:{width:"100px"}},null,8,["modelValue"]),t[8]||(t[8]=o("span",{class:"range-separator"},"—",-1)),e(u,{modelValue:l.maxPrice,"onUpdate:modelValue":t[2]||(t[2]=a=>l.maxPrice=a),placeholder:"¥ 最低价",style:{width:"100px"}},null,8,["modelValue"])]),e(g,{modelValue:l.category,"onUpdate:modelValue":t[3]||(t[3]=a=>l.category=a),placeholder:"商品类别",style:{width:"100px"},clearable:""},{default:r(()=>[e(i,{label:"空调",value:"空调"}),e(i,{label:"电脑",value:"电脑"}),e(i,{label:"办公设备",value:"办公设备"})]),_:1},8,["modelValue"])]),o("div",O,[e(g,{modelValue:l.sortType,"onUpdate:modelValue":t[4]||(t[4]=a=>l.sortType=a),placeholder:"默认排序",style:{width:"110px"}},{default:r(()=>[e(i,{label:"默认排序",value:"default"}),e(i,{label:"销量优先",value:"sales"}),e(i,{label:"最新上架",value:"newest"})]),_:1},8,["modelValue"]),e(g,{modelValue:l.priceSort,"onUpdate:modelValue":t[5]||(t[5]=a=>l.priceSort=a),placeholder:"价格排序",style:{width:"110px"}},{default:r(()=>[e(i,{label:"价格排序",value:""}),e(i,{label:"价格从低到高",value:"asc"}),e(i,{label:"价格从高到低",value:"desc"})]),_:1},8,["modelValue"])]),o("div",Q,[(s(!0),d(E,null,K(p.value,(a,k)=>(s(),d("div",{key:k,class:"product-card"},[o("div",X,[e(x,{src:a.image,fit:"contain"},{error:r(()=>[o("div",Z,[e(m,{size:40,color:"#ccc"},{default:r(()=>[e(n(z))]),_:1})])]),_:1},8,["src"])]),o("div",j,[o("div",G,c(a.name),1),o("div",H,[a.tag?(s(),d("span",J,c(a.tag),1)):_("",!0),o("span",Y,"¥"+c(a.price),1),o("span",ee,"¥"+c(a.originalPrice),1),o("div",{class:"add-cart",onClick:oe=>V()},[e(m,null,{default:r(()=>[e(n(N))]),_:1})],8,ae)])])]))),128))]),p.value.length===0?(s(),v(b,{key:0,description:"暂无协议供货商品"})):_("",!0),p.value.length>0?(s(),v(n(q),{key:1,page:l.pageNum,"onUpdate:page":t[6]||(t[6]=a=>l.pageNum=a),"page-size":l.pageSize,"onUpdate:pageSize":t[7]||(t[7]=a=>l.pageSize=a),total:f.value,onChange:y},null,8,["page","page-size","total"])):_("",!0)])}}}),ye=B(te,[["__scopeId","data-v-5c531daa"]]);export{ye as default};
