1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/advance/detail/detail"],{"344d":function(t,e,n){"use strict";var o=n("d131"),i=n.n(o);i.a},"34fa":function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("9bbc"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"9bbc":function(t,e,n){"use strict";n.r(e);var o=n("fe8a"),i=n("b381");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("344d");var r,s=n("f0c5"),c=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"4be9822d",null,!1,o["a"],r);e["default"]=c.exports},b381:function(t,e,n){"use strict";n.r(e);var o=n("fe50"),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},d131:function(t,e,n){},fe50:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){n.e("components/page-component/goods/app-goods-banner").then(function(){return resolve(n("d9fb"))}.bind(null,n)).catch(n.oe)},c=function(){n.e("plugins/advance/components/detail-ad").then(function(){return resolve(n("f06d"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("plugins/advance/components/detail-price-share").then(function(){return resolve(n("1d2e"))}.bind(null,n)).catch(n.oe)},d=function(){Promise.all([n.e("common/vendor"),n.e("plugins/advance/components/detail-bottom-button")]).then(function(){return resolve(n("cb1f"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("plugins/advance/components/detail-attr").then(function(){return resolve(n("31f6"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("components/page-component/app-join-member/app-join-member").then(function(){return resolve(n("2626"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/page-component/app-related-suggestion-product/app-related-suggestion-product").then(function(){return resolve(n("41e0"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("plugins/advance/components/detail-discount").then(function(){return resolve(n("978a"))}.bind(null,n)).catch(n.oe)},g=function(){n.e("plugins/advance/components/detail-vip").then(function(){return resolve(n("9e4f"))}.bind(null,n)).catch(n.oe)},m=function(){Promise.all([n.e("common/vendor"),n.e("components/page-component/app-vip-card/app-vip-card")]).then(function(){return resolve(n("7a92"))}.bind(null,n)).catch(n.oe)},_=function(){n.e("components/page-component/app-goods-detail/app-name").then(function(){return resolve(n("8e0b"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("components/page-component/app-quick-navigation/app-quick-navigation").then(function(){return resolve(n("d475"))}.bind(null,n)).catch(n.oe)},v=function(){n.e("components/page-component/goods/app-goods-full-reduce").then(function(){return resolve(n("bc5a"))}.bind(null,n)).catch(n.oe)},w=function(){n.e("components/basic-component/app-close/app-close").then(function(){return resolve(n("1653"))}.bind(null,n)).catch(n.oe)},O=function(){n.e("components/page-component/goods/bd-detail").then(function(){return resolve(n("7e0d"))}.bind(null,n)).catch(n.oe)},y=function(){n.e("components/page-component/goods/bd-comments").then(function(){return resolve(n("66eb"))}.bind(null,n)).catch(n.oe)},j=function(){n.e("components/page-component/goods/bd-kb").then(function(){return resolve(n("f02b"))}.bind(null,n)).catch(n.oe)},$=function(){n.e("components/page-component/goods/bd-hc").then(function(){return resolve(n("7eb9"))}.bind(null,n)).catch(n.oe)},k=function(){Promise.all([n.e("common/vendor"),n.e("components/page-component/goods/bd-coupon")]).then(function(){return resolve(n("fb44"))}.bind(null,n)).catch(n.oe)},P=function(){n.e("components/page-component/goods/bd-xbc").then(function(){return resolve(n("48be"))}.bind(null,n)).catch(n.oe)},T=function(){n.e("components/page-component/goods/bd-info-extra").then(function(){return resolve(n("fd84"))}.bind(null,n)).catch(n.oe)},I={name:"detail",data:function(){return{showClose:!1,is_open:0,full_reduce:null,active:!0,attr_deposit:"0",attr_swell_deposit:"0",attr_stock:0,attr_price:"0",attr_price_member:0,url:"",level_show:0,loading:!1,select_attr_group:[],zhe:!1,list:[],num:1,shareShow:!1,attr_pic_url:"",goods_id:-1,d:0,h:0,m:0,s:0,end_time:-1,buttonDisabled:!1,poster_config:this.$api.advance.poster_config,poster_generate:this.$api.advance.poster_generate,goods:null}},onLoad:function(t){this.goods_id=t.id,wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]})},onShow:function(){var e=this;this.showClose=!1,setTimeout((function(){e.showClose=!0})),this.$nextTick((function(){e.request_detail({id:e.goods_id}),e.$request({url:e.$api.advance.goods_list,data:{goods_id:e.goods_id}}).then((function(n){0===n.code?e.list=n.data.list:1===n.code&&t.showModal({title:"提示",content:n.msg})}))}))},onHide:function(){clearInterval(this.end_time)},onUnload:function(){clearInterval(this.end_time)},onShareAppMessage:function(){return this.hShareAppMessage()},methods:{hShareAppMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.goods,n=e.app_share_title,o=e.name,i=e.id,a=e.app_share_pic,r=e.subtitle,s=e.pic_url;return this.$shareAppMessage({path:"/plugins/advance/detail/detail",title:n||o,imageUrl:a||s[0].pic_url,desc:r,params:{id:i}},t)},getMall:function(t){this.is_open=t.is_open},request_detail:function(e){var n=this;this.$request({url:this.$api.advance.detail,data:{id:e.id},method:"get"}).then((function(e){0===e.code?(n.goods=e.data.detail,n.goods.goods_activity&&(n.full_reduce=n.goods.goods_activity.full_reduce),n.goods.num=1,n.loading=!0,n.url="".concat(n.$api.advance.poster,"&goods_id=").concat(n.goods.id),n.getTime(n.goods.advanceGoods.end_prepayment_at),n.set_attr_active()):1===e.code&&(t.hideLoading(),t.showModal({content:e.msg,showCancel:!1,success:function(){t.navigateBack()}}))}))},open_share:function(){this.shareShow=!0},change_num:function(t){this.num+=t},change_num_data:function(t){this.num=t},favorite:function(t){this.goods.favorite=t},select_attr:function(t){for(var e=t.data,n=t.item,o=this.goods.attr_groups,i=":",a=0,r=0;r<o.length;r++)for(var s=this.goods.attr_groups[r].attr_list,c=0;c<s.length;c++)o[r].attr_group_id===e&&s[c].attr_id===n?this.$set(this.goods.attr_groups[r].attr_list[c],"active",!0):o[r].attr_group_id===e&&s[c].attr_id!==n&&this.$set(this.goods.attr_groups[r].attr_list[c],"active",!1),this.goods.attr_groups[r].attr_list[c].active&&(a=this.goods.attr_groups[r].attr_list[c].attr_id,i+=":".concat(a));var u=i.substr(2);this.get_price_stock(u)},set_attr_active:function(){for(var t=0,e=":",n=0;n<this.goods.attr_groups.length;n++)for(var o=0;o<this.goods.attr_groups[n].attr_list.length;o++)0!==o?this.$set(this.goods.attr_groups[n].attr_list[o],"active",!1):0===o&&(t=this.goods.attr_groups[n].attr_list[o].attr_id,e+=":".concat(t),this.$set(this.goods.attr_groups[n].attr_list[o],"active",!0));this.get_price_stock(e.substr(2))},get_price_stock:function(t){for(var e=this.goods.attr,n=0;n<e.length;n++)if(e[n].sign_id===t){this.select_attr_group=e[n].attr_list;var o=e[n],i=o.deposit,a=o.swell_deposit,r=o.stock,s=o.price,c=o.price_member,u=o.pic_url;this.attr_deposit=i,this.attr_swell_deposit=a,this.attr_stock=r,this.attr_price=s,this.attr_price_member=c,this.attr_pic_url=u}0==this.attr_stock?this.buttonDisabled=!0:this.buttonDisabled=!1},close_attr:function(t){this.goods.buy_goods_auth?this.active=t:this.$tips.showToast({title:"您暂无权限购买该商品",icon:"none"})},getTime:function(t){var e=this,n=new Date(t.replace(/-/g,"/")).getTime()-(new Date).getTime();this.d=parseInt(n/1e3/60/60/24),this.h=parseInt(n/1e3/60/60%24),this.m=parseInt(n/1e3/60%60),this.s=parseInt(n/1e3%60),this.end_time=setInterval((function(){var n=(new Date).getTime(),o=new Date(t.replace(/-/g,"/")).getTime(),i=o-n;if(i>0){var a=parseInt(i/1e3/60/60/24),r=parseInt(i/1e3/60/60%24),s=parseInt(i/1e3/60%60),c=parseInt(i/1e3%60);e.d=a,e.h=r,e.m=s,e.s=c}else clearInterval(e.end_time)}),1e3)},setCoupon:function(t){this.$set(this.goods.goods_coupon_center[t],"is_receive",1)}},components:{"app-goods-banner":s,"detail-ad":c,"detail-price-share":u,"detail-bottom-button":d,"detail-attr":l,"app-join-member":p,"app-related-suggestion-product":h,"detail-discount":f,"detail-vip":g,"app-name":_,"app-vip-card":m,"app-quick-navigation":b,appGoodsFullReduce:v,appClose:w,bdDetail:O,bdComments:y,bdKb:j,bdHc:$,bdCoupon:k,bdXbc:P,bdInfoExtra:T},computed:a(a(a({},(0,o.mapGetters)("mallConfig",{vip:"getVip",getTheme:"getTheme"})),(0,o.mapGetters)("user",{is_vip:"is_vip"})),(0,o.mapState)({mall:function(t){return t.mallConfig.mall}})),onShareTimeline:function(){var t=this.goods,e=t.app_share_title,n=t.name,o=t.id;return this.$shareTimeline({title:e||n,query:{id:o}})}};e.default=I}).call(this,n("543d")["default"])},fe8a:function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var i=function(){var t=this,e=t.$createElement;t._self._c},a=[]}},[["34fa","common/runtime","common/vendor"]]]);
|