"use strict";var t=Object.defineProperty,o=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(o,e,i)=>e in o?t(o,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[e]=i,n=(t,o,e)=>new Promise(((i,a)=>{var n=t=>{try{r(e.next(t))}catch(o){a(o)}},s=t=>{try{r(e.throw(t))}catch(o){a(o)}},r=t=>t.done?i(t.value):Promise.resolve(t.value).then(n,s);r((e=e.apply(t,o)).next())}));const s=require("../../../common/vendor.js"),r=require("../sheep/index.js"),c=require("../sheep/api/promotion/rewardActivity.js"),l=require("../sheep/hooks/useGoods.js"),d=require("../sheep/api/product/spu.js");if(!Array){(s.resolveComponent("su-sticky")+s.resolveComponent("s-goods-column")+s.resolveComponent("uni-load-more")+s.resolveComponent("s-layout")+s.resolveComponent("layout-default-uni"))()}Math||((()=>"../sheep/ui/su-sticky/su-sticky.js")+(()=>"../sheep/components/s-goods-column/s-goods-column.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../sheep/components/s-layout/s-layout.js"))();const p={__name:"index",setup(t){const p=s.reactive({activityId:0,activityInfo:{},pagination:{list:[],total:1,pageNo:1,pageSize:8},loadStatus:"",leftGoodsList:[],rightGoodsList:[]});let u=0,g=0,f=0;function y(t=0,o="left"){p.pagination.list[u]&&("left"===o?g+=t:f+=t,g<=f?p.leftGoodsList.push(p.pagination.list[u]):p.rightGoodsList.push(p.pagination.list[u]),u++)}function m(){return n(this,null,(function*(){const t={};2===p.activityInfo.productScope?t.ids=p.activityInfo.productSpuIds.join(","):3===p.activityInfo.productScope&&(t.categoryIds=p.activityInfo.productSpuIds.join(",")),p.loadStatus="loading";const{code:n,data:r}=yield d.SpuApi.getSpuPage(((t,n)=>{for(var s in n||(n={}))e.call(n,s)&&a(t,s,n[s]);if(o)for(var s of o(n))i.call(n,s)&&a(t,s,n[s]);return t})({pageNo:p.pagination.pageNo,pageSize:p.pagination.pageSize},t));0===n&&(p.pagination.list=s.lodash.concat(p.pagination.list,r.list),p.pagination.total=r.total,p.loadStatus=p.pagination.list.length