(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/exchange/gift/gift"],{"59b5":function(e,t,n){"use strict";n.r(t);var o=n("f5ca"),r=n("6010");for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("e43c");var i,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,"b78a1878",null,!1,o["a"],i);t["default"]=u.exports},6010:function(e,t,n){"use strict";n.r(t);var o=n("ebb3"),r=n.n(o);for(var a in o)"default"!==a&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=r.a},"7444b":function(e,t,n){},d4b51:function(e,t,n){"use strict";(function(e){n("b8bc");o(n("66fd"));var t=o(n("59b5"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},e43c:function(e,t,n){"use strict";var o=n("7444b"),r=n.n(o);r.a},ebb3:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n("a34a")),r=n("2f62");function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,o,r,a,i){try{var c=e[a](i),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(o,r)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function c(e){i(a,o,r,c,u,"next",e)}function u(e){i(a,o,r,c,u,"throw",e)}c(void 0)}))}}function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(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 f=function(){n.e("components/page-component/goods/app-goods-banner").then(function(){return resolve(n("b169"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("components/page-component/app-share-qr-code-poster/app-share-qr-code-poster").then(function(){return resolve(n("b12d"))}.bind(null,n)).catch(n.oe)},p=function(){n.e("components/page-component/goods/bd-detail").then(function(){return resolve(n("c91c"))}.bind(null,n)).catch(n.oe)},h={name:"goods",data:function(){return{shareShow:!1,goods:{},url:this.$api.exchange.qrcode,show:!1,list:[],code:null,status:"",windowHeight:667,loading:!1,first:!0}},onLoad:function(t){var n=this;n.code=t.code,n.windowHeight=e.getSystemInfoSync().windowHeight,n.$showLoading({type:"global",text:"加载中..."}),n.request({url:n.$api.exchange.me_detail,data:{code:n.code}}).then((function(e){if(e){n.first=!1;var t=e.goods_attr,o=e.code,r=e.status;n.url=n.url+"&code="+o,n.goods=t,n.code=o,n.status=r,n.loading=!0,n.$hideLoading()}}))},onShow:function(){var e=this;if(this.first)return!1;this.$showLoading(),this.$nextTick((function(){var t=e;t.request({url:t.$api.exchange.me_detail,data:{code:t.code}}).then((function(e){var n=e.goods_attr,o=e.code,r=e.status;t.goods=n,t.code=o,t.status=r,t.loading=!0,t.$hideLoading()}))}))},computed:s(s(s({},(0,r.mapState)("gConfig",{iphone:function(e){return e.iphone},iphoneHeight:function(e){return e.iphoneHeight}})),(0,r.mapGetters)("mallConfig",{getTheme:"getTheme"})),(0,r.mapState)({mall:function(e){return e.mallConfig.mall},userInfo:function(e){return e.user.info}})),onShareAppMessage:function(){return this.$shareAppMessage({path:"/plugins/exchange/gift/gift",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:"",params:{code:this.code}})},methods:{copy:function(){e.setClipboardData({data:this.code,success:function(){e.hideToast(),e.getClipboardData({success:function(){e.showToast({title:"内容已复制",duration:1e3,icon:"none"})},fail:function(e){}})}})},toExchange:function(){e.navigateTo({url:"/plugins/exchange/detail/detail?code="+this.code})},request:function(t){var n=this;return c(o.default.mark((function r(){var a,i,c;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return a=t.url,i=t.data,o.next=3,n.$request({url:a,data:i});case 3:if(c=o.sent,0!==c.code){o.next=8;break}return o.abrupt("return",c.data);case 8:e.showModal({title:"提示",content:c.msg,showCancel:!1,success:function(t){e.navigateBack()}});case 9:case"end":return o.stop()}}),r)})))()}},components:{"app-banner":f,"app-share-qr-code":l,bdDetail:p}};t.default=h}).call(this,n("543d")["default"])},f5ca:function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var r=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.shareShow=!0})},a=[]}},[["d4b51","common/runtime","common/vendor"]]]);