2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
import{_ as e}from"./u-image.ff8bf742.js";import{d as t,o as s,e as o,w as l,T as n,n as r,j as a,A as c,B as i,f as d,R as _,q as y,v as p,F as u,u as g,r as m,b as x,Q as f,h as b,g as h,t as w,i as k,p as v}from"./index-d0750414.js";import{_ as $}from"./price.225b162b.js";import{_ as j}from"./_plugin-vue_export-helper.1b428a4d.js";const z=t({__name:"widget-root",props:{styles:{type:Object,default:()=>({})}},setup:e=>(t,c)=>{const i=a;return s(),o(i,{class:"widget-root",style:r({padding:`${e.styles.padding_top}px ${e.styles.padding_horizontal}px ${e.styles.padding_bottom}px`,"background-color":e.styles.root_bg_color,"border-radius":`${e.styles.radius}px`,color:e.styles.text_color})},{default:l(()=>[n(t.$slots,"default")]),_:3},8,["style"])}}),S=j(t({__name:"area-goods",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(t){const n=t,j=g();return console.log(n.content.goods_list,n.content),(n,g)=>{const S=m(x("u-image"),e),T=a,A=m(x("price"),$),C=f,W=m(x("widget-root"),z);return s(),o(W,{styles:t.styles},{default:l(()=>[c(d(T,{class:"goods-group"},{default:l(()=>[d(T,{class:_(["goods-lists gap-y-2",{larger:4==t.content.goods_type,perline:2==t.content.goods_type,swiper:3==t.content.goods_type,lists:1==t.content.goods_type}]),style:r({"row-gap":`${t.styles.goods_vertical}px`,"column-gap":`${t.styles.goods_horizontal}px`})},{default:l(()=>[3!=t.content.goods_type?(s(!0),y(u,{key:0},p(t.content.goods_list,(e,n)=>(s(),o(T,{class:"goods-wrap",key:n,style:r({background:t.styles.component_bg_color,"border-radius":`${t.styles.border_top_radius}px ${t.styles.border_top_radius}px ${t.styles.border_bottom_radius}px ${t.styles.border_bottom_radius}px`}),onClick:t=>b(j).navigateTo("/pages/goods/index?id="+e.id)},{default:l(()=>[d(T,{class:"goods-item"},{default:l(()=>[d(T,{class:"goods-image overflow-hidden flex-none",style:r({"--img-radius":`${t.styles.image_radius}px`})},{default:l(()=>[d(S,{src:null==e?void 0:e.image,width:"100%",height:"100%",fit:"cover"},null,8,["src"])]),_:2},1032,["style"]),d(T,{class:_(["goods-info",{"p-2":1===t.content.goods_type,"mt-2":2===t.content.goods_type}])},{default:l(()=>[4!==t.content.goods_type?(s(),y(u,{key:0},[t.content.show_title?(s(),o(T,{key:0,class:"mb-1 name",style:r({color:t.styles.title_color})},{default:l(()=>[d(T,{class:_(3==t.content.style?"line-clamp-2":"line-clamp-1")},{default:l(()=>[h(w(e.name||"这里是商品标题中式推拿,泰式按摩"),1)]),_:2},1032,["class"])]),_:2},1032,["style"])):k("",!0),t.content.show_server&&3!=t.content.goods_type?(s(),o(T,{key:1,class:_(["text-xs mb-1",{"mt-4":1===t.content.goods_type}]),style:r({color:t.styles.server_color})},{default:l(()=>[h(" 服务时间:"),v("span",{class:"text-[#59b870] font-medium"},w(e.duration||"60"),1),h("分钟 ")]),_:2},1032,["style","class"])):k("",!0)],64)):k("",!0),d(T,{class:"flex price-btn items-center justify-between"},{default:l(()=>[d(T,{class:"flex items-baseline"},{default:l(()=>[t.content.show_price?(s(),o(A,{key:0,mainSize:"32rpx",minorSize:"26rpx",fontWeight:"500",color:t.styles.price_color,content:e.price},null,8,["color","content"])):k("",!0),t.content.show_scribing_price&&3!=t.content.goods_type&&"0.00"!=e.scribing_price?(s(),o(A,{key:1,mainSize:"24rpx",minorSize:"24rpx",fontWeight:"400",lineThrough:!0,color:t.styles.scribing_price_color,content:e.scribing_price},null,8,["color","content"])):k("",!0)]),_:2},1024),t.content.show_sales&&e.order_num&&1!==t.content.goods_type?(s(),o(T,{key:0,class:"text-muted text-xs flex-none",style:r({color:t.styles.sales_color})},{default:l(()=>[h(" 已售"+w(e.order_num),1)]),_:2},1032,["style"])):k("",!0)]),_:2},1024),4===t.content.goods_type?(s(),y(u,{key:1},[t.content.show_server?(s(),o(T,{key:0,class:"text-xs mt-3",style:r({color:t.styles.server_color})},{default:l(()=>[h(" 服务时间:"),v("span",{class:"text-[#59b870] font-medium"},w(e.duration||"60"),1),h("分钟 ")]),_:2},1032,["style"])):k("",!0),d(T,{class:"flex justify-between items-center mt-3"},{default:l(()=>[t.content.show_title?(s(),o(T,{key:0,class:"mb-1 name",style:r([{width:"250px"},{color:t.styles.title_color}])},{default:l(()=>[d(T,{class:"line-clamp-2"},{default:l(()=>[h(w(e.name||"这里是商品标题中式推拿,泰式按摩SPA, SPA"),1)]),_:2},1024)]),_:2},1032,["style"])):k("",!0),d(T,{class:"buy-btn text-xs",style:r({"border-radius":`${t.styles.btn_radius}px`})},{default:l(()=>[h(w(t.content.btn_text),1)]),_:1},8,["style"])]),_:2},1024)],64)):k("",!0)]),_:2},1032,["class"])]),_:2},1024),1==t.content.goods_type?(s(),o(T,{key:0,class:"flex justify-between items-center mt-2"},{default:l(()=>[t.content.show_sales?(s(),o(T,{key:0,class:"text-muted text-xs"},{default:l(()=>[h(" 超"+w(e.order_num)+"人选择 ",1)]),_:2},1024)):k("",!0),d(T,{class:"buy-btn text-xs",style:r({"border-radius":t.styles.btn_radius/2+"px"})},{default:l(()=>[h(w(t.content.btn_text),1)]),_:1},8,["style"])]),_:2},1024)):k("",!0)]),_:2},1032,["style","onClick"]))),128)):(s(),o(C,{key:1,class:"scroll-view_H","scroll-x":"true"},{default:l(()=>[(s(!0),y(u,null,p(t.content.goods_list,(e,n)=>(s(),o(T,{class:"goods-wrap scroll-view-item_H mr-[20rpx]",key:n,style:r({background:t.styles.component_bg_color,"border-radius":`${t.styles.border_top_radius}px ${t.styles.border_top_radius}px ${t.styles.border_bottom_radius}px ${t.styles.border_bottom_radius}px`}),onClick:t=>b(j).navigateTo("/pages/goods/index?id="+e.id)},{default:l(()=>[d(T,{class:"goods-item"},{default:l(()=>[d(T,{class:"overflow-hidden flex-none",style:r([{"--img-radius":`${t.styles.image_radius}px`},{width:"250rpx",height:"250rpx"}])},{default:l(()=>[d(S,{src:null==e?void 0:e.image,width:"100%",height:"100%",fit:"cover"},null,8,["src"])]),_:2},1032,["style"]),d(T,{class:_(["goods-info",{"p-2":1===t.content.goods_type,"mt-2":2===t.content.goods_type}])},{default:l(()=>[t.content.show_title?(s(),o(T,{key:0,class:"mb-1 name",style:r({color:t.styles.title_color})},{default:l(()=>[d(T,{style:r({width:1==t.content.style?"210rpx":"auto"}),class:_(3==t.content.style?"line-clamp-2":"line-clamp-1 whitespace-normal")},{default:l(()=>[h(w(e.name||"这里是商品标题中式推拿,泰式按摩"),1)]),_:2},1032,["style","class"])]),_:2},1032,["style"])):k("",!0),t.content.show_server?(s(),o(T,{key:1,class:_(["text-xs mb-1",{"mt-4":1===t.content.goods_type}]),style:r({color:t.styles.server_color})},{default:l(()=>[h(" 服务时间:"),v("span",{class:"text-[#59b870] font-medium"},w(e.duration||"60"),1),h("分钟 ")]),_:2},1032,["style","class"])):k("",!0),d(T,{class:"flex price-btn items-center justify-between"},{default:l(()=>[d(T,{class:"flex items-baseline"},{default:l(()=>[t.content.show_price?(s(),o(A,{key:0,mainSize:"32rpx",minorSize:"26rpx",fontWeight:"500",color:t.styles.price_color,content:e.price},null,8,["color","content"])):k("",!0),t.content.show_scribing_price&&1!=t.content.goods_type&&"0.00"!==e.scribing_price&&!e.order_num?(s(),o(A,{key:1,mainSize:"24rpx",minorSize:"24rpx",fontWeight:"400",lineThrough:!0,color:t.styles.scribing_price_color,content:e.scribing_price},null,8,["color","content"])):k("",!0)]),_:2},1024),t.content.show_sales&&e.order_num&&1!==t.content.goods_type?(s(),o(T,{key:0,class:"text-muted text-xs flex-none",style:r({color:t.styles.sales_color})},{default:l(()=>[h(" 已售"+w(e.order_num),1)]),_:2},1032,["style"])):k("",!0)]),_:2},1024)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1032,["style","onClick"]))),128))]),_:1}))]),_:1},8,["style","class"])]),_:1},512),[[i,t.content.enabled]])]),_:1},8,["styles"])}}}),[["__scopeId","data-v-f53eb1d4"]]);export{S as A,z as _};
|