简体   繁体   English

MeteorJS-FlowRouter随机重定向(实例)

[英]MeteorJS - FlowRouter random redirect (instance)

Hi everyone im new to meteor and to coding generaly, Im trying to redirect a user to a page with random ending (make instances of the same page per user so other users cannot acces the same page) for example I have: 大家好,我是流星和编码方面的新手,例如,我试图将用户重定向到具有随机结尾的页面(使每个用户创建同一页面的实例,以便其他用户无法访问同一页面),例如,我有:

 FlowRouter.route('/main',{ name: 'main', action(){ BlazeLayout.render('MainLayout'); } });

I want the user to be redirected to something like: 我希望将用户重定向到类似这样的内容:

/main=randomString

(so it will be unique to every user that hits the Main page) help? (因此,对访问主页的每个用户来说都是唯一的)帮助?

Issue solved! 问题已解决!

FlowRouter.go('/main', {Room: "RoomID"}, {Num: "RandomNumber"}); 

made it happen, redirects me to /main=randomNumber for making multiple instances with unique path for every user 做到了,将我重定向到/ main = randomNumber,以便为每个用户创建具有唯一路径的多个实例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM