lincenying / mmf-blog-vue2-ssr Goto Github PK
View Code? Open in Web Editor NEWmmf-blog-vue2 ssr(The service side rendering)
Home Page: https://www.mmxiaowu.com
License: MIT License
mmf-blog-vue2 ssr(The service side rendering)
Home Page: https://www.mmxiaowu.com
License: MIT License
朋友你好,我在sf上看到你的这篇文章,但是没看懂解决思路,我查看你的commit线,有修改过cookie的解决方法,如你所说,vue-ssr的资料不多,最近写项目时也遇到登陆问题,尝试了一些方法都无法实现登陆功能,到目前为止只发现你的这个项目完美实现了,希望能讲解一下你的思路,万分感谢!
我有一个这样的需求,打包完毕后css单独生成文件。head里的style vue-ssr-data-id 这些删除。
相关配置贴一下吧。
看了一下代码,先是在entry-server.js
中调了api.setCookies(context.cookies)
,然后在this.api
中就已经设置好cookie
了,所有请求使用的都是同一份index-server.js
导出的实例,这样在多个用户同时请求时,如A先请求,先设置了A的cookie,A的请求还没处理完成,B也来请求了,这样不是B的cookie会覆盖掉A的cookie吗,这样后续A的请求不是就会被污染了吗?如果分析有误,还请指正!
This relative module was not found:
mmf-blog-vue2-ssr/src/App.vue
does not match the corresponding path on disk app.vue
.能跑起来吗?
这个写法应该是错的:
const state: {
test: []
}
const mutations = {
push_test (state, data) {
if (test.length) {
console.log('输出这一句证明有Bug')
} else {
state.test = data // Array
}
}
}
之前搜了一下google,第一篇就找到你的,我自己也是用的第三种方法,但是跟你的有点区别,没那么繁琐,什么时候来讨论一下,加个微信或者Q?
页面html代码,有数据的地方也全部是 这个
ssr run start 在文章页的时候刷新不能获取匹配的组件内容
如题,有没有demo,或者截个图也行。谢谢了。
我是在你最新的介绍vue-ssr的下面留言的那个人,我想问一下api服务器和网站服务器是怎样一个关系,可不可以用leancloud的服务呢?那么你在那里买的服务器呢?
有相关的证明吗?
朋友,又来打扰你了。最近在看你这个项目时遇到了一个问题,我观察到预取数据window.__INITIAL_STATE__
中,在列表页查看源代码,详情页即item:{"data":{}}
为空,在详情页查看源代码,列表页即"frontend":{"article":{"lists":{"data":[],"hasNext":0,"page":1,"path":""}
为空,成功做到了按页面所需进行预取数据,然而entry-server.js
在中, context.state = store.state
,长下文会预取所有state数据,所以我想问下你是如何做到数据按需预取的,谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.