You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/h5/static/js/pages-seckill.98a442d1.js

1 line
25 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-seckill"],{1015:function(t,e,i){"use strict";var n=i("4ea4");i("99af"),i("7db0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("96cf");var o=n(i("1da1")),a=i("5cb4"),r={data:function(){return{timeList:[],goodsList:[],pageIndex:1,length:15,activityTime:{},loadingStatus:"loading",isLast:!1}},mounted:function(){this.getTimeList()},onReachBottom:function(){if("nomore"===this.loadingStatus)return!1;this.pageIndex++,this.getGoodsList()},methods:{getTimeList:function(){var t=this;return(0,o.default)(regeneratorRuntime.mark((function e(){var i,n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,a.ApiGetSeckillTimes)();case 2:if(i=e.sent,n=i.error,o=i.result,!n){e.next=8;break}return uni.$u.toast(n.message),e.abrupt("return",!1);case 8:t.timeList=o,t.activityTime=o.find((function(t){return t.isInProgress}))||o[0],t.getGoodsList();case 11:case"end":return e.stop()}}),e)})))()},getGoodsList:function(){var t=this;return(0,o.default)(regeneratorRuntime.mark((function e(){var i,n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loadingStatus="loading",e.next=3,(0,a.ApiGetSeckillGoods)({pageIndex:t.pageIndex,length:t.length,activityTimeId:t.activityTime.id});case 3:if(i=e.sent,n=i.error,o=i.result,!n){e.next=9;break}return uni.$u.toast(n.message),e.abrupt("return",!1);case 9:t.goodsList=t.goodsList.concat(o.records),o.records.length<t.length&&(t.loadingStatus="nomore");case 11:case"end":return e.stop()}}),e)})))()},changeTime:function(t){this.activityTime=t,this.pageIndex=1,this.goodsList=[],this.getGoodsList()}}};e.default=r},"10b3":function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={uLineProgress:i("2433").default,uLoadmore:i("c153").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-image",{staticClass:"back",attrs:{src:i("82ab")},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router.back()}}}),n("v-uni-image",{staticClass:"banner",attrs:{src:i("b08e")}}),n("v-uni-view",{staticClass:"tab"},t._l(t.timeList,(function(e){return n("v-uni-view",{key:e.id,staticClass:"tab--item",class:{"tab--item__active":e.id===t.activityTime.id},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.changeTime(e)}}},[n("v-uni-text",{staticClass:"tab--time"},[t._v(t._s(e.timeName))]),n("v-uni-text",[t._v(t._s(e.isInProgress?"抢购中":"即将开抢"))])],1)})),1),t._l(t.goodsList,(function(e){return n("v-uni-view",{key:e.productId,staticClass:"goods-item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.$Router.push("/goodsDetail?id="+e.productId)}}},[n("v-uni-image",{staticClass:"goods-item--image",attrs:{src:e.productMainPicture}}),n("v-uni-view",{staticClass:"goods-item--con"},[n("v-uni-text",{staticClass:"goods-item--title"},[t._v(t._s(e.productName))]),n("v-uni-view",{staticClass:"goods-item--prog-box"},[n("u-line-progress",{staticClass:"goods-item--prog",attrs:{percentage:30,showText:!1,height:"11rpx",activeColor:"#FE0A16",inactiveColor:"#FF8E8F"}}),n("v-uni-text",[t._v("仅剩"+t._s(e.stock)+"件")])],1),n("v-uni-view",{staticClass:"goods-item--operation"},[n("v-uni-view",[n("v-uni-view",{staticClass:"goods-item--price"},[t._v("¥"+t._s(e.activityPrice))]),n("v-uni-text",{staticClass:"goods-item--orgPrice"},[t._v("¥"+t._s(e.originalPrice))])],1),t.activityTime.isInProgress?[e.stock>0?n("v-uni-button",{staticClass:"goods-item--btn"},[t._v("立即抢购")]):n("v-uni-button",{staticClass:"goods-item--btn goods-item--btn__disable"},[t._v("已售罄")])]:n("v-uni-button",{staticClass:"goods-item--btn"},[t._v("即将开抢")])],2)],1)],1)})),n("u-loadmore",{attrs:{status:t.loadingStatus,color:"#FF8384",iconColor:"#FF8384",nomoreText:"我也是有底线的啦~"}})],2)},a=[]},"1de5":function(t,e,i){"use strict";t.exports=function(t,e){return e||(e={}),t=t&&t.__esModule?t.default:t,"string"!==typeof t?t:(/^['"].*['"]$/