2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
import{g as y}from"./invite-CLAqi3e4.js";import{I as h}from"./index-B1jP4d3J.js";import{z as i,h as v,r as _,c as w,l as n,n as a,L as k,s as t,x as l,y as c,F as j,A as C,G as I,I as L,_ as A}from"./index-rDThlOme.js";const m=h("down",!1,function(o){return i("svg",{width:o.size,height:o.size,viewBox:"0 0 48 48",fill:"none"},[i("path",{d:"M36 18L24 30L12 18",stroke:o.colors[0],"stroke-width":o.strokeWidth,"stroke-linecap":o.strokeLinecap,"stroke-linejoin":o.strokeLinejoin},null)])}),B={class:"relative w-full min-h-screen mx-auto overflow-x-hidden bg-white pt-4 px-4"},N={class:"mb-6 p-4 bg-blue-50 rounded-xl shadow-sm"},V={class:"p-3 bg-white rounded-lg border border-gray-200 break-all text-sm text-gray-800"},z={class:"flex justify-between mb-6"},D={class:"text-center p-4 bg-white rounded-xl shadow-sm flex-1 mr-2"},Q={class:"text-2xl font-bold text-amber-600"},E={class:"text-center p-4 bg-white rounded-xl shadow-sm flex-1 ml-2"},F={class:"text-2xl font-bold text-amber-300"},S={class:"mb-6"},W={class:"group"},$={class:"cursor-pointer p-3 bg-white rounded-t-xl shadow-sm flex justify-between items-center"},G={class:"p-3 bg-white rounded-b-xl shadow-sm border-t border-gray-100"},M={class:"w-full text-xs text-left text-gray-600"},T={class:"py-2"},q={key:0,class:"text-gray-400"},H={key:1,class:"text-green-900"},J={key:2,class:"text-green-400"},K={key:3,class:"text-orange-400"},O={class:"py-2"},P={class:"space-y-3"},R={class:"group bg-white rounded-lg shadow-sm"},U={class:"list-none cursor-pointer p-3 flex justify-between items-center"},X={class:"group bg-white rounded-lg shadow-sm"},Y={class:"list-none cursor-pointer p-3 flex justify-between items-center"},Z={class:"group bg-white rounded-lg shadow-sm"},tt={class:"list-none cursor-pointer p-3 flex justify-between items-center"},et=v({__name:"invite",setup(o){const d=_({invite_list:[]}),u=w(()=>{var s;return`https://baobao.cells.org.cn/accept?code=${(s=d.value)==null?void 0:s.invite_code}`}),g=async()=>{let s=await y();console.log(s),d.value=s},b=()=>{const s=document.createElement("textarea");document.body.appendChild(s),s.value=u.value,s.select(),document.execCommand("Copy"),document.body.removeChild(s),L("复制成功")};return g(),(s,e)=>{var x,p;return a(),n("div",B,[e[12]||(e[12]=k('<section class="mb-6 overflow-hidden whitespace-nowrap bg-yellow-50 border-l-4 border-yellow-400 p-3 rounded-r-lg shadow-sm" data-v-dfe384d4><div class="scrolling-text text-sm text-yellow-700" data-v-dfe384d4> 🎉 恭喜 用户“小明”成功邀请好友获得 1 节免费课时!🎉 恭喜 用户“小红”成功邀请好友获得 1 节免费课时!🎉 </div></section><section class="mt-6 mb-8 text-center" data-v-dfe384d4><h1 class="text-2xl font-bold text-gray-800" data-v-dfe384d4>邀请好友得免费课时</h1><p class="mt-2 text-sm text-gray-600" data-v-dfe384d4>每成功邀请一位好友即可获得 1 节免费课程</p></section>',2)),t("section",N,[t("div",{class:"flex items-center justify-between mb-2"},[e[0]||(e[0]=t("span",{class:"text-sm font-medium text-gray-700"},"我的专属邀请链接:",-1)),t("button",{class:"px-3 rounded bg-white border border-blue-500",onClick:b}," 复制 ")]),t("div",V,l(u.value),1)]),t("section",z,[t("div",D,[e[1]||(e[1]=t("p",{class:"text-sm text-gray-600"},"已邀请人数",-1)),t("p",Q,l(((x=d.value)==null?void 0:x.invite_num)||0)+" 人",1)]),t("div",E,[e[2]||(e[2]=t("p",{class:"text-sm text-gray-600"},"累计获得课时",-1)),t("p",F,l(((p=d.value)==null?void 0:p.invite_reward_num)||0)+" 节",1)])]),t("section",S,[t("details",W,[t("summary",$,[e[3]||(e[3]=t("span",{class:"font-medium text-gray-700"},"查看我的邀请记录",-1)),i(c(m),{theme:"outline",class:"fas fa-chevron-down group-open:rotate-180 transition-transform duration-200 text-gray-500"})]),t("div",G,[t("table",M,[e[4]||(e[4]=t("thead",null,[t("tr",{class:"border-b border-gray-200"},[t("th",{class:"pb-2"},"昵称"),t("th",{class:"pb-2"},"状态"),t("th",{class:"pb-2"},"奖励")])],-1)),t("tbody",null,[(a(!0),n(j,null,C(d.value.invite_list,(r,f)=>(a(),n("tr",{class:"border-b border-gray-200",key:f},[t("td",T,l(r.invited_user_name),1),t("td",null,[r.invite_status==0?(a(),n("span",q,"未预约")):r.invite_status==1?(a(),n("span",H,"已预约")):r.invite_status==2?(a(),n("span",J,"已体验")):r.invite_status==3?(a(),n("span",K,"已被别人邀请")):I("",!0)]),t("td",O,l(r.reward_text),1)]))),128))])])])])]),e[13]||(e[13]=t("section",{class:"mb-6 p-4 bg-white rounded-xl shadow-sm"},[t("h3",{class:"font-medium text-gray-700 mb-2"},"如何领取奖励?"),t("p",{class:"text-sm text-gray-600 leading-relaxed"}," 邀请好友来完成体验课后,系统会自动放发奖励课时。 ")],-1)),t("section",null,[e[11]||(e[11]=t("h3",{class:"font-medium text-gray-700 mb-3"},"常见问题",-1)),t("div",P,[t("details",R,[t("summary",U,[e[5]||(e[5]=t("span",{class:"text-sm font-medium text-gray-700"},"Q: 如何才算成功邀请好友?",-1)),i(c(m),{theme:"outline",class:"fas fa-chevron-down group-open:rotate-180 transition-transform duration-200 text-gray-500"})]),e[6]||(e[6]=t("div",{class:"px-3 pb-3 text-sm text-gray-600"}," A: 好友通过您的邀请并完成首次课程学习即视为成功邀请。 ",-1))]),t("details",X,[t("summary",Y,[e[7]||(e[7]=t("span",{class:"text-sm font-medium text-gray-700"},"Q: 奖励何时到账?",-1)),i(c(m),{theme:"outline",class:"fas fa-chevron-down group-open:rotate-180 transition-transform duration-200 text-gray-500"})]),e[8]||(e[8]=t("div",{class:"px-3 pb-3 text-sm text-gray-600"}," A: 好友满足条件后的 24 小时内,奖励将自动发放到您的账户中。 ",-1))]),t("details",Z,[t("summary",tt,[e[9]||(e[9]=t("span",{class:"text-sm font-medium text-gray-700"},"Q: 是否有限制次数?",-1)),i(c(m),{theme:"outline",class:"fas fa-chevron-down group-open:rotate-180 transition-transform duration-200 text-gray-500"})]),e[10]||(e[10]=t("div",{class:"px-3 pb-3 text-sm text-gray-600"}," A: 本次活动不限制邀请人数,邀请越多奖励越多! ",-1))])])])])}}}),at=A(et,[["__scopeId","data-v-dfe384d4"]]);export{at as default};
|