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:5036,currentPage:1,targetPage:1,total:11,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:[{id:57,url:'/t/2b2d782e6a045c726777320f3b04',name:'RackNerd',color:'#558B2F',icon:'mdi-server-network-outline',},],posts:[{id:57603,num:0,uid:5258,content:'\u003Ccode\u003E------------------------------------------------------------------------大陆三网+教育网 IPv4 单线程测速,v2024-03-15------------------------------------------------------------------------测速节点 下载/Mbps 上传/Mbps 延迟/ms 抖动/ms电信 江苏苏州 9.30 Mbps 129.30 Mbps 138.40 ms 13.90 ms 电信 浙江杭州 4.90 Mbps 27.70 Mbps 141.20 ms 12.60 ms 电信 浙江宁波 5G 3.70 Mbps 7.00 Mbps 142.10 ms 9.40 ms 电信 江苏镇江 5G 17.80 Mbps 2.80 Mbps 141.50 ms 10.00 ms 电信 江苏南京 5G 34.10 Mbps 134.70 Mbps 137.70 ms 9.10 ms 电信 湖南长沙 5G 0.70 Mbps 17.40 Mbps 165.90 ms 5.40 ms 移动 四川成都 92.50 Mbps 30.00 Mbps 198.60 ms 6.60 ms 移动 浙江杭州 5G 66.80 Mbps 44.50 Mbps 189.20 ms 14.40 ms 联通 北京 14.00 Mbps 115.10 Mbps 181.30 ms 22.70 ms 联通 天津 5G 8.00 Mbps 95.90 Mbps 180.90 ms 20.40 ms ------------------------------------------------------------------------系统时间:2025-03-18 09:46:20 EDT北京时间: 2025-03-18 21:46:20 CST------------------------------------------------------------------------\u003C/code\u003E\u003Cp\u003E电信已经可以用惨不忍睹来形容了,看你们吹的电信联通都不错,还以为单线起码能有个50,这个速度甚至比不比得过CCS都是个问题\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:47:54',updatedAt:'2025-03-19 17:17:14',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57604,num:1,uid:1468,content:'\u003Cp\u003E我本地联通确实不错 单线程150轻松\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:48:39',updatedAt:'2025-03-19 17:17:14',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57605,num:2,uid:6294,content:'\u003Cp\u003E又被affman骗了\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:48:52',updatedAt:'2025-03-19 17:17:14',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57606,num:3,uid:6744,content:'\u003Cp\u003E丢包导致的,还是gia好\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:50:24',updatedAt:'2025-03-19 17:17:14',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57607,num:4,uid:1964,content:'\u003Cp\u003Ebwg美西?我移动dmiteb现在30mb/s左右\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:52:39',updatedAt:'2025-03-19 17:17:14',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57608,num:5,uid:5258,content:'\u003Cp\u003ERN和CC的那个机房,DC02\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:54:44',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57609,num:6,uid:3317,content:'\u003Cp\u003E谁给你说dc2行的?被affman和油管主骗了吧,dc2从来就没行过,只有联通能勉强用用而已而且看地区,但那不叫行\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:57:30',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57610,num:7,uid:1461,content:'\u003Cp\u003E我记得dc02和01的区别是新老机房 配置略微有问题....\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 21:58:46',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57611,num:8,uid:1441,content:'\u003Cp\u003E又不是优化线路 速度没保证的 \u003Cimg src\u003D\"/z/img/xhj/005.webp\"\u003E\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 22:01:00',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57612,num:9,uid:5270,content:'\u003Cp\u003E我dc02专门用来上传还不错,下载用hy2,白天还行。高峰就得用bwg\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 22:01:49',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:57613,num:10,uid:1580,content:'\u003Cp\u003E啊。。这哪家的\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-18 22:02:27',updatedAt:'2025-03-19 17:17:15',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[1580,{uid:1580,url:'/u/172362216a045c766562566f161f0917',avatar:'/a/172362216a045c766562566f161f0917',username:'小梁233🤖',}],[1964,{uid:1964,url:'/u/122f5d3a6a045c76696c526f2d1d1233',avatar:'/a/122f5d3a6a045c76696c526f2d1d1233',username:'leic-山水🤖',}],[3317,{uid:3317,url:'/u/113e7e346a045c74636b516f342a1e72',avatar:'/a/113e7e346a045c74636b516f342a1e72',username:'rubua🤖',}],[6744,{uid:6744,url:'/u/3e7a5a5f6a045c71676e526f110f1509',avatar:'/a/3e7a5a5f6a045c71676e526f110f1509',username:'Probert🤖',}],[1468,{uid:1468,url:'/u/337e063c6a045c76646c5e6f402a0610',avatar:'/a/337e063c6a045c76646c5e6f402a0610',username:'Ltachtm🤖',}],[5258,{uid:5258,url:'/u/300c01016a045c72626f5e6f44086b32',avatar:'/a/300c01016a045c72626f5e6f44086b32',username:'ruan🤖',}],[6294,{uid:6294,url:'/u/3738513d6a045c716263526f01386b1f',avatar:'/a/3738513d6a045c716263526f01386b1f',username:'wss🤖',}],[1441,{uid:1441,url:'/u/191b54076a045c76646e576f143b3f2e',avatar:'/a/191b54076a045c76646e576f143b3f2e',username:'Nyaa🤖',}],[1461,{uid:1461,url:'/u/6b1b7d1c6a045c76646c576f2d33372f',avatar:'/a/6b1b7d1c6a045c76646c576f2d33372f',username:'moplord🤖',}],[5270,{uid:5270,url:'/u/2b3f7c546a045c72626d566f260d3f0d',avatar:'/a/2b3f7c546a045c72626d566f260d3f0d',username:'stevezheng🤖',}],]),related:[{title:'120收RN黑五第四波 10.99 dc02',url:'/d/2079745d6a045c77606a5675405f646a1e70311e',},{title:'放生我的第一台付费VPS(RN 1c2g),新手无脑选Racknerd',url:'/d/683c76236a045c77606a5675405c606a1c2d073f',},{title:'千万别买RN,曝光幽默 RackNerd 客服',url:'/d/3771635a6a045c77606a5675405b646a1a26621e',},{title:'【暂不收】收RN之前的常规款9.89u年付的洛杉矶DC2',url:'/d/192562596a045c77606a5674465a616a26712016',},{title:'【已出】 rn dc02 黑五闪购第四波 10.99$年付 已翻倍10T流量款',url:'/d/2038580b6a045c77606a56744659636a29771b3b',},{title:'Racknerd 几个大坑点请避雷',url:'/d/233a6b386a045c77606a56774e50676a5c390210',},{title:'rn晚高峰速度猎奇',url:'/d/303b51236a045c77606a56774f51616a553a190b',},{title:'RN的新Dc03,测试Ip,电信很差?',url:'/d/02335e3d6a045c77606a56774150636a072d143b',},{title:'坐标魔都联通,今晚的RN圣何塞超神了',url:'/d/222c01546a045c77606a56774151616a3e112961',},{title:'RackNerd美国🐔',url:'/d/6c2770086a045c77606a5677435f616a5f311b1f',},{title:'突然发现rn的都柏林机房还不错',url:'/d/6e30575b6a045c77606a5677455a646a1c091f3b',},{title:'【已收】收个RN黑五常规款18.93刀 DC2',url:'/d/280e4a586a045c77606a56764e5a666a1f0e600b',},{title:'【已出】15出rn圣何塞',url:'/d/081a7b226a045c77606a56764f5f646a5a74341a',},{title:'(已收)收rn黑五第四波 10.99 dc02',url:'/d/37710b146a045c77606a56764151656a3515603f',},{title:'(已出)¥120 出 RN 黑五闪购第四波 $10.99 DC02',url:'/d/6a0e012c6a045c77606a56764550626a3d2d6104',},{title:'rn的dc03机房可以工单申请到dc02机房吗?',url:'/d/631e665e6a045c77606a56764651626a2a262418',},{title:'(已出)清理Racknerd 2个小鸡',url:'/d/203357186a045c77606a5676475e606a03333a02',},{title:'100RMB出一台RN圣何塞机',url:'/d/08277c3d6a045c77606a5676475f676a5c753f10',},{title:'出 RN 黑五闪购第四波 $10.99 DC02',url:'/d/69114b196a045c77606a567647586b6a232b6613',},{title:'【已出】15RMB出鸡,RN机器,圣何塞,1C 1G 15G SSD 2T流量,2025.5.15到期,原生IP,续费11刀一年。',url:'/d/2a3f460c6a045c77606a56714e5f6b6a160f231c',},],} 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")