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:6039,currentPage:1,targetPage:1,total:10,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:59,url:'/t/3613550e6a045c7269770b181038',name:'Claude',color:'#66BB6A',icon:'mdi-tag-heart',},],posts:[{id:70723,num:0,uid:13233,content:'\u003Cp\u003E不用折腾搭建,国内可直接访问,登录即可用,可用 Claude3 Opus 模型。\u003C/p\u003E支持 Claude3 Opus ,虽然速度比 GPT-4o 慢点,回答质量更好。支持最新 GPT-4o ,获得快速高质量的对话,保证可用配额。支持多种大模型,GPT-4o ,Claude-3 ,Llama3 等最强模型。AskInternet 联网搜索用于替代传统搜索,更高效。支持 Kimi 、DeepSeek 等更多大模型。支持识图生图。多设备登录同步,支持移动端 PWA 安装。\u003Cp\u003E有需求的欢迎注册体验。https://c.datapipe.top\u003C/p\u003E\u003Cp\u003E\u003Cimg alt\u003D\"\" src\u003D\"https://i.datapipe.top/i/2024/obpy-1.png\"\u003E\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2024-06-04 14:12:51',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70724,num:1,uid:7151,content:'充了一个月的',ipRegion:'',updatedByUid:0,createdAt:'2024-06-04 14:24:08',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70725,num:2,uid:13234,content:'现在 coze 上面 gpt-4 gpt-4o 都免费,cursor 上面 gpt-4 gpt-4o 也都免费,这种聚合平台还这么高的价格',ipRegion:'',updatedByUid:0,createdAt:'2024-06-04 14:45:59',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70726,num:3,uid:13235,content:'没有 Claude3 ,Opus 回答质量确实比 GPT-4o 要好不少。',ipRegion:'',updatedByUid:0,createdAt:'2024-06-04 15:00:20',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70727,num:4,uid:13233,content:'是的,可以试试 Claude 3 Opus 。',ipRegion:'',updatedByUid:0,createdAt:'2024-06-04 15:46:03',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70728,num:5,uid:13233,content:'基础订阅只需 20/月。',ipRegion:'',updatedByUid:0,createdAt:'2024-06-12 16:35:37',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70729,num:6,uid:13236,content:'这人一直在普通节点发广告',ipRegion:'',updatedByUid:0,createdAt:'2024-06-12 16:43:54',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70730,num:7,uid:13237,content:'20 元不限 token 数,不超小时次数就行?',ipRegion:'',updatedByUid:0,createdAt:'2024-11-21 17:23:48',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70731,num:8,uid:13238,content:'有一说一,我一直在续费,希望 o1 也能基础版本可以用',ipRegion:'',updatedByUid:0,createdAt:'2024-12-02 17:04:29',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:70732,num:9,uid:13239,content:'\u003Cimg src\u003D\"https://i.imgur.com/6Aoucb3.png\"\u003E 老哥你网站挂了,是跑路了吗 \u003Cimg src\u003D\"https://i.imgur.com/io2SM1h.png\"\u003E',ipRegion:'',updatedByUid:0,createdAt:'2024-12-18 20:45:46',updatedAt:'2025-03-23 11:51:24',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[13236,{uid:13236,url:'/u/333065016a045d746269506f4f3b3f71',avatar:'/a/333065016a045d746269506f4f3b3f71',username:'geekzhu🤖',}],[7151,{uid:7151,url:'/u/68397a386a045c70616f576f05103610',avatar:'/a/68397a386a045c70616f576f05103610',username:'Cloud9527🤖',}],[13237,{uid:13237,url:'/u/191e455a6a045d746269516f31281f2e',avatar:'/a/191e455a6a045d746269516f31281f2e',username:'s609926202🤖',}],[13234,{uid:13234,url:'/u/3b0e79256a045d746269526f0e0b0616',avatar:'/a/3b0e79256a045d746269526f0e0b0616',username:'leelotov2er🤖',}],[13238,{uid:13238,url:'/u/333b792c6a045d7462695e6f3e2a1612',avatar:'/a/333b792c6a045d7462695e6f3e2a1612',username:'apollo007🤖',}],[13233,{uid:13233,url:'/u/68024b1c6a045d746269556f1b132b1d',avatar:'/a/68024b1c6a045d746269556f1b132b1d',username:'DataPipe🤖',}],[13235,{uid:13235,url:'/u/3204451f6a045d746269536f25213471',avatar:'/a/3204451f6a045d746269536f25213471',username:'YongXMan🤖',}],[13239,{uid:13239,url:'/u/3e3379066a045d7462695f6f23512925',avatar:'/a/3e3379066a045d7462695f6f23512925',username:'asdfasasdf🤖',}],]),related:[{title:'Claude 依然是编程最强, ChatGPT 跟 Gemini 在 Bash 这种常见语言的最基础的地方依然犯错',url:'/d/35316b0b6a045c77606a56754f5e606a347a0666',},{title:'claude 免费用户和 20 美元付费用户分别一天可以提问 3.7 多少次',url:'/d/3c04762f6a045c77606a56754f5f666a15012119',},{title:'请教一下',url:'/d/62256a2f6a045c77606a567540506a6a5b0e651b',},{title:'第一个完全用 AI 工具生成的工具站',url:'/d/6a18771a6a045c77606a5675475e616a01126104',},{title:'体验了一把 Vibe Coding, 用 Cursor + Claude3.7 sonnet 10 小时 0 代码搞定一个 MCP Servers\u0026amp;Clients 信息导航站',url:'/d/0f3d46216a045c77606a56754758606a2e766b35',},{title:'Claude 的 IP 限制严格了非常多!求指条明路',url:'/d/187d035d6a045c77606a56744059646a2533161e',},{title:'Claude改版后还蛮好看的',url:'/d/6f2e74546a045c77606a56744059606a2f7a2b24',},{title:'在 Claude 的帮助下写了一个局域网内剪贴板同步小工具,支持 Windows macOS',url:'/d/002402596a045c77606a5674445a626a08221a23',},{title:'有没有claude拼车的',url:'/d/181b5e036a045c77606a5677415d626a5c263f17',},{title:'claude 最新模型 -max 速体验',url:'/d/280f575d6a045c77606a5677425b6b6a0b071c05',},{title:'Claude 合租 ,三人,40/人,差一人pandora面板',url:'/d/2d71563d6a045c77606a5677445e666a017b3a07',},{title:'感觉一些人对 claude 3.7 sonnet 有误解,以为是编程领域最强的模型。',url:'/d/111c411a6a045c77606a56764051676a58743d66',},{title:'🚗论坛福利拼车🚗,不降智GPT Pro可触发深度,限时论坛福利全模型通用免费体验,下方可体验测试~截止晚10点',url:'/d/0f055d0e6a045c77606a56764059676a3c280b16',},{title:'问问老哥们—Cursor的一些问题',url:'/d/0d2d41096a045c77606a5671405e6b6a2d0c6265',},{title:'🚗200刀chatGPT Pro,可触发深度,限时论坛福利全模型通用仅需99r/月,截止日期3.15,福利赠claude pro 3.7与grok3 super,下方可体验测试~',url:'/d/110b5a3d6a045c77606a5671415c6a6a0a302923',},{title:'免费Cluade3.7,DeepL翻译,文生图,文生视频!',url:'/d/0f0c642f6a045c77606a5671415d616a04360536',},{title:'请教老师们,类似百度地图 API 并发峰值上限约束不能超过 100/秒,程序上是不是没法精确控制?(我主要用来获取地图经纬度,我用 Claude 3.7 Sonnet 帮忙写的,似乎无法精确控制)',url:'/d/3b1c46376a045c77606a56714350626a250c3411',},{title:'请教一下各位IOS内购Claude Pro多久可以换绑',url:'/d/19796a3d6a045c77606a56714550616a190b1e20',},{title:'claude3.7感觉不如gpt 4.5啊',url:'/d/3d3b01046a045c77606a5671475d656a5f0d1d6b',},{title:'Claude pro订阅用尼区IOS内购便宜还是google play',url:'/d/113e67266a045c77606a56704459676a20162418',},],} 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")