Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program bionic native jump


May 18, 2021 WeChat Mini Program Development Document


Table of contents


Bionic ride code

Business can quickly realize the online scanning function of public transportation through access to the industry template of the original ride code, as well as open the line, ride record, help center and other related pages. Bionic native ride code industry template includes the following interface (before calling to complete the small program account registration, WeChat payment merchant number application process, and to [email protected] to access the bionic ride code industry template ability to apply for mail):

The NAME of the API API description
Bionic native jump Jump different WeChat bionic native pages to achieve different functional requirements according to the needs.
raw code WeChat background to the business side to request QR source data, WeChat front end can be based on the source data to generate ride code.
Pay for the callback WeChat background to the business side to request QR source data, WeChat front end can be based on the source data to generate ride code.
WeChat charge Used to receive information obtained by the service party based on the scanning interface to the user for a fee-free charge.
User registration/signing up WeChat background to the owner to initiate user registration.
The user is out of contract WeChat background to inform the owner of the user log off / contract.
User sign-up status query The owner queries the user contract status interface.
Underpayment WeChat background informs the owner that the payment was successful (no notification if the payment failed).
Query the line Check the bus/subway lines set up
Set the line Set bus / subway line
Query the list of owed users WeChat background will get all the list of arrears users, and provide the interface query list interface. Since then, if any user completes the arrears payment, delete the record while receiving the successful payment notification.

Imitation of life jump

Different functional needs are achieved differently according to different jumps different.

1, request parameters

parameter name type required Remark
path_type int Y Requires page 0 - New User Home / Welcome Page (Open the Ride, including "successfully opened the ride code"
1 - Tash 2 - Opened Route 3 - Personal Center 4 - My Ride Record 5 - Help 6 - Arrears Record

Note: The request parameter is JSON format.

2, return parameters

parameter name type required Remark
errcode int Y Return code
errmsg string Y returned messages
business_type string Y business type
query_string string Y Parameters used when calling the imitation of the primary student
expire_at int Y Returns the expiration time of query_string (UINX timestamp)

3, sample code

ask:

https://api.weixin.qq.com/intp/transportcode/getbusinessview?access_token=ACCESSTOKEN

Request parameters:

{"path_type":1}

Return:

{
    "errcode":0,
    "errmsg":"ok",
    "business_type":"wxCity",
    "query_string":"addr=pages%2Froute%2Fmain&business_view_token=a52f6d30814a8d7d5717d004a0c38894",
    "expire_at":1576838728
}