1 line
8.1 KiB
JavaScript
1 line
8.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-041b4df3"],{ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var s=document.documentElement,o=document.body,i={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return s&&s.scrollTop?t=s.scrollTop:o&&(t=o.scrollTop),t},getClientHeight:function(){var t=0;return t=o.clientHeight&&s.clientHeight?Math.min(o.clientHeight,s.clientHeight):Math.max(o.clientHeight,s.clientHeight),t},getScrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},b9cd:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{style:{background:t.pageOptions.background_color},attrs:{id:"goods-limit-index"}},[a("div",{staticClass:"title"},[t._v("即将下架")]),t._l(t.list,(function(e){return a("div",{key:e.id,staticClass:"rush-item",on:{click:function(a){return a.stopPropagation(),a.preventDefault(),t.gotoDetail(e)}}},[a("div",{staticClass:"flex-j-sb top-time flex-a-c "},[a("div",{staticClass:"flex-a-c "},[a("div",{staticStyle:{color:"#333"}},[t._v(t._s(t.timestampToTime(e.start_time))+t._s(t.pageOptions.diy_name||"限时购"))]),a("i",{staticClass:"iconfont icon-ht_qd_miaosha",style:{color:t.pageOptions.background_color}})]),a("div",{staticClass:"flex",staticStyle:{color:"#999"}},[a("span",{staticStyle:{display:"block"}},[t._v(t._s(t.checkTime(e.start_time)?"距开始 ":"距结束 "))]),t.checkTime(e.start_time)?a("van-count-down",{staticClass:"count-down",attrs:{time:1e3*e.start_time-Date.parse(t.nowTimes)},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.days))]),a("span",{staticClass:"colon"},[t._v("天")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color,width:"15px"}},[t._v(t._s(e.hours))]),a("span",{staticClass:"colon"},[t._v(":")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.minutes))]),a("span",{staticClass:"colon"},[t._v(":")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.seconds))])]}}],null,!0)}):a("van-count-down",{staticClass:"count-down",attrs:{time:1e3*e.end_time-Date.parse(t.nowTimes)},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.days))]),a("span",{staticClass:"colon"},[t._v("天")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color,width:"15px"}},[t._v(t._s(e.hours))]),a("span",{staticClass:"colon"},[t._v(":")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.minutes))]),a("span",{staticClass:"colon"},[t._v(":")]),a("span",{staticClass:"time",style:{background:t.pageOptions.background_color}},[t._v(t._s(e.seconds))])]}}],null,!0)})],1)]),a("div",{staticClass:"flex rush-good",staticStyle:{"flex-wrap":"wrap"}},[a("img",{attrs:{src:e.img,alt:""}}),a("div",{staticClass:"flex-j-sb",staticStyle:{flex:"1","flex-direction":"column"}},[a("div",{staticClass:"line-clamp-2",staticStyle:{"font-size":"0.975rem","text-align":"left"}},[t._v(t._s(e.title))]),a("div",{staticStyle:{width:"65%"}},[a("van-progress",{staticStyle:{"margin-top":"0.5rem"},attrs:{color:t.pageOptions.progress_color,percentage:100*e.stock_scale,"show-pivot":!1,"stroke-width":"6px"}})],1),a("div",{staticClass:"flex-a-c flex-j-sb",staticStyle:{"margin-top":"0.75rem"}},[a("div",{staticClass:"price",style:{color:t.pageOptions.now_price_color}},[a("small",[t._v(t._s(t.$i18n.t("money")))]),t._v(t._s(e.vip_level_status&&1==e.vip_level_status.status?e.vip_level_status.word:e.pricenow)+" "),0!=e.priceold&&e.priceold!=e.pricenow?a("small",{staticStyle:{"text-decoration":"line-through",color:"#999"}},[t._v(t._s(t.$i18n.t("money"))+t._s(e.priceold))]):t._e()]),a("div",{staticClass:"btn",class:{"disabled-btn":0==Number(e.stock_scale)},style:{color:t.pageOptions.now_word_color,background:t.pageOptions.now_background_color}},[t._v("马上抢")])])])])])}))],2)},o=[],i=a("c7eb"),n=a("1da1"),r=(a("99af"),a("14d9"),a("a9e3"),a("ac0d")),c={mixins:[r["a"]],data:function(){return{nowTimes:new Date,list:[],isLoadMore:!0,current_page:1,last_page:1,pageOptions:{}}},created:function(){this.getData()},components:{},computed:{},mounted:function(){},methods:{getData:function(){var t=this;return Object(n["a"])(Object(i["a"])().mark((function e(){var a,s,o,n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.get("plugin.goods-limit-set.frontend.controllers.index.index",{},".");case 2:if(a=e.sent,s=a.result,o=a.msg,n=a.data,t.isLoadMore=!0,0!=s){e.next=9;break}return e.abrupt("return",t.$toast(o));case 9:t.pageOptions=n.set,t.list=n.list.data,t.current_page=n.list.current_page,t.last_page=n.list.last_page;case 13:case"end":return e.stop()}}),e)})))()},getMoreData:function(){var t=this;return Object(n["a"])(Object(i["a"])().mark((function e(){var a,s,o,n,r;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(t.current_page>=t.last_page)){e.next=2;break}return e.abrupt("return");case 2:return t.isLoadMore=!1,a=t.current_page+1,e.next=6,$http.get("plugin.goods-limit-set.frontend.controllers.index.index",{page:a},".");case 6:if(s=e.sent,o=s.result,n=s.msg,r=s.data,t.isLoadMore=!0,0!=o){e.next=13;break}return e.abrupt("return",t.$toast(n));case 13:t.list=t.list.concat(r.list.data),t.current_page=r.list.current_page;case 15:case"end":return e.stop()}}),e)})))()},gotoDetail:function(t){var e="",a={id:t.id};switch(t.plugin_id){case 69:e="grab_group";break;case 78:a.mode=1,e="newRetailSalesGood";break;default:e="goods";break}this.$router.push(this.fun.getUrl(e,a))},checkTime:function(t){return!!t&&(new Date).getTime()/1e3<t},timestampToTime:function(t){if(!Number(t)||""==t)return"";var e=new Date(1e3*t),a=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"",s=(e.getDate()<10?"0"+e.getDate():e.getDate())+"";return a+"月"+s+"日"}}},l=c,d=(a("fd98"),a("2877")),u=Object(d["a"])(l,s,o,!1,null,"38efceea",null);e["default"]=u.exports},d2ff:function(t,e,a){var s=a("24fb");e=s(!1),e.push([t.i,"#goods-limit-index[data-v-38efceea]{min-height:100vh;padding:1.25rem .875rem 3.125rem}#goods-limit-index .title[data-v-38efceea]{width:12.5rem;height:3.4375rem;line-height:3.4375rem;background-size:100%;font-size:22px;font-weight:700;color:#fff;margin:0 auto 1.25rem}.rush-item[data-v-38efceea]{margin-top:.75rem}.rush-item .top-time[data-v-38efceea]{padding:.5rem;background:#fff;border-radius:.5rem}.rush-item .icon-ht_qd_miaosha[data-v-38efceea]{text-align:center;color:#333;line-height:21px;margin-left:4px}.rush-item .rush-good[data-v-38efceea]{background:#fff;border-radius:.5rem;margin:.5rem 0 0 0;padding:.625rem}.rush-item .rush-good img[data-v-38efceea]{max-width:100%;height:6.625rem;border-radius:.375rem;margin-right:.875rem}.rush-item .rush-good .btn[data-v-38efceea]{padding:0 .75rem;line-height:1.375rem;background:#000;color:#fff;border-radius:.75rem;font-size:.8125rem}.rush-item .rush-good .disabled-btn[data-v-38efceea]{background-color:#999!important;cursor:not-allowed;opacity:.5}.rush-item .rush-good .price[data-v-38efceea]{font-size:1rem}.rush-item .rush-good small[data-v-38efceea]{font-size:.75rem}.rush-item .count-down .time[data-v-38efceea]{padding:2px 4px;font-size:12px;border-radius:4px;color:#fff}.rush-item .count-down .colon[data-v-38efceea]{color:#999;padding:0 2px}",""]),t.exports=e},dbd0:function(t,e,a){var s=a("d2ff");s.__esModule&&(s=s.default),"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=a("499e").default;o("701aa6a6",s,!0,{sourceMap:!1,shadowMode:!1})},fd98:function(t,e,a){"use strict";a("dbd0")}}]); |