-
如题,假如现在有一个页面A,它有中、英两种语言可以切换,URL分别为: 实际上URL的路径内容就是 问这个问题,是由于我在文章中加入了上面的PJAX函数,一方面这种方式维护起来麻烦,二是出现了一些意外的问题。 |
Beta Was this translation helpful? Give feedback.
Answered by
imaegoo
Dec 30, 2021
Replies: 1 comment 1 reply
-
试试给 twikoo 传个 path 参数,该参数获取 URL 路径的末尾作为 path,可以满足你的情况。 twikoo.init({
envId: '...',
// ...
path: 'location.pathname.split("/").reverse().find(function(i){return i})'
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
imaegoo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
试试给 twikoo 传个 path 参数,该参数获取 URL 路径的末尾作为 path,可以满足你的情况。