7 lines
16 KiB
JavaScript
7 lines
16 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23750,e=>{"use strict";var t=e.i(43476),a=e.i(47163);function s({className:e,type:s,...r}){return(0,t.jsx)("input",{type:s,"data-slot":"input",className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}e.s(["Input",()=>s])},10708,48425,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(74080),r=e.i(91918),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,s)=>{let l=a.forwardRef((e,a)=>{let{asChild:l,...i}=e,n=l?r.Slot:s;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n,{...i,ref:a})});return l.displayName=`Primitive.${s}`,{...e,[s]:l}},{});function i(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>l,"dispatchDiscreteCustomEvent",()=>i],48425);var n=a.forwardRef((e,a)=>(0,t.jsx)(l.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));n.displayName="Label";var d=e.i(47163);let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(n,{ref:s,className:(0,d.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a}));c.displayName=n.displayName,e.s(["Label",()=>c],10708)},73375,e=>{"use strict";let t=(0,e.i(75254).default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],73375)},62031,e=>{"use strict";let t=(0,e.i(75254).default)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);e.s(["Share2",()=>t],62031)},69638,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>t],69638)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},18207,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(22016),r=e.i(73375),l=e.i(74886),i=e.i(62031),n=e.i(61911),d=e.i(75254);let c=(0,d.default)("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);var x=e.i(94983);let o=(0,d.default)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var p=e.i(67881),m=e.i(4421),h=e.i(37727);function u({isOpen:e,onClose:a,referralLink:s,referralCode:r,nickname:l}){if(!e)return null;let i=`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(s)}`;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:a}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm bg-white rounded-xl overflow-hidden shadow-2xl animate-in fade-in zoom-in duration-200",children:[(0,t.jsx)("button",{onClick:a,className:"absolute top-2 right-2 p-1.5 bg-black/20 rounded-full text-white hover:bg-black/40 z-10",children:(0,t.jsx)(h.X,{className:"w-5 h-5"})}),(0,t.jsxs)("div",{className:"bg-gradient-to-br from-indigo-900 to-purple-900 text-white p-6 flex flex-col items-center text-center relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 w-32 h-32 bg-white/10 rounded-full -translate-x-1/2 -translate-y-1/2 blur-2xl"}),(0,t.jsx)("div",{className:"absolute bottom-0 right-0 w-40 h-40 bg-pink-500/20 rounded-full translate-x-1/3 translate-y-1/3 blur-2xl"}),(0,t.jsxs)("div",{className:"relative z-10 w-full flex flex-col items-center",children:[(0,t.jsxs)("h2",{className:"text-xl font-bold mb-1 leading-tight text-white",children:["一场SOUL的",(0,t.jsx)("br",{}),"创业实验场"]}),(0,t.jsx)("p",{className:"text-white/80 text-xs mb-6",children:"真实商业故事 · 55个案例 · 每日更新"}),(0,t.jsx)("div",{className:"w-32 h-44 bg-gray-200 rounded shadow-lg mb-6 overflow-hidden relative",children:(0,t.jsx)("img",{src:"/images/image.png",alt:"Book Cover",className:"w-full h-full object-cover"})}),(0,t.jsx)("div",{className:"flex items-center gap-2 mb-4 bg-white/10 px-3 py-1.5 rounded-full backdrop-blur-sm",children:(0,t.jsxs)("span",{className:"text-xs text-white",children:["推荐人: ",l]})}),(0,t.jsx)("div",{className:"bg-white p-2 rounded-lg shadow-lg mb-2",children:(0,t.jsx)("img",{src:i,alt:"QR Code",className:"w-32 h-32"})}),(0,t.jsx)("p",{className:"text-[10px] text-white/60 mb-1",children:"长按识别二维码试读"}),(0,t.jsxs)("p",{className:"text-xs font-mono tracking-wider text-white",children:["邀请码: ",r]})]})]}),(0,t.jsxs)("div",{className:"p-4 bg-gray-50 flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-center text-xs text-gray-500 mb-1",children:"长按上方图片保存,或截图分享"}),(0,t.jsx)(p.Button,{onClick:a,className:"w-full",variant:"outline",children:"关闭"})]})]})]})}var b=e.i(69638),f=e.i(23750),g=e.i(10708);function v({isOpen:e,onClose:s,availableAmount:r}){let{requestWithdrawal:l}=(0,m.useStore)(),[i,n]=(0,a.useState)(""),[d,x]=(0,a.useState)("wechat"),[o,u]=(0,a.useState)(""),[v,j]=(0,a.useState)(""),[N,y]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1);if(!e)return null;let C=async e=>{e.preventDefault();let t=parseFloat(i);isNaN(t)||t<=0||t>r?alert("请输入有效的提现金额"):o&&v?(y(!0),await new Promise(e=>setTimeout(e,1e3)),l(t,d,o,v),y(!1),k(!0)):alert("请填写完整的提现信息")},S=()=>{k(!1),n(""),u(""),j(""),s()};return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:S}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm bg-white rounded-xl overflow-hidden shadow-2xl animate-in fade-in zoom-in duration-200",children:[(0,t.jsx)("button",{onClick:S,className:"absolute top-2 right-2 p-1.5 bg-black/10 rounded-full text-gray-500 hover:bg-black/20 z-10",children:(0,t.jsx)(h.X,{className:"w-5 h-5"})}),w?(0,t.jsxs)("div",{className:"p-8 flex flex-col items-center text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,t.jsx)(b.CheckCircle,{className:"w-8 h-8 text-green-600"})}),(0,t.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"申请提交成功"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"您的提现申请已提交,预计1-3个工作日内到账。"}),(0,t.jsx)(p.Button,{onClick:S,className:"w-full bg-green-600 hover:bg-green-700 text-white",children:"完成"})]}):(0,t.jsxs)("form",{onSubmit:C,className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(c,{className:"w-5 h-5 text-indigo-600"}),(0,t.jsx)("h3",{className:"text-lg font-bold text-gray-900",children:"申请提现"})]}),(0,t.jsxs)("div",{className:"space-y-4 mb-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(g.Label,{htmlFor:"amount",children:["提现金额 (可提现: ¥",r.toFixed(2),")"]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500",children:"¥"}),(0,t.jsx)(f.Input,{id:"amount",type:"number",min:"10",max:r,step:"0.01",value:i,onChange:e=>n(e.target.value),className:"pl-7",placeholder:"最低10元"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(g.Label,{children:"提现方式"}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>x("wechat"),className:`flex-1 py-2 px-4 rounded-lg border text-sm font-medium transition-colors ${"wechat"===d?"border-green-600 bg-green-50 text-green-700":"border-gray-200 hover:bg-gray-50 text-gray-600"}`,children:"微信支付"}),(0,t.jsx)("button",{type:"button",onClick:()=>x("alipay"),className:`flex-1 py-2 px-4 rounded-lg border text-sm font-medium transition-colors ${"alipay"===d?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-200 hover:bg-gray-50 text-gray-600"}`,children:"支付宝"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(g.Label,{htmlFor:"account",children:"wechat"===d?"微信号":"支付宝账号"}),(0,t.jsx)(f.Input,{id:"account",value:o,onChange:e=>u(e.target.value),placeholder:"wechat"===d?"请输入微信号":"请输入支付宝账号"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(g.Label,{htmlFor:"name",children:"真实姓名"}),(0,t.jsx)(f.Input,{id:"name",value:v,onChange:e=>j(e.target.value),placeholder:"请输入收款人真实姓名"})]})]}),(0,t.jsx)(p.Button,{type:"submit",className:"w-full bg-indigo-600 hover:bg-indigo-700 text-white",disabled:N||!i||!o||!v,children:N?"提交中...":"确认提现"})]})]})]})}function j(){let{user:e,isLoggedIn:d,settings:h,getAllPurchases:b,getAllUsers:f}=(0,m.useStore)(),[g,j]=(0,a.useState)(!1),[N,y]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),[C,S]=(0,a.useState)([]),[L,z]=(0,a.useState)(0);if((0,a.useEffect)(()=>{if(e?.referralCode){let t=b(),a=f().filter(t=>t.referredBy===e.referralCode),s=a.map(e=>e.id);S(t.filter(e=>s.includes(e.userId))),z(a.length)}},[e,b,f]),!d||!e)return(0,t.jsx)("div",{className:"min-h-screen bg-app-bg text-app-text flex items-center justify-center pb-20",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-app-text-muted mb-4",children:"请先登录"}),(0,t.jsx)(s.default,{href:"/",className:"text-app-brand hover:underline",children:"返回首页"})]})});let B=`${window.location.origin}?ref=${e.referralCode}`,T=h?.distributorShare||90,F=e.earnings||0,O=e.pendingEarnings||0,U=async()=>{let e=`我正在读《一场SOUL的创业实验场》,每天6-9点的真实商业故事,推荐给你!${B}`;try{"function"==typeof navigator.share&&"function"==typeof navigator.canShare?await navigator.share({title:"一场SOUL的创业实验场",text:"来自Soul派对房的真实商业故事",url:B}):(await navigator.clipboard.writeText(e),alert("分享文案已复制,快去朋友圈或Soul派对分享吧!"))}catch{await navigator.clipboard.writeText(e),alert("分享文案已复制!")}},$=async()=>{let e=`📖 推荐一本好书《一场SOUL的创业实验场》
|
||
|
||
这是卡若每天早上6-9点在Soul派对房分享的真实商业故事,55个真实案例,讲透创业的底层逻辑。
|
||
|
||
👉 点击阅读: ${B}
|
||
|
||
#创业 #商业思维 #Soul派对`;await navigator.clipboard.writeText(e),alert("朋友圈文案已复制!\n\n打开微信 → 发朋友圈 → 粘贴即可")};return(0,t.jsxs)("div",{className:"min-h-screen bg-app-bg text-app-text pb-24",children:[(0,t.jsx)("header",{className:"sticky top-0 z-50 bg-app-bg/90 backdrop-blur-md border-b border-app-border",children:(0,t.jsxs)("div",{className:"max-w-xs mx-auto px-4 py-3 flex items-center",children:[(0,t.jsx)(s.default,{href:"/my",className:"flex items-center gap-1 text-app-text-muted hover:text-app-text",children:(0,t.jsx)(r.ChevronLeft,{className:"w-5 h-5"})}),(0,t.jsx)("h1",{className:"flex-1 text-center text-sm font-semibold",children:"分销中心"}),(0,t.jsx)("div",{className:"w-5"})]})}),(0,t.jsxs)("main",{className:"max-w-xs mx-auto px-4 py-4",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-br from-app-brand/20 to-app-card rounded-xl p-4 border border-app-brand/30 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c,{className:"w-4 h-4 text-app-brand"}),(0,t.jsx)("span",{className:"text-app-text-muted text-xs",children:"累计收益"})]}),(0,t.jsxs)("span",{className:"text-app-brand text-xs",children:[T,"%返利"]})]}),(0,t.jsxs)("p",{className:"text-2xl font-bold text-app-text mb-0.5",children:["¥",F.toFixed(2)]}),(0,t.jsxs)("p",{className:"text-app-text-muted text-xs mb-3",children:["待结算: ¥",O.toFixed(2)]}),(0,t.jsx)(p.Button,{disabled:F<10,onClick:()=>k(!0),className:"w-full bg-app-brand hover:bg-app-brand-hover text-white h-8 text-xs",children:F<10?`满10元可提现`:"申请提现"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"bg-app-card/60 rounded-lg p-2.5 text-center",children:[(0,t.jsx)(n.Users,{className:"w-4 h-4 text-app-brand mx-auto mb-1"}),(0,t.jsx)("p",{className:"text-base font-bold text-app-text",children:L}),(0,t.jsx)("p",{className:"text-app-text-muted text-xs",children:"邀请人数"})]}),(0,t.jsxs)("div",{className:"bg-app-card/60 rounded-lg p-2.5 text-center",children:[(0,t.jsx)(i.Share2,{className:"w-4 h-4 text-app-brand mx-auto mb-1"}),(0,t.jsx)("p",{className:"text-base font-bold text-app-text",children:C.length}),(0,t.jsx)("p",{className:"text-app-text-muted text-xs",children:"成交订单"})]})]}),(0,t.jsxs)("div",{className:"bg-app-card/60 rounded-xl p-3 border border-app-border mb-3",children:[(0,t.jsx)("p",{className:"text-app-text text-xs font-medium mb-2",children:"我的专属链接"}),(0,t.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,t.jsx)("div",{className:"flex-1 bg-app-bg rounded-lg px-2.5 py-1.5 text-app-text-muted text-xs truncate font-mono",children:B}),(0,t.jsxs)(p.Button,{onClick:()=>{navigator.clipboard.writeText(B),j(!0),setTimeout(()=>j(!1),2e3)},size:"sm",variant:"outline",className:"border-app-border text-app-text hover:bg-app-card bg-transparent text-xs h-7 px-2",children:[(0,t.jsx)(l.Copy,{className:"w-3 h-3 mr-1"}),g?"已复制":"复制"]})]}),(0,t.jsxs)("p",{className:"text-app-text-muted text-xs",children:["邀请码: ",(0,t.jsx)("span",{className:"text-app-brand font-mono",children:e.referralCode})]})]}),(0,t.jsxs)("div",{className:"space-y-2 mb-3",children:[(0,t.jsxs)(p.Button,{onClick:()=>y(!0),className:"w-full bg-indigo-600 hover:bg-indigo-700 text-white py-4 text-xs",children:[(0,t.jsx)(o,{className:"w-4 h-4 mr-2"}),"生成推广海报"]}),(0,t.jsxs)(p.Button,{onClick:$,className:"w-full bg-green-600 hover:bg-green-700 text-white py-4 text-xs",children:[(0,t.jsx)(x.MessageCircle,{className:"w-4 h-4 mr-2"}),"分享到朋友圈"]}),(0,t.jsx)(p.Button,{onClick:U,variant:"outline",className:"w-full border-app-border text-app-text hover:bg-app-card bg-transparent py-4 text-xs",children:"更多分享方式"})]}),(0,t.jsx)(u,{isOpen:N,onClose:()=>y(!1),referralLink:B,referralCode:e.referralCode,nickname:e.nickname}),(0,t.jsx)(v,{isOpen:w,onClose:()=>k(!1),availableAmount:F}),C.length>0&&(0,t.jsxs)("div",{className:"bg-app-card/60 rounded-xl border border-app-border",children:[(0,t.jsx)("div",{className:"p-2.5 border-b border-app-border",children:(0,t.jsx)("p",{className:"text-app-text text-xs font-medium",children:"收益明细"})}),(0,t.jsx)("div",{className:"divide-y divide-app-border max-h-40 overflow-auto",children:C.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"p-2.5 flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-app-text text-xs",children:"fullbook"===e.type?"整本书":"单节"}),(0,t.jsx)("p",{className:"text-app-text-muted text-xs",children:new Date(e.createdAt).toLocaleDateString("zh-CN")})]}),(0,t.jsxs)("p",{className:"text-app-brand text-sm font-semibold",children:["+¥",(e.referrerEarnings||0).toFixed(2)]})]},e.id))})]})]})]})}e.s(["default",()=>j],18207)}]); |