vendor.js 9.8 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["subpackage/diyComponents/common/vendor"],{"69c7":function(t,i){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAB4FBMVEXR09MAAABTu0f/ybFEQ0j+ybFSukb6+vpAP0XS1NX////1sJLzr5Hd3t73sJP19fXW2NjV1dfP09TT1dZPu0RNukL8/PzY2dnt7u7o6Ojw8fH/zrXh4eG+vr6UlJUrKysHBwdXvEqYmZpev1Li5OQfHx8WFhYPDw+tra76vqONjY5ubm9sxGLZ29vNz8+ztLVYvUzfysD5sJVJR0s6PEL39/fr9+nQ0NDmv6t9zHRiYmJVVFlLSkw8PDwyMjImJibN1M/3z7yvzqyGh4lQT1Pq7Ozq6+vn9uXk5eXZ8NfW09LK0szG0sblysC6u7280bv6zLT2tZiDxntzx2pmwltbvlDa1NHj1Mzd0cvq08f7zrfqwrD9xqz7wqr5up6Xy5GahHt6x3FlZWluYWDj4+PIysvExsa/wMHC57665LWz4a7xv6mlpaWkpKSe2ZiRkZGV1Y6ylYfNs4R+fn5zc3d0dHR4a2dhXWBZUlM7OzvY0c7z0sPxx6+jpKaq3KSozqTcuKSkzqDzuaCcnqDntp/LqZjEpZSOyYiljYG7s3yxs3aDumTx+vDJ6cXvybrss5S7nI+N0oWI0H98fH+DxHaFc22WtmqezJrlpouIxYHAknumtXKNeXKif2+Ib2R1uFqrLwAZAAAGpklEQVRYw5TU7WvTQBzA8Z+04XLXpUkM5KHpE6FPtrRF2zFZuw3pNsbAUt/odCpldduLKTKc29QNxuZkr0QQQUT9W72lbdpLL1W/r0qTfPgduRzcCChVSswSgmTTykiGigGwakgZy5QRIbOJUiroOT6YXizOIYJMSzI0YNIMyTLppbniYvqfwXwzaSEUyxgYaFhThqnYRbGRiSFkJZv5fwLTKSdG0IqkuQMpuLJbuHCcZDLpnFZ3QNX6g0oriMScVPrvYPbNC4RWy/3hlEq1tdVohkW38P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2OPvbLzHYyQpR+zkpjHt1+sN3EbEJ8irQHH7604YQ3xaL5ow/thjU/ge7ZqgbiTLtgWIOLIh01jRJn47DzE7RVydPxtJxONj2qPJAeaalv7c+T3k6+FHH0g6YsCPa/U2kedtFz3E/mfpC+aYCnQiABpgnWKeUDX89xNgUWHFCmaF90XWYCmSGEZtfLELySVUrke1nduuxzLqCn0VFzwcv1o33sBul7rc6NRFkIYKin0phUhtEalHz/+LHlZiC4CS3fX3Xb/rInQNa3ImmaJHzTP20EISl6VMmLCcw+vpJJS+4N+s85XNksr2zleqLS7TCkAJvWVe4iwRHhw6UsGDJDaG1TKYkU7t6rhFM0/vkxojCGRXc/uSoeJvNmTTnmMJcwQkZw0nLQl5oWzrpLAnoW3K/3v6XI2u/x7rRUwI1Bhu8mXWmLatPP6xcJ9eCiVkloD/r4+n668e8YXm3YyVohGGyDBLAgAJCyfS4P0z/nrsYIMPrzelnIZZ1a/BESpHhLN4ENGs4MLWE2jp3VG9Cv8ZTQjw6OohMrEYdf8OhU0eDY80vG2/KgILg8I7LfIxlsygItm+t1uKRXUeTaAE4ugD8C2lgwrIrUIqIlR7yi2vQD6RQdNDGqzFBvBm4DsNLVZqBH0rvwWIECnlhlBxKr6eCFhK1bKi2tzq4qaadUHDbANEEA/VI2ZRu2+aNLbmBiGANCbRGj3WQxJZxTAZkhIFIwcNCStlulu7T6UmxFleF/bJZYpNXVvRgMNALnx6cHoxpi6Vtu5Ou5oCfbodGdcNbZzrjFeHcc+oNY9Oz8eV4kxbrfuo9tpEIKcQw1Nsl4wvY2IdZ+/ueBEw0kc9BBixPwgngwjx7K5YN/+iGrD02nc6fqobieeng5rkX374z8GYRo3keADwQAAAABJRU5ErkJggg=="},a81a:function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var r=e("8ede"),s=e("c28d"),a=e("23a8"),c={data:function(){return{attr:{cartAttr:!1,productAttr:[],productSelect:{}},productValue:[]}},created:function(){},methods:{updateFun:function(t,i){t.cartNum&&(this.tempArr.forEach((function(i){i.id==t.id&&(i.cart_num=t.cartNum)})),i&&this.getCartNum())},DefaultSelect:function(){var t=this.attr.productAttr,i=[];for(var e in this.productValue)if(this.productValue[e].stock>0){i=this.attr.productAttr.length?e.split(","):[];break}for(var r=0;r<t.length;r++)this.$set(t[r],"index",i[r]);var s=this.productValue[i.join(",")];this.$set(this.attr.productSelect,"store_name",this.storeName),s&&t.length?(this.$set(this.attr.productSelect,"image",s.image),this.$set(this.attr.productSelect,"price",s.price),this.$set(this.attr.productSelect,"stock",s.stock),this.$set(this.attr.productSelect,"unique",s.unique),this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),this.$set(this.attr.productSelect,"vip_price",s.vip_price),this.$set(this,"attrValue",i.join(","))):!s&&t.length?(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this,"attrValue",""),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price)):s||t.length||(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",this.storeInfo.stock),this.$set(this.attr.productSelect,"unique",this.storeInfo.unique||""),this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),this.$set(this,"attrValue",""),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price))},ChangeAttr:function(t){var i=this.productValue[t];i&&i.stock>=0?(this.$set(this.attr.productSelect,"image",i.image),this.$set(this.attr.productSelect,"price",i.price),this.$set(this.attr.productSelect,"stock",i.stock),this.$set(this.attr.productSelect,"unique",i.unique),this.$set(this.attr.productSelect,"vip_price",i.vip_price),this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),this.$set(this,"attrValue",t)):(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price),this.$set(this,"attrValue",""))},attrVal:function(t){this.$set(this.attr.productAttr[t.indexw],"index",this.attr.productAttr[t.indexw].attr_values[t.indexn])},iptCartNum:function(t){var i=this;if(t){var e=this.storeInfo.min_qty;Number.isInteger(parseInt(t))&&parseInt(t)>=this.storeInfo.min_qty&&(e=parseInt(t)),this.$nextTick((function(t){i.$set(i.attr.productSelect,"cart_num",t<0?i.storeInfo.min_qty:e)}))}},onMyEvent:function(){this.$set(this.attr,"cartAttr",!1)},ChangeCartNumDuo:function(t){var i=this.productValue[this.attrValue];if(void 0!==i||this.attr.productAttr.length||(i=this.attr.productSelect),void 0!==i){var e=i.stock||0,r=this.attr.productSelect;this.ChangeCartNum(t,r,e,1)}},ChangeCartNumDan:function(t,i,e){var r=this.tempArr[i],s=this.tempArr[i].stock;this.ChangeCartNum(t,r,s,0,e.id)},ChangeSubDel:function(t){var i=this,e=i.cartData.cartList,r=[];e.forEach((function(t){r.push(t.id)})),(0,s.cartDel)(r.join(",")).then((function(t){i.$set(i.cartData,"cartList",[]),i.cartData.iScart=!1,i.totalPrice=0,i.page=1,i.loadend=!1,i.tempArr=[],i.productslist(),i.getCartNum()}))},ChangeOneDel:function(t,i){var e=this,r=e.cartData.cartList;(0,s.cartDel)(t.toString()).then((function(t){r.splice(i,1),r.length||(e.cartData.iScart=!1,e.page=1,e.loadend=!1,e.tempArr=[],e.productslist()),e.getCartNum()}))},goCatNum:function(){this.goCat(1,this.id,1)},closeList:function(t){this.$set(this.cartData,"iScart",t)},ChangeCartList:function(t,i){var e=this.cartData.cartList,r=e[i],s=e[i].trueStock;this.ChangeCartNum(t,r,s,0,r.product_id,i,1),e.length||(this.cartData.iScart=!1,this.page=1,this.loadend=!1,this.tempArr=[],this.productslist())},ChangeCartNum:function(t,i,e,r,s,a,c){if(t){if(i.cart_num++,i.cart_num>e)return r?(this.$set(this.attr.productSelect,"cart_num",e||this.storeInfo.min_qty),this.$set(this,"cart_num",e||1)):(i.cart_num=e||0,this.$set(this,"tempArr",this.tempArr),this.$set(this.cartData,"cartList",this.cartData.cartList)),this.$util.Tips({title:"该产品没有更多库存了"});r||(c?(this.goCat(0,s,1,1,i.product_attr_unique),this.getTotalPrice()):this.goCat(0,s,1))}else i.cart_num--,0==i.cart_num&&(this.cartData.cartList.splice(a,1),r&&(this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),this.$set(this,"cart_num",1))),i.cart_num<0?r?(this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),this.$set(this,"cart_num",1)):(i.cart_num=0,this.$set(this,"tempArr",this.tempArr),this.$set(this.cartData,"cartList",this.cartData.cartList)):r||(c?(this.goCat(0,s,0,1,i.product_attr_unique),this.getTotalPrice()):this.goCat(0,s,0));this.tempArr.forEach((function(t){t.id==s&&(t.cart_num=i.cart_num)}))},goCat:function(t,i,e,s,a){var c=this;if(t){var o=c.productValue[this.attrValue];if(c.attr.productAttr.length&&void 0===o)return c.$util.Tips({title:"产品库存不足,请选择其它属性"})}var u={product_id:i,num:t?c.attr.productSelect.cart_num:1,type:e,unique:t?c.attr.productSelect.unique:s?a:""};(0,r.postCartNum)(u).then((function(i){t&&(c.attr.cartAttr=!1,c.tempArr.forEach((function(t,i){if(t.id==c.id){var e=c.attr.productSelect.stock,r=parseInt(t.cart_num)+parseInt(c.attr.productSelect.cart_num);t.cart_num=r>e?e:r}}))),c.$util.Tips({title:i.msg}),c.getCartNum(),s||c.getCartList(1)})).catch((function(t){return c.$util.Tips({title:t})}))},goCartDuo:function(i,e){if(this.isLogin)if(0==i.cart_button)if(i.is_presale_product)t.navigateTo({url:"/pages/activity/goods_details/index?id=".concat(i.id,"&type=6")});else{var r="/pages/goods_details/index?id=".concat(i.id,"&fromType=1"),s="/pages/goods_details/index?id=".concat(i.id);t.navigateTo({url:e?s:r})}else this.storeName=i.store_name,this.getAttrs(i.id),this.$set(this,"id",i.id),this.$set(this.attr,"cartAttr",!0);else(0,a.toLogin)()},goCartDan:function(i,e,r){this.isLogin?0==i.cart_button?i.is_presale_product?t.navigateTo({url:"/pages/activity/goods_details/index?id=".concat(i.id,"&type=6")}):t.navigateTo({url:"/pages/goods_details/index?id=".concat(i.id,"&fromType=1")}):(this.tempArr[e].cart_num=1,this.$set(this,"tempArr",this.tempArr),this.goCat(0,i.id,1)):(0,a.toLogin)()}}};i.default=c}).call(this,e("df3c")["default"])}}]);