1 |
- import{z as t,A as s,o as a,f as o,g as i,w as e,S as l,_ as n,c3 as c,m as d,k as A,u as p,l as g,r,F as f,i as u,j as m,y,n as S,v as I,x as B,s as x,J as Q}from"./index-a116b7fa.js";import{_ as U}from"./su-sticky.41b75182.js";import{_ as b}from"./s-goods-column.67cd78e3.js";import{_ as w}from"./uni-load-more.2682655d.js";import{_ as j}from"./s-layout.4ae51839.js";import{s as k}from"./useGoods.6b315a78.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";/* empty css *//* empty css */import"./phone-international-input.b9f6c8e6.js";/* empty css */const C=M({__name:"index",setup(M){const C=t({activityId:0,activityInfo:{},pagination:{list:[],total:1,pageNo:1,pageSize:8},loadStatus:"",leftGoodsList:[],rightGoodsList:[]});let H=0,_=0,h=0;function v(t=0,s="left"){C.pagination.list[H]&&("left"===s?_+=t:h+=t,_<=h?C.leftGoodsList.push(C.pagination.list[H]):C.rightGoodsList.push(C.pagination.list[H]),H++)}async function K(){const t={};2===C.activityInfo.productScope?t.ids=C.activityInfo.productSpuIds.join(","):3===C.activityInfo.productScope&&(t.categoryIds=C.activityInfo.productSpuIds.join(",")),C.loadStatus="loading";const{code:s,data:a}=await l.getSpuPage({pageNo:C.pagination.pageNo,pageSize:C.pagination.pageSize,...t});0===s&&(C.pagination.list=n.concat(C.pagination.list,a.list),C.pagination.total=a.total,C.loadStatus=C.pagination.list.length<C.pagination.total?"more":"noMore",v())}function F(){"noMore"!==C.loadStatus&&(C.pagination.pageNo++,K())}return s((()=>{F()})),a((async t=>{C.activityId=t.activityId,await async function(t){const{code:s,data:a}=await c.getRewardActivity(t);0===s&&(C.activityInfo=a)}(C.activityId),await K(C.activityId)})),(t,s)=>{const a=m,l=y,n=d(S("su-sticky"),U),c=Q,M=d(S("s-goods-column"),b),H=d(S("uni-load-more"),w),_=d(S("s-layout"),j);return o(),i(_,{class:"activity-wrap",title:C.activityInfo.title},{default:e((()=>[A(n,{bgColor:"#fff"},{default:e((()=>[A(a,{class:"ss-flex ss-col-top tip-box"},{default:e((()=>[A(a,{class:"type-text ss-flex ss-row-center"},{default:e((()=>[p("满减:")])),_:1}),A(a,{class:"ss-flex-1"},{default:e((()=>[(o(!0),g(f,null,r(C.activityInfo.rules,(t=>(o(),i(a,{class:"tip-content",key:t},{default:e((()=>[p(I(B(k)(C.activityInfo,t)),1)])),_:2},1024)))),128))])),_:1}),A(l,{class:"activity-left-image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAABICAMAAAAQ/CHDAAAAQlBMVEUAAAD/59f/5tf/59f/5tf/38//59j/59f/5tf/5tf/59f/49f/49T/5dj/5tj/5dX/5dj/5tf/5tj/5Nr/5NT/5tc+RkjZAAAAFXRSTlMAIN+f3hBff++/cFBAzq+Az76PMDD6OdBvAAABEElEQVRo3sXRS5aDMBBDUQrbGNuEX1r732oPNUhmOUhvA/eUasI8t5aOPrYyyQJbz/0Yf5MgfHTu/emr8b0zjZjY0yibCStQ1g4+WYHy4E2L0lWidO8QoqwtUpQzhxBl+yZE2bw8gApYwMACBhYwsPiheQhRlkKIsloMKPIiRbmxAcXahSjLIURZd6C4woAiL0KUVQeKHAYUeQhRVh0o9mJAkcOAIr+FKOsOFNWBojpQ3A4UyYHiVZQoVSVKVYlSNaC4HCiSA0VyoKgOFNWBYnGg69uAIocBRS4GFMmBojpQbA50DQOKlwPF7UCxOVC+FcKaA0XXoxwY0poDRVejHBjimgPFcKC5GFAcDhThQK9/qgrZLofQBLIAAAAASUVORK5CYII="}),A(l,{class:"activity-right-image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAABkBAMAAAB0qc+6AAAAJ1BMVEUAAAD/gwL/cAP/cwP/hgH/gAH/fQL/dwL/dQP/ewL+iAH/bgX/dwDlI8ExAAAADXRSTlMALBUZLyglHxwiMhIK/FILewAABPNJREFUWMOlmbuLE2EUxeNrdV0LBzIIarFOEIQ06ljERxNItZWjTAS1UHBHos1iYYylgyh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5BaUoKlpBXrYIqmxE4cSZ4PHMzJntDNBE4LTCTR1KCcms1JAelH5ohHduCZinMHhCSzSbsiIImczUmdQFQRaaWwTQnUCRtOIH85SUR17fVFdxRTTG0ie4Wk1YJLwCBLFEuaMMme5/mnG6Aom9QgUctIe+FeiqYERIk5GjYnJHs+kjnZOqvibI7WdynpyBs5TkMm5c1x5ETKz08QJb1MrFXJ1YlJ+TndtbcuEUmydSZxAP2LdGSIV1yWTkgtLBMXc0KkwvfDmMRdflmkl0gqnl8FB9MGsSZxVzyfMCYJHE+vHHEEsaZlUT1mSaPcmbNRJaTa2uOoh23Cwbxb/GEpcycodDewNPm5b10pqbYP1y6zv5y4V+pOumBtnZxeYqE3IJWgBllSjCSpUwmJX9CgksS6KTEHzmfOzLRWirpIHcDEYyFJ4F8BVDKfMXCSFPP+Qi/noFq12XmxeOVa2IGGz1s3q/5LgDPyieJeepQTOKs6sxYlHscx3hSoEwuqzmqAPbq80PHmTPVngp0z6a4Qi32pYLNtr5GGtP01p+Yv+GHSkGRJRy4AAAAASUVORK5CYII="})])),_:1})])),_:1}),A(a,{class:"ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top"},{default:e((()=>[A(a,{class:"goods-list-box"},{default:e((()=>[(o(!0),g(f,null,r(C.leftGoodsList,(t=>(o(),i(a,{class:"left-list",key:t.id},{default:e((()=>[A(M,{class:"goods-md-box",size:"md",data:t,onClick:s=>B(x).$router.go("/pages/goods/index",{id:t.id}),onGetHeight:s[0]||(s[0]=t=>v(t,"left"))},{cart:e((()=>[A(c,{class:"ss-reset-button cart-btn"})])),_:2},1032,["data","onClick"])])),_:2},1024)))),128))])),_:1}),A(a,{class:"goods-list-box"},{default:e((()=>[(o(!0),g(f,null,r(C.rightGoodsList,(t=>(o(),i(a,{class:"right-list",key:t.id},{default:e((()=>[A(M,{class:"goods-md-box",size:"md",data:t,onClick:s=>B(x).$router.go("/pages/goods/index",{id:t.id}),onGetHeight:s[1]||(s[1]=t=>v(t,"right"))},{cart:e((()=>[A(c,{class:"ss-reset-button cart-btn"})])),_:2},1032,["data","onClick"])])),_:2},1024)))),128))])),_:1})])),_:1}),C.pagination.total>0?(o(),i(H,{key:0,status:C.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:F},null,8,["status"])):u("",!0)])),_:1},8,["title"])}}},[["__scopeId","data-v-ec6e6f8a"]]);export{C as default};
|