"use strict";var e=require("../common/vendor.js"),o=require("../api/companyUser.js");require("../common/request.js");const i={data:()=>({imageUrl:"",urlVal:"",companyUserId:""}),onShareAppMessage(e){return console.log("fe===",this.imageUrl),{title:"立即绑定，享受更多权益",path:"/pages_user/bindCompanyUser?companyUserId="+this.companyUserId,imageUrl:this.imageUrl}},onShareTimeline(e){return{title:"立即绑定，享受更多权益",query:"companyUserId="+this.companyUserId,imageUrl:this.imageUrl}},onLoad(){this.companyUserId=e.index.getStorageSync("companyUserId")||"",this.getInfo()},methods:{getInfo(){o.getBindInfo().then((o=>{200==o.code?(this.imageUrl=o.imageUrl,this.urlVal=o.url):e.index.showToast({title:o.msg,icon:"none"})}))},copyUrl(){e.index.setClipboardData({data:this.urlVal,success:()=>{e.index.showToast({title:"复制成功",icon:"none"})},fail:()=>{e.index.showToast({title:"复制失败",icon:"none"})}})},downImg(){e.index.showLoading({title:"图片保存中..."}),e.index.downloadFile({url:this.imageUrl,fail:function(o){e.index.showModal({title:"提示",content:"保存失败"}),e.index.hideLoading()},success:function(o){var i=o.tempFilePath;e.index.saveImageToPhotosAlbum({filePath:i,success:()=>{e.index.showToast({title:"保存成功",duration:2e3})},fail:()=>{console.log("图片失败"),e.index.showToast({title:"图片失败",duration:2e3,icon:"error"}),e.index.hideLoading()},complete:function(){e.index.hideLoading()}})}})}}};if(!Array){(e.resolveComponent("u-icon")+e.resolveComponent("u-empty"))()}Math||((()=>"../uni_modules/uview-plus/components/u-icon/u-icon.js")+(()=>"../uni_modules/uview-plus/components/u-empty/u-empty.js"))();var n=e._export_sfc(i,[["render",function(o,i,n,t,a,s){return e.e({a:a.imageUrl||a.urlVal},a.imageUrl||a.urlVal?{b:a.imageUrl,c:e.p({name:"share-square",size:"30",color:"#222"}),d:e.p({name:"download",size:"30",color:"#222"}),e:e.o((e=>s.downImg()))}:{g:e.p({mode:"data",icon:"https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",text:"暂无数据"})},{f:o.imgurl})}],["__scopeId","data-v-747551b2"]]);i.__runtimeHooks=6,wx.createPage(n);
