import{c as t,f as a,m as e,j as s,w as i,i as n,t as o,l,e as r,x as d}from"./index.a22d62f2.js";import{_ as u}from"./plugin-vue_export-helper.21dcd24c.js";var c=u({name:"technicalSupport",data:()=>({userData:{},url:""}),onLoad:function(t){window.location.href=`https://redirectwx.edstao.com/#/pages/good/share?etaomallId=${t.etaomallId}&link=${t.link}&title=${t.title}&skuId=${t.skuId}&brandName=${t.brandName}&mainImg=${t.mainImg}`},mounted(){this.getUrl(),this.wxSign()},beforeDestroy(){window.location.href=`https://${this.userData.link}.edstao.com/#/pages/good/detail?skuId=${this.userData.skuId}`},methods:{goback(){window.location.href=`https://${this.userData.link}.edstao.com/#/pages/good/detail?skuId=${this.userData.skuId}`},getUrl(){let t=decodeURIComponent(window.location.href);const a={};t.replace(/([^?&=]+)=([^&]+)/g,((t,e,s)=>a[e]=s)),console.log(a,"qqqqqqqqqq"),this.userData=a},wxSign(){let a=this;t.wxSign({skuId:this.userData.skuId,etaomallId:this.userData.etaomallId,url:window.location.href}).then((t=>{a.url=t.redirecturl,a.initWX(t)}))},initWX(t){let a=this;const e=window._wx,s={debug:!1,appId:t.appid,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:["updateAppMessageShareData"]};console.log(s),e.config(s),e.ready((function(){e.updateAppMessageShareData({title:"商城-"+a.userData.brandName,desc:a.userData.title,link:t.redirecturl,imgUrl:a.userData.mainImg,success:function(t){}})})),e.error((function(t){}))}}},[["render",function(t,u,c,p,g,m){const h=r("van-icon"),f=d,w=r("van-sticky");return a(),e("div",{style:{background:"#ffffff",height:"100vh","line-height":"50px"}},[s(w,null,{default:i((()=>[s(f,{class:"top-bar top_bar justify-center bg-white sh"},{default:i((()=>[s(h,{class:"top-left",name:"arrow-left",onClick:m.goback},null,8,["onClick"]),n("p",null,"分享详情")])),_:1})])),_:1}),n("div",{style:{padding:"20px"}},[n("p",null,"标题：商城- "+o(g.userData.brandName),1),n("p",null,"商品描述："+o(g.userData.title),1),n("p",null,[l("商品图片："),n("img",{style:{width:"120px","vertical-align":"top"},src:g.userData.mainImg,alt:""},null,8,["src"])])])])}]]);export{c as default};
