You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
2 lines
14 KiB
11 months ago
|
import{E as e,$ as t,o as s,c as a,w as l,a as o,b as i,d as n,F as d,e as c,i as r,r as u,f as g,t as h,g as m,h as p,n as _,j as y,k as f,l as C,m as S,p as k,q as v,u as L,s as b,v as x,x as I,y as E,z as T,A as w}from"./index-4ddb689d.js";import{W as P}from"./wxofficial.956096a5.js";import{S as A}from"./index.c375f920.js";import{E as B}from"./index.25c5a396.js";import{_ as N}from"./_plugin-vue_export-helper.1b428a4d.js";import{M as R,_ as $}from"./mescroll-mixins.a7931123.js";import{r as G}from"./uni-app.es.24af5d4f.js";import{h as D}from"./color.813a9497.js";import{S as O}from"./SpecType.cb8615db.js";import{a as V}from"./cart.86d426b5.js";import{s as j,l as H}from"./index.85d62ccb.js";import{G as M}from"./index.0d19d98b.js";const U={onPageScroll(e){this.handlePageScroll(e)},onReachBottom(){this.handleReachBottom()},onPullDownRefresh(){this.handlePullDownRefresh()},data(){return{mescroll:{onPageScroll:e=>{this.handlePageScroll(e)},onReachBottom:()=>{this.handleReachBottom()},onPullDownRefresh:()=>{this.handlePullDownRefresh()}}}},methods:{handlePageScroll(e){let t=this.$refs.mescrollItem;t&&t.mescroll&&t.mescroll.onPageScroll(e)},handleReachBottom(){let e=this.$refs.mescrollItem;e&&e.mescroll&&e.mescroll.onReachBottom()},handlePullDownRefresh(){let e=this.$refs.mescrollItem;e&&e.mescroll&&e.mescroll.onPullDownRefresh()}}},z=new e([{key:"ONE_LEVEL_BIG",name:"一级分类[大图]",value:10},{key:"ONE_LEVEL_SMALL",name:"一级分类[小图]",value:11},{key:"TWO_LEVEL",name:"二级分类",value:20},{key:"COMMODITY",name:"一级分类+商品",value:30}]),W="category/list";let F;const Y=N({components:{Search:A,Primary:N({components:{Empty:B},props:{display:{type:Number,default:10},list:{type:Array,default:[]}},data:()=>({PageCategoryStyleEnum:z}),methods:{onTargetGoodsList(e){this.$navTo("pages/goods/list",{categoryId:e})}}},[["render",function(e,t,p,_,y,f){const C=m,S=r,k=u("empty");return s(),a(S,{class:"primary"},{default:l((()=>[p.list.length>0&&p.display==y.PageCategoryStyleEnum.ONE_LEVEL_BIG.value?(s(),a(S,{key:0,class:"cate-content"},{default:l((()=>[o(S,{class:"cate-wrapper cate_style__10 clearfix"},{default:l((()=>[(s(!0),i(d,null,n(p.list,((e,t)=>(s(),a(S,{class:"cate-item",key:t,onClick:t=>f.onTargetGoodsList(e.category_id)},{default:l((()=>[e.image?(s(),a(C,{key:0,class:"image",mode:"widthFix",src:e.image.preview_url},null,8,["src"])):c("",!0)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})):c("",!0),p.list.length>0&&p.display==y.PageCategoryStyleEnum.ONE_LEVEL_SMALL.value?(s(),a(S,{key:1,class:"cate-content"},{default:l((()=>[o(S,{class:"cate-wrapper cate_style__11 clearfix"},{default:l((()=>[(s(!0),i(d,null,n(p.list,((e,t)=>(s(),a(S,{class:"cate-item",key:t,onClick:t=>f.onTargetGoodsList(e.category_id)},{default:l((()=>[e.image?(s(),a(C,{key:0,class:"image",mode:"scaleToFill",src:e.image.preview_url},null,8,["src"])):c("",!0),o(S,{class:"cate-name"},{default:l((()=>[g(h(e.name),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})):c("",!0),p.list.length?c("",!0):(s(),a(k,{key:2,tips:"亲,暂无商品分类"+p.display},null,8,["tips"]))])),_:1})}],["__scopeId","data-v-784c3793"]]),Secondary:N({components:{Empty:B},props:{list:{type:Array,default:[]}},data:()=>({PageCategoryStyleEnum:z,scrollHeight:0,curIndex:0,scrollTop:0}),created(){this.setListHeight()},methods:{setListHeight(){const{windowHeight:e}=uni.getSystemInfoSync();this.scrollHeight=e-p(96)},handleSelectNav(e){this.curIndex=e,this.scrollTop=0},onTargetGoodsList(e){this.$navTo("pages/goods/list",{categoryId:e})}}},[["render",function(e,t,p,S,k,v){const L=C,b=y,x=m,I=r,E=u("empty");return p.list.length>0?(s(),a(I,{key:0,class:"secondary",style:_(e.appThemeStyle)},{default:l((()=>[o(I,{class:"cate-content"},{default:l((()=>[o(b,{class:"cate-left","scroll-y":!0,style:_({height:`${k.scrollHeight}px`})},{default:l((()=>[(s(!0),i(d,null,n(p.list,((e,t)=>(s(),a(L,{class:f(["type-nav",{selected:k.curIndex==t}]),key:t,onClick:e=>v.handleSelectNav(t)},{default:l((()=>[g(h(e.name),1)])),_:2},1032,["class","onClick"])))),128))])),_:1},8,[
|