require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/scoreshop/goods/detail"],{1415:function(t,e,i){"use strict";i.r(e);var n=i("edc4"),o=i("8258");for(var r in o)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(r);i("1c90"),i("489a");var s=i("828b"),u=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=u.exports},"1c90":function(t,e,i){"use strict";var n=i("bc90"),o=i.n(n);o.a},"489a":function(t,e,i){"use strict";var n=i("de00"),o=i.n(n);o.a},8258:function(t,e,i){"use strict";i.r(e);var n=i("97dc"),o=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=o.a},"97dc":function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(i("7eb4")),r=n(i("ee10")),s=n(i("7ca3")),u=i("8f59"),a=n(i("6992"));function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var d=getApp(),l={mixins:[a.default],components:{goodsPicker:function(){i.e("components/goods/goodsPicker").then(function(){return resolve(i("d582"))}.bind(null,i)).catch(i.oe)}},data:function(){return{is_submit:!1,id:"",goods:{},height:0,util:d.globalData.util,video_context:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){(0,s.default)(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},(0,u.mapGetters)(["base","user","is_login"])),onLoad:function(e){var i=this;return(0,r.default)(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.id&&(i.id=e.id),n.next=3,i.init();case 3:i.height=t.upx2px(750);case 4:case"end":return n.stop()}}),n)})))()},onShareAppMessage:function(){this.$util.handleWxappShare();var t="plugin/scoreshop/goods/detail?id="+this.goods.id+(this.user.id?"&uid="+this.user.id:""),e={title:this.goods.share_title||this.base.title,path:t,imageUrl:this.goods.share_img};return e},onShareTimeline:function(){this.$util.handleWxappShare(2);var t="id="+this.goods.id+(this.user.id?"&uid="+this.user.id:""),e={title:this.goods.share_title||this.base.title,query:t,imageUrl:this.goods.share_img};return e},methods:{onBuy:function(){if(!this.is_login)return this.util.authLogin();this.$refs["goodsPicker"].show()},init:function(){var t=this,e={id:this.id};this.util.get("scoreshop/goods/detail",e).then((function(e){1==e.code?(t.goods=e.data,t.initVideo()):t.util.toast(e.message,3e3,"back")}))},vplay:function(t){if(this.video_context.length>0)return!1;this.initVideo()},initVideo:function(){var e=this.goods.slides.map((function(t){return"video"==t.type?t.url:null})).filter((function(t){return t}));if(!e||this.goods.slides.length<=0)return!1;for(var i=[],n=0;n<e.length;n++){var o=t.createVideoContext("video".concat(n));i.push(o)}this.video_context=i},swiperChange:function(t){this.goods.slides.map((function(t){return"video"==t.type?t.url:null})).filter((function(t){return t}));for(var e=t.detail.current,i=0;i<this.video_context.length;i++)this.video_context[i].pause();"video"==this.goods.slides[e].type&&this.video_context[e].play()}}};e.default=l}).call(this,i("df3c")["default"])},bc90:function(t,e,i){},de00:function(t,e,i){},edc4:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}));var n={uParse:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-parse/u-parse")]).then(i.bind(null,"90c0"))},loginModal:function(){return Promise.all([i.e("common/vendor"),i.e("components/login-modal/login-modal")]).then(i.bind(null,"e34a"))}},o=function(){var t=this.$createElement,e=(this._self._c,this.goods.id?this.goods.slides&&this.goods.slides.length>0:null),i=this.goods.id?this.util.darkColor(this.base.btn_color,.2):null;this.$mp.data=Object.assign({},{$root:{g0:e,g1:i}})},r=[]},ef72:function(t,e,i){"use strict";(function(t,e){var n=i("47a9");i("4c1a");n(i("3240"));var o=n(i("1415"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["ef72","common/runtime","common/vendor"]]]);