(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/exchange/goods/goods"],{"195d":function(e,t,o){"use strict";var n;o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return s})),o.d(t,"a",(function(){return n}));var i=function(){var e=this,t=e.$createElement;e._self._c},s=[]},"3ae6":function(e,t,o){"use strict";var n=o("9370"),i=o.n(n);i.a},4265:function(e,t,o){"use strict";o.r(t);var n=o("a2c7"),i=o.n(n);for(var s in n)"default"!==s&&function(e){o.d(t,e,(function(){return n[e]}))}(s);t["default"]=i.a},"616b":function(e,t,o){"use strict";o.r(t);var n=o("195d"),i=o("4265");for(var s in i)"default"!==s&&function(e){o.d(t,e,(function(){return i[e]}))}(s);o("3ae6");var r,a=o("f0c5"),c=Object(a["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);t["default"]=c.exports},9370:function(e,t,o){},a2c7:function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(o("a34a")),i=o("2f62"),s=r(o("e829"));function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,o,n,i,s,r){try{var a=e[s](r),c=a.value}catch(u){return void o(u)}a.done?t(c):Promise.resolve(c).then(n,i)}function c(e){return function(){var t=this,o=arguments;return new Promise((function(n,i){var s=e.apply(t,o);function r(e){a(s,n,i,r,c,"next",e)}function c(e){a(s,n,i,r,c,"throw",e)}r(void 0)}))}}function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function d(e){for(var t=1;t0?"u-bottom-height-2":this.full_reduce||this.goods.sell_time>0?"u-bottom-height-1":"u-bottom-height-0"},leftTip:function(){var e="";return e=0==this.isTip&&this.goods.sell_time>0?"box-grow-1":"bd-btn-left bd-btn-half",this.goods&&"goods"===this.goods.type?e:""},disableBtn:function(){return this.goods.is_finish_sell||this.goods.sell_time>0?"btn-finish-sell":"bd-oversell-btn"},disableBtnText:function(){return this.goods.is_finish_sell?"商品已下架":this.goods.sell_time>0?"商品未开售":"已售罄"},remindParams:function(){return{sell_time:this.goods.sell_time,goods_id:this.goods.id,template_message_list:this.goods.template_message_list,buy_text:"立即购买"}}}),onShareTimeline:function(){return this.$shareTimeline({title:this.goods.app_share_title?this.goods.app_share_title:this.goods.name,imageUrl:this.goods.pic_url[0].pic_url,query:{goods_id:this.goods.id}})},onShareAppMessage:function(){return this.hShareAppMessage()},methods:{hShareAppMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.$shareAppMessage({path:"/plugins/exchange/goods/goods",title:this.goods.app_share_title?this.goods.app_share_title:this.goods.name,imageUrl:this.goods.app_share_pic?this.goods.app_share_pic:this.goods.pic_url[0].pic_url,desc:this.goods.subtitle,params:{goods_id:this.goods.id}},e)},getMall:function(e){this.is_open=1==e.is_open},toExchange:function(){if(this.goods.buy_goods_auth)if(this.goods.sell_time>0)this.rightTip();else{if("undefined"!==typeof this.goods.limit_buy&&1==this.goods.limit_buy.status&&this.goods.limit_buy.rest_number<1)return this.$tips.showToast({title:this.goods.limit_buy.text,icon:"none"}),!1;var t=[];for(var o in this.goods.attr[0].attr_list)t.push({attr_id:this.goods.attr[0].attr_list[o].attr_id,attr_group_id:this.goods.attr[0].attr_list[o].attr_group_id});var n=[{mch_id:0,goods_list:[{id:this.goods.id,attr:t,num:1,cat_id:0,goods_attr_id:this.goods.attr[0].id}]}],i="/pages/order-submit/order-submit?mch_list=".concat(JSON.stringify(n));i+="&preview_url=".concat(encodeURIComponent(this.$api.exchange.order_preview),"&submit_url=").concat(encodeURIComponent(this.$api.exchange.order_submit),"&plugin=exchange"),e.navigateTo({url:i})}else this.$tips.showToast({title:"您暂无权限购买该商品",icon:"none"})},request:function(t){var o=this;return c(n.default.mark((function i(){var s,r,a;return n.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return s=t.url,r=t.data,n.next=3,o.$request({url:s,data:r});case 3:if(a=n.sent,0!==a.code){n.next=8;break}return n.abrupt("return",a.data);case 8:e.showModal({title:"提示",content:a.msg,showCancel:!1,success:function(t){e.navigateBack()}});case 9:case"end":return n.stop()}}),i)})))()},setCoupon:function(e){this.$set(this.goods.goods_coupon_center[e],"is_receive",1)},changeTime:function(e){this.goods.sell_time=e}},components:{"app-banner":h,appClose:g,appGoodsFullReduce:p,bdInfo:f,bdCoupon:_,bdXbc:m,bdKb:b,bdHc:v,bdDetail:w,bdComments:y,appSellTip:T}};t.default=x}).call(this,o("543d")["default"])},f7119:function(e,t,o){"use strict";(function(e){o("2d0a");n(o("66fd"));var t=n(o("616b"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,o("543d")["createPage"])}},[["f7119","common/runtime","common/vendor"]]]);