quickWalletと呼ばれる支払いシステムを使用していますが、アプリで次のURLにリダイレクトされます。
http://localhost:3000/payment-response?status=failed&id=1009891&billnumbers=1480072195&checksum=2fcdb781a18f795459b3f388135419eeae02dda12da05e2613eae8ce4f16e514
FlowRouterを使用してどのように処理できますか?
これは私の現在のルート定義です:
FlowRouter.route('/payment-response?',{
name:'payment Response Received',
action(){
BlazeLayout.render('paymentResponse');
}
});
私は自分のコンソールで次のようになっています:
kadira_flow-router.js?hash = 9cd2691…:519パスのルートがありません:/ payment-response?status = failed&id = 1009891&billnumbers = 1480072195&checksum = 2fcdb781a18f795459b3f388135419eeae02dda12da05e2613eae8ce4f16e514
私は何が間違っているのですか?
疑問符はURLのクエリセクションを示すトークンにすぎないため、疑問符を使用せずにパスを定義します。
FlowRouterの最初の例が示すように:
FlowRouter.route('/blog/:postId', {
action: function(params, queryParams) {
console.log("Yeah! We are on the post:", params.postId);
}
});
クエリパラメータは、action()
メソッドの2番目の引数として使用できます。
したがって、コードは次のようになります。
FlowRouter.route('/payment-response',{
name: 'paymentResponseReceived',
action(_params, queryParams){
// render your layout with the queryParams
}
});
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加