"use strict";var e=require("../common/vendor.js"),a=require("../api/companyUser.js");require("../common/request.js");const s={data(){return{imageUrl:"",urlVal:"",companyUserId:""}},onShareAppMessage(o){return console.log("fe===",this.imageUrl),{title:"\u7ACB\u5373\u7ED1\u5B9A\uFF0C\u4EAB\u53D7\u66F4\u591A\u6743\u76CA",path:"/pages_user/bindCompanyUser?companyUserId="+this.companyUserId,imageUrl:this.imageUrl}},onShareTimeline(o){return{title:"\u7ACB\u5373\u7ED1\u5B9A\uFF0C\u4EAB\u53D7\u66F4\u591A\u6743\u76CA",query:"companyUserId="+this.companyUserId,imageUrl:this.imageUrl}},onLoad(){this.companyUserId=e.index.getStorageSync("companyUserId")||"",this.getInfo()},methods:{getInfo(){a.getBindInfo().then(o=>{o.code==200?(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:"\u590D\u5236\u6210\u529F",icon:"none"})},fail:()=>{e.index.showToast({title:"\u590D\u5236\u5931\u8D25",icon:"none"})}})},downImg(){e.index.showLoading({title:"\u56FE\u7247\u4FDD\u5B58\u4E2D..."}),e.index.downloadFile({url:this.imageUrl,fail:function(o){e.index.showModal({title:"\u63D0\u793A",content:"\u4FDD\u5B58\u5931\u8D25"}),e.index.hideLoading()},success:function(o){var i=o.tempFilePath;e.index.saveImageToPhotosAlbum({filePath:i,success:()=>{e.index.showToast({title:"\u4FDD\u5B58\u6210\u529F",duration:2e3})},fail:()=>{console.log("\u56FE\u7247\u5931\u8D25"),e.index.showToast({title:"\u56FE\u7247\u5931\u8D25",duration:2e3,icon:"error"}),e.index.hideLoading()},complete:function(){e.index.hideLoading()}})}})}}};if(!Array){const o=e.resolveComponent("u-icon"),i=e.resolveComponent("u-empty");(o+i)()}const r=()=>"../uni_modules/uview-plus/components/u-icon/u-icon.js",c=()=>"../uni_modules/uview-plus/components/u-empty/u-empty.js";Math||(r+c)();function l(o,i,u,d,n,t){return e.e({a:n.imageUrl||n.urlVal},n.imageUrl||n.urlVal?{b:n.imageUrl,c:e.p({name:"share-square",size:"30",color:"#222"}),d:e.p({name:"download",size:"30",color:"#222"}),e:e.o(p=>t.downImg())}:{g:e.p({mode:"data",icon:"https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png",text:"\u6682\u65E0\u6570\u636E"})},{f:o.imgurl})}var m=e._export_sfc(s,[["render",l],["__scopeId","data-v-274173f4"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_company/bindInfo.vue"]]);s.__runtimeHooks=6;wx.createPage(m);
