detail.js 3.7 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/detail"],{"17af":function(n,t,e){"use strict";e.r(t);var o=e("9653"),a=e.n(o);for(var i in o)"default"!==i&&function(n){e.d(t,n,(function(){return o[n]}))}(i);t["default"]=a.a},"8fec":function(n,t,e){"use strict";(function(n){e("6cdc"),e("921b");o(e("66fd"));var t=o(e("bbcb"));function o(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,e("543d")["createPage"])},9653:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(e("a34a")),a=e("1b62"),i=e("d084");function u(n){return n&&n.__esModule?n:{default:n}}function r(n,t,e,o,a,i,u){try{var r=n[i](u),c=r.value}catch(s){return void e(s)}r.done?t(c):Promise.resolve(c).then(o,a)}function c(n){return function(){var t=this,e=arguments;return new Promise((function(o,a){var i=n.apply(t,e);function u(n){r(i,o,a,u,c,"next",n)}function c(n){r(i,o,a,u,c,"throw",n)}u(void 0)}))}}var s=function(){return Promise.all([e.e("common/vendor"),e.e("components/app-img")]).then(e.bind(null,"cb3c"))},d=function(){return e.e("components/app-swiper").then(e.bind(null,"150c"))},f=function(){return e.e("components/module/app-tag").then(e.bind(null,"1a62"))},l=function(){return e.e("components/module/app-trademark").then(e.bind(null,"ea75"))},p=function(){return e.e("pages/goods/components/buy-foot").then(e.bind(null,"2e3d"))},h=function(){return e.e("pages/goods/components/sel-popup").then(e.bind(null,"1262"))},m=function(){return e.e("pages/home/components/go-login").then(e.bind(null,"4c29"))},g=function(){return e.e("components/module/app-share-mask").then(e.bind(null,"0119"))},v={name:"goods-detail",mixins:[a.share],components:{AppSwiper:d,AppTag:f,AppTrademark:l,BuyFoot:p,SelPopup:h,AppImg:s,GoLogin:m,AppShareMask:g},data:function(){return{data:{},imgList:[],buyNum:1,popupShow:!1,loginShow:!1,showShare:!1}},onLoad:function(n){},mounted:function(){},computed:{},methods:{init:function(){var n=this;this._getDetail().then((function(){var t={title:"".concat(n.data.goodsName),desc:"这束花不错推荐给你",imgUrl:n.data.smallImgList[0],pagePath:"/pages/goods/detail?id=".concat(n.data.id)};n.jweixinFn(t)}))},_getDetail:function(){var n=c(o.default.mark((function n(){var t=this;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,(0,i.getDetail)({id:this.option.id}).then((function(n){if(t.$util.isEmpty(n.data))return!1;var e=[];for(var o in n.data.imgList)e.push({img:n.data.imgList[o]});t.imgList=e;var a=[];for(var i in n.data.goodsStyleList)a.push(n.data.goodsStyleList[i]);n.data.stock=n.data.stock?parseInt(n.data.stock):0,n.data.goodsStyleList=a,t.data=n.data}));case 2:case"end":return n.stop()}}),n,this)})));function t(){return n.apply(this,arguments)}return t}(),changeNum:function(n){this.buyNum=n.value},showPopup:function(){this.$util.isLogin()?this.popupShow=!0:this.loginShow=!0},hidePopup:function(){this.popupShow=!1},shareFn:function(){console.log("asdfasdf"),this.showShare=!0},hideShare:function(){this.showShare=!1}}};t.default=v},bbcb:function(n,t,e){"use strict";e.r(t);var o=e("f298"),a=e("17af");for(var i in a)"default"!==i&&function(n){e.d(t,n,(function(){return a[n]}))}(i);e("cc8a");var u,r=e("f0c5"),c=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"596287cf",null,!1,o["a"],u);t["default"]=c.exports},cc8a:function(n,t,e){"use strict";var o=e("eb83"),a=e.n(o);a.a},eb83:function(n,t,e){},f298:function(n,t,e){"use strict";var o,a=function(){var n=this,t=n.$createElement,e=(n._self._c,{type:"number",val:750});n.$mp.data=Object.assign({},{$root:{a0:e}})},i=[];e.d(t,"b",(function(){return a})),e.d(t,"c",(function(){return i})),e.d(t,"a",(function(){return o}))}},[["8fec","common/runtime","common/vendor"]]]);