(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/u-index-plugins/u-pintuan"],{"0a4e":function(t,e,n){},"3b2f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("a34a")),o=n("2f62");function r(t){return t&&t.__esModule?t:{default:t}}function a(t,e,n,i,o,r,a){try{var s=t[r](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(i,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function s(t){a(r,i,o,s,u,"next",t)}function u(t){a(r,i,o,s,u,"throw",t)}s(void 0)}))}}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(){n.e("components/page-component/u-index-plugins/u-index-plugins").then(function(){return resolve(n("9f23"))}.bind(null,n)).catch(n.oe)},f=function(){Promise.all([n.e("common/vendor"),n.e("components/page-component/u-goods-list/u-ordinary-list")]).then(function(){return resolve(n("a71e"))}.bind(null,n)).catch(n.oe)},d={name:"u-pintuan",props:{theme:{type:Object},index:{type:Number},page_id:{type:Number},is_required:{type:Boolean},appImg:{type:Object,default:function(){return{plugins_out:""}}},appSetting:{type:Object,default:function(){return{is_show_stock:1,sell_out_pic:"",is_use_stock:1}}}},data:function(){return{newData:{},tempList:[],goodsList:[],time:0,style:"1",goods_num:10}},components:{uIndexPlugins:l,uOrdinaryList:f},computed:c(c({},(0,o.mapGetters)("mallConfig",{getTheme:"getTheme"})),{},{copyList:function(){return this.newData}}),mounted:function(){var t=this.$storage.getStorageSync("INDEX_MALL");this.style=t.home_pages[this.index].style,this.goods_num=t.home_pages[this.index].goods_num,this.is_required?this.loadData():this.newData=t.home_pages[this.index].list},methods:{isShowMemPrice:function(t){return 1===t.is_level&&1!==t.is_negotiable?1:0},isShowVip:function(t){return t.vip_card_appoint&&t.vip_card_appoint.discount>0&&1!==t.is_negotiable?1:0},isShowStock:function(t){return 1===this.appSetting.is_show_stock&&0===t.goods_stock?1:0},router:function(t){this.$emit("router",t)},loadData:function(){var t=this;return s(i.default.mark((function e(){var n,o,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={type:0===t.page_id?"mall":"diy",key:"pintuan",page_id:t.page_id,index:t.index},t.goods_num&&(n.goods_num=t.goods_num),e.next=4,t.$request({url:t.$api.index.extra,data:n});case 4:o=e.sent,t.newData=o.data,0===o.code&&o.data&&0===t.page_id&&(r=t.$storage.getStorageSync("INDEX_MALL"),r.home_pages[t.index].list=t.newData,t.$storage.setStorageSync("INDEX_MALL",r));case 7:case"end":return e.stop()}}),e)})))()},cloneData:function(t){return JSON.parse(JSON.stringify(t))},splitData:function(){var t=this;if(this.tempList.length){var e=this.tempList[0];this.goodsList.push(e),this.tempList.splice(0,1),this.tempList.length&&(this.timeOut=setTimeout((function(){t.splitData()}),200))}}},watch:{copyList:{handler:function(t){this.$validation.empty(t)||(this.tempList=this.cloneData(t),this.splitData())}}},destroyed:function(){clearTimeout(this.time)}};e.default=d},"61b5":function(t,e,n){"use strict";var i=n("0a4e"),o=n.n(i);o.a},"735a":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,"1"===t.style?t.__map(t.newData.list,(function(e,n){var i=t.__get_orig(e),o=t.isShowStock(e),r=t.isShowMemPrice(e),a=t.isShowVip(e);return{$orig:i,m0:o,m1:r,m2:a}})):null);t.$mp.data=Object.assign({},{$root:{l0:n}})},r=[]},b220:function(t,e,n){"use strict";n.r(e);var i=n("3b2f"),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a},eff7:function(t,e,n){"use strict";n.r(e);var i=n("735a"),o=n("b220");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("61b5");var a,s=n("f0c5"),u=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"2dc77a62",null,!1,i["a"],a);e["default"]=u.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/page-component/u-index-plugins/u-pintuan-create-component',
    {
        'components/page-component/u-index-plugins/u-pintuan-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("eff7"))
        })
    },
    [['components/page-component/u-index-plugins/u-pintuan-create-component']]
]);
