1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/pick/detail/detail"],{"0e41":function(e,t,n){"use strict";n.r(t);var o=n("eebe"),i=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"2a3b":function(e,t,n){"use strict";n.r(t);var o=n("3eac"),i=n("0e41");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("84c8");var s,c=n("f0c5"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"44d3e40a",null,!1,o["a"],s);t["default"]=r.exports},"3eac":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var i=function(){var e=this,t=e.$createElement;e._self._c},a=[]},"7c92":function(e,t,n){"use strict";(function(e){n("2d0a");o(n("66fd"));var t=o(n("2a3b"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"84c8":function(e,t,n){"use strict";var o=n("bc9e"),i=n.n(o);i.a},bc9e:function(e,t,n){},eebe:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n("a34a")),i=n("2f62");function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n,o,i,a,s){try{var c=e[a](s),r=c.value}catch(u){return void n(u)}c.done?t(r):Promise.resolve(r).then(o,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function c(e){s(a,o,i,c,r,"next",e)}function r(e){s(a,o,i,c,r,"throw",e)}c(void 0)}))}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){n.e("components/page-component/app-quick-navigation/app-quick-navigation").then(function(){return resolve(n("d475"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("components/page-component/goods/app-goods-banner").then(function(){return resolve(n("d9fb"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/page-component/app-goods-recommend/app-goods-recommend").then(function(){return resolve(n("ee79"))}.bind(null,n)).catch(n.oe)},h=function(){Promise.all([n.e("common/vendor"),n.e("components/page-component/goods/u-attr")]).then(function(){return resolve(n("338d"))}.bind(null,n)).catch(n.oe)},g=function(){n.e("components/page-component/goods/bd-info").then(function(){return resolve(n("543b"))}.bind(null,n)).catch(n.oe)},m=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)},v=function(){n.e("components/page-component/goods/bd-xbc").then(function(){return resolve(n("48be"))}.bind(null,n)).catch(n.oe)},b=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)},w=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)},k=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-service").then(function(){return resolve(n("9413"))}.bind(null,n)).catch(n.oe)},$={name:"detail",data:function(){return{showClose:!1,is_open:0,goods:null,attrShow:0,selectAttr:{},isVip:!1,discount:null,is_vip_card_user:0,shareData:{},recommend_list:[],activity:{},shareUrl:"",webUrl:"",activity_status:1,poster_config:this.$api.pick.poster_config,poster_generate:this.$api.pick.poster_generate,flash_sale:null,disable:"disable"}},computed:u({},(0,i.mapGetters)("mallConfig",{getTheme:"getTheme"})),onShareAppMessage:function(){return this.$shareAppMessage({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,path:"/plugins/pick/detail",desc:this.goods.subtitle,params:{id:this.goods.id}})},components:{"app-quick-navigation":l,appGoodsBanner:p,"app-goods-recommend":f,uAttr:h,bdInfo:g,bdCoupon:m,bdXbc:v,bdKb:b,bdHc:_,bdDetail:w,bdComments:y,appClose:k,bdService:O},methods:{hShareAppMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.$shareAppMessage({title:"",imageUrl:"",path:"/plugins/pick/detail/detail",params:{goods_id:this.goods.id}},e)},getMall:function(e){this.is_open=e.is_open},getDetail:function(t){var n=this;return c(o.default.mark((function i(){var a,s,c,r;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,n.$request({url:n.$api.pick.goods,method:"get",data:{id:t}});case 2:a=o.sent,0===a.code?(s=a.data.detail,c=s.vip_card_appoint,r=s.plugin_extra,n.goods=a.data.detail,n.flash_sale=r.flash_sale,n.activity=a.data.activity,n.recommend_list=a.data.list,n.shareUrl="".concat(n.$api.pick.poster,"&goods_id=").concat(n.goods.id),n.activity_status=a.data.activity_status,(c.discount||"0.00"===c.discount)&&(n.isVip=!0,n.discount=c.discount),n.is_vip_card_user=c.is_vip_card_user):e.showToast({title:a.msg,icon:"none"});case 4:case"end":return o.stop()}}),i)})))()},setCoupon:function(e){this.$set(this.goods.goods_coupon_center[e],"is_receive",1)},onAttr:function(e){var t=e.item;this.selectAttr=t},quickShare:function(e){this.shareData=e},clickAttr:function(t){if(1===this.activity_status)if(1===t){if(!this.goods.buy_goods_auth)return void this.$tips.showToast({title:"您暂无权限购买该商品",icon:"none"});this.attrShow=!0}else e.navigateTo({url:"/plugins/pick/pond/pond?rule_num=".concat(this.activity.rule_num,"&pick_activity_id=").concat(this.activity.id)})},add:function(t){var n=this;return c(o.default.mark((function i(){var a,s;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return a=t.goods_list[0],o.next=3,n.$request({url:n.$api.pick.add,data:{goods_id:a.id,attr:a.goods_attr_id,num:a.num,pick_activity_id:n.activity.id}});case 3:s=o.sent,0===s.code&&e.navigateBack();case 5:case"end":return o.stop()}}),i)})))()},back:function(){e.navigateTo({url:"/pages/index/index"})},goBack:function(){e.navigateTo({url:"/plugins/pick/index/index"})},favorite:function(){var t=this.$api.user.favorite_add,n=!0;this.goods.favorite&&(t=this.$api.user.favorite_remove,n=!1),this.goods.favorite=n,this.$request({url:t,data:{goods_id:this.goods.id}}).then((function(t){0===t.code||e.showModal({title:"提示",content:t.msg,showCancel:!1})})).catch((function(){}))}},onShow:function(){var e=this;this.showClose=!1,setTimeout((function(){e.showClose=!0}))},onLoad:function(e){this.$commonLoad.onload(e),this.webUrl="/plugins/pick/detail/detail?goods_id="+e.goods_id,wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]}),this.getDetail(e.goods_id)},onShareTimeline:function(){return this.$shareTimeline({title:this.goods.app_share_title?this.goods.app_share_title:this.goods.name,query:{goods_id:this.goods.goods_id}})}};t.default=$}).call(this,n("543d")["default"])}},[["7c92","common/runtime","common/vendor"]]]);
|