Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the client management function in the development of Wechat with C #

2025-04-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the C# development of Wechat how to achieve client management functions, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article. Let the editor take you to know about it.

1. Configuration and processing of Enterprise account parameters.

We know that the server of Wechat (including official account, enterprise account, etc.) serves as a bridge between the customer's mobile phone and the developer's server, and realizes the interaction with users through message transmission and response. here is its message flow chart.

Therefore, before using the Wechat website system deployed by yourself, you need to log in to the official backend of Wechat to initialize some information, obtain the corresponding parameter settings, and configure it in your own website system through these parameter information. in order to build a complete link to achieve message transmission and response.

When we have configured the interface between the service of [developer Server] and [Wechat Server], we have implemented the basic message exchange process. So we can configure the Enterprise client to use it.

1) configuration of website system parameters

In order to achieve the message link, we need to configure the corresponding parameters in the website system, so that we can complete the callback mode of the official backend of Wechat.

First of all, log in to the Wechat enterprise background 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 parameters of the entire website.

2) configuration of client parameters for Enterprise account

Before the Wechat enterprise account client feature is used, you need to configure the corresponding parameter information in "Parameter configuration". Only in this way can you correctly communicate with the Wechat backend and obtain the data on the server.

For the parameters of the above client software dialog box, in addition to some of the parameters set in callback settings, you also need to combine some other parameters of Wechat backend, so that we can configure the interfacing operation with Wechat server.

CorpID: unique identification enterprise number: after the enterprise account is activated, it has a CorpID. The CorpID of different enterprise accounts is different, which is equivalent to the identity of the enterprise account. When starting the development access, enterprise developers must first use CorpID and Secret in exchange for Access_Token, and then can call the enterprise number-related APIs.

Secret: manage the group credential key. When the system administrator creates an administrative group in the enterprise number management backend, the enterprise number backend assigns a unique secret to the management group. Through the secret, you can determine the management group, and the access rights of the management group to applications, address books, and interfaces.

2. The management function of the organization

I introduced the management operation of the enterprise organization in the essay "C # Development of Wechat Portal and the Department Management of Wechat Enterprise Management Development".

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 function of this enterprise Winform client has not been shown yet. Here, the software is mainly used to carry out some routine data operations, but directly calls the functions of Wechat enterprise API. These API are the interface implementations introduced in the previous series.

The following is the interface of the enterprise Winform client, which mainly uses my traditional style of Winform structure to deal with to achieve a multi-document interface.

In the [organizational list] management module, the relevant address book organizational structure is listed in the tree list. Select different organizational levels, and you can list the corresponding personnel you belong to. The interface is shown below.

Through the function operation of the red box above, we can see the relevant function points of the organization, including new sub-departments, delete departments, modify departments, and personnel management for departments: add members, delete members, modify members, move members, disable or enable people, etc., while the list of departments on the left is displayed through a tree list, all of which are handled by calling API directly. The submitted results can be seen directly in the backstage of the enterprise.

These function points are realized by imitating the function points in the background of Enterprise, but they are based on Winform and can be combined with local data processing to achieve richer interface and data management.

Add members, then provide an input interface for the user to fill in the corresponding information, the interface for the implementation of the function is shown below.

If you are a mobile member, a list of departments will pop up for the user to choose which department you need to move to. After confirmation, the mobile processing will be carried out.

3. Label management function

In the "tag list" management module, all visible tags are listed in the tree list on the left. If there is a corresponding department organization or person under the tag, it will be listed in the list. The specific interface is shown below.

The function operations included in this module are: new tag, delete tag, modify tag, add tag member, delete tag member and so on.

Tag management is very simple, mainly to maintain the concept of a similar group, we can create, modify or delete the corresponding tag.

At the same time, we can also add a corresponding collection of departments and personnel to the tag, as shown below.

4. Message sending operation

[send message] functional module, you can choose to send objects, including organizations, labels, personnel can choose, while the content of the message, including text, pictures, voice, video, pictures, files and other content.

The selection of personnel is to provide a multi-functional selection interface, including you can select departments, labels, personnel, and finally return the selected objects through [complete selection].

After selecting the object and entering the corresponding sending content, click "send" to send the message, and you can see the latest message on the corresponding member's mobile phone. The following is an enterprise ID interface that accepts pictures and text.

Other content, such as video and voice, are required to be uploaded to the server before being sent. The sending processing operation is the same and will not be repeated.

Thank you for reading this article carefully. I hope the article "how to achieve client management functions in the development of Wechat in C #" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support it and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 252

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report