Scan WeChat to go directly to the payment page written in the mini program - get unlimited mini program codes

Requirement premise: We have a scan function in our applet. At this time, the QR code is generated by the company's backend. However, in order to enhance the sense of use for the convenience of use, use WeChat to scan or long press to identify and go directly to the payment page, but at this time, the results of WeChat scanning are not supported.

Solution: Change to Suncode, and  obtain unlimited mini-program codes according to the document|WeChat open document  (both front and back ends must read this document).

I am the front end: what needs to be noted is:

前端转码 decodeURIComponent scene有的特殊字符请自行编码为合法字符  |  后端env_version是什么版本
-------------------------------------------------------
期间迷惑我的问题是:

后端指定页面跳转后设置scene参数传给前端

getUrlParams() {
 return this.$router.params;
}

const urlParams = this.getUrlParams();
const scene = decodeURIComponent(urlParams.scene);

我要去接收scene但总是取出来是underfined  ┭┮﹏┭┮ 

通过开发者工具的二维码编译才发现是有个报错,解决掉就拿到了参数值啦!!

欢迎指导,此文章记录本人开发遇到的新知识。

Guess you like

Origin blog.csdn.net/weixin_62226731/article/details/131397207
Recommended