"use strict";const e=require("../../common/vendor.js"),s=require("../../sheep/index.js"),r=require("../../sheep/components/s-share-modal/canvas-poster/useCanvas.js");require("../../sheep/store/index.js"),require("../../sheep/helper/index.js"),require("../../sheep/request/index.js");const i=require("../../sheep/api/distri/share.js");if(require("../../sheep/url/index.js"),require("../../sheep/config/index.js"),require("../../sheep/router/index.js"),require("../../sheep/hooks/useModal.js"),require("../../sheep/helper/test.js"),require("../../sheep/api/member/auth.js"),require("../../sheep/api/member/signin.js"),require("../../sheep/helper/throttle.js"),require("../../sheep/platform/index.js"),require("../../sheep/platform/provider/wechat/index.js"),require("../../sheep/platform/provider/wechat/miniProgram.js"),require("../../sheep/api/member/social.js"),require("../../sheep/api/member/user.js"),require("../../sheep/platform/provider/apple/index.js"),require("../../sheep/platform/share.js"),require("../../sheep/platform/pay.js"),require("../../sheep/api/pay/order.js"),require("../../sheep/config/zIndex.js"),require("../../sheep/components/s-share-modal/canvas-poster/poster/index.js"),require("../../sheep/components/s-share-modal/canvas-poster/poster/user.js"),require("../../sheep/components/s-share-modal/canvas-poster/poster/goods.js"),require("../../sheep/components/s-share-modal/canvas-poster/poster/groupon.js"),require("../../sheep/api/infra/file.js"),require("../../sheep/store/app.js"),require("../../sheep/api/promotion/diy.js"),require("../../sheep/store/user.js"),require("../../sheep/store/cart.js"),require("../../sheep/api/trade/cart.js"),require("../../sheep/api/pay/wallet.js"),require("../../sheep/api/trade/order.js"),require("../../sheep/api/promotion/coupon.js"),require("../../sheep/store/sys.js"),require("../../sheep/store/modal.js"),require("../../sheep/helper/digit.js"),!Array){e.resolveComponent("s-layout")()}Math;const p={__name:"qrcode-share",setup(p){const a=e.reactive({linkId:0}),t=e.reactive({canvasId:"canvasId",width:.9*s.sheep.$platform.device.windowWidth,height:600,src:""}),o=e.getCurrentInstance();async function h(){i.ShareApi.getLinkId(1).then((e=>{0===e.code&&(a.linkId=e.data.linkId,async function(e){t.src="",t.shareInfo={title:"",desc:"",image:"",path:"",link:"http://192.168.0.110:8000/#/pages/index/user?linkId="+a.linkId,poster:{type:"user"}},await r.useCanvas(t,o)}())}))}const n=()=>{["WechatOfficialAccount","H5"].includes(s.sheep.$platform.name)?s.sheep.$helper.toast("请长按图片保存"):e.index.saveImageToPhotosAlbum({filePath:t.src,success:e=>{onClosePoster(),s.sheep.$helper.toast("保存成功")},fail:e=>{s.sheep.$helper.toast("保存失败"),console.log("图片保存失败:",e)}})};return e.onLoad((async()=>{await h()})),(r,i)=>e.e({a:""===t.src},""===t.src?{b:t.height+"px",c:t.width+"px"}:{d:t.src,e:t.height+"px",f:t.width+"px"},{g:t.canvasId,h:t.canvasId,i:t.height+"px",j:t.width+"px",k:e.t((["wechatOfficialAccount","H5"].includes(e.unref(s.sheep).$platform.name),"长按图片保存")),l:e.o(n),m:e.p({title:"我的二维码/分享页"})})}},a=e._export_sfc(p,[["__scopeId","data-v-a25c9bbc"]]);wx.createPage(a);
