"use strict";const e=require("../../../../../common/vendor.js"),r=require("./user.js"),t=require("./goods.js"),o=require("./groupon.js"),a=require("../../../../index.js"),s=require("../../../../api/infra/file.js");let n=e.ref("");async function u(e){await s.FileApi.getFileIO(e).then((e=>{n.value=window.URL.createObjectURL(e)}))}exports.formatImageUrlProtocol=function(e){return 0===e.indexOf("http:")&&(e=e.replace("http:","https:")),e},exports.getPosterData=async function(s){const i=a.sheep.$store("user").userInfo;console.log(JSON.parse(e.index.getStorageSync("user-store")).userInfo);let c=i.avatar;switch(s.shareInfo.poster.type){case"user":return await u(c),s.avatar=n.value,r.user(s);case"goods":return await u(c),s.avatar=n.value,await u(s.shareInfo.poster.image),s.shareInfo.poster.image=n.value,t.goods(s);case"groupon":return o.groupon(s)}};
