我查看了其他问题/答案,但我找不到解决我的问题的问题。我在这里查看了原始文档,但该解决方案对我来说没有意义。
以下代码中的路径因用户而异。
onNext: function(){
document.location.href = 'http://localhost:8080/web/client/biography';
},
依此类推,接下来,用户将根据用户名被定向到不同的路径。
如何确保每个用户的 URL 都是正确的?
http://localhost:8080/web/client/biography
http://localhost:8080/web/client1/biography
http://localhost:8080/web/client2/biography
我的代码:
<script>
// Instance the tour
var tour = new Tour({
name: "tour",
steps: [],
container: "body",
keyboard: true,
storage: window.localStorage,
debug: false,
backdrop: true,
backdropContainer: 'body',
backdropPadding: 0,
steps: [
{
element: ".logo",
title: "Setup Wizard",
content: "Synergistically visualize maintainable metrics vis-a-vis.",
},
{
//element: "#groups",
//backdrop: false,
// title: "Setup Wizard",
// content: "Synergistically visualize maintainable metrics vis-a-vis."
},
{
element: ".group-content",
//backdrop: false,
onNext: function(){
document.location.href = 'http://localhost:8080/web/client/biography';
},
title: "Setup Wizard",
content: "To get started we'd like you to setup your group subscriptions, and later tell us a bit more about yourself. Please tick your interested groups and click on Save"
},
{
element: ".user-profile-portlet",
onEnd: function(){
document.location.href = 'http://localhost:8080/user/client/home';
},
title: "Setup Wizard",
content: "Go ahead and click on 'edit' and tell us a bit more about yourself."
}
]});
// Initialize the tour
tour.init();
// Start the tour
tour.start();
</script>