C# development WeChat portal application management system function introduction

高洛峰
Release: 2017-03-31 15:04:07
Original
2313 people have browsed it

Recently conducted in-depth research on the WeChat interface. By encapsulating the underlying interface step by step, it gradually upgraded to automated configuration, automated response, and optimization and improvement of the background processing interface, striving to build a more complete and applicable WeChat Portal application management system.

The WeChat portal application management system adopts the route based on MVC+EasyUI. Since most domain name servers can only support .NET4.0, it uses MVC3 and C#4.0 as the development basis and can basically be deployed on on any .NET server.

In the WeChat portal system, the following functional operations are implemented:

1) Realize the dynamic configuration of the menu and update it to the server;

2) Dynamically define events and responses Messages to realize menu action responses to different industries and different needs;

3) Dynamic response instruction configuration processing to realize message processing of the entire response chain;

4) Obtain subscribers and users Group information, and can implement operations such as maintenance of user group information;

5) Manage and update multimedia files, graphic messages and other content to facilitate preparation for customer push messages.

6) Use the group messaging function to send messages to selected subscribers or groups.

1. WeChat Menu Management

Manage menus in the system and submit the menus to the server to achieve dynamic configuration and generation of menus, which can provide benefits for our system Adapt to various needs and achieve flexible processing.

C#开发微信门户应用管理系统功能介绍

The adding interface of WeChat menu is as follows.

C#开发微信门户应用管理系统功能介绍

The modification interface of the WeChat menu is as follows

C#开发微信门户应用管理系统功能介绍

The WeChat menu definition is stored in the database and can be submitted if needed To take effect on the WeChat server, you need to call the WeChat API interface for processing. I added a processing method to submit to the server in the Controller of the page.

C#开发微信门户应用管理系统功能介绍

On the portal of the WeChat service account, the menu performance is as follows.

C#开发微信门户应用管理系统功能介绍

2. Processing of menu events

For dynamically generated menus, in most cases it is used as a Click method, that is, each menu event needs to be defined. For the event response operation of the menu, if we use WeChat, we can understand that WeChat's processing events can generally respond to user text messages, picture messages, graphic messages, etc. Under normal circumstances, text messages or graphic messages are generally used.

In order to further realize the reuse of response content, we manage the event definition and content definition of the menu separately. The event definition can use multiple text messages or multiple graphic messages to combine, so that it can be achieved A more flexible usage environment.

C#开发微信门户应用管理系统功能介绍

Add event definition as shown below

C#开发微信门户应用管理系统功能介绍

The response content encoding of the event can be entered or selected from "Edit" button, when selecting the "Edit" button, the system pops up a dialog box for the user to select the response content encoding of the event.

C#开发微信门户应用管理系统功能介绍

After completing the selection, return to the original new interface, and you will see that the returned record is the record we selected.

C#开发微信门户应用管理系统功能介绍

The editing interface of WeChat events is as shown below, similar to the content of the new interface.

C#开发微信门户应用管理系统功能介绍

3. WeChat message content management

As mentioned above, menu events are processed through associated event coding, and the event itself can combine multiple message contents , so the message content is the smallest unit in response to customer operations. They can be a text message, a graphic message, or a combination of multiple messages (of the same type).

C#开发微信门户应用管理系统功能介绍

In order to facilitate management, I divided the messages into graphic, instruction, and text types. If necessary, it can be refined into other types of messages as needed.

The interface for adding message content is as follows.

C#开发微信门户应用管理系统功能介绍

#The mobile interface effect of text message is as follows.

C#开发微信门户应用管理系统功能介绍

Whether it is a text message or a graphic message, we define the message according to the definition of graphic message. If it is a text message, we only need to get the description content as the message The main body is enough.

The editing interface of graphic messages is as shown below. The main thing is to fill in the complete content and pictures, as well as the detailed links to the page.

C#开发微信门户应用管理系统功能介绍

The above message of the customer relationship management system, the interface effect displayed on the mobile phone is as follows. Click the link to switch to the message jump link address.

C#开发微信门户应用管理系统功能介绍

4. Maintenance of response instructions

The maintenance of response instructions is somewhat similar to event management. It mainly means defining some used instructions to facilitate construction. The response chain of the response system enables step-by-step operation instructions.

C#开发微信门户应用管理系统功能介绍

After setting the response command in the background, the system can process it according to the response command chain. First we need to provide a prompt interface for entering the response chain, as shown below.

C#开发微信门户应用管理系统功能介绍

But after we select the answering system in the menu, the system returns a text prompt interface, as shown below.

C#开发微信门户应用管理系统功能介绍

This interface prompts some buttons, including several fixed buttons and some business buttons. Enter a simple 1~6 to respond to the selection.

C#开发微信门户应用管理系统功能介绍

We see the above interface. After entering command 1, the system enters the next level of response command, and then lists several input keys and content prompts. .

When we continue to enter business button 1, the response is a graphic message, which is also a detailed description of the button.

C#开发微信门户应用管理系统功能介绍

At this time, we can also enter the * key to return to the previous menu.

C#开发微信门户应用管理系统功能介绍

Enter 0 to enter the customer service dialogue mode. Any subsequent messages you send will be forwarded to the multi-customer service system.

C#开发微信门户应用管理系统功能介绍

When the user sends a message, the customer service assistant can receive the message in time and process the customer's response.

C#开发微信门户应用管理系统功能介绍

5. Subscriber management

In order to more effectively manage subscriber and group information, we can obtain relevant information from the WeChat server for our understanding The following user information can also prepare for subsequent group messages.

C#开发微信门户应用管理系统功能介绍

The management of subscriber users is as follows. By default, you can view it by the user's region. The region is expanded according to the following levels: country-province-city. Click Sync Data to download user data on the server to the local for updating or writing.

C#开发微信门户应用管理系统功能介绍

Subscribers can also be viewed according to groups

C#开发微信门户应用管理系统功能介绍

Double-click to view subscriber information and view subscriber information The detailed information interface is shown below.

C#开发微信门户应用管理系统功能介绍

7、User group management

C#开发微信门户应用管理系统功能介绍

Create group The interface is shown below.

C#开发微信门户应用管理系统功能介绍

The editing group information interface is as follows.

C#开发微信门户应用管理系统功能介绍

When the group is edited and saved, the system will remember the modified ones. During synchronization, the newly added local content will be created on the server; Modify the modified group name on the server, and then perform synchronization list processing.

C#开发微信门户应用管理系统功能介绍

8. Multimedia management

Multimedia management refers to uploading local files to the WeChat server for storage to facilitate the sending of information. Wait for operations. WeChat requires that certain information must be uploaded to the server before it can be sent using its media ID.

After the file is successfully uploaded to the server, the "File Upload Identity" in the list is a string of BASE64 encoded data, and there is also an upload timestamp (because the WeChat server only retains 3 days of media data, Data that has expired will be automatically deleted.

At the same time, there are two important functions above the list: uploading selected records and re-uploading expired records to facilitate the updating of our own multimedia files. operate.

C#开发微信门户应用管理系统功能介绍

The adding interface operation is as follows, which introduces the attachment upload control for file operations, which is very convenient. At the same time, files that are successfully uploaded will be listed in the list.

C#开发微信门户应用管理系统功能介绍

Multimedia files can be in the following ways: pictures, voices, videos, and thumbnails.

C#开发微信门户应用管理系统功能介绍

The saved data records, file upload identifiers and timestamps are all empty. If we want to use them, we must upload them to WeChat’s server and then use them according to The MediaId is used to send information, and the operation interface for uploading selected records is as shown below.

C#开发微信门户应用管理系统功能介绍

After the multimedia file is successfully uploaded, the recorded information is as follows.

C#开发微信门户应用管理系统功能介绍

9. Graphic and text message processing

Graphic and text messages are divided into two types: single graphic and text messages and multiple graphic and text messages. Single graphic and text messages are as follows Show.

C#开发微信门户应用管理系统功能介绍

Multiple graphic and text messages are as follows:

C#开发微信门户应用管理系统功能介绍

Like multimedia data management, graphic and text messages are also processed through the same To manage, first upload to the server, and then send the message. Multimedia messages also have time restrictions. The specific management interface in our WeChat portal platform is as follows.

C#开发微信门户应用管理系统功能介绍

#The interface for adding graphic messages is as shown below. After saving, you can continue to add message content with multiple graphics and texts in the "Other Graphics and Text List" in the editing interface.

C#开发微信门户应用管理系统功能介绍

In the adding interface, select the thumbnail of the graphic message, which is specified by selection. Only the image or thumbnail resource has been uploaded to the server.

C#开发微信门户应用管理系统功能介绍

The added multi-image and text list can be viewed and managed.

C#开发微信门户应用管理系统功能介绍

After saving the record, then continue to upload. The uploaded record interface is as shown below. After success, an uploaded server ID and timestamp will be returned, otherwise an error will be prompted.

C#开发微信门户应用管理系统功能介绍

10. Session message management

In order to facilitate recording customer input and sending information, we record user input data in the WeChat portal management platform, specifically The session message management interface is shown below.

C#开发微信门户应用管理系统功能介绍

We can double-click any record in the last 48 hours to send messages to the customers we follow. If the message is sent successfully, the user can receive it in the WeChat account on the phone. Send relevant messages.

C#开发微信门户应用管理系统功能介绍

11. Group message management

In order to carry out corresponding marketing operations for customers, sometimes we need to send group messages to designated group owners or personnel , allowing customers to regularly understand our product information and activities.

Due to group messaging, in addition to text messages, which can be directly edited and sent, other data must be multimedia files or graphic message content uploaded to the server, so the previous multimedia management and graphic message management are Mainly introduced for the purpose of group messaging. With the above multimedia and multi-image information, we can select records from the platform to send them, thus saving troublesome joint work and achieving efficient mass-sending operations.

C#开发微信门户应用管理系统功能介绍

# Mass messages can be viewed by group, or by message type, making it easier for us to manage.

C#开发微信门户应用管理系统功能介绍

To add graphic messages, you can choose text messages, graphic messages, picture messages and other contents. Depending on the content, the interface provides different selection operations.

There are two types of mass sending of messages. One is based on groups, so just select the corresponding group from the platform; the other is sent based on the user's OpenID and provided for user input. The main operation interface is as follows.

C#开发微信门户应用管理系统功能介绍

The above is the detailed content of C# development WeChat portal application management system function introduction. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!