import{_ as L}from"./index.01003c78.js";import{_ as A}from"./pic.216038e4.js";import{_ as M,g as a,u as e,o as l,f as u,a as i,P as V,b as C,S,t as k,c as G,w as y,n as m,K as F,r as U,F as R,k as j,R as z,b5 as J,l as K,y as O,p as H,e as Q}from"./entry.a1451ca0.js";const W={key:0,class:"tourGuideContainer"},X={class:"bubble"},Y={class:"text-fff font-24 font-w-700"},Z={class:"font-16"},ee={class:"text-fff font-16 my-16"},te={__name:"index",setup(t,{expose:q}){const $=a(!1),c=a(8),h=a(0),w=a(0),s=a({}),x=a(null),r=a([]),f=a(0),B=(v,n)=>{var g,_,o;x.value=n,r.value=v,x.value?s.value=(g=x.value)==null?void 0:g.getBoundingClientRect():(s.value=(o=(_=r.value[0])==null?void 0:_.ref)==null?void 0:o.getBoundingClientRect(),c.value=4),b(0),$.value=!0},b=v=>{var g,_,o,p;f.value=v,x.value||(s.value=(_=(g=r.value[v])==null?void 0:g.ref)==null?void 0:_.getBoundingClientRect());let n=((p=(o=r.value[v])==null?void 0:o.ref)==null?void 0:p.getBoundingClientRect())||{};h.value=n.left+n.width/2-40,w.value=n.top+n.height/2-10};return q({open:B}),(v,n)=>{const g=A,_=L;return e($)?(l(),u("div",W,[i("div",{class:"tourGuide",style:V({clipPath:`polygon(0% 0%, 0% 100%, ${e(s).left-e(c)}px 100%, ${e(s).left-e(c)}px ${e(s).top-e(c)}px, ${e(s).right+e(c)}px ${e(s).top-e(c)}px, ${e(s).right+e(c)}px ${e(s).bottom+e(c)}px, ${e(s).left-e(c)}px ${e(s).bottom+e(c)}px, ${e(s).left-e(c)}px 100%, 100% 100%, 100% 0%)`})},null,4),i("div",{class:"fingerContain",style:V({left:e(h)+"px",top:e(w)+"px"})},[C(g,{class:"w-60",src:"/svg/finger/finger_line_black.svg"}),i("div",X,[i("div",Y,[S(k(e(r)[e(f)].title)+" ",1),i("span",Z,"("+k(e(f)+1)+" / "+k(e(r).length)+")",1)]),i("div",ee,k(e(r)[e(f)].content),1),e(f)<e(r).length-1?(l(),G(_,{key:0,class:"text-black mr-8",size:"small",radius:4,onClick:n[0]||(n[0]=o=>b(e(f)+1))},{default:y(()=>[S("下一步")]),_:1})):m("",!0),e(f)==e(r).length-1?(l(),G(_,{key:1,class:"text-black mr-8",size:"small",radius:4,onClick:n[1]||(n[1]=o=>b(e(f)-1))},{default:y(()=>[S("上一步")]),_:1})):m("",!0),C(_,{type:"main",size:"small",radius:4,onClick:n[2]||(n[2]=o=>$.value=!1)},{default:y(()=>[S("跳过")]),_:1})])],4)])):m("",!0)}}},oe=M(te,[["__scopeId","data-v-09868601"]]),ne=""+globalThis.__publicAssetsURL("img/JP0663SC.png"),se=""+globalThis.__publicAssetsURL("img/uploadManage.png");const N=t=>(H("data-v-60389c5b"),t=t(),Q(),t),le={class:"flex-center"},ae={class:"font-w-700 font-24 text-black"},ie={class:"pt-16 d-flex flex-wrap px-8"},ce=["onClick"],ue=["src"],re={class:"my-4 font-12"},de={class:"d-flex"},fe=["onClick"],_e=["onClick"],pe={key:0,src:ne,class:"cursor-pointer pic"},me={key:1,src:se,class:"cursor-pointer pic"},ge=N(()=>i("div",{class:"my-4 font-12"},"多平台上传",-1)),ve=N(()=>i("div",{class:"add-btn",style:{background:"#eaeaea",color:"#333",cursor:"default"}},"推荐",-1)),he={key:0,class:"align-center py-8 text-color"},xe={class:"text-main-color font-16"},ke={__name:"index",props:{mode:{type:String,default:"dianpu"},modelValue:{type:Boolean,default:!1},isUpdatePage:{type:Boolean,default:!1},title:{type:String,default:"店铺授权"}},emits:["update:modelValue","success"],setup(t,{expose:q,emit:$}){const c=t,h=a(!1),w=a(null),s=a(null),x=a(null),r=a(null),f=a(null),B=F(),b=a("");a(!1);function v(){O.shouquanliianjie().then(o=>{o.code==200?(h.value=!0,b.value=o.data||[]):ElMessage.error(o.msg)}).catch(()=>ElMessage.error("获取店铺链接和授权出错"))}function n(o,p,I){if(c.title=="店铺授权"){window.open(o[p],"_blank");return}if(c.title=="一键上传"){if(p=="goumai"){window.open(o[p],"_blank");return}if(p=="shouquan"&&I!="all"){window.open(o[p],"_blank");return}}$("success")}function g(){window.location.reload()}function _(){let o=[{ref:r.value[0],title:"第一步",content:"首先购买平台店铺"},{ref:f.value[0],title:"第二步",content:"点击授权"},{ref:x.value[0],title:"第三步",content:"点击前往上传商品"}];w.value.open(o,s.value[0])}return q({open:v}),(o,p)=>{const I=L,T=U("el-icon"),D=U("el-dialog"),E=oe;return l(),u(R,null,[C(D,{modelValue:e(h),"onUpdate:modelValue":p[0]||(p[0]=d=>K(h)?h.value=d:null),title:t.title,width:"680rem","align-center":"",class:"customDialog bg-color",style:{padding:"0 0 16rem 0"},"lock-scroll":!1},{title:y(()=>[i("div",le,[i("span",ae,k(t.title),1),t.title=="一键上传"?(l(),G(I,{key:0,class:"ml-8 font-12",type:"main",radius:4,style:{padding:"2rem 8rem"},onClick:_},{default:y(()=>[S("操作步骤")]),_:1})):m("",!0)])]),default:y(()=>[i("div",ie,[(l(!0),u(R,null,j(e(b),(d,ye)=>(l(),u(R,null,[d[t.mode]?(l(),u("div",{key:0,ref_for:!0,ref_key:"tourContainRef",ref:s,class:"add-item",onClick:P=>n(d[t.mode],"shouquan","all")},[i("img",{ref_for:!0,ref_key:"logoRef",ref:x,src:d.src,class:"cursor-pointer pic"},null,8,ue),i("div",re,k(d.name),1),i("div",de,[d[t.mode].goumai?(l(),u("div",{key:0,ref_for:!0,ref_key:"goumaiRef",ref:r,class:"add-btn",style:V({background:d.color}),onClick:z(P=>n(d[t.mode],"goumai"),["stop"])},"购买",12,fe)):m("",!0),d[t.mode].shouquan?(l(),u("div",{key:1,ref_for:!0,ref_key:"shouquanRef",ref:f,class:"add-btn ml-4",style:V({background:d.color}),onClick:z(P=>n(d[t.mode],"shouquan"),["stop"])},"授权",12,_e)):m("",!0)])],8,ce)):m("",!0)],64))),256)),t.title=="一键上传"?(l(),u("div",{key:0,class:"add-item",onClick:n},[e(B)?(l(),u("img",pe)):m("",!0),e(B)?m("",!0):(l(),u("img",me)),ge,ve])):m("",!0)]),t.title=="店铺授权"?(l(),u(R,{key:0},[t.isUpdatePage?(l(),u("p",he," 添加店铺或授权店铺前，先退出当前网页登录的店铺，再点击上方图标授权")):m("",!0),i("div",{class:"flex-center border-top pt-16 cursor-pointer",onClick:g},[C(T,{size:20,color:"#ff5500",class:"mt-4 mr-4"},{default:y(()=>[C(e(J))]),_:1}),i("div",xe,k(t.isUpdatePage?"添加完成后请刷新本页,如不成功重新再授权":"添加完成后请刷新本页"),1)])],64)):(l(),u(R,{key:1},[],64))]),_:1},8,["modelValue","title"]),C(E,{ref_key:"tourGuideRef",ref:w},null,512)],64)}}},we=M(ke,[["__scopeId","data-v-60389c5b"]]);export{we as _};
