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:5496,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:37,url:'/t/383344386a045c74677716241d0f',name:'云盘',color:'#66BB6A',icon:'mdi-content-save',},],posts:[{id:62949,num:0,uid:5445,content:'\u003Cp\u003E会员到期了打算续费,看网上说限制设备了,那咋开车?\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:11:15',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62950,num:1,uid:1854,content:'\u003Cp\u003E十个设备,随便开呀,每个人两个不就行了\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:13:29',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62951,num:2,uid:5445,content:'\u003Cp\u003E 现在不是十个设备啊,缩小了\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:14:08',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62952,num:3,uid:1563,content:'\u003Cp\u003E开车自己存的东西,不都会被别人看见了\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:15:22',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62953,num:4,uid:5445,content:'\u003Cp\u003E 我还好,私密的都是带密码的压缩包,基本都是下载东西用\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:18:19',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62954,num:5,uid:1854,content:'\u003Cp\u003E 😂?!什么时候改的,我开的5人车还好好的,没人和我说被踢出了\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:18:19',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62955,num:6,uid:5445,content:'\u003Cp\u003E 改了啊,好像去年都改了,你网上搜搜看\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:18:41',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62956,num:7,uid:4432,content:'\u003Cp\u003E开三人,手机扫码登pc\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:18:43',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62957,num:8,uid:1563,content:'\u003Cp\u003E\u003Cimg src\u003D\"https://tc.meimo.xyz/i/2025/03/19/67da7046cb888.png\" alt\u003D\"image\"\u003E\u003Cbr\u003E开会员的时候显示的还是10台\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:21:07',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62958,num:9,uid:5194,content:'\u003Cp\u003E我只开三人车 一人60 加起来180 我小赚几块钱\u003Cbr\u003E反正60 和 45 也就差个 15块钱\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:31:14',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:62959,num:10,uid:5445,content:'\u003Cp\u003E 设备你怎么给他们限制\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-19 15:37:03',updatedAt:'2025-03-20 14:33:07',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[1854,{uid:1854,url:'/u/2f190a026a045c76686f526f20113414',avatar:'/a/2f190a026a045c76686f526f20113414',username:'无声鱼啊请告诉我所谓理想与悖论🤖',}],[5445,{uid:5445,url:'/u/111f7e206a045c72646e536f121e1c76',avatar:'/a/111f7e206a045c72646e536f121e1c76',username:'依韵🤖',}],[5194,{uid:5194,url:'/u/152d62026a045c726163526f3103303e',avatar:'/a/152d62026a045c726163526f3103303e',username:'Bingo7🤖',}],[4432,{uid:4432,url:'/u/2e7e46086a045c736469546f1a27090d',avatar:'/a/2e7e46086a045c736469546f1a27090d',username:'dida303🤖',}],[1563,{uid:1563,url:'/u/1211601a6a045c76656c556f110f3530',avatar:'/a/1211601a6a045c76656c556f110f3530',username:'lbczzs🤖',}],]),related:[{title:'问一个关于 alist 的问题',url:'/d/2f2605276a045c77606a56754451606a27001518',},{title:'阿里云盘 WebDAV 体验如何?',url:'/d/3419615b6a045c77606a5675445a626a050a1e33',},{title:'onedrive国区和外区的使用有区别吗',url:'/d/357d0a356a045c77606a5674415e6b6a24376a35',},{title:'one drive 和 dropbox,我该选哪个?',url:'/d/6c3c5e216a045c77606a56744650666a150b0027',},{title:'115这波,估计钱是要不回来了,要么拖着遥遥无期,要么继续用余额买会员。好在也是刚需',url:'/d/180b75596a045c77606a56744651666a5e0d6b01',},{title:'收个115网盘,100t左右',url:'/d/3b0f6a206a045c77606a5674465f616a58280425',},{title:'百度网盘合租',url:'/d/6f047f586a045c77606a56744750646a3f0d3f3b',},{title:'个人照片数据放在百度或阿里云盘有风险吗?',url:'/d/0326433f6a045c77606a56774f5e656a591a1934',},{title:'城通网盘买了个终身会员',url:'/d/1725623a6a045c77606a5677405c666a54393d03',},{title:'求助哪里有有靠谱的网盘',url:'/d/2c04645c6a045c77606a5677415d656a2f0e3520',},{title:'收个收个收个 阿里云盘永久容量 阿里云盘',url:'/d/1c7803066a045c77606a567741586b6a5a7a6b06',},{title:'有服务器、网盘、nas、公网IP怎么搞一套最好的图床',url:'/d/340a7e026a045c77606a5677435d666a01316315',},{title:'你的115提现到账了吗?',url:'/d/297078216a045c77606a5677455e6a6a14000727',},{title:'收一个天翼云盘10t',url:'/d/68237c1f6a045c77606a56774559626a5f3a3514',},{title:'115原石会员限速了,天塌了',url:'/d/2a3d653c6a045c77606a5677475d606a2b162434',},{title:'感觉115要玩庞氏骗局了?',url:'/d/390460046a045c77606a56774758666a23712317',},{title:'115 签到500到账啦',url:'/d/002f051d6a045c77606a56764e5e6b6a3822653f',},{title:'快讯 听说115签到的返现到余额?',url:'/d/2b0a71556a045c77606a56764e5a676a1e006a07',},{title:'相当于免费用三年/500用115六年,老板做慈善吗?',url:'/d/141d4a1b6a045c77606a56764e58626a0f1b0567',},{title:'115 618签到返现可以提现了!',url:'/d/620677186a045c77606a56764e596b6a28073530',},],} 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")