(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/poster/poster"],{"56d4":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={data:function(){return{card_id:0,coupon_id:0,info:{}}},computed:i(i({},(0,o.mapGetters)("mallConfig",{getTheme:"getTheme"})),(0,o.mapState)({poster_img:function(t){return t.mallConfig.__wxapp_img.poster}})),methods:{submitSave:function(){var e=this;this.$showLoading({text:"生成中"});var n,o,r=this;r.card_id>0&&(n=r.$api.poster.card_share,o={cardId:r.card_id}),r.coupon_id>0&&(n=r.$api.poster.coupon_share,o={coupon_id:r.coupon_id}),r.$request({url:n,data:o}).then((function(n){e.$hideLoading();var o=n.code,r=n.data,i=n.msg;if(0===o){var a=r.pic_url;e.$utils.batchSave(a,"image").then((function(){t.showToast({title:"保存成功"})}))}else t.showToast({title:i,icon:"none"})})).catch((function(){e.$hideLoading()}))},getList:function(){var e,n,o=this;o.card_id>0&&(e=o.$api.poster.card,n={cardId:o.card_id}),o.coupon_id>0&&(e=o.$api.poster.coupon,n={coupon_id:o.coupon_id}),o.$request({url:e,data:n}).then((function(e){0==e.code?o.info=e.data:(o.$hideLoading(),t.showToast({title:e.msg,icon:"none",duration:1e3}))})).catch((function(t){o.$hideLoading()}))}},onLoad:function(t){this.$commonLoad.onload(t);var e=this;t.card_id>0&&(e.card_id=t.card_id),t.coupon_id>0&&(e.coupon_id=t.coupon_id),e.getList()}};e.default=c}).call(this,n("543d")["default"])},"741f":function(t,e,n){"use strict";var o=n("e841"),r=n.n(o);r.a},"9ac2":function(t,e,n){"use strict";var o;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var r=function(){var t=this,e=t.$createElement;t._self._c},i=[]},a2fe:function(t,e,n){"use strict";(function(t){n("2d0a");o(n("66fd"));var e=o(n("d01a"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},bfd9:function(t,e,n){"use strict";n.r(e);var o=n("56d4"),r=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},d01a:function(t,e,n){"use strict";n.r(e);var o=n("9ac2"),r=n("bfd9");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("741f");var a,c=n("f0c5"),u=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,"6b71391c",null,!1,o["a"],a);e["default"]=u.exports},e841:function(t,e,n){}},[["a2fe","common/runtime","common/vendor"]]]);