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