# PC Weixin Mini Program Access Guide
# 1 PC side Weixin Mini Program Summary
PC-side Weixin Mini Program refers to the Weixin Mini Program that runs on the PC side.Developers can run Mini Programs on the PC side without special adaptation. At the same time, we also provide some additional interfaces and capabilities for PC interaction to improve the user experience on the PC side.
# 1.1 Platform information acquisition and judgment
The PC side currently has two main platforms: Windows and Mac.Developers can obtain the current device information through [wx.getSystemInfoSync](<(wx.getSystemInfoSync) >) to help determine the current device's operating environment.
# 1.2 Differences in underlying capabilities of the framework
PC side Weixin Mini Program are using the same set of framework, from the platform side compatible with the operating system level interface, interface capabilities, upper performance almost the same. It is recommended that developers can deal with PC related platforms in a unified manner. Similarly, the Mini Program foundation library keeps versions up to date with mobile.
Mac version 3.x up to support v3.3.5 base library. Mac WeChat official website Download 4.0 beta Mac WeChat to experience the latest effects.
# 2 Large screen adaptations
The PC side has the advantage of a large screen experience.Developers can quickly switch on the PC's large-screen mode by adapting it, and the framing side also provides a method of completing the non-large-screen Weixin Mini Program experience.
# 2.1 Accessability to large screen adaptations
Theresizablefield can be configured in apagejson to control whether Weixin Mini Program supports large-screen adaptation.
For Weixin Mini Program that has been connected to the large screen adaptation, we will use [wx.onWindowResize](<(wx.onWindowResize) >)To notify the developer of the current window size. This interface can be used to respond to small window changes.

Due to the need for PC side interaction with a drag area and other reasons, the PC's large screen Weixin Mini Program does not support custom navigation rails. In the Mini Program that is not adapted to the large screen, the Mini Program supports the new ability to customize the navigation bar, can be referred to:
# 2.2 Adaptive double column mode
For the Weixin Mini Program that is not connected to the large screen, in order to ensure the user's needs for different sizes of windows, we will scale the page in the frame layer to ensure the user experience. At the same time, if the user stretches more than 1.5x, we will automatically double-display the top-level secondary page of the Mini Program, so the developer does not need to adapt it to allow the user to enjoy the interactive experience at different sizes.
# 2.2.1 Window size ratio and effect
| Window size ratio | Window effects |
|---|---|
| 0.75x - 1x | narrow |
| 1x - 1.5x | Enlarge (single window) |
| 1.5x - 2x | Double column mode |
# 2.2.2 Specifications of adaptation
In two-column mode, Weixin Mini Program top-level pages will be divided into left and right columns, each showing a page.The effect is as follows:

The model does not require a developer adaption, and the user experience rules are as follows:
- If there is only one page at the moment, it is fixed on the left side of the window.
- If there are currently 2 or more pages, the two-level pages at the top of the page stack are automatically assigned to the left and right columns according to the order in which the pages are opened.
- If the user triggers the navigateTo jump interface when operating the left page, the framework will think that it should jump on the right page at this time and will replace the original right page.
# 3 PC Weixin Mini Program specific capabilities
In order to give users a better Weixin Mini Program experience on the PC side, we provide some additional interfaces and features.
# 3.1 Keyboard events
In order for developers to be more responsive to user actions, we provide wx.onKeyUp and wx.onKeyDown Two interfaces allow developers to listen to keyboard events and handle them accordingly.
# 3.2 Drag file open with Weixin Mini Program
In the basic library version v3.7.5 and above, such as the user on the PC side drag files from other places (including but not limited to the system document folder,WeChat chat logs], and the framework side will attempt to parsy the file type supported by Weixin Mini Program and, if Mini Program support is supported, the Mini Program will open the file.
Configuration Weixin Mini Program The type of text that is supported to open can refer to: Chat material supports Mini Program opening
# 3.3 Add to Desktop
On the Windows platform, Weixin Mini Program can add Mini Programs to the desktop in a menu, and users can click on them to open them directly.The Mac platform does not support this capability.

# 4 PC side Weixin Mini Program
The PC side provides two payment methods of two-dimensional code payment and PC payment push to the mobile phone, which can quickly transfer the payment operation to the mobile phone.
# 4.1 QR code payment
The PC side Weixin Mini Program supports the display of the two-dimension code in the payment process, and users can pay by scanning the two-dimension code on the computer side of the mobile phone.NOTE:
- The account number of the mobile phone scan code needs to be consistent with the account number of the PC side.
- QR codes have a five-minute expiration date and will expire beyond that time.
# 4.2 PC payment push to mobile phone
Since the base library v3.5.8, PC side Weixin Mini Program new support push to mobile payment.The user can choose the method of pushing the payment in the interaction, at which point the user's phone will receive a notification, confirming the notification and pulling up the payment page for quick payment. Developers can turn this capability on without adaptation.
The interactive experience is as follows:

# 5 PC Weixin Mini Program Ecological capacity
# 5.1 Web application opens PC Weixin Mini Program
Website App can be turned on Weixin Mini Program by calling the PC WeChat capability Users of WeChat 3.9.12 for Windows and above and WeChat 4.0.0 for Mac and above can jump to a specified page of a Mini Program on the PC WeChat client in the website application.Specific reference: website application pull up PC Mini Program
# 5.2 Web application sharing PC Weixin Mini Program
Website App also supports PC capability sharing WeChat. Users of WeChat 4.0.1 for Mac or WeChat 40.1 for Windows and above can share website app content to a WeChat session in the form of a small app card. Specific reference: website application sharing PC Mini Programs
# 5.3 Scheme opens PC Weixin Mini Program
The PC also supports URL Scheme capabilities. Developers can use URL Scheme to open Weixin Mini Program in web pages and applications. Specific reference: URL Scheme Open Mini Program
# 6 Testing methods
# 6.1 Testing PCs with developer tools Weixin Mini Program
Developers can test the PC Weixin Mini Program through developer tools. Specific reference: PC Mini Programs development
# Requirements for the operating environment
Download and install the Developer Tool version 1.02.190808 or above, underload .
# Use Procedure
- Using the automatic preview of function, click Preview > Automatic Preview. You can choose to start the PC automatic preview. Click Compile and preview. If successful, Weixin Mini Program will be automatically pulled up on the WeChat PC version.

# 7 Question Feedback
You can go to the WeChat Open Community's PC Weixin Mini Program Zone for feedback.