Yes, I currently need to implement a feature that uses scan QR code to pay. I make a URL link to the QR code, and then call Jsapi in the link to initiate charges, now the problem is that my QR code needs to include a parameter (product ID), then a different ID for the charge, the last record, and considering that there may be an unlimited number of product types so it is impossible to make a sub-page.
Now the question is, do I use a link like http://shop.com/?id=100 to think? The latter part is also part of the link, and can not pass the parameters, how do you realize it?
Reply content:
Yes, I currently need to implement a feature that uses scan QR code to pay. I make a URL link to the QR code, and then call Jsapi in the link to initiate charges, now the problem is that my QR code needs to include a parameter (product ID), then a different ID for the charge, the last record, and considering that there may be an unlimited number of product types so it is impossible to make a sub-page.
Now the question is, do I use a link like http://shop.com/?id=100 to think? The latter part is also part of the link, and can not pass the parameters, how do you realize it?
In the process of generating two-dimensional code, I also encountered this problem, in two ways to practice.
1. As said upstairs, using the rewrite path, the path does not appear "? "This affects the characters that receive the parameter.
2. UrlEncode, "Index.html%3factid%3d3%26from%3d3", after receiving decode, the parameters obtained are: index.html?actid=3&from=3.
In fact, this site is not to inspire you?
http://segmentfault.com/q/1010000004324729