Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

调整前台动态皮肤预览逻辑 #116

Closed
88250 opened this issue Apr 30, 2020 · 0 comments
Closed

调整前台动态皮肤预览逻辑 #116

88250 opened this issue Apr 30, 2020 · 0 comments
Assignees
Milestone

Comments

@88250
Copy link
Owner

88250 commented Apr 30, 2020

前台动态切换皮肤特性 skin=xxx 主要是为了预览皮肤,之前的实现逻辑会在 cookie 中保存当前皮肤,目的是为了让前台动态切换以后可以不带 skin 参而继续用 cookie 值进行皮肤预览。比如 skin=nijigen 预览后,cookie 中的 skin 值会被设置为 nijigen,然后后续访问都用该值进行模板渲染。

当博主在后台切换皮肤后,访客的 cookie 并未清空,会导致皮肤切换没有效果,另外这个 cookie 逻辑偶尔上页面静态化 #107 以后就更复杂了,所以需要进行简化。

现改为不写 cookie,仅在带有 skin=xxx 时切换皮肤,将 skin 写入 session storage。

@88250 88250 added this to the 4.1.0 milestone Apr 30, 2020
@88250 88250 self-assigned this Apr 30, 2020
@88250 88250 closed this as completed Apr 30, 2020
@88250 88250 reopened this May 12, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants