detail.js 6.1 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/pick/detail/detail"],{"412b":function(n,t,e){"use strict";(function(n){e("8748");o(e("66fd"));var t=o(e("ac17"));function o(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,e("543d")["createPage"])},"4adc":function(n,t,e){"use strict";e.r(t);var o=e("f91f"),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},"6da6":function(n,t,e){"use strict";var o=e("8f88"),a=e.n(o);a.a},"8f88":function(n,t,e){},ac17:function(n,t,e){"use strict";e.r(t);var o=e("b4d7"),a=e("4adc");for(var i in a)"default"!==i&&function(n){e.d(t,n,(function(){return a[n]}))}(i);e("6da6");var c,r=e("f0c5"),u=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,"662b5c72",null,!1,o["a"],c);t["default"]=u.exports},b4d7:function(n,t,e){"use strict";var o,a=function(){var n=this,t=n.$createElement,e=(n._self._c,Number(110));n.$mp.data=Object.assign({},{$root:{m0:e}})},i=[];e.d(t,"b",(function(){return a})),e.d(t,"c",(function(){return i})),e.d(t,"a",(function(){return o}))},f91f:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(e("4795"));function a(n){return n&&n.__esModule?n:{default:n}}function i(n,t,e,o,a,i,c){try{var r=n[i](c),u=r.value}catch(s){return void e(s)}r.done?t(u):Promise.resolve(u).then(o,a)}function c(n){return function(){var t=this,e=arguments;return new Promise((function(o,a){var c=n.apply(t,e);function r(n){i(c,o,a,r,u,"next",n)}function u(n){i(c,o,a,r,u,"throw",n)}r(void 0)}))}}var r=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/app-quick-navigation/app-quick-navigation")]).then(function(){return resolve(e("cf64"))}.bind(null,e)).catch(e.oe)},u=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/goods/app-goods-banner")]).then(function(){return resolve(e("de38"))}.bind(null,e)).catch(e.oe)},s=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/goods/app-goods-price")]).then(function(){return resolve(e("50c2"))}.bind(null,e)).catch(e.oe)},d=function(){e.e("components/page-component/goods/app-goods-attr").then(function(){return resolve(e("e7a9"))}.bind(null,e)).catch(e.oe)},p=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/app-attr/app-attr")]).then(function(){return resolve(e("4761"))}.bind(null,e)).catch(e.oe)},l=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/goods/app-goods-marketing")]).then(function(){return resolve(e("b3c0"))}.bind(null,e)).catch(e.oe)},m=function(){Promise.all([e.e("common/vendor"),e.e("components/basic-component/app-jump-button/app-jump-button")]).then(function(){return resolve(e("9e5c"))}.bind(null,e)).catch(e.oe)},f=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/app-goods-list/app-goods-list")]).then(function(){return resolve(e("e27d"))}.bind(null,e)).catch(e.oe)},v=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/goods/app-goods-service")]).then(function(){return resolve(e("be7d"))}.bind(null,e)).catch(e.oe)},h=function(){e.e("components/page-component/goods/app-goods-detail").then(function(){return resolve(e("04ea"))}.bind(null,e)).catch(e.oe)},g=function(){e.e("components/page-component/app-goods-recommend/app-goods-recommend").then(function(){return resolve(e("b702"))}.bind(null,e)).catch(e.oe)},b=function(){Promise.all([e.e("common/vendor"),e.e("components/basic-component/app-iphone-x/app-iphone-x")]).then(function(){return resolve(e("bd7b"))}.bind(null,e)).catch(e.oe)},_=function(){Promise.all([e.e("common/vendor"),e.e("components/basic-component/app-empty-bottom/app-empty-bottom")]).then(function(){return resolve(e("51dc"))}.bind(null,e)).catch(e.oe)},k=function(){Promise.all([e.e("common/vendor"),e.e("components/page-component/app-vip-card/app-vip-card")]).then(function(){return resolve(e("744f"))}.bind(null,e)).catch(e.oe)},y={name:"detail",data:function(){return{detail:{},attrShow:0,selectAttr:{},is_vip:!1,discount:null,is_vip_card_user:0,shareData:{},recommend_list:[],activity:{},shareUrl:"",activity_status:1,loading:!1}},components:{"app-quick-navigation":r,appGoodsBanner:u,appGoodsPrice:s,appGoodsAttr:d,appAttr:p,appGoodsMarketing:l,appJumpButton:m,"app-goods-list":f,"app-goods-service":v,"app-goods-detail":h,"app-goods-recommend":g,appIphoneX:b,appEmptyBottom:_,AppVipCard:k},methods:{getDetail:function(n){var t=this;return c(o.default.mark((function e(){var a;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!1,t.$showLoading(),e.next=4,t.$request({url:t.$api.pick.goods,method:"get",data:{id:n}});case 4:a=e.sent,0===a.code&&(t.detail=a.data.detail,t.activity=a.data.activity,t.recommend_list=a.data.list,t.shareUrl="".concat(t.$api.pick.poster,"&goods_id=").concat(t.detail.id),t.activity_status=a.data.activity_status),t.loading=!0,t.$hideLoading();case 8:case"end":return e.stop()}}),e)})))()},onAttr:function(n){this.selectAttr=n},quickShare:function(n){this.shareData=n},clickAttr:function(t){1===this.activity_status&&(1===t?this.attrShow=Math.random():n.navigateTo({url:"/plugins/pick/pond/pond?rule_num=".concat(this.activity.rule_num,"&pick_activity_id=").concat(this.activity.id)}))},add:function(t,e){var a=this;return c(o.default.mark((function i(){var c;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,a.$request({url:a.$api.pick.add,data:{goods_id:t.goods_id,attr:t.id,num:e,pick_activity_id:a.activity.id}});case 2:c=o.sent,0===c.code&&n.navigateBack();case 4:case"end":return o.stop()}}),i)})))()},back:function(){n.navigateTo({url:"/plugins/pick/index/index"})},favorite:function(){var t=this.$api.user.favorite_add,e=!0;this.detail.favorite&&(t=this.$api.user.favorite_remove,e=!1),this.detail.favorite=e,this.$request({url:t,data:{goods_id:this.detail.id}}).then((function(t){0===t.code||n.showModal({title:"提示",content:t.msg,showCancel:!1})})).catch((function(n){}))}},onLoad:function(n){this.getDetail(n.goods_id)}};t.default=y}).call(this,e("543d")["default"])}},[["412b","common/runtime","common/vendor"]]]);