1 |
- import{a0 as t,y as a,z as s,o,e as i,f as e,w as l,_ as n,l as c,j as d,t as A,k as p,r as g,F as r,g as f,i as u,x as m,m as y,u as S,v as I,s as B,G as x}from"./index-b48a414d.js";import{_ as Q}from"./su-sticky.aabc6a00.js";import{_ as U}from"./s-goods-column.5d43688b.js";import{_ as b}from"./uni-load-more.647920f4.js";import{_ as j,y as k}from"./s-layout.d6dcdc81.js";import{S as w}from"./spu.3911022d.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";import"./points.c381a8e1.js";/* empty css *//* empty css */import"./phone-international-input.feef99c7.js";/* empty css */const h=a=>t({url:"/promotion/reward-activity/get",method:"GET",params:{id:a}}),C=M({__name:"index",setup(t){const M=a({activityId:0,activityInfo:{},pagination:{list:[],total:1,pageNo:1,pageSize:8},loadStatus:"",leftGoodsList:[],rightGoodsList:[]});let C=0,_=0,H=0;function K(t=0,a="left"){M.pagination.list[C]&&("left"===a?_+=t:H+=t,_<=H?M.leftGoodsList.push(M.pagination.list[C]):M.rightGoodsList.push(M.pagination.list[C]),C++)}async function v(){const t={};2===M.activityInfo.productScope?t.ids=M.activityInfo.productSpuIds.join(","):3===M.activityInfo.productScope&&(t.categoryIds=M.activityInfo.productSpuIds.join(",")),M.loadStatus="loading";const{code:a,data:s}=await w.getSpuPage({pageNo:M.pagination.pageNo,pageSize:M.pagination.pageSize,...t});0===a&&(M.pagination.list=n.concat(M.pagination.list,s.list),M.pagination.total=s.total,M.loadStatus=M.pagination.list.length<M.pagination.total?"more":"noMore",K())}function E(){"noMore"!==M.loadStatus&&(M.pagination.pageNo++,v())}return s((()=>{E()})),o((async t=>{M.activityId=t.activityId,await async function(t){const{code:a,data:s}=await h(t);0===a&&(M.activityInfo=s)}(M.activityId),await v(M.activityId)})),(t,a)=>{const s=u,o=m,n=c(y("su-sticky"),Q),w=x,h=c(y("s-goods-column"),U),C=c(y("uni-load-more"),b),_=c(y("s-layout"),j);return i(),e(_,{class:"activity-wrap",title:M.activityInfo.title},{default:l((()=>[d(n,{bgColor:"#fff"},{default:l((()=>[d(s,{class:"ss-flex ss-col-top tip-box"},{default:l((()=>[d(s,{class:"type-text ss-flex ss-row-center"},{default:l((()=>[A("满减:")])),_:1}),d(s,{class:"ss-flex-1"},{default:l((()=>[(i(!0),p(r,null,g(M.activityInfo.rules,(t=>(i(),e(s,{class:"tip-content",key:t},{default:l((()=>[A(S(I(k)(M.activityInfo,t)),1)])),_:2},1024)))),128))])),_:1}),d(o,{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="}),d(o,{class:"activity-right-image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAABkBAMAAAB0qc+6AAAAJ1BMVEUAAAD/gwL/cAP/cwP/hgH/gAH/fQL/dwL/dQP/ewL+iAH/bgX/dwDlI8ExAAAADXRSTlMALBUZLyglHxwiMhIK/FILewAABPNJREFUWMOlmbuLE2EUxeNrdV0LBzIIarFOEIQ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J94NrTr1bXsI8ho5kogKaIFDDNxuE5BaUoKlpBXrYIqmxE4cSZ4PHMzJntDNBE4LTCTR1KCcms1JAelH5ohHduCZinMHhCSzSbsiIImczUmdQFQRaaWwTQnUCRtOIH85SUR17fVFdxRTTG0ie4Wk1YJLwCBLFEuaMMme5/mnG6Aom9QgUctIe+FeiqYERIk5GjYnJHs+kjnZOqvibI7WdynpyBs5TkMm5c1x5ETKz08QJb1MrFXJ1YlJ+TndtbcuEUmydSZxAP2LdGSIV1yWTkgtLBMXc0KkwvfDmMRdflmkl0gqnl8FB9MGsSZxVzyfMCYJHE+vHHEEsaZlUT1mSaPcmbNRJaTa2uOoh23Cwbxb/GEpcycodDewNPm5b10pqbYP1y6zv5y4V+pOumBtnZxeYqE3IJWgBllSjCSpUwmJX9CgksS6KTEHzmfOzLRWirpIHcDEYyFJ4F8BVDKfMXCSFPP+Qi/noFq12XmxeOVa2IGGz1s3q/5LgDPyieJeepQTOKs6sxYlHscx3hSoEwuqzmqAPbq80PHmTPVngp0z6a4Qi32pYLNtr5GGtP01p+Yv+GHSkGRJRy4AAAAASUVORK5CYII="})])),_:1})])),_:1}),d(s,{class:"ss-flex ss-flex-wrap ss-p-x-20 ss-m-t-20 ss-col-top"},{default:l((()=>[d(s,{class:"goods-list-box"},{default:l((()=>[(i(!0),p(r,null,g(M.leftGoodsList,(t=>(i(),e(s,{class:"left-list",key:t.id},{default:l((()=>[d(h,{class:"goods-md-box",size:"md",data:t,onClick:a=>I(B).$router.go("/pages/goods/index",{id:t.id}),onGetHeight:a[0]||(a[0]=t=>K(t,"left"))},{cart:l((()=>[d(w,{class:"ss-reset-button cart-btn"})])),_:2},1032,["data","onClick"])])),_:2},1024)))),128))])),_:1}),d(s,{class:"goods-list-box"},{default:l((()=>[(i(!0),p(r,null,g(M.rightGoodsList,(t=>(i(),e(s,{class:"right-list",key:t.id},{default:l((()=>[d(h,{class:"goods-md-box",size:"md",data:t,onClick:a=>I(B).$router.go("/pages/goods/index",{id:t.id}),onGetHeight:a[1]||(a[1]=t=>K(t,"right"))},{cart:l((()=>[d(w,{class:"ss-reset-button cart-btn"})])),_:2},1032,["data","onClick"])])),_:2},1024)))),128))])),_:1})])),_:1}),M.pagination.total>0?(i(),e(C,{key:0,status:M.loadStatus,"content-text":{contentdown:"上拉加载更多"},onClick:E},null,8,["status"])):f("",!0)])),_:1},8,["title"])}}},[["__scopeId","data-v-ec6e6f8a"]]);export{C as default};
|