(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/mch/mch/qrcode/qrcode"],{"11b5":function(e,t,n){"use strict";var o;n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o}));var c=function(){var e=this,t=e.$createElement;e._self._c},r=[]},"6a94":function(e,t,n){},"809f":function(e,t,n){"use strict";n.r(t);var o=n("11b5"),c=n("e520");for(var r in c)"default"!==r&&function(e){n.d(t,e,(function(){return c[e]}))}(r);n("e1dd");var i,a=n("f0c5"),u=Object(a["a"])(c["default"],o["b"],o["c"],!1,null,"4a066bfa",null,!1,o["a"],i);t["default"]=u.exports},e044:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62");function c(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 r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={name:"qrcode",computed:r({},(0,o.mapState)({appImg:function(e){return e.mallConfig.plugin.mch.app_image}})),components:{},data:function(){return{qr_code:null,mch:null,mch_id:0}},onLoad:function(t){var n=this;n.mch_id=t.mch_id,n.$request({url:n.$api.mch.qr_code,data:{mch_id:n.mch_id}}).then((function(t){0===t.code?(n.mch=t.data.mch,n.qr_code=t.data.qr_code):e.showToast({title:t.msg,icon:"none"})}))},methods:{saveQrcode:function(){var t=this,n=t.qr_code.file_path;e.showLoading({title:"图片保存中"}),e.downloadFile({url:n,success:function(t){e.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:function(){e.showToast({title:"保存成功"})},fail:function(n){n.errMsg&&e.showModal({title:"提示",content:"您好,请先授权保存到相册权限",showCancel:!1,success:function(n){n.confirm&&e.openSetting({success:function(n){n.authSetting["scope.writePhotosAlbum"]?e.saveImageToPhotosAlbum({filePath:t.tempFilePath,success:function(){e.showToast({title:"保存成功"})}}):e.showModal({title:"提示",content:"授权失败，请稍后重新获取",showCancel:!1})}})}})},complete:function(t){e.hideLoading()}})},fail:function(t){e.showModal({title:"图片下载失败",content:t.errMsg,showCancel:!1})},complete:function(t){e.hideLoading()}})}}};t.default=a}).call(this,n("543d")["default"])},e1dd:function(e,t,n){"use strict";var o=n("6a94"),c=n.n(o);c.a},e520:function(e,t,n){"use strict";n.r(t);var o=n("e044"),c=n.n(o);for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=c.a},ed1e:function(e,t,n){"use strict";(function(e){n("b8bc");o(n("66fd"));var t=o(n("809f"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])}},[["ed1e","common/runtime","common/vendor"]]]);