1 |
- import{am as wt,aa as ot,an as It,ao as Yt,r as z,ap as Ot,aq as Xt,ar as Jt,as as Kt,at as zt,c as U,n as P,m as rt,b as G,d as M,au as Tt,x as kt,e as k,ai as Mt,a6 as xt,i as Zt,w as N,Y as Lt,av as st,z as F,Z as D,aw as Nt,ax as $t,a as e,k as tt,af as et,y as te,X as lt,t as H,ay as Bt,a4 as ee,az as ie,aA as ae,o as ht,W as nt,a5 as oe,aB as se,aC as gt,$ as ne,aD as re,aE as le,aF as ce,a3 as de,a7 as ue,ah as fe,aG as he,aH as ge,aI as ve,a9 as me,aJ as ye,g as Ae,h as be,ab as vt,aK as pe,v as Ce,A as R,P as Se,I as Z,D as _t,a0 as we,V as jt,L as Ie,C as mt}from"./index-0b3380a9.js";import{S as ze,a as Te,i as ke,A as Me}from"./index-c97a8cb3.js";import{I as yt}from"./index-02bb440b.js";import{T as xe,L as Le}from"./index-fa04e4d2.js";import{C as Ne}from"./index-e2c278c3.js";import{R as Be,a as At}from"./index-489472c6.js";import{T as $}from"./index-f87aeb09.js";import{M as _e}from"./index-bbd3900d.js";import{M as je}from"./index-919c5bf7.js";import{R as Fe,C as it}from"./student-register-store-f0e25580.js";import"./Checker-a18684d0.js";import"./index-451fefb3.js";function Re(t,i,o){let n,r=0;const a=t.scrollLeft,c=o===0?1:Math.round(o*1e3/16);function d(){wt(n)}function g(){t.scrollLeft+=(i-a)/c,++r<c&&(n=ot(g))}return g(),d}function Pe(t,i,o,n){let r,a=It(t);const c=a<i,d=o===0?1:Math.round(o*1e3/16),g=(i-a)/d;function y(){wt(r)}function b(){a+=g,(c&&a>i||!c&&a<i)&&(a=i),Yt(t,a),c&&a<i||!c&&a>i?r=ot(b):n&&(r=ot(n))}return b(),y}function Qe(){const t=z([]),i=[];return Ot(()=>{t.value=[]}),[t,n=>(i[n]||(i[n]=r=>{t.value[n]=r}),i[n])]}function Ft(t,i){if(!Xt||!window.IntersectionObserver)return;const o=new IntersectionObserver(a=>{i(a[0].intersectionRatio>0)},{root:document.body}),n=()=>{t.value&&o.observe(t.value)},r=()=>{t.value&&o.unobserve(t.value)};Jt(r),Kt(r),zt(n)}const[Ge,De]=U("sticky"),Ue={zIndex:P,position:rt("top"),container:Object,offsetTop:G(0),offsetBottom:G(0)};var Ee=M({name:Ge,props:Ue,emits:["scroll","change"],setup(t,{emit:i,slots:o}){const n=z(),r=Tt(n),a=kt({fixed:!1,width:0,height:0,transform:0}),c=z(!1),d=k(()=>Mt(t.position==="top"?t.offsetTop:t.offsetBottom)),g=k(()=>{if(c.value)return;const{fixed:h,height:w,width:f}=a;if(h)return{width:`${f}px`,height:`${w}px`}}),y=k(()=>{if(!a.fixed||c.value)return;const h=xt(Zt(t.zIndex),{width:`${a.width}px`,height:`${a.height}px`,[t.position]:`${d.value}px`});return a.transform&&(h.transform=`translate3d(0, ${a.transform}px, 0)`),h}),b=h=>i("scroll",{scrollTop:h,isFixed:a.fixed}),x=()=>{if(!n.value||st(n))return;const{container:h,position:w}=t,f=D(n),S=It(window);if(a.width=f.width,a.height=f.height,w==="top")if(h){const u=D(h),L=u.bottom-d.value-a.height;a.fixed=d.value>f.top&&u.bottom>0,a.transform=L<0?L:0}else a.fixed=d.value>f.top;else{const{clientHeight:u}=document.documentElement;if(h){const L=D(h),m=u-L.top-d.value-a.height;a.fixed=u-d.value<f.bottom&&u>L.top,a.transform=m<0?-m:0}else a.fixed=u-d.value<f.bottom}b(S)};return N(()=>a.fixed,h=>i("change",h)),Lt("scroll",x,{target:r,passive:!0}),Ft(n,x),N([Nt,$t],()=>{!n.value||st(n)||!a.fixed||(c.value=!0,F(()=>{const h=D(n);a.width=h.width,a.height=h.height,c.value=!1}))}),()=>{var h;return e("div",{ref:n,style:g.value},[e("div",{class:De({fixed:a.fixed&&!c.value}),style:y.value},[(h=o.default)==null?void 0:h.call(o)])])}}});const qe=tt(Ee),[We,bt]=U("tabs");var He=M({name:We,props:{count:et(Number),inited:Boolean,animated:Boolean,duration:et(P),swipeable:Boolean,lazyRender:Boolean,currentIndex:et(Number)},emits:["change"],setup(t,{emit:i,slots:o}){const n=z(),r=d=>i("change",d),a=()=>{var d;const g=(d=o.default)==null?void 0:d.call(o);return t.animated||t.swipeable?e(ze,{ref:n,loop:!1,class:bt("track"),duration:+t.duration*1e3,touchable:t.swipeable,lazyRender:t.lazyRender,showIndicators:!1,onChange:r},{default:()=>[g]}):g},c=d=>{const g=n.value;g&&g.state.active!==d&&g.swipeTo(d,{immediate:!t.inited})};return N(()=>t.currentIndex,c),te(()=>{c(t.currentIndex)}),lt({swipeRef:n}),()=>e("div",{class:bt("content",{animated:t.animated||t.swipeable})},[a()])}});const[Rt,K]=U("tabs"),Ve={type:rt("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:G(0),duration:G(.3),animated:Boolean,ellipsis:H,swipeable:Boolean,scrollspy:Boolean,offsetTop:G(0),background:String,lazyRender:H,lineWidth:P,lineHeight:P,beforeChange:Function,swipeThreshold:G(5),titleActiveColor:String,titleInactiveColor:String},Pt=Symbol(Rt);var Ye=M({name:Rt,props:Ve,emits:["change","scroll","rendered","clickTab","update:active"],setup(t,{emit:i,slots:o}){let n,r,a,c,d;const g=z(),y=z(),b=z(),x=z(),h=Bt(),w=Tt(g),[f,S]=Qe(),{children:u,linkChildren:L}=ee(Pt),m=kt({inited:!1,position:"",lineStyle:{},currentIndex:-1}),E=k(()=>u.length>+t.swipeThreshold||!t.ellipsis||t.shrink),V=k(()=>({borderColor:t.color,background:t.background})),q=(s,l)=>{var v;return(v=s.name)!=null?v:l},Y=k(()=>{const s=u[m.currentIndex];if(s)return q(s,m.currentIndex)}),Q=k(()=>Mt(t.offsetTop)),ct=k(()=>t.sticky?Q.value+n:0),W=s=>{const l=y.value,v=f.value;if(!E.value||!l||!v||!v[m.currentIndex])return;const p=v[m.currentIndex].$el,A=p.offsetLeft-(l.offsetWidth-p.offsetWidth)/2;c&&c(),c=Re(l,A,s?0:+t.duration)},B=()=>{const s=m.inited;F(()=>{const l=f.value;if(!l||!l[m.currentIndex]||t.type!=="line"||st(g.value))return;const v=l[m.currentIndex].$el,{lineWidth:p,lineHeight:A}=t,T=v.offsetLeft+v.offsetWidth/2,_={width:ht(p),backgroundColor:t.color,transform:`translateX(${T}px) translateX(-50%)`};if(s&&(_.transitionDuration=`${t.duration}s`),nt(A)){const J=ht(A);_.height=J,_.borderRadius=J}m.lineStyle=_})},Qt=s=>{const l=s<m.currentIndex?-1:1;for(;s>=0&&s<u.length;){if(!u[s].disabled)return s;s+=l}},O=(s,l)=>{const v=Qt(s);if(!nt(v))return;const p=u[v],A=q(p,v),T=m.currentIndex!==null;m.currentIndex!==v&&(m.currentIndex=v,l||W(),B()),A!==t.active&&(i("update:active",A),T&&i("change",A,p.title)),a&&!t.scrollspy&&se(Math.ceil(gt(g.value)-Q.value))},X=(s,l)=>{const v=u.find((A,T)=>q(A,T)===s),p=v?u.indexOf(v):0;O(p,l)},dt=(s=!1)=>{if(t.scrollspy){const l=u[m.currentIndex].$el;if(l&&w.value){const v=gt(l,w.value)-ct.value;r=!0,d&&d(),d=Pe(w.value,v,s?0:+t.duration,()=>{r=!1})}}},Gt=(s,l,v)=>{const{title:p,disabled:A}=u[l],T=q(u[l],l);A||(ne(t.beforeChange,{args:[T],done:()=>{O(l),dt()}}),re(s)),i("clickTab",{name:T,title:p,event:v,disabled:A})},Dt=s=>{a=s.isFixed,i("scroll",s)},Ut=s=>{F(()=>{X(s),dt(!0)})},Et=()=>{for(let s=0;s<u.length;s++){const{top:l}=D(u[s].$el);if(l>ct.value)return s===0?0:s-1}return u.length-1},qt=()=>{if(t.scrollspy&&!r){const s=Et();O(s)}},Wt=()=>{if(t.type==="line"&&u.length)return e("div",{class:K("line"),style:m.lineStyle},null)},ut=()=>{var s,l,v;const{type:p,border:A,sticky:T}=t,_=[e("div",{ref:T?void 0:b,class:[K("wrap"),{[oe]:p==="line"&&A}]},[e("div",{ref:y,role:"tablist",class:K("nav",[p,{shrink:t.shrink,complete:E.value}]),style:V.value,"aria-orientation":"horizontal"},[(s=o["nav-left"])==null?void 0:s.call(o),u.map(J=>J.renderTitle(Gt)),Wt(),(l=o["nav-right"])==null?void 0:l.call(o)])]),(v=o["nav-bottom"])==null?void 0:v.call(o)];return T?e("div",{ref:b},[_]):_},ft=()=>{B(),F(()=>{var s,l;W(!0),(l=(s=x.value)==null?void 0:s.swipeRef.value)==null||l.resize()})};N(()=>[t.color,t.duration,t.lineWidth,t.lineHeight],B),N(Nt,ft),N(()=>t.active,s=>{s!==Y.value&&X(s)}),N(()=>u.length,()=>{m.inited&&(X(t.active),B(),F(()=>{W(!0)}))});const Ht=()=>{X(t.active,!0),F(()=>{m.inited=!0,b.value&&(n=D(b.value).height),W(!0)})},Vt=(s,l)=>i("rendered",s,l);return lt({resize:ft,scrollTo:Ut}),ie(B),ae(B),zt(Ht),Ft(g,B),Lt("scroll",qt,{target:w,passive:!0}),L({id:h,props:t,setLine:B,scrollable:E,onRendered:Vt,currentName:Y,setTitleRefs:S,scrollIntoView:W}),()=>e("div",{ref:g,class:K([t.type])},[t.sticky?e(qe,{container:g.value,offsetTop:Q.value,onScroll:Dt},{default:()=>[ut()]}):ut(),e(He,{ref:x,count:u.length,inited:m.inited,animated:t.animated,duration:t.duration,swipeable:t.swipeable,lazyRender:t.lazyRender,currentIndex:m.currentIndex,onChange:O},{default:()=>{var s;return[(s=o.default)==null?void 0:s.call(o)]}})])}});const[Oe,pt]=U("tab"),Xe=M({name:Oe,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:P,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:H},setup(t,{slots:i}){const o=k(()=>{const r={},{type:a,color:c,disabled:d,isActive:g,activeColor:y,inactiveColor:b}=t;c&&a==="card"&&(r.borderColor=c,d||(g?r.backgroundColor=c:r.color=c));const h=g?y:b;return h&&(r.color=h),r}),n=()=>{const r=e("span",{class:pt("text",{ellipsis:!t.scrollable})},[i.title?i.title():t.title]);return t.dot||nt(t.badge)&&t.badge!==""?e(le,{dot:t.dot,content:t.badge,showZero:t.showZeroBadge},{default:()=>[r]}):r};return()=>e("div",{id:t.id,role:"tab",class:[pt([t.type,{grow:t.scrollable&&!t.shrink,shrink:t.shrink,active:t.isActive,disabled:t.disabled}])],style:o.value,tabindex:t.disabled?void 0:t.isActive?0:-1,"aria-selected":t.isActive,"aria-disabled":t.disabled||void 0,"aria-controls":t.controls},[n()])}}),[Je,at]=U("tab"),Ke=xt({},ce,{dot:Boolean,name:P,badge:P,title:String,disabled:Boolean,titleClass:de,titleStyle:[String,Object],showZeroBadge:H});var Ze=M({name:Je,props:Ke,setup(t,{slots:i}){const o=Bt(),n=z(!1),r=pe(),{parent:a,index:c}=ue(Pt);if(!a){console.error("[Vant] <Tab> must be a child component of <Tabs>.");return}const d=()=>{var f;return(f=t.name)!=null?f:c.value},g=()=>{n.value=!0,a.props.lazyRender&&F(()=>{a.onRendered(d(),t.title)})},y=k(()=>{const f=d()===a.currentName.value;return f&&!n.value&&g(),f}),b=z(""),x=z("");fe(()=>{const{titleClass:f,titleStyle:S}=t;b.value=f?he(f):"",x.value=S&&typeof S!="string"?ge(ve(S)):S});const h=f=>e(Xe,be({key:o,id:`${a.id}-${c.value}`,ref:a.setTitleRefs(c.value),style:x.value,class:b.value,isActive:y.value,controls:o,scrollable:a.scrollable.value,activeColor:a.props.titleActiveColor,inactiveColor:a.props.titleInactiveColor,onClick:S=>f(r.proxy,c.value,S)},vt(a.props,["type","color","shrink"]),vt(t,["dot","badge","title","disabled","showZeroBadge"])),{title:i.title}),w=z(!y.value);return N(y,f=>{f?w.value=!1:me(()=>{w.value=!0})}),N(()=>t.title,()=>{a.setLine(),a.scrollIntoView()}),ye(xe,y),lt({id:o,renderTitle:h}),()=>{var f;const S=`${a.id}-${c.value}`,{animated:u,swipeable:L,scrollspy:m,lazyRender:E}=a.props;if(!i.default&&!u)return;const V=m||y.value;if(u||L)return e(Te,{id:o,role:"tabpanel",class:at("panel-wrapper",{inactive:w.value}),tabindex:y.value?0:-1,"aria-hidden":!y.value,"aria-labelledby":S},{default:()=>{var Q;return[e("div",{class:at("panel")},[(Q=i.default)==null?void 0:Q.call(i)])]}});const Y=n.value||m||!E?(f=i.default)==null?void 0:f.call(i):null;return Ae(e("div",{id:o,role:"tabpanel",class:at("panel"),tabindex:V?0:-1,"aria-labelledby":S},[Y]),[[Ce,V]])}}});const $e=tt(Ze),ti=tt(Ye),[ei,ii]=U("divider"),ai={dashed:Boolean,hairline:H,vertical:Boolean,contentPosition:rt("center")};var oi=M({name:ei,props:ai,setup(t,{slots:i}){return()=>{var o;return e("div",{role:"separator",class:ii({dashed:t.dashed,hairline:t.hairline,vertical:t.vertical,[`content-${t.contentPosition}`]:!!i.default&&!t.vertical})},[!t.vertical&&((o=i.default)==null?void 0:o.call(i))])}}});const si=tt(oi),ni="_goods_126oz_1",ri="_goodsSection_126oz_9",li="_sellOut_126oz_14",ci="_sellOutImg_126oz_25",di="_goodsImg_126oz_29",ui="_goodsInfo_126oz_33",fi="_goodsName_126oz_37",hi="_goodsSale_126oz_43",gi="_pre_126oz_48",vi="_goodsPrice_126oz_51",mi="_addCart_126oz_57",yi="_addCartDisabled_126oz_62",I={goods:ni,goodsSection:ri,sellOut:li,sellOutImg:ci,goodsImg:di,goodsInfo:ui,goodsName:fi,goodsSale:hi,pre:gi,goodsPrice:vi,addCart:mi,addCartDisabled:yi},Ai="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABv5JREFUWMO1mWtoHFUUx39ndlPdbjZWE1ub+EDSVmpq41uQanwQSOurRKEtCAZR2lTwhX5QNJakiKL4QdBWQYyoNAot+KiKASW2FkpbNWBEaqNNTarWqu1uamxN5vhh9nFn5s7s2mog7Myde88993/+59xzzxVO4E/fu2Q6RyevIuG0INKEMA+kDiGDACI54CCwG5EhVAbQqS1y064/j3dOOS5F317YhpPoQLgZNIWIIU3IK5v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:{showAdd:{type:Boolean,default:!0},item:{type:Object,default:{}},onItemClick:{type:Function,default:t=>{}},onBuyClick:{type:Function,default:t=>{}}},render(){const t=this.item;return e("div",{class:I.goods,onClick:()=>this.onItemClick(t)},[e("div",{class:I.goodsSection},[e(yt,{src:t.pic,fit:"cover",class:I.goodsImg},null),t.stock<=0&&e("div",{class:I.sellOut},[e(yt,{src:ke,fit:"cover",class:I.sellOutImg},null)])]),e("div",{class:I.goodsInfo},[e("div",{class:[I.goodsName,"van-ellipsis"]},[t.name]),e("div",{class:I.goodsBuy},[e("p",{class:I.goodsPrice},[e("span",{class:I.pre},[R("¥")]),Se(t.price)]),this.showAdd&&e(Z,{class:[I.addCart,t.stock<=0&&I.addCartDisabled],name:Ai,size:22,onClick:i=>{i.stopPropagation(),t.stock>0&&this.onBuyClick(t)}},null)])])])}}),pi="_tabList_38jza_1",Ci="_goodsList_38jza_6",Ct={tabList:pi,goodsList:Ci},Si=M({name:"tab-list",props:{showAdd:{type:Boolean,default:!0},typeId:{type:Number,default:0},productAttributeCategoryId:{type:Number,default:0},brandId:{type:Number,default:0},sort:{type:Number,defalut:0},keyword:{type:String,defalut:""},isTab:{type:Boolean,default:!1},onOpenWebView:{type:Function,default:t=>{}}},data(){return{list:[],loading:!1,finished:!1,params:{productCategoryId:void 0,productAttributeCategoryId:void 0,brandId:null,sort:null,keyword:"",pageNum:1,pageSize:20},addGoodsShow:!1,selectGoodsItem:{}}},mounted(){this.getList()},methods:{onSearch(){this.finished=!1,this.list=[],this.params.pageNum=1,this.getList()},async getList(){this.loading=!0;try{let t=this.params;t.productCategoryId=this.typeId?this.typeId:void 0,t.productAttributeCategoryId=this.productAttributeCategoryId?this.productAttributeCategoryId:void 0,t.brandId=this.brandId?this.brandId:void 0,t.sort=this.sort?this.sort:void 0,t.keyword=this.keyword?this.keyword:void 0;const o=(await _t.post("/edu-app/open/mall/productSearch",{noAuthorization:!0,data:{...t}})).data||{};if(this.list.length>0&&o.pageNum===1)return;this.list=this.list.concat(o.list||[]),this.finished=o.pageNum>=o.totalPage,this.params.pageNum=o.pageNum+1}catch(t){this.finished=!0}this.loading=!1},onDetailClick(t){if(this.isTab){let i=this.$router.resolve({path:"/goodsDetail",query:{id:t.id}}).fullPath;this.onOpenWebView(i);return}this.$router.push({path:"/goodsDetail",query:{id:t.id}})},onBuyClick(t){console.log(t,"item"),this.selectGoodsItem=t,this.addGoodsShow=!0}},render(){return e("div",{class:Ct.tabList},[e(Le,{loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:"",immediateCheck:!1,class:[Ct.goodsList,"mb12"],onLoad:this.getList},{default:()=>[this.list.length&&this.list.map(t=>e(bi,{item:t,onItemClick:this.onDetailClick,onBuyClick:this.onBuyClick,showAdd:this.showAdd},null))||null,!this.loading&&!this.list.length&&e(we,{description:"暂无商品"},null)||null]}),e(jt,{show:this.addGoodsShow,closeable:!0,position:"bottom",round:!0,onClose:()=>{this.addGoodsShow=!1}},{default:()=>[e(Me,{show:this.addGoodsShow,onClose:()=>{this.addGoodsShow=!1},item:this.selectGoodsItem},null)]})])}}),wi="_active_gviry_19",Ii="_filterBtn_gviry_23",zi="_filterTagWrap_gviry_26",Ti="_filterTag_gviry_26",ki="_filterSort_gviry_72",Mi="_iconSort_gviry_82",C={"filter-top":"_filter-top_gviry_7",active:wi,filterBtn:Ii,filterTagWrap:zi,filterTag:Ti,"filter-productCategory":"_filter-productCategory_gviry_42","filter-tag":"_filter-tag_gviry_58","filter-tag-checked":"_filter-tag-checked_gviry_68",filterSort:ki,"icon-active":"_icon-active_gviry_79",iconSort:Mi},xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAkCAMAAADfNcjQAAAAAXNSR0IArs4c6QAAAMlQTFRFAAAAAAAAAAAAMzMzKysrLi4uKysrMzMzMDAwLS0tNjY2MTExNzc3MDAwMzMzMDAwMTExNDQ0MjIyNTU1NDQ0MjIyMjIyMjIyMjIyNDQ0MzMzMzMzMjIyNDQ0M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AAElFTkSuQmCC",Ni="_loading_8jqo2_1",Bi="_titlePopup_8jqo2_7",_i="_title_8jqo2_7",ji="_radio_8jqo2_21",Fi="_filterAction_8jqo2_58",j={loading:Ni,titlePopup:Bi,title:_i,"radio-group":"_radio-group_8jqo2_21",radio:ji,filterAction:Fi},St=()=>({productAttributeCategoryList:null,brandList:null}),Ri=M({name:"goods-filter-list",props:{setFilter:{type:Function,default:t=>{}},cateGoryId:{type:Number,default:0}},data(){return{dataShow:!0,loading:!1,brandList:[],productAttributeCategoryList:[],productCategorySmallVoList:[],params:St()}},mounted(){this.getFilterList()},methods:{async getFilterList(){this.loading=!0;try{const t=await _t.get("/edu-app/open/mall/search/condition",{noAuthorization:!0});this.dataShow=t.code===200;const{brandList:i=[],productAttributeCategoryList:o=[]}=t.data||{};this.brandList=i,this.productAttributeCategoryList=o}catch(t){this.dataShow=!1}this.loading=!1},onFilterClick(){this.setFilter({productCategory:this.productCategorySmallVoList[this.params.productCategorySmallVoList],productAttributeCategory:this.productAttributeCategoryList[this.params.productAttributeCategoryList],brand:this.brandList[this.params.brandList]})},setParams(t){this.params[t]=null}},render(){return e("div",null,[this.loading&&e("div",{class:j.loading},[e(Ie,{color:"var(--van-primary)"},null)]),e("div",{class:j.filterWrap},[e("div",{class:j.titlePopup},[R("筛选")]),Object.keys(this.params).map(t=>e(Ne,{border:!1},{title:()=>e("div",null,[t==="productAttributeCategoryList"?"商品类型":"品牌"]),label:()=>e(Be,{class:j["radio-group"],modelValue:this.params[t],"onUpdate:modelValue":i=>this.params[t]=i},{default:()=>[t==="productAttrbuteCategoryList"?this.productAttributeCategoryList.map((i,o)=>{const r=o===this.params[t]?"primary":"default";return e(At,{class:j.radio,name:o,onClick:()=>{}},{default:()=>[e($,{size:"large",type:r},{default:()=>[i.name]})]})}):this.brandList.map((i,o)=>{const r=o===this.params[t]?"primary":"default";return e(At,{class:j.radio,name:o,onClick:()=>{}},{default:()=>[e($,{size:"large",type:r},{default:()=>[i.name]})]})})]})})),e(si,{style:{margin:"0"}},null),e("div",{class:j.filterAction},[e(mt,{round:!0,style:{marginRight:"8px"},onClick:()=>this.params=St()},{default:()=>[R("重置")]}),e(mt,{round:!0,type:"primary",color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",style:{marginLeft:"8px"},onClick:()=>this.onFilterClick()},{default:()=>[R("确认")]})])])])}}),Xi=M({name:"goods-list",data(){const t=this.$route.query;return{tabListShow:!t.id,typeId:0,filterActive:0,filterListShow:!1,productCategory:{active:0,name:t.tag||"",id:Number(t.id)||0,children:[]},productAttributeCategory:{children:[],name:"",id:0},brand:{name:"",id:0},keyword:"",autofocus:!1}},computed:{getProductAttributeCategory(){if(this.productCategory.id){if(this.productCategory.children)return(this.productCategory.children[this.productCategory.active]||{}).id||"";this.productCategory.id}return 0}},async mounted(){this.$nextTick(()=>{this.$route.query.input==="focus"&&document.querySelector(".van-field__control").focus()}),this.tabListShow=!0},methods:{onFilter(t){this.filterActive===3&&t===3&&(t=4),this.filterActive===4&&t===3&&(t=3),this.filterActive!==t&&(this.filterActive=t,this.$nextTick(()=>{this.onSearch()}))},setFilter({productCategory:t,productAttributeCategory:i,brand:o}){t&&t.active===void 0&&(t.active=0),this.productCategory=t||{id:0,name:""},this.productAttributeCategory=i||{id:0,name:""},this.brand=o||{id:0,name:""},this.$nextTick(()=>{this.onSearch(),this.filterListShow=!1})},onToggleTag(){this.$refs.tabList.loading||this.$nextTick(()=>{this.onSearch()})},onClearTag(t){t==="productCategory"?this.productCategory={id:0,name:""}:t==="productAttributeCategory"?this.productAttributeCategory={id:0,name:""}:this.brand={id:0,name:""};let i=this.$refs.goodsFilter;i&&(t==="productAttributeCategory"?i.setParams("productAttributeCategoryList"):i.setParams("brandList")),this.$nextTick(()=>{this.onSearch()})},onSearch(){this.$refs.tabList.onSearch()},searchBtn(t){this.keyword=t,this.$nextTick(()=>{this.onSearch()})}},render(){return e("div",null,[e(je,null,{default:()=>[e(_e,{modelValue:this.keyword,searchIcon:Li,onSearch:this.searchBtn,placeholder:"请输入商品名称"},null),e(Fe,{class:C["filter-top"],align:"center"},{default:()=>[e(it,{span:6,class:this.filterActive===0?C.active:"",onClick:()=>this.onFilter(0)},{default:()=>[R("综合排序")]}),e(it,{span:6,class:this.filterActive===3||this.filterActive===4?C.active:"",onClick:()=>this.onFilter(3)},{default:()=>[R("价格"),e("div",{class:C.filterSort},[e(Z,{class:this.filterActive===3?C["icon-active"]:"",style:{transform:"rotate(-90deg)"},name:"play",size:12},null),e(Z,{class:[C.iconSort,this.filterActive===4?[C["icon-active"]]:""],style:{transform:"rotate(90deg)"},name:"play",size:12},null)])]}),e(it,{style:{marginLeft:"auto"},span:6,class:C.filterBtn,onClick:()=>this.filterListShow=!0},{default:()=>[R("筛选"),e(Z,{name:xi,size:18},null)]})]}),this.productCategory.id&&this.productCategory.children&&this.productCategory.children.length?e(ti,{class:C["filter-productCategory"],shrink:!0,ellipsis:!1,active:this.productCategory.active,"onUpdate:active":t=>this.productCategory.active=t,onChange:()=>this.onToggleTag()},{default:()=>[this.productCategory&&this.productCategory.children.map((t,i)=>e($e,{name:i,title:t.name},{title:()=>e("div",{class:[C["filter-tag"],this.productCategory.active===i?C["filter-tag-checked"]:""]},[t.name])}))]}):null]}),e("div",{class:C.filterTagWrap},[this.productAttributeCategory.id?e($,{class:C.filterTag,closeable:!0,onClose:()=>this.onClearTag("productAttributeCategory")},{default:()=>[this.productAttributeCategory.name]}):"",this.brand.id?e($,{class:C.filterTag,closeable:!0,onClose:()=>this.onClearTag("brand")},{default:()=>[this.brand.name]}):""]),this.tabListShow?e(Si,{ref:"tabList",style:{height:"calc(100vh - var(--header-height))"},showAdd:!0,productAttributeCategoryId:this.productAttributeCategory.id,brandId:this.brand.id,sort:this.filterActive,keyword:this.keyword},null):null,e(jt,{show:this.filterListShow,closeable:!0,position:"bottom",round:!0,onClose:()=>{this.filterListShow=!1}},{default:()=>[e(Ri,{cateGoryId:this.productCategory.id,ref:"goodsFilter",setFilter:this.setFilter},null)]})])}});export{Xi as default};
|