1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/book/goods/goods"],{"1ac0":function(e,o,n){},"39b0":function(e,o,n){"use strict";var t;n.d(o,"b",(function(){return i})),n.d(o,"c",(function(){return c})),n.d(o,"a",(function(){return t}));var i=function(){var e=this,o=e.$createElement;e._self._c},c=[]},"4fcb":function(e,o,n){"use strict";n.r(o);var t=n("b69b"),i=n.n(t);for(var c in t)"default"!==c&&function(e){n.d(o,e,(function(){return t[e]}))}(c);o["default"]=i.a},b69b:function(e,o,n){"use strict";(function(e){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var t=n("2f62");function i(e,o){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);o&&(t=t.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.push.apply(n,t)}return n}function c(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?i(Object(n),!0).forEach((function(o){s(e,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))}))}return e}function s(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}var r=function(){n.e("components/page-component/goods/app-goods-banner").then(function(){return resolve(n("d9fb"))}.bind(null,n)).catch(n.oe)},a=function(){n.e("plugins/book/components/app-store").then(function(){return resolve(n("b68d"))}.bind(null,n)).catch(n.oe)},u=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)},d=function(){n.e("components/page-component/app-quick-navigation/app-quick-navigation").then(function(){return resolve(n("d475"))}.bind(null,n)).catch(n.oe)},l=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)},p=function(){n.e("components/page-component/goods/app-goods-full-reduce").then(function(){return resolve(n("bc5a"))}.bind(null,n)).catch(n.oe)},g=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)},f=function(){n.e("components/page-component/goods/bd-info").then(function(){return resolve(n("543b"))}.bind(null,n)).catch(n.oe)},h=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)},b=function(){n.e("components/page-component/goods/bd-xbc").then(function(){return resolve(n("48be"))}.bind(null,n)).catch(n.oe)},m=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)},v=function(){n.e("components/page-component/goods/bd-detail").then(function(){return resolve(n("7e0d"))}.bind(null,n)).catch(n.oe)},w=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)},y={name:"goods",components:{"app-goods-banner":r,"app-store":a,"app-related-suggestion-product":u,"app-quick-navigation":d,"app-vip-card":l,uAttr:g,appClose:k,appGoodsFullReduce:p,bdName:f,bdCoupon:h,bdXbc:b,bdKb:m,bdHc:_,bdDetail:v,bdComments:w,bdService:O},data:function(){return{showClose:!1,is_open:0,goods:{goods_activity:{full_reduce:{}},goods_marketing:{}},goods_marketing:{},full_reduce:null,selectAttr:{},activeIndex:0,list:[],url:"",webUrl:"",cartShow:!0,is_vip:!1,is_vip_card_user:0,discount:null,goods_id:0,poster_config:this.$api.book.poster_config,poster_generate:this.$api.book.poster_generate,checked:null,show:!1,loading:!1,store:null,storeNum:null,services:null,name:null,goodsId:null,picUrl:null,disable:"disable"}},onShow:function(){var e=this;this.showClose=!1,setTimeout((function(){e.showClose=!0}))},onShareTimeline:function(){var e=this.goods,o=e.app_share_title,n=e.goods_id,t=e.name;return this.$shareTimeline({title:o||t,query:{goods_id:n}})},onLoad:function(e){this.$commonLoad.onload(e),this.webUrl="/plugins/book/goods/goods?goods_id="+e.goods_id,this.goods_id=e.goods_id,this.request(e.goods_id),this.newRecommend(e.goods_id),wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]})},onShareAppMessage:function(){this.hShareAppMessage()},methods:{hShareAppMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=this.goods,n=o.app_share_title,t=o.app_share_pic,i=o.goods_id,c=o.name,s=o.subtitle;return this.$shareAppMessage({path:"/plugins/book/goods/goods",title:n||c,imageUrl:t||this.picUrl[0].pic_url,desc:s,params:{goods_id:i}},e)},getMall:function(e){this.is_open=e.is_open},check:function(e){var o=e.item;this.checked=o},rightFunc:function(o){e.navigateTo({url:"/pages/order-submit/order-submit?mch_list=".concat(JSON.stringify([o]),"&preview_url=").concat(encodeURIComponent(this.$api.book.order_preview),"&submit_url=").concat(encodeURIComponent(this.$api.book.order_submit),"&plugin=booking")})},newRecommend:function(e){var o=this;this.$request({url:this.$api.goods.new_recommend,data:{goods_id:e}}).then((function(e){0===e.code&&(o.list=e.data.list)}))},open:function(){this.goods.buy_goods_auth?this.show=!0:this.$tips.showToast({title:"您暂无权限购买该商品",icon:"none"})},setCoupon:function(e){this.$set(this.goods.goods_coupon_center[e],"is_receive",1)},router:function(o){e.navigateTo({url:o})},request:function(o){var n=this;e.getLocation({type:"wgs84",success:function(e){n.$showLoading(),n.$request({url:n.$api.book.detail,data:{goods_id:o,latitude:e.latitude,longitude:e.longitude}}).then((function(e){if(0===e.code){var o=e.data.list,t=e.data.list,i=t.store,c=t.services,s=t.name,r=t.id,a=t.pic_url,u=t.goods_marketing;n.item=o,n.goods=o,o.goods_activity&&(n.full_reduce=o.goods_activity.full_reduce),n.store=i.slice(0,1),n.storeNum=i.length,n.services=c,n.name=s,n.goodsId=r,n.picUrl=a,n.goods_marketing=u,n.url="".concat(n.$api.book.poster,"&goods_id=").concat(r),n.poster_config="".concat(n.poster_config,"&goods_id=").concat(r),n.poster_generate="".concat(n.poster_generate,"&goods_id=").concat(r),n.loading=!0,o.vip_card_appoint.discount>0&&(n.is_vip=!0,n.discount=o.vip_card_appoint.discount),n.is_vip_card_user=o.vip_card_appoint.is_vip_card_user}n.$hideLoading()}))},fail:function(){e.showToast({title:"请开启位置权限",icon:"none",duration:2e3,success:function(){setTimeout((function(){e.navigateBack()}),2e3)}})}})}},computed:c({},(0,t.mapGetters)("mallConfig",{getTheme:"getTheme"}))};o.default=y}).call(this,n("543d")["default"])},c657:function(e,o,n){"use strict";var t=n("1ac0"),i=n.n(t);i.a},cbbc:function(e,o,n){"use strict";n.r(o);var t=n("39b0"),i=n("4fcb");for(var c in i)"default"!==c&&function(e){n.d(o,e,(function(){return i[e]}))}(c);n("c657");var s,r=n("f0c5"),a=Object(r["a"])(i["default"],t["b"],t["c"],!1,null,"42f1d441",null,!1,t["a"],s);o["default"]=a.exports},cc3a:function(e,o,n){"use strict";(function(e){n("2d0a");t(n("66fd"));var o=t(n("cbbc"));function t(e){return e&&e.__esModule?e:{default:e}}e(o.default)}).call(this,n("543d")["createPage"])}},[["cc3a","common/runtime","common/vendor"]]]);
|