u-pick.js 4.5 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/u-index-plugins/u-pick"],{3818:function(t,e,n){},"6b6e":function(t,e,n){"use strict";n.r(e);var i=n("df56"),o=n("b04cf");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("9624");var s,a=n("f0c5"),u=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"c1a44ad6",null,!1,i["a"],s);e["default"]=u.exports},9624:function(t,e,n){"use strict";var i=n("3818"),o=n.n(i);o.a},b04cf:function(t,e,n){"use strict";n.r(e);var i=n("fe4b"),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},df56: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.goodsList,(function(e,n){var i=t.__get_orig(e),o=t.isShowStock(e),r=t.isShowMemPrice(e),s=t.isShowVip(e);return{$orig:i,m0:o,m1:r,m2:s}})):null);t.$mp.data=Object.assign({},{$root:{l0:n}})},r=[]},fe4b:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function o(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 r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=function(){n.e("components/page-component/u-index-plugins/u-index-plugins").then(function(){return resolve(n("41a5"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/page-component/u-goods-list/u-ordinary-list").then(function(){return resolve(n("1f2b"))}.bind(null,n)).catch(n.oe)},c={name:"u-pick",props:{activity:{type:Object,default:function(){return{}}},theme:Object,index:Number,is_required:Boolean,page_id:Number,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:a,uOrdinaryList:u},computed:r(r({},(0,i.mapGetters)("mallConfig",{getTheme:"getTheme"})),{},{copyList:function(){if(this.newData)return this.newData.list}}),methods:{router:function(t){this.$emit("router",t)},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},loadData:function(){var t=this,e={type:0===this.page_id?"mall":"diy",key:"pick",page_id:this.page_id,index:this.index};this.goods_num&&(e.goods_num=this.goods_num),this.$request({url:this.$api.index.extra,data:e}).then((function(e){if(t.newData=e.data,0===e.code&&e.data&&0===t.page_id){var n=t.$storage.getStorageSync("INDEX_MALL");n.home_pages[t.index].data=t.newData,t.$storage.setStorageSync("INDEX_MALL",n)}}))},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))}}},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].data},watch:{copyList:{handler:function(t){this.$validation.empty(t)||(this.tempList=this.cloneData(t),this.splitData())}}},destroyed:function(){clearTimeout(this.time)}};e.default=c}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/page-component/u-index-plugins/u-pick-create-component',
  4. {
  5. 'components/page-component/u-index-plugins/u-pick-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("6b6e"))
  7. })
  8. },
  9. [['components/page-component/u-index-plugins/u-pick-create-component']]
  10. ]);