Node.js nodejs中的重定向未打开playstore

Node.js nodejs中的重定向未打开playstore,node.js,android-intent,Node.js,Android Intent,嗨,当我从手机上启动一个url时,它会在浏览器中打开playstore url,而不是在playstore中打开 我的节点代码是这样的 //controller.js exports.app = function (rq, rs){ rs.redirect('https://play.google.com/store/apps/details?id=com.fiverating.android'); } //app.js app.get('/app', controller.app);

嗨,当我从手机上启动一个url时,它会在浏览器中打开playstore url,而不是在playstore中打开

我的节点代码是这样的

//controller.js
exports.app = function (rq, rs){
    rs.redirect('https://play.google.com/store/apps/details?id=com.fiverating.android');
}

//app.js
app.get('/app', controller.app);

因此,当我启动url
fiverating.com/app
表单浏览器时,它会在同一个浏览器中打开,我是否应该在重定向之前添加一些其他值作为响应,例如在服务器端,只需返回一个要重定向到的url:

//controller.js
module.exports.app = function (rq, rs){
  rs.json({
    url: 'https://play.google.com/store/apps/details?id=com.fiverating.android'
  });
}
在客户端重定向到该url(angularjs中的示例):


为什么您不想将
url
从后端返回到客户端,然后重定向到该url?@Talgat Medetbekov我是node的新手,我不明白您的建议。你能解释一下我是node新手,如何在客户端运行javascript,我应该在javascripts中添加一个文件折叠在path中并添加上面提到的代码吗?我将向您展示如何重定向。谢谢您的回复Talgat,我在问题中提到了我的代码。
$http.get('/api/app')
  .success(function (response) {
    window.location.href = response.url;
  });