Home >WeChat Applet >WeChat Development >C# develops WeChat portal and applies the client management function of WeChat enterprise account
We know that both WeChat official accounts and enterprise accounts provide an official Web backend to facilitate our configuration of WeChat accounts and related data management functions. For WeChat enterprise accounts, there is an organizational structure in the address book Management, tag management, personnel management, and message sending and other functions. The organizational structure and tags of the WeChat enterprise account can add corresponding personnel, and the message sending can include text, pictures, voice, video, graphics, files, etc. For enterprise accounts, the official interface can send almost unlimited messages. Therefore, building a management backend to manage the personnel of enterprise accounts and send messages to enterprise members is a good feature highlight, which can sometimes improve our enterprise. Internal message communication efficiency and daily work management efficiency. This article explores Winform-based client methods to implement these functional operations.
We know that the server of WeChat (including official accounts, enterprise accounts, etc.) builds a bridge between customer mobile phones and developer servers. Through messages The transmission and response realize the interaction with the user. The following is its message flow chart.
Therefore, before using the WeChat website system deployed by yourself, you need to log in to the WeChat official backend to initialize some information and obtain the corresponding parameter settings. Through these parameter information, you can Only through configuration in the website system can a complete link be built to realize message delivery and response.
After we configure the connection between the [Developer Server] service and [WeChat Server], we have realized the basic message interaction process. In this way, we can configure the enterprise account client for use.
1) Website system parameter configuration
In order to realize the message link, we need to configure the corresponding parameters in the website system, so that we can put the WeChat official backend The callback mode is completed.
First log in to the WeChat enterprise backend management on our own [development server].
Configure the relevant parameter information for the enterprise account.
Combined with the callback processing operation on the WeChat server, complete the configuration operation of the entire website parameters.
2) Enterprise account client parameter configuration
Before using the WeChat Enterprise Account client function, you need to configure the corresponding parameter information in [Parameter Configuration], so that you can correctly communicate with the WeChat backend and obtain data on the server.
The parameters of the client software dialog box above, in addition to some parameters in the callback settings, also need to be combined with some other parameters of the WeChat background so that we can configure it properly Interconnection with WeChat server.
CorpID: Uniquely identifies the enterprise account: After the enterprise account is opened, it will have a CorpID. The CorpID of different enterprise accounts is different, which is equivalent to the identity of the enterprise account; when starting development access, enterprise developers must first use CorpID Use Secret in exchange for Access_Token, and then you can call enterprise account related interfaces.
Secret: Management group credential key. When the system administrator creates a management group in the Enterprise Account management background, the Enterprise Account background assigns a unique secret to the management group. This secret can be used to determine the management group and the access rights the management group has to applications, address books, and interfaces.
I introduced it in the essay "C# Development of WeChat Portal and Application of WeChat Enterprise Account Address Book Management Development Department Management" Management operations of the enterprise organization.
By default, we can create a root node in the background and then process it on this node.
After introducing so much, it seems that the interface functions of this Enterprise Winform client have not been shown. The software here is mainly used to perform some routine data operations, but it is It is just a function of directly calling the WeChat Enterprise Account API. These APIs are the interface implementations introduced in the previous series.
The following is the interface of the Enterprise Winform client. This is mainly processed by my traditional style Winform structure to achieve a multi-document operation interface.
[Organization List] In the management module, the relevant address book organizational structure will be listed in the tree list. Select different organizational levels to list the corresponding personnel. The interface is as follows.
Through the functional operations in the red box above, we can see the relevant functional points of the organization, including creating new sub-departments, deleting departments, modifying departments, and creating new sub-departments for departments. Implemented personnel management: adding members, deleting members, modifying members, moving members, disabling or enabling personnel and other functions, while the list of departments on the left is displayed through a tree list. All these operations are processed directly by calling the API. After submission The results can be seen directly in the enterprise account backend in real time.
These function points are all implemented by imitating the function points of the enterprise account backend, but they are based on Winform and can be combined with local data processing to achieve richer interfaces and data management.
When adding members, an input interface is provided for users to fill in the corresponding information. The interface for function implementation is as follows.
If the member is moved, a department list will pop up for the user to select the specific department to be moved to, and the move will be processed after confirmation.
[Tag list] In the management module, list it in the tree list on the left All visible labels, if there are corresponding departments, organizations or personnel under the labels, will be listed in the list. The specific interface is as follows.
The functional operations included in this module include: creating new tags, deleting tags, modifying tags; adding tag members, deleting tag members, etc.
# Tag management is very simple, mainly to maintain the concept of a similar group. We can create, modify or delete the corresponding tags.
At the same time, we can also add corresponding departments and personnel collections to the label. The operation of adding label members is as follows.
The [Send Message] function module allows you to select the sending objects, including organizations, labels, and people. All can be selected; the content of the message includes text, pictures, voice, video, graphics, files, etc.
The personnel selection provides a multi-functional selection interface, including the ability to select departments, labels, and personnel, and finally return the selected object through [Complete Selection].
After selecting the object and entering the corresponding sending content, click [Send] to send the message, and you can view the latest message on the corresponding member's mobile phone. , the following is an enterprise account interface that accepts pictures and text.
Other content such as video, voice, etc. are required to be uploaded to the server before being sent. The sending processing operation is the same and will not be repeated.
For more articles related to C# development of WeChat portal and application of client management functions of WeChat Enterprise Account, please pay attention to the PHP Chinese website!