(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/payment-code/payment-code"],{"2e7ab":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"payment-code",components:{},data:function(){return{edit:!1,pic_url:"",save_loading:!1,price:"",tmp_price:""}},onLoad:function(t){this.submit()},methods:{savePrice:function(t){this.edit=!0},submit:function(){var e=this,n=e.tmp_price?parseFloat(parseFloat(e.tmp_price).toFixed(2)):"";e.$showLoading({text:"生成中"}),e.$request({url:e.$api.scan_code_pay.qr_code,method:"POST",data:{price:n}}).then((function(o){if(e.$hideLoading(),0===o.code){var c=[o.data.qr_code.file_path,n,n,!1];e.pic_url=c[0],e.price=c[1],e.tmp_price=c[2],e.edit=c[3]}else t.showToast({icon:"none",title:o.msg})})).catch((function(t){e.$hideLoading()}))},qrcodeClick:function(e){t.previewImage({urls:[this.pic_url]})},saveQrcode:function(){var e=this;e.$showLoading({title:"正在保存图片"}),t.downloadFile({url:e.pic_url,success:function(n){t.saveImageToPhotosAlbum({filePath:n.tempFilePath,success:function(){t.showToast({title:"保存成功"})},fail:function(e){console.log(e.errMsg),e.errMsg&&t.showModal({title:"提示",content:"您好,请先授权保存到相册权限",showCancel:!1,success:function(e){e.confirm&&t.openSetting({success:function(e){e.authSetting["scope.writePhotosAlbum"]?t.saveImageToPhotosAlbum({filePath:n.tempFilePath,success:function(){t.showToast({title:"保存成功"})}}):t.showModal({title:"提示",content:"授权失败，请稍后重新获取",showCancel:!1})}})}})},complete:function(t){e.$hideLoading()}})},fail:function(e){t.showModal({title:"图片下载失败",content:e.errMsg,showCancel:!1})},complete:function(t){e.$hideLoading()}})}}};e.default=n}).call(this,n("543d")["default"])},"4cc1":function(t,e,n){"use strict";var o=n("bbdd"),c=n.n(o);c.a},9728:function(t,e,n){"use strict";var o,c=function(){var t=this,e=t.$createElement;t._self._c},i=[];n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}))},bbdd:function(t,e,n){},c963:function(t,e,n){"use strict";(function(t){n("8748");o(n("66fd"));var e=o(n("fe7a"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},e098:function(t,e,n){"use strict";n.r(e);var o=n("2e7ab"),c=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=c.a},fe7a:function(t,e,n){"use strict";n.r(e);var o=n("9728"),c=n("e098");for(var i in c)"default"!==i&&function(t){n.d(e,t,(function(){return c[t]}))}(i);n("4cc1");var a,u=n("f0c5"),s=Object(u["a"])(c["default"],o["b"],o["c"],!1,null,"54efd94f",null,!1,o["a"],a);e["default"]=s.exports}},[["c963","common/runtime","common/vendor"]]]);