const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:8432,currentPage:1,targetPage:1,total:101,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[],posts:[{id:111189,num:0,uid:3439,content:'\u003Cp\u003E活动名称:April-Gift Day\u003C/p\u003E\u003Cp\u003E奖励数量:10\u003C/p\u003E\u003Cp\u003E奖品名称:免费开卡抵扣券\u003C/p\u003E\u003Cp\u003E开奖时间:2025-04-14 23:00\u003C/p\u003E\u003Cp\u003E中奖概率:楼层随机去重\u003C/p\u003E\u003Cp\u003E优惠券有效期:领取后 7 天内有效,优惠券不可转赠!!!!\u003C/p\u003E\u003Cp\u003E活动描述:2025 年 白送虚拟 visa 卡,惊喜不断,福利不断!!!\u003C/p\u003E\u003Cp\u003E平台简介:HornetPay 虚拟信用卡、免 KYC 、免月费、USDT 在线充值、卡片在线发行\u003C/p\u003E\u003Cp\u003E平台目标:不只是支付,连接全球金融服务\u003C/p\u003E\u003Cp\u003E平台地址: https://hornetpay.uk/#/?lang\u003Dzh-CN\u003C/p\u003E\u003Cp\u003E官方 X 账号: https://x.com/hornetpay\u003C/p\u003E\u003Cp\u003E常见问题:\u003C/p\u003E\u003Cp\u003E1. 卡片支持绑定 Alipay 吗?\u003C/p\u003E\u003Cp\u003E可以的。(带 HOT 的卡段可以)\u003C/p\u003E\u003Cp\u003E2. 卡片我该选择哪一种类型?\u003C/p\u003E\u003Cp\u003E卡片分三种:\u003C/p\u003E\u003Cp\u003E大黄蜂(为 FB 或 Google 广告卡),单笔消费$50.00 免交易手续费 (卡片维护)\u003C/p\u003E\u003Cp\u003E机械蜂(美区订阅卡,跨区消费会有单笔 0.5$交易手续费),可以绑定谷歌 cloud 、亚马逊云、tencent 国际 cloud, cloudflare\u003C/p\u003E\u003Cp\u003E闪电蜂(为全球通卡)可绑定各类电商平台消费 (推荐)\u003C/p\u003E\u003Cp\u003E3. 开卡需要提交实名认证吗?\u003C/p\u003E\u003Cp\u003E所有虚拟卡均不需认证(免 KYC ),即开即用。\u003C/p\u003E\u003Cp\u003E4. 可以开 0 余额卡片吗?\u003C/p\u003E\u003Cp\u003E不可以。所有卡片最低预存$30\u003C/p\u003E\u003Cp\u003E5. 支持 OpenAI 与 Tencent Cloud 以及其他国外订阅吗?\u003C/p\u003E\u003Cp\u003E支持的。\u003C/p\u003E\u003Cp\u003E平台其他福利:\u003C/p\u003E\u003Cp\u003E1.首次发行卡片可额外获取 1 至 5 美元奖励返现 (使用了抵扣券,这个奖励也可拿)\u003C/p\u003E\u003Cp\u003E2.邀请好友,注册开卡,可获取 30%佣金(五级好友返现)\u003C/p\u003E\u003Cp\u003E3.被邀请人开卡,可获取来自好友的 xxx%佣金返还 (互惠互利)\u003C/p\u003E\u003Cp\u003E4.卡片消费会有对应 cashback 返现 ( 0.15% )\u003C/p\u003E\u003Cp\u003E5.邀请好友,团队成就奖,五人、十人、百人、千人、万人、1%至 15%\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:28:51',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111190,num:1,uid:3439,content:'收藏帖子,不然开奖了都不知道!(此楼忽略,不参与抽奖)',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:29:44',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[71,72,73,79,],mentionUsers:[],likeUsers:[],},{id:111191,num:2,uid:13420,content:'成为中奖者吧!',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:36:31',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111192,num:3,uid:18610,content:'1111',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:40:31',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111193,num:4,uid:15732,content:'参与试试',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:42:27',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111194,num:5,uid:18611,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:42:59',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111195,num:6,uid:18612,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:45:17',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111196,num:7,uid:7322,content:'中奖中奖',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:45:26',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111197,num:8,uid:18613,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 10:52:19',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111198,num:9,uid:7227,content:'参与',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:02:28',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111199,num:10,uid:18300,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:06:04',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111200,num:11,uid:8287,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:12:48',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111201,num:12,uid:11424,content:'必须中奖!',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:13:42',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111202,num:13,uid:18614,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:18:30',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111203,num:14,uid:18488,content:'运气+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:21:36',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111204,num:15,uid:15735,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:24:36',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111205,num:16,uid:18615,content:'运气+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:25:33',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111206,num:17,uid:16990,content:'参与一下',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:35:19',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111207,num:18,uid:17760,content:'运气+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:35:57',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:111208,num:19,uid:4952,content:'参与+1',ipRegion:'',updatedByUid:0,createdAt:'2025-04-14 11:37:43',updatedAt:'2025-04-19 23:44:47',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[13420,{uid:13420,url:'/u/000e77076a045d746468566f1d022910',avatar:'/a/000e77076a045d746468566f1d022910',username:'RobertLyu🤖',}],[18638,{uid:18638,url:'/u/69207d3c6a045d7f66695e6f2406270c',avatar:'/a/69207d3c6a045d7f66695e6f2406270c',username:'Leooe1🤖',}],[18614,{uid:18614,url:'/u/2a1e625d6a045d7f666b526f0f50350a',avatar:'/a/2a1e625d6a045d7f666b526f0f50350a',username:'wynwm🤖',}],[8287,{uid:8287,url:'/u/6c0063056a045c7f6262516f11582222',avatar:'/a/6c0063056a045c7f6262516f11582222',username:'Yuesh1🤖',}],[18615,{uid:18615,url:'/u/282041006a045d7f666b536f3b5b0077',avatar:'/a/282041006a045d7f666b536f3b5b0077',username:'yao177🤖',}],[18612,{uid:18612,url:'/u/3c7d48276a045d7f666b546f1b26160e',avatar:'/a/3c7d48276a045d7f666b546f1b26160e',username:'dadagege🤖',}],[18637,{uid:18637,url:'/u/1e70511c6a045d7f6669516f15250926',avatar:'/a/1e70511c6a045d7f6669516f15250926',username:'ajiaerin🤖',}],[7227,{uid:7227,url:'/u/1c1163216a045c706268516f3a5e250c',avatar:'/a/1c1163216a045c706268516f3a5e250c',username:'errorMsg0xff🤖',}],[3439,{uid:3439,url:'/u/6f0c682f6a045c7464695f6f451f241d',avatar:'/a/6f0c682f6a045c7464695f6f451f241d',username:'jimmy2024🤖',}],[18642,{uid:18642,url:'/u/6803685f6a045d7f666e546f21023933',avatar:'/a/6803685f6a045d7f666e546f21023933',username:'MareDevi🤖',}],[15735,{uid:15735,url:'/u/0f39445a6a045d726769536f0e0e2b7f',avatar:'/a/0f39445a6a045d726769536f0e0e2b7f',username:'shinuxy🤖',}],[17760,{uid:17760,url:'/u/2878482f6a045d70676c566f4f0a1a0c',avatar:'/a/2878482f6a045d70676c566f4f0a1a0c',username:'rooftop64🤖',}],[18611,{uid:18611,url:'/u/161b68286a045d7f666b576f35193516',avatar:'/a/161b68286a045d7f666b576f35193516',username:'wdxbb🤖',}],[18300,{uid:18300,url:'/u/231b41176a045d7f636a566f4f5c3a0f',avatar:'/a/231b41176a045d7f636a566f4f5c3a0f',username:'colia🤖',}],[11424,{uid:11424,url:'/u/2c0c022e6a045d766468526f16071077',avatar:'/a/2c0c022e6a045d766468526f16071077',username:'coolair🤖',}],[18610,{uid:18610,url:'/u/0b7d53026a045d7f666b566f43336515',avatar:'/a/0b7d53026a045d7f666b566f43336515',username:'zhh2271🤖',}],[4952,{uid:4952,url:'/u/233d77356a045c73696f546f340c0016',avatar:'/a/233d77356a045c73696f546f340c0016',username:'neochan🤖',}],[18488,{uid:18488,url:'/u/6c3f42266a045d7f64625e6f30251715',avatar:'/a/6c3f42266a045d7f64625e6f30251715',username:'v2kid🤖',}],[14710,{uid:14710,url:'/u/191a502c6a045d73676b566f19103474',avatar:'/a/191a502c6a045d73676b566f19103474',username:'kylinC🤖',}],[16990,{uid:16990,url:'/u/2b7006596a045d716963566f32002537',avatar:'/a/2b7006596a045d716963566f32002537',username:'lhsakudsgdsik🤖',}],[7322,{uid:7322,url:'/u/6c115f5a6a045c706368546f1a08363d',avatar:'/a/6c115f5a6a045c706368546f1a08363d',username:'xiaoxt🤖',}],[18613,{uid:18613,url:'/u/0918413d6a045d7f666b556f10390b0f',avatar:'/a/0918413d6a045d7f666b556f10390b0f',username:'xuobll🤖',}],[15732,{uid:15732,url:'/u/3b1845396a045d726769546f151f240c',avatar:'/a/3b1845396a045d726769546f151f240c',username:'einskai🤖',}],]),related:[],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")