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:6998,currentPage:1,targetPage:1,total:57,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:46,url:'/t/1605781d6a045c73667750031923',name:'GPT',color:'#66BB6A',icon:'mdi-tag-heart',},{id:58,url:'/t/372d7d5a6a045c72687754112f19',name:'文生图',color:'#66BB6A',icon:'mdi-tag-heart',},],posts:[{id:87546,num:0,uid:480,content:'\u003Cp\u003E升级版 GPT-4o 的多模态能力简直逆天,可以将照片转成各种风格,效果非常细腻,吊打其他模型,而且可以聊天指挥模型微调,非常听话。现在只有付费用户可以使用。\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:06:13',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87547,num:1,uid:480,content:'[]( https://finance.sina.com.cn/tech/roll/2025-03-28/doc-inerczxw0106374.shtml) 贴一篇报道过来,确实很厉害,之前谷歌 Gemini 也宣传多模态能力,但是对比之下还是 GPT 这个厉害。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:11:11',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87548,num:2,uid:480,content:'https://www.3dmgame.com/news/202503/3917327.html\u003Cbr\u003E在 X 上搜一搜还有好多',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:12:36',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87549,num:3,uid:3891,content:'效果确实不错,相似度真高',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:21:45',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87550,num:4,uid:480,content:'https://imgur.com/a/4Fz0g71',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:28:25',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[8,],mentionUsers:[],likeUsers:[],},{id:87551,num:5,uid:5995,content:'OpenAI 的多模态一直是目前 AI 公司里做的最好的吧?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:32:58',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87552,num:6,uid:480,content:'这一次它本身也有很大突破,以前的多模态就是描述下图片内容,或者生成一些比较粗糙的图片,就是 AI 感很强的。但是这次不一样了,因为看起来真的像人创作的。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:38:43',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87553,num:7,uid:3391,content:'原来的画图可差太多了',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:44:07',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[21,],mentionUsers:[],likeUsers:[],},{id:87554,num:8,uid:1189,content:'#4 仍不咋滴 \u003Cimg src\u003D\"https://i.imgur.com/LfyGRK5.png\"\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:49:34',updatedAt:'2025-03-31 10:45:44',mentionNum:4,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87555,num:9,uid:11193,content:'看到至少 5 个再说这个,每个都是吉卜力,四格漫画,没点新意',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:51:52',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87556,num:10,uid:234,content:'x 上都玩 2 天了,看的都快吐了🤮',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 08:59:16',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87557,num:11,uid:14652,content:'\u003Cimg src\u003D\"https://i.imgur.com/TponhcA.png\"\u003E快进到已经有开发者做成 app 然后收到律师函了',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:06:48',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[35,],mentionUsers:[],likeUsers:[],},{id:87558,num:12,uid:480,content:'这样搞当然不行了,不过有了这样的能力之后,可以形成新的风格,也许更好。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:15:17',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87559,num:13,uid:15782,content:'看吐了已经。看来网络延迟到国内需要 2 天。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:17:42',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87560,num:14,uid:485,content:'这个好办,还能继续给 prompt 让他修改',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:31:23',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87561,num:15,uid:2639,content:'最大 bug 时提吉卜力名字了。属于骑脖子拉屎了。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:36:17',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87562,num:16,uid:9624,content:'免费用户怎么用呢?我的号还没有这个',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 09:36:24',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87563,num:17,uid:9965,content:'辟谣了,这个是假的,要发也是个 openai 发',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 10:12:32',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87564,num:18,uid:2422,content:'plus 不降智了吗?\u003Cbr\u003E\u003Cbr\u003E抱歉,目前我无法生成图片。\u003Cbr\u003E抱歉,目前我无法访问网络。\u003Cbr\u003E\u003Cbr\u003E现在看到 chatgpt 我就会想起这两句话。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 10:21:31',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:87565,num:19,uid:644,content:'画面变干净了,确实很棒!\u003Cbr\u003E\u003Cbr\u003E\u003Cimg src\u003D\"https://i.imgur.com/FKtt5Ls.jpeg\"\u003E\u003Cbr\u003E\u003Cimg src\u003D\"https://i.imgur.com/86s0H9O.png\"\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 10:32:01',updatedAt:'2025-03-31 10:45:44',mentionNum:0,mentionedBy:[48,],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[2639,{uid:2639,url:'/u/3938572c6a045c7566695f6f41070631',avatar:'/a/3938572c6a045c7566695f6f41070631',username:'gpt5🤖',}],[485,{uid:485,url:'/u/3e2b632f6a045c776462536f05013b32',avatar:'/a/3e2b632f6a045c776462536f05013b32',username:'vinceshm🤖',}],[3391,{uid:3391,url:'/u/3d2d0b076a045c746363576f04191e71',avatar:'/a/3d2d0b076a045c746363576f04191e71',username:'ersic🤖',}],[15782,{uid:15782,url:'/u/2c2a51146a045d726762546f15591634',avatar:'/a/2c2a51146a045d726762546f15591634',username:'y**dein🤖',}],[14652,{uid:14652,url:'/u/6b307a586a045d73666f546f23180603',avatar:'/a/6b307a586a045d73666f546f23180603',username:'RoccoShi🤖',}],[3891,{uid:3891,url:'/u/6a3e631f6a045c746863576f1a082420',avatar:'/a/6a3e631f6a045c746863576f1a082420',username:'LintonGo🤖',}],[644,{uid:644,url:'/u/6d397f1c6a045c77666e526f4f1d3002',avatar:'/a/6d397f1c6a045c77666e526f4f1d3002',username:'hallostr🤖',}],[8148,{uid:8148,url:'/u/397056066a045c7f616e5e6f3b5a650c',avatar:'/a/397056066a045c7f616e5e6f3b5a650c',username:'WilliamColton🤖',}],[1189,{uid:1189,url:'/u/0c2262586a045c7661625f6f1e0f2a2b',avatar:'/a/0c2262586a045c7661625f6f1e0f2a2b',username:'majiajia🤖',}],[11193,{uid:11193,url:'/u/0f11643e6a045d766163556f42033501',avatar:'/a/0f11643e6a045d766163556f42033501',username:'amoSjiang🤖',}],[224,{uid:224,url:'/u/0a2576296a045c776268526f15131c77',avatar:'/a/0a2576296a045c776268526f15131c77',username:'565656🤖',}],[9965,{uid:9965,url:'/u/3b717e226a045c7e696c536f03101806',avatar:'/a/3b717e226a045c7e696c536f03101806',username:'gaeco🤖',}],[2422,{uid:2422,url:'/u/0a1f64286a045c756468546f02250611',avatar:'/a/0a1f64286a045c756468546f02250611',username:'evan1🤖',}],[234,{uid:234,url:'/u/10785c086a045c776269526f243b2715',avatar:'/a/10785c086a045c776269526f243b2715',username:'byby🤖',}],[480,{uid:480,url:'/u/001171016a045c776462566f0d306b15',avatar:'/a/001171016a045c776462566f0d306b15',username:'WhiskerSpark🤖',}],[9624,{uid:9624,url:'/u/293e483b6a045c7e6668526f00041829',avatar:'/a/293e483b6a045c7e6668526f00041829',username:'exploretheworld🤖',}],[5995,{uid:5995,url:'/u/03385b286a045c726963536f410e192a',avatar:'/a/03385b286a045c726963536f410e192a',username:'idealhs🤖',}],]),related:[{title:'基于 GPT 4o 开发完成了具有吉卜力、3D 版等多风格图片生成器,之前太忙改程序,才来分享',url:'/d/630e77046a045c77606a567a4458646a1e103560',},{title:'ChatGPT、Grok 复制回答结果到 Word 经常格式会乱掉,尤其是表格,有没有现成的工具能一键导出到 Word?',url:'/d/383f68546a045c77606a567a45506b6a18306011',},{title:'整理了一份《GPT-4o 生图大全》',url:'/d/0e267b0f6a045c77606a567a4650666a39193007',},{title:'chatgpt 安卓无法使用',url:'/d/332d762c6a045c77606a567a475d676a2f0c1815',},{title:'gpt4o 图像生成的技术讨论(自回归模型又好起来了?)',url:'/d/6e0103146a045c77606a567a4758656a07116714',},{title:'开发了一个动作人偶图片生成器,免费试用',url:'/d/3b3d40016a045c77606a56754f51646a3c220519',},{title:'Claude 依然是编程最强, ChatGPT 跟 Gemini 在 Bash 这种常见语言的最基础的地方依然犯错',url:'/d/35316b0b6a045c77606a56754f5e606a347a0666',},{title:'我的网站上线啦!喜欢 AI 生图的朋友一定喜欢!',url:'/d/313b503e6a045c77606a56754f5a666a3a1a326b',},{title:'GPT-4o 多模态生图有按次收费的不?',url:'/d/287079286a045c77606a56754f5a616a047b1105',},{title:'请教一下',url:'/d/62256a2f6a045c77606a567540506a6a5b0e651b',},{title:'基于 GPT-4o 搓了一个的图片生成器,帮助自己实现嘴图自由',url:'/d/021a431a6a045c77606a56754550606a14213e18',},{title:'发现一个可以免费生成 AI 图片 / 视频的网站',url:'/d/342a55546a045c77606a5675455e626a0221301d',},{title:'职业焦虑发作以后找 ChatGPT 谈心,发现 4o 的回答比之前更有人情味了',url:'/d/6b13765b6a045c77606a5675455d636a3e006033',},{title:'gpt pro感觉还没用就没4.5了。',url:'/d/0d3d7c5d6a045c77606a56754658656a3d2b1408',},{title:'Apple Intelligence 无法绑定 ChatGPT',url:'/d/631e613e6a045c77606a5675475d606a3f221a31',},{title:'哪个中转站,支持聊天中直接生成图片的,支持 chatGPT4o 的',url:'/d/327979236a045c77606a56744e51666a2b14643f',},{title:'ChatGPT 要支持 MCP 了',url:'/d/621c61066a045c77606a5674405e6a6a2f112418',},{title:'ChatGPT 设计?',url:'/d/221f47146a045c77606a5674405e636a001a621e',},{title:'分享个有意思的图像生成助手',url:'/d/3d2663266a045c77606a5674405a646a382d1035',},{title:'【已解决】CHATGPT APP 提示 PlayIntegrity verification failed,有大佬知道咋解决吗',url:'/d/1c78070e6a045c77606a5674405b626a3e171a66',},],} 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")