| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["marketing-curPrice-index-index"],{"00c07":function(t,e,i){"use strict";i.r(e);var n=i("adf6"),a=i("43d6");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("e173");var r=i("828b"),c=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"1ffa6a56",null,!1,n["a"],void 0);e["default"]=c.exports},"0195":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-f55d4a30] .u-form-item--right__content__slot > uni-view,[data-v-f55d4a30] .u-form-item--right__content__slot > div,[data-v-f55d4a30] .u-form-item--right__content__slot > span,[data-v-f55d4a30] .u-form-item--right__content__slot > uni-text{width:100%}.toolsMore[data-v-f55d4a30]{padding:%?30?% 0;text-align:center;color:#c1c1c1;font-size:%?22?%}',""]),t.exports=e},"181d0":function(t,e,i){var n=i("a5ab");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("1a841dae",n,!0,{sourceMap:!1,shadowMode:!1})},"1c62":function(t,e,i){"use strict";var n=i("a779"),a=i.n(n);a.a},"267e":function(t,e,i){"use strict";var n=i("181d0"),a=i.n(n);a.a},"2c76":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{},[i("v-uni-view",{staticClass:"u-sticky-wrap",class:[t.elClass],style:{height:t.fixed?t.height+"px":"auto",backgroundColor:t.bgColor}},[i("v-uni-view",{staticClass:"u-sticky",style:{position:t.fixed?"fixed":"static",top:t.stickyTop+"px",left:t.left+"px",width:"auto"==t.width?"auto":t.width+"px",zIndex:t.uZIndex}},[t._t("default")],2)],1)],1)},a=[]},"3dcd":function(t,e,i){"use strict";i.r(e);var n=i("afd1"),a=i("d44d");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("1c62");var r=i("828b"),c=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"f55d4a30",null,!1,n["a"],void 0);e["default"]=c.exports},4179:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n={props:{status:{type:Number,default:1}},data:function(){return{}},computed:{getMoreStatus:function(){var t;switch(this.status){case 1:t="loadmore";break;case 2:t="loading";break;case 3:t="nomore";break}return t}}};e.default=n},"43d6":function(t,e,i){"use strict";i.r(e);var n=i("fb40"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"61b0":function(t,e,i){"use strict";i.r(e);var n=i("2c76"),a=i("a99f");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("9d77");var r=i("828b"),c=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"1ef8cf66",null,!1,n["a"],void 0);e["default"]=c.exports},"643f":function(t,e,i){"use strict";i.r(e);var n=i("a533"),a=i("f38a");for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("267e");var r=i("828b"),c=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"c8d110ba",null,!1,n["a"],void 0);e["default"]=c.exports},"6a01":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */[data-v-1ef8cf66] .u-form-item--right__content__slot > uni-view,[data-v-1ef8cf66] .u-form-item--right__content__slot > div,[data-v-1ef8cf66] .u-form-item--right__content__slot > span,[data-v-1ef8cf66] .u-form-item--right__content__slot > uni-text{width:100%}.u-sticky[data-v-1ef8cf66]{z-index:9999999999}',""]),t.exports=e},"8d11":function(t,e,i){var n=i("6a01");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("1c9053b7",n,!0,{sourceMap:!1,shadowMode:!1})},"9d77":function(t,e,i){"use strict";var n=i("8d11"),a=i.n(n);a.a},a533:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"contentBd"},[i("v-uni-scroll-view",{staticClass:"tabList",attrs:{"scroll-x":!0}},t._l(t.tab,(function(e,n){return i("v-uni-view",{key:n,class:["item",t.active===e.id?"active":""],on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.$emit("handle","tab",e)}}},[t._v(t._s(e.name))])})),1),t._l(t.items,(function(e,n){return i("v-uni-view",{key:n,staticClass:"popup-list-item",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.$emit("handle","detail",e)}}},[i("v-uni-view",{staticClass:"good-info"},[i("v-uni-image",{staticClass:"good-pic",attrs:{src:e.cover_pic,mode:""}}),i("v-uni-view",{staticClass:"info-section"},[i("v-uni-view",{staticClass:"good-name"},[t._v(t._s(e.name))]),i("v-uni-view",{staticClass:"good-count"},[i("v-uni-text",[t._v(t._s(e.userCount||0))]),t._v("人正在参与")],1),i("v-uni-view",{staticClass:"good-min-price"},[t._v("最低可砍至"),i("v-uni-view",{staticClass:"good-price"},[i("v-uni-text",[t._v("¥")]),i("v-uni-text",[t._v(t._s(t._f("priceBeforeZero")(e.price)))]),i("v-uni-text",[t._v(t._s(t._f("priceAfterZero")(e.price)))])],1)],1),i("v-uni-view",{staticClass:"good-select"},[i("v-uni-view",{staticClass:"good-select-let"},[t._v("原价"),i("v-uni-view",{staticClass:"good-price"},[i("v-uni-text",[t._v("¥")]),i("v-uni-text",{staticStyle:{"font-weight":"normal"}},[t._v(t._s(t._f("priceBeforeZero")(e.oldPrice)))]),i("v-uni-text",[t._v(t._s(t._f("priceAfterZero")(e.oldPrice)))])],1)],1),i("v-uni-view",{staticClass:"good-btn"},[t._v("立即参与")])],1)],1)],1)],1)}))],2)},a=[]},a5ab:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'.contentBd[data-v-c8d110ba]{padding:0 %?24?%}.tabList[data-v-c8d110ba]{position:-webkit-sticky;position:sticky;left:0;top:%?84?%;right:0;background:#f0f0f0;z-index:4;padding:%?10?% 0;white-space:nowrap}.tabList .item[data-v-c8d110ba]{position:relative;display:inline-block;margin-right:%?40?%;padding-bottom:%?8?%;vertical-align:middle;text-align:center;font-size:%?28?%;color:#262626}.tabList .item.active[data-v-c8d110ba]{font-weight:700}.tabList .item.active[data-v-c8d110ba]:after{content:"";position:absolute;left:50%;bottom:0;margin-left:%?-17?%;width:%?34?%;height:%?6?%;background:#f0250e}.popup-list-item[data-v-c8d110ba]{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:%?24?%;padding:%?24?% %?26?%;background:#fff;border-radius:%?24?%}.popup-list-item[data-v-c8d110ba]:first-of-type{margin-top:%?16?%}.popup-list-item .good-info[data-v-c8d110ba]{position:relative;width:100%;display:flex;align-items:flex-start}.popup-list-item .good-info .good-pic[data-v-c8d110ba]{width:%?224?%;height:%?224?%;background:#f2f2f2;border-radius:%?10?%;display:block;margin-right:%?20?%;flex-shrink:0}.popup-list-item .good-info .info-section[data-v-c8d110ba]{flex:1;overflow:hidden}.popup-list-item .good-info .info-section .good-name[data-v-c8d110ba]{font-size:%?28?%;font-family:PingFang SC;font-weight:600;line-height:%?40?%;max-height:%?80?%;color:#262626;display:-webkit-box;white-space:normal;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all;overflow:hidden}.popup-list-item .good-info .info-section .good-sku[data-v-c8d110ba]{max-width:40.27vw;font-size:3.2vw;font-weight:400;line-height:4.27vw;color:#999;margin-top:1.07vw;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.good-price[data-v-c8d110ba]{display:flex;align-items:baseline;font-size:%?24?%}.good-price uni-text[data-v-c8d110ba]:nth-child(2){font-size:%?32?%;font-weight:600}.popup-list-item[data-v-c8d110ba]:last-child{margin-bottom:0}.good-btn[data-v-c8d110ba]{width:%?180?%;height:%?60?%;text-align:center;line-height:%?60?%;background:linear-gradient(90deg,#ff1b22,#ff7333);border-radius:32px;font-size:%?28?%;font-weight:700;color:#fff}.good-count[data-v-c8d110ba]{padding:%?10?% 0 %?14?%;color:#8c8c8c;font-size:%?24?%}.good-count uni-text[data-v-c8d110ba]{color:#f0250e}.good-min-price[data-v-c8d110ba]{position:relative;top:%?8?%;display:flex;align-items:flex-end;color:#f0250e;line-height:1;font-size:%?24?%}.good-min-price .good-price uni-text[data-v-c8d110ba]{color:#f0250e}.good-select[data-v-c8d110ba]{display:flex;justify-content:space-between;align-items:flex-end}.good-select .good-select-let[data-v-c8d110ba]{flex:1;display:flex;align-items:flex-end;padding-bottom:%?4?%;overflow:hidden;font-size:%?24?%;color:#8c8c8c}.good-select .good-select-let .good-price[data-v-c8d110ba]{position:relative}.good-select .good-select-let .good-price[data-v-c8d110ba]:after{content:"";position:absolute;left:0;top:50%;width:100%;height:1px;background:#8c8c8c}.good-select .good-select-let .good-price uni-text[data-v-c8d110ba]{font-size:%?24?%}.good-select .good-select-let .good-price uni-text uni-text[data-v-c8d110ba]:nth-child(2){font-size:%?24?%;font-weight:400}',""]),t.exports=e},a779:function(t,e,i){var n=i("0195");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("3d3bab13",n,!0,{sourceMap:!1,shadowMode:!1})},a99f:function(t,e,i){"use strict";i.r(e);var n=i("be9f"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},adf6:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uSticky:i("61b0").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"content"},[i("u-sticky",{attrs:{"h5-nav-height":"0"}},[i("v-uni-view",{staticClass:"search"},[i("v-uni-view",{staticClass:"searchBox"},[i("i",{staticClass:"iconfont icon-sousuo"}),i("v-uni-input",{attrs:{type:"text","placeholder-style":"color:#9B9B9B;",placeholder:"请输入商品名称"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.clear.apply(void 0,arguments)}},model:{value:t.goods_name,callback:function(e){t.goods_name=e},expression:"goods_name"}})],1)],1)],1),i("v-uni-view",{staticClass:"banner"},[i("v-uni-swiper",{staticClass:"bannerItem",attrs:{autoplay:!0,indicatorDots:!0,duration:500}},t._l(t.banner,(function(e){return i("v-uni-swiper-item",{key:e.id,staticClass:"bannerItem"},[i("v-uni-image",{staticClass:"bannerItem",attrs:{mode:"aspectFill",src:e.pic_url},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.handle("goUrl",e)}}})],1)})),1)],1),i("pageList",{attrs:{tab:t.tab,active:t.active,items:t.goods},on:{handle:function(e){arguments[0]=e=t.$handleEvent(e),t.handle.apply(void 0,arguments)}}}),i("v-uni-view",{staticClass:"footerBox"},[i("toolsMore",{attrs:{status:t.moreStatus}})],1),i("v-uni-view",{staticClass:"myOrder",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$utils.toUrl("/marketing/curPrice/order/list/index")}}},[t._v("我的砍价")])],1)},o=[]},afd1:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var n={uLoadmore:i("c9bb").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"toolsMore",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$emit("more")}}},[i("u-loadmore",{attrs:{status:t.getMoreStatus,icon:!0}})],1)},o=[]},afd5:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'.footerBox[data-v-1ffa6a56]{padding-bottom:calc(env(safe-area-inset-bottom) + %?120?%)}.content[data-v-1ffa6a56]{background:#f0f0f0;min-height:100vh}.search[data-v-1ffa6a56]{padding:%?10?% %?30?%;background:#f0250e}.searchBox[data-v-1ffa6a56]{display:flex;align-items:center;padding:0 %?24?%;border-radius:32px;background:#f2f2f2}.searchBox uni-input[data-v-1ffa6a56]{margin-left:%?10?%;flex:1;height:%?64?%;overflow:hidden;font-size:%?26?%;color:#333}.searchBox .iconfont[data-v-1ffa6a56]{color:#9b9b9b}.bannerItem[data-v-1ffa6a56]{position:relative;z-index:2;height:%?240?%;width:100%;border-radius:10px}.banner[data-v-1ffa6a56]{position:relative;padding:%?20?% %?24?% %?10?%}.banner[data-v-1ffa6a56]:after{content:"";position:absolute;left:0;top:0;height:50%;width:100%;background:linear-gradient(1turn,#f5f5f5,#f0250e)}.myOrder[data-v-1ffa6a56]{position:fixed;right:0;top:70%;display:flex;align-items:center;justify-content:center;width:%?140?%;height:%?54?%;background:#fff;box-shadow:0 %?6?% %?12?% rgba(0,0,0,.05);border-radius:%?28?% %?0?% %?0?% %?28?%;font-size:%?24?%;color:#f0250e;font-weight:700}',""]),t.exports=e},b36b:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.cutPriceConf=function(t,e){return a.default.GET("/activity/cut-price-conf",t,e)},e.cutPriceGoodsList=function(t,e){return a.default.GET("/activity/cut-price-goods-list",t,e)},e.cutPriceInfo=function(t,e){return a.default.GET("/activity/cut-price-info",t,e)},e.cutPriceLogList=function(t,e){return a.default.GET("/activity/cut-price-log-list",t,e)},e.cutPriceOrderByGoodsId=function(t,e){return a.default.GET("/activity/cut-price-order-by-goods-id",t,e)},e.cutPriceOrderCreate=function(t,e){return a.default.GET("/activity/cut-price-order-create",t,e)},e.cutPriceOrderInfo=function(t,e){return a.default.POST("/activity/cut-price-order-info",t,e)},e.cutPriceOrderList=function(t,e){return a.default.GET("/activity/cut-price-order-list",t,e)};var a=n(i("cc29"))},bc22:function(t,e,i){var n=i("afd5");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("53024c62",n,!0,{sourceMap:!1,shadowMode:!1})},be9f:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa"),i("9c4e");var n={name:"u-sticky",props:{offsetTop:{type:[Number,String],default:0},index:{type:[Number,String],default:""},enable:{type:Boolean,default:!0},h5NavHeight:{type:[Number,String],default:44},bgColor:{type:String,default:"#ffffff"},zIndex:{type:[Number,String],default:""}},data:function(){return{fixed:!1,height:"auto",stickyTop:0,elClass:this.$u.guid(),left:0,width:"auto"}},watch:{offsetTop:function(t){this.initObserver()},enable:function(t){0==t?(this.fixed=!1,this.disconnectObserver("contentObserver")):this.initObserver()}},computed:{uZIndex:function(){return this.zIndex?this.zIndex:this.$u.zIndex.sticky}},mounted:function(){this.initObserver()},methods:{initObserver:function(){var t=this;this.enable&&(this.stickyTop=0!=this.offsetTop?uni.upx2px(this.offsetTop)+this.h5NavHeight:this.h5NavHeight,this.disconnectObserver("contentObserver"),this.$uGetRect("."+this.elClass).then((function(e){t.height=e.height,t.left=e.left,t.width=e.width,t.$nextTick((function(){t.observeContent()}))})))},observeContent:function(){var t=this;this.disconnectObserver("contentObserver");var e=this.createIntersectionObserver({thresholds:[.95,.98,1]});e.relativeToViewport({top:-this.stickyTop}),e.observe("."+this.elClass,(function(e){t.enable&&t.setFixed(e.boundingClientRect.top)})),this.contentObserver=e},setFixed:function(t){var e=t<this.stickyTop;e?this.$emit("fixed",this.index):this.fixed&&this.$emit("unfixed",this.index),this.fixed=e},disconnectObserver:function(t){var e=this[t];e&&e.disconnect()}},beforeDestroy:function(){this.disconnectObserver("contentObserver")}};e.default=n},d08d:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa"),i("5ef2");var n={props:{tab:{type:Array,default:function(){return[]}},items:{type:Array,default:function(){return[]}},active:{type:[String,Number],default:""}},filters:{priceBeforeZero:function(t){return t||(t=""),t.indexOf(".")<0?"".concat(t,"."):t.substr(0,t.indexOf("."))},priceAfterZero:function(t){return t||(t=""),t.indexOf(".")<0?"00":t.substr(t.indexOf("."),t.length)}},data:function(){return{}}};e.default=n},d44d:function(t,e,i){"use strict";i.r(e);var n=i("4179"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},e173:function(t,e,i){"use strict";var n=i("bc22"),a=i.n(n);a.a},f38a:function(t,e,i){"use strict";i.r(e);var n=i("d08d"),a=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},fb40:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c223"),i("aa9c"),i("e966"),i("bf0f"),i("2797"),i("aa77");var a=n(i("b7c7")),o=n(i("2634")),r=n(i("2fdc")),c=n(i("643f")),s=n(i("3dcd")),d=i("b36b"),u={components:{pageList:c.default,toolsMore:s.default},data:function(){return{goods:[],active:"",tab:[],goods_name:"",isEnd:!1,limit:10,page:1,moreStatus:1,type:0,activity_id:"",banner:[],min_price:"0.00"}},onLoad:function(t){var e=this;return(0,r.default)((0,o.default)().mark((function i(){return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:t.activity_cut_price_id&&(e.activity_id=t.activity_cut_price_id),e.init(e.clear);case 2:case"end":return i.stop()}}),i)})))()},methods:{init:function(t){var e=this;return(0,r.default)((0,o.default)().mark((function i(){var n,a,r;return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,(0,d.cutPriceInfo)({activity_id:e.activity_id});case 2:n=i.sent,n.code||(a=n.cat,r=n.banner,e.tab=a||[],e.banner=r||[],n.data&&(e.min_price=n.data.min_price||"0.00"),a&&a.length&&(e.active=a[0].id)),t&&t();case 5:case"end":return i.stop()}}),i)})))()},clear:function(){var t=this;return(0,r.default)((0,o.default)().mark((function e(){return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.goods=[],t.isEnd=!1,t.page=1,t.getGoodsList();case 4:case"end":return e.stop()}}),e)})))()},handle:function(t,e){switch(t){case"tab":this.active!==e.id&&(this.active=e.id,this.clear());break;case"goUrl":if(e.url){var i=JSON.parse(e.url),n=i.link,a=i.open_type;this.$utils.toUrl(n,a)}break;case"detail":this.$utils.toUrl("/goods/goods/goods?id=".concat(e.id,"&activity_cut_price_id=").concat(e.activity_id));break}},getGoodsList:function(){var t=this;return(0,r.default)((0,o.default)().mark((function e(){var i,n,r,c,s,u,f,l,v,p;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.limit,n=t.page,r=t.goods_name,c=t.active,s=t.activity_id,t.moreStatus=2,e.next=4,(0,d.cutPriceGoodsList)({pageSize:i,page:n,goods_name:r,cat_id:c,activity_id:s});case 4:u=e.sent,u.code||(f=u.goods_ext.list,t.moreStatus=1,uni.stopPullDownRefresh(),l=t.goods,v=u.goods_ext.totalCount,p=u.goods_list,p.length&&(p=t.mergeGoodsList(f,p),l.push.apply(l,(0,a.default)(p)),t.page=t.page+1),l.length>=parseInt(v)&&(t.isEnd=!0,t.moreStatus=3));case 6:case"end":return e.stop()}}),e)})))()},mergeGoodsList:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.forEach((function(e){var i=t.find((function(t){return parseInt(e.id)===parseInt(t.goods_id)}));i&&(e.userCount=i.userCount,e.oldPrice=e.price,e.price=i.price,e.activity_id=i.activity_id)})),e}},onReachBottom:function(){this.isEnd||this.getGoodsList()},onPullDownRefresh:function(){this.clear()}};e.default=u}}]);
|