|
|
|
|
import{$ as a,u as s,q as t,o as e,c as l,w as o,n as r,i as c,a as i,b as n,d,F as u,f,t as m,e as p,j as h,l as g,r as _,y as b,k as x,g as T}from"./index-4ddb689d.js";import{M as y,_ as v}from"./mescroll-mixins.a7931123.js";import{r as I}from"./uni-app.es.24af5d4f.js";import{W as S}from"./wxofficial.956096a5.js";import{C as k}from"./index.994d85b2.js";import{h as C}from"./color.813a9497.js";import{A as L}from"./GoodsStatus.54b07d63.js";import{l as w}from"./goods.d51b766f.js";import{_ as E}from"./_plugin-vue_export-helper.1b428a4d.js";const A="sharp.home/data";const j=E({components:{CountDown:k},mixins:[y,S],data:()=>({isLoading:!0,curTabIndex:0,scrollLeft:0,upOption:{auto:!1,page:{size:15},noMoreSize:3},ActiveStatusEnum:L,tabbar:[],goodsList:[]}),computed:{progressBackgroundColor(){return C(this.appTheme.mainBg,.2)}},onLoad(a){this.onRefreshPage(),this.setWxofficialShareData()},methods:{onRefreshPage(){const s=this;return new Promise(((t,e)=>{var l;a.get(A,l).then((a=>{s.tabbar=a.data.tabbar,s.goodsList=a.data.goodsList,s.curTabIndex=0,s.scrollLeft=0,s.goodsList.data.length||s.mescroll.showEmpty(),t()})).catch(e)}))},getListData(a=1){const t=this,e=t.getCurTabbarId();return new Promise(((l,o)=>{w(e,{page:a},{load:!1}).then((e=>{const o=e.data.list;t.goodsList.data=s(o,t.goodsList,a),l(o)})).catch(o)}))},downCallback(){this.onRefreshPage().finally((()=>this.mescroll.endSuccess()))},upCallback(a){const s=this;s.getListData(a.num).then((a=>{const t=a.data.length,e=a.data.total;s.mescroll.endBySize(t,e)})).catch((()=>s.mescroll.endErr()))},scroll({detail:a}){this.scrollLeft=a.scrollLeft},handleTab(a){const s=this;s.curTabIndex=a,s.goodsList=t(),s.mescroll.resetUpScroll()},getCurTabbar(){return this.tabbar[this.curTabIndex]},getCurTabbarId(){const a=this.getCurTabbar();return a?a.active_time_id:0},handleTargetGoods(a){this.$navTo("pages/sharp/goods/index",{activeTimeId:this.getCurTabbarId(),sharpGoodsId:a})},setWxofficialShareData(){this.updateShareCardData({title:"整点秒杀会场"})}},onShareAppMessage(){return{title:"整点秒杀会场",path:`/pages/sharp/index?${this.$getShareUrlParams()}`}},onShareTimeline(){return{title:"整点秒杀会场",path:`/pages/sharp/index?${this.$getShareUrlParams()}`}}},[["render",function(a,s,t,y,S,k){const C=c,L=h,w=g,E=_("count-down"),A=T,j=I(b("mescroll-body"),v);return e(),l(C,{class:"container",style:r(a.appThemeStyle)},{default:o((()=>[i(j,{ref:"mescrollRef",sticky:!0,onInit:a.mescrollInit,down:{native:!0,auto:!1},onDown:k.downCallback,up:S.upOption,onUp:k.upCallback},{default:o((()=>[i(C,{class:"sharp-tabs"},{default:o((()=>[i(L,{"scroll-x":!0,"scroll-left":S.scrollLeft,onScroll:k.scroll},{default:o((()=>[i(C,{class:"sharp-tabs--container dis-flex"},{default:o((()=>[(e(!0),n(u,null,d(S.tabbar,((a,s)=>(e(),l(C,{key:s,class:x(["tabs-item dis-flex flex-dir-column flex-x-center flex-y-center",{active:S.curTabIndex==s}]),onClick:a=>k.handleTab(s)},{default:o((()=>[a.status==S.ActiveStatusEnum.STATE_NOTICE.value?(e(),l(C,{key:0,class:"item-title"},{default:o((()=>[f(m(a.status_text),1)])),_:2},1024)):(e(),n(u,{key:1},[i(C,{class:"item-time"},{default:o((()=>[f(m(a.active_time),1)])),_:2},1024),i(C,{class:"item-status"},{default:o((()=>[f(m(a.status_text),1)])),_:2},1024)],64))])),_:2},1032,["class","onClick"])))),128))])),_:1})])),_:1},8,["scroll-left","onScroll"])])),_:1}),S.tabbar.length?(e(),l(C,{key:0,class:"sharp-active dis-flex flex-dir-column flex-y-center"},{default:o((()=>[i(C,{class:"active-status"},{default:o((()=>[i(w,{class:"active-status--icon iconfont icon-artboard"}),S.tabbar[S.curTabIndex].status!=S.ActiveStatusEnum.STATE_NOTICE.value?(e(),l(w,{key:0,class:"active-status--time"},{default:o((()=>[f(m(S.tabbar[S.curTabIndex].active_time),1)])),_:1})):p("",!0),i(w,{class:"active-status--text"},{default:o((()=>[f(m(S.tabbar[S.curTabIndex].status_text2),1)])),_:1})])),_:1}),i(C,{class:"active--count-down dis-flex flex-y-center"},{default:o((()=>[i(w,{class:"m-r-10"},{default:o((()=>[f(m(S.tabbar[S.curTabIndex].status==S.ActiveStatusEnum.STATE_BEGIN.value?"距结束":"距<EFBFBD><EFBFBD>
|