2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
import{g as h}from"./invite-CY8sGJfP.js";import{z as i,h as y,r as v,c as w,l as n,n as a,L as _,s as t,x as d,y as c,F as k,A as j,G as C,N as I,I as L,_ as A}from"./index-C2VieYHK.js";import{I as N}from"./index-DeTfQ5AC.js";const m=N("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"},D={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"},Q={class:"text-center p-4 bg-white rounded-xl shadow-sm flex-1 mr-2"},S={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"},W={class:"mb-6"},G={class:"group"},M={class:"cursor-pointer p-3 bg-white rounded-t-xl shadow-sm flex justify-between items-center"},T={class:"p-3 bg-white rounded-b-xl shadow-sm border-t border-gray-100"},$={class:"w-full text-xs text-left text-gray-600"},q={class:"py-2"},H={key:0,class:"text-gray-400"},J={key:1,class:"text-green-900"},K={key:2,class:"text-green-400"},O={key:3,class:"text-orange-400"},P={class:"py-2"},R={class:"space-y-3"},U={class:"group bg-white rounded-lg shadow-sm"},X={class:"list-none cursor-pointer p-3 flex justify-between items-center"},Y={class:"group bg-white rounded-lg shadow-sm"},Z={class:"list-none cursor-pointer p-3 flex justify-between items-center"},tt={class:"group bg-white rounded-lg shadow-sm"},et={class:"list-none cursor-pointer p-3 flex justify-between items-center"},st=y({__name:"invite",setup(o){const l=v({invite_list:[]}),u=w(()=>{var s;return`https://ting.lifebanktech.com/accept?code=${(s=l.value)==null?void 0:s.invite_code}`}),b=async()=>{let s=await h();l.value=s,await I({shareData:{title:"",link:u.value}})},g=()=>{const s=document.createElement("textarea");document.body.appendChild(s),s.value=u.value,s.select(),document.execCommand("Copy"),document.body.removeChild(s),L("复制成功")};return b(),(s,e)=>{var x,p;return a(),n("div",B,[e[12]||(e[12]=_('<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-e9778ab9><div class="scrolling-text text-sm text-yellow-700" data-v-e9778ab9> 🎉 恭喜 用户“小明”成功邀请好友获得 1 节免费课时!🎉 恭喜 用户“小红”成功邀请好友获得 1 节免费课时!🎉 </div></section><section class="mt-6 mb-8 text-center" data-v-e9778ab9><h1 class="text-2xl font-bold text-gray-800" data-v-e9778ab9>邀请好友得免费课时</h1><p class="mt-2 text-sm text-gray-600" data-v-e9778ab9>每成功邀请一位好友即可获得 1 节免费课程</p></section>',2)),t("section",D,[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:g}," 复制 ")]),t("div",V,d(u.value),1)]),t("section",z,[t("div",Q,[e[1]||(e[1]=t("p",{class:"text-sm text-gray-600"},"已邀请人数",-1)),t("p",S,d(((x=l.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,d(((p=l.value)==null?void 0:p.invite_reward_num)||0)+" 节",1)])]),t("section",W,[t("details",G,[t("summary",M,[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",T,[t("table",$,[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(k,null,j(l.value.invite_list,(r,f)=>(a(),n("tr",{class:"border-b border-gray-200",key:f},[t("td",q,d(r.invited_user_name),1),t("td",null,[r.invite_status==0?(a(),n("span",H,"未预约")):r.invite_status==1?(a(),n("span",J,"已预约")):r.invite_status==2?(a(),n("span",K,"已体验")):r.invite_status==3?(a(),n("span",O,"已被别人邀请")):C("",!0)]),t("td",P,d(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",R,[t("details",U,[t("summary",X,[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",Y,[t("summary",Z,[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",tt,[t("summary",et,[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))])])])])}}}),rt=A(st,[["__scopeId","data-v-e9778ab9"]]);export{rt as default};
|