Local service configuration Intranet penetration to realize WeChat public account integration

Background: When building a website system for on-demand courses, I want to access the WeChat official account to realize on-demand courses and other operations on the WeChat official account. Then we won’t discuss things like official account registration here for the time being, and students who need it can look it up by themselves.

        However, the WeChat test official account cannot directly use the local address to access it directly. Here, an intranet penetration operation is required to realize the conversion of mainland services. As shown below

 Configuration information:

1. In the interface configuration information box, you need to configure your own backend service interface. The project here adopts (SpringBoot+vue) separated front-end and back-end development methods, so the interface configuration item should write the interface address corresponding to the back-end service .

2. Here you need to use the internal network penetration technology to generate a new domain name from the local address. There are many internal network penetration software that can perform this operation. I use Sunny-Ngrok software here, as shown in the figure below, for internal net penetration

3. After generating the domain name, fill in the interface configuration of your own domain name + @RequestMapping("/api/wechat/message") of the backend Controller into the interface configuration of the official account, and write the Token at will, so it may not be very clear, I for example.

Such as: URL:  http://xxx.gz2vip.91tunnel.com/api/wechat/message

This is the complete official account URL: http://xxx.gz2vip.91tunnel.com + /api/wechat/message.

This js interface configuration generally refers to the front-end part. You can see in the picture above that I have configured two tunnels, one for the front-end and one for the back-end. You only need to fill in the generated domain name of the front-end.

The above is the basic content of the internal network penetration configuration WeChat test official account, and it is over ~~~~ 

Guess you like

Origin blog.csdn.net/zhangkai__/article/details/125721927
Recommended