rule.js 3.9 KB

12
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/rule/rule"],{336:function(t,e,n){"use strict";(function(t,e){var i=n(4);n(26);i(n(25));var o=i(n(337));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n(1)["default"],n(2)["createPage"])},337:function(t,e,n){"use strict";n.r(e);var i=n(338),o=n(340);for(var s in o)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(s);n(342);var r,a=n(45),c=Object(a["default"])(o["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],r);c.options.__file="pageA/rule/rule.vue",e["default"]=c.exports},338:function(t,e,n){"use strict";n.r(e);var i=n(339);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},339:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return o})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return s})),n.d(e,"components",(function(){return i}));var o=function(){var t=this,e=t.$createElement;t._self._c},s=!1,r=[];o._withStripped=!0},340:function(t,e,n){"use strict";n.r(e);var i=n(341),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},341:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{selectArr:[],subIndex:[],specs:[],zu:[],formattedItems:[]}},onLoad:function(){},created:function(){this.rulea()},methods:{addValue:function(t){this.specs[t].values.push("")},addSpec:function(){this.specs.push({name:"",values:[]})},rulea:function(){var t=this,e=[];console.log("specs",this.specs),this.specs.forEach((function(t){e.push(t.values)})),this.$nextTick((function(){t.zu=t.cartesianProductOf.apply(t,e),t.zu&&t.formatItems()}))},removeValue:function(t,e){console.log("specIndex",t),console.log("valueIndex",e),this.specs[t].values.splice(e,1),this.rulea()},cartesianProductOf:function(){return Array.prototype.reduce.call(arguments,(function(t,e){var n=[];return t.forEach((function(t){e.forEach((function(e){n.push(t.concat([e]))}))})),console.log("ret",n),n}),[[]])},formatItems:function(){var t=this;this.formattedItems.map((function(t){})),console.log("this.formattedItems",this.formattedItems);var e=JSON.parse(JSON.stringify(this.formattedItems));this.formattedItems=[];this.zu.forEach((function(e,n){if(t.zu){var i=[];i.push({height:e.height,stock_total:e.stock_total,weight:e.weight,length:e.length,width:e.width,price:e.price,image:e.image,is_sales:e.is_sales});var o=[],s=[],r=[],a=[];e.forEach((function(t,e){o.push(t.name),s.push(t.name_en),r.push(t.name_es),a.push(t.name_ita)})),console.log("itemV1",o),console.log("itemV2",s),console.log("itemV3",r),console.log("itemV4",a),t.formattedItems.push({item:o.join(","),item_en:s.join(","),item_es:r.join(","),item_ita:a.join(","),height:"0",stock_total:"0",weight:"0",length:"0",width:"0",price:"0.00",image:"",is_sales:!0})}else t.formattedItems=[]})),console.log("formlist",e),console.log("formattedItems",this.formattedItems),this.formattedItems.forEach((function(n,i){e.forEach((function(o,s){e.length==t.formattedItems.length?i==s&&(n.stock_total=o.stock_total,n.height=o.height,n.weight=o.weight,n.weight=o.weight,n.width=o.width,n.price=o.price,n.image=o.image,n.is_sales=o.is_sales):n.item==o.item&&(n.height=o.height,n.stock_total=o.stock_total,n.weight=o.weight,n.weight=o.weight,n.width=o.width,n.price=o.price,n.image=o.image,n.is_sales=o.is_sales)}))}))}}};e.default=i},342:function(t,e,n){"use strict";n.r(e);var i=n(343),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=o.a},343:function(t,e,n){}},[[336,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pageA/rule/rule.js.map