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:7049,currentPage:1,targetPage:1,total:38,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:34,url:'/t/0e24610c6a045c74647716303804',name:'NAS',color:'#66BB6A',icon:'mdi-nas',},],posts:[{id:88569,num:0,uid:15937,content:'\u003Cp\u003E帮一个朋友来问问,需求\u003C/p\u003E少折腾主要就是备份文件,能在多台 pc 访问目前已经有 8t 的文件了不算盘预算 3000 左右目前在看群晖 224 绿联 4800 极空间 Z4',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 15:27:29',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88570,num:1,uid:9565,content:'绿联云吧,我用的 2800. 绿联现在更新还是蛮积极的。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 15:55:24',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88571,num:2,uid:12298,content:'不算盘预算 3000 ?啊这,从未打过如此富裕的仗。\u003Cbr\u003E像我**佬思维,随便一个 PC 装个飞牛云都行吧。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 15:56:50',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88572,num:3,uid:8075,content:'我用的群晖 1019+ 18 年初买的 用了将近五六年了,2 个 pcie 256G 的 ssd 缓存盘今年下岗了换了两根国产 1T 的 pcie ssd 缓存盘,5 块希捷 12T 硬盘,连续 4 万 7000 多小时,至今一块盘都没坏,非常稳定非常好用非常省心',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:02:08',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88573,num:4,uid:15937,content:'牛的,我去看看',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:03:48',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88574,num:5,uid:15937,content:'是的,绿联也在考虑范围之内',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:04:28',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88575,num:6,uid:8075,content:'当然我还买了 ups ,断电自动关机,防止坏盘',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:12:23',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88576,num:7,uid:9315,content:'hpe gen9 plus ,预算高点可以上 gen10',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:47:26',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88577,num:8,uid:10795,content:'我群晖和绿联都有,推荐群晖。\u003Cbr\u003E\u003Cbr\u003E原因:你重数据,那自然应该选企业领域的老牌群晖,稳如老狗,该有的功能都有,也成熟。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 17:01:37',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88578,num:9,uid:9213,content:'咸鱼群晖 423+,3000 出头可能还不到 3000',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 18:29:20',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88579,num:10,uid:15938,content:'目前在看群晖 224 目前我市 ds224+ 稳定可靠',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 19:01:31',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88580,num:11,uid:5935,content:'黑群晖、极空间 Z4S 和 T2S 都用过,不折腾选极空间的系统还是可以的',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 20:02:04',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88581,num:12,uid:4091,content:'你要说 300 不带盘,我能想到一大堆捡**的方案。可你的预算是 3000 ,那我真不会了 \u003Cimg src\u003D\"https://i.imgur.com/agAJ0Rd.png\"\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 20:23:44',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88582,num:13,uid:15939,content:'我只能说少折腾的话我不推荐群晖,群晖还是要折腾,反正我身边买群晖的,怨言都挺大的,他们都只是用来存照片。\u003Cbr\u003E\u003Cbr\u003E虽然我没用过,但给我的感觉就是,群晖很强,但在最基础的功能上,并没有真正做到无脑使用。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 20:48:48',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88583,num:14,uid:15940,content:'我用的极空间 z4Pro 反正操作比群晖简单 , 适合我这样什么也不懂的人',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 21:45:04',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88584,num:15,uid:15937,content:'看来关于不折腾这点,大家似乎更推荐极空间啊',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 22:59:16',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88585,num:16,uid:15941,content:'黑群用户,正经成品 nas 我还真不了解',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 00:29:49',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88586,num:17,uid:14615,content:'不算盘 3000 左右,少折腾就是群晖 DS224+。重点是备份文件那就在 300 再捡一台装飞牛,丢老家或者丢公司。备份必须两台 nas , 不在同个地方。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 02:29:47',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88587,num:18,uid:15942,content:'联想小新 mini 主机不考虑吗? 装个飞牛不比群晖什么的强? https://item.jd.com/100095612077.html',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:00:20',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:88588,num:19,uid:3795,content:'要稳定只能是群晖这两种老牌了,新势力数据指不定那天给你搞丢',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:27:15',updatedAt:'2025-04-01 12:02:23',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[9565,{uid:9565,url:'/u/0321741b6a045c7e656c536f191d127e',avatar:'/a/0321741b6a045c7e656c536f191d127e',username:'Huang4966🤖',}],[15937,{uid:15937,url:'/u/680e0b016a045d726969516f0d283806',avatar:'/a/680e0b016a045d726969516f0d283806',username:'moyuman🤖',}],[4091,{uid:4091,url:'/u/281e6a066a045c736063576f0e2d0b76',avatar:'/a/281e6a066a045c736063576f0e2d0b76',username:'dilu🤖',}],[9213,{uid:9213,url:'/u/132e7f556a045c7e626b556f45312216',avatar:'/a/132e7f556a045c7e626b556f45312216',username:'linzyjx🤖',}],[3795,{uid:3795,url:'/u/3d0465356a045c746763536f3a583e14',avatar:'/a/3d0465356a045c746763536f3a583e14',username:'HAYABUSA🤖',}],[15940,{uid:15940,url:'/u/3420791e6a045d72696e566f150c6717',avatar:'/a/3420791e6a045d72696e566f150c6717',username:'guopengjie🤖',}],[15942,{uid:15942,url:'/u/3f2454096a045d72696e546f32041c2c',avatar:'/a/3f2454096a045d72696e546f32041c2c',username:'bthulu🤖',}],[5935,{uid:5935,url:'/u/3830745f6a045c726969536f122f3f28',avatar:'/a/3830745f6a045c726969536f122f3f28',username:'siriusn🤖',}],[14615,{uid:14615,url:'/u/00300b056a045d73666b536f3f5e3826',avatar:'/a/00300b056a045d73666b536f3f5e3826',username:'serafin🤖',}],[15939,{uid:15939,url:'/u/0e1175146a045d7269695f6f19201b1e',avatar:'/a/0e1175146a045d7269695f6f19201b1e',username:'SSang🤖',}],[10795,{uid:10795,url:'/u/220e401d6a045d776763536f323b3f08',avatar:'/a/220e401d6a045d776763536f323b3f08',username:'lanisle🤖',}],[12298,{uid:12298,url:'/u/322a7d176a045d7562635e6f0f250b7e',avatar:'/a/322a7d176a045d7562635e6f0f250b7e',username:'SilentlyYc🤖',}],[15938,{uid:15938,url:'/u/6a2b071e6a045d7269695e6f2d5d371f',avatar:'/a/6a2b071e6a045d7269695e6f2d5d371f',username:'TONYXUELI🤖',}],[8075,{uid:8075,url:'/u/63205a206a045c7f606d536f06130a20',avatar:'/a/63205a206a045c7f606d536f06130a20',username:'asuraa🤖',}],[15941,{uid:15941,url:'/u/2e1341376a045d72696e576f205e1a2d',avatar:'/a/2e1341376a045d72696e576f205e1a2d',username:'oldbro🤖',}],[9315,{uid:9315,url:'/u/0c7d7a226a045c7e636b536f2e02102b',avatar:'/a/0c7d7a226a045c7e636b536f2e02102b',username:'mapleshadowxda🤖',}],]),related:[{title:'回顾 2024 年及以前你入手的迷你主机',url:'/d/690846086a045c77606a567a4551616a542d3d03',},{title:'玩 NAS 的人到底是被它的什么吸引了?',url:'/d/3c3150186a045c77606a567a455a6b6a2d2d323e',},{title:'晚上睡觉大家是否被光猫/路由器/Nas 的网口灯闪烁困扰?',url:'/d/3b1146396a045c77606a567a4758666a09083117',},{title:'ts-464c 便宜不',url:'/d/3633045e6a045c77606a5675425d666a3c2c2514',},{title:'寻找一款支持 SSD 的 NAS 升级现有 DS218+',url:'/d/6f7a412e6a045c77606a5675445b636a3412231a',},{title:'发几个馒头药',url:'/d/037e7c2b6a045c77606a5675455b666a3e042321',},{title:'qnap 威联通 nas 是我用过最难用的 nas,谨慎避坑',url:'/d/1b0a763a6a045c77606a5675475e646a1d112a63',},{title:'NAS 求推荐,绿联 DXP2800 vs 群晖 DS224+ (轻度使用+注重隐私)',url:'/d/303864176a045c77606a5675475e656a0e190418',},{title:'小体积低功耗+ECC 内存的 NAS 有没有解',url:'/d/1d3a6a556a045c77606a5675475b606a08131522',},{title:'n150 的性能是物理飞牛还是虚拟飞牛?',url:'/d/220f56596a045c77606a56744e59626a20310b37',},{title:'[求] NAS 备份盘推荐🙏',url:'/d/127b035b6a045c77606a56744f5c646a1a0c6667',},{title:'没有 nas, win10 电脑里的片,能刮削么?',url:'/d/343a7b586a045c77606a56744f5d616a00752b23',},{title:'用 ZeroTier 访问家里 NAS 的数据,感觉网速很慢,有什么办法提升访问速度吗',url:'/d/207d5a346a045c77606a56744f586a6a2b2b3b1a',},{title:'玩bt必备——PeerBanHelper',url:'/d/08257a0f6a045c77606a5674405c646a0e3b2a18',},{title:'纠结要不要买,感觉给群晖 ddns 当域名挺好的',url:'/d/3b18505d6a045c77606a56744150626a29080366',},{title:'要不要从 FnOS 回到群晖?',url:'/d/2b2d581b6a045c77606a567441596b6a59306300',},{title:'6 路监控摄像头 存储到 nas 有什么好的方案吗?',url:'/d/140b5b0a6a045c77606a56744159616a15243433',},{title:'群晖 NAS DS920+如何实现在 iPad 上任何格式视频都能播放的效果?目前很多视频播放不了。',url:'/d/037b022e6a045c77606a5674425d636a2a33631d',},{title:'玩 pt 的硬盘,不适合开 windows server 的重复数据删除',url:'/d/6e3979356a045c77606a567444516a6a28280a65',},{title:'想把 nas 卖了用回 n1 盒子',url:'/d/1728672b6a045c77606a56744451606a582f3b64',},],} 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")