C# Development of WeChat Portal and Application-WeChat Portal Application Management System Function Introduction

高洛峰
Release: 2017-02-17 15:06:34
Original
1520 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 through 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 shown below.

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; the modified group name will be modified on the server. 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 the operation. 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. Operation.

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

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

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

##Multimedia files can be in the following ways: pictures, voices, videos, thumbnails. 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 send the information based on its MediaId. The operation interface for uploading the selected records is as follows As shown.

C#开发微信门户及应用-微信门户应用管理系统功能介绍 ##After the multimedia file is successfully uploaded, the recorded information is as follows

##9. Pictures and texts. Message processingC#开发微信门户及应用-微信门户应用管理系统功能介绍

Text messages are divided into single picture and text messages and multiple picture and text messages. Single picture and text messages are as follows

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

Multiple picture and text messages. The text message is as follows:

Like multimedia data management, graphic and text messages are also managed in the same way. They are uploaded to the server first, and then the message is sent. , 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 follows, save. After that, you can continue to add multi-image and text message content in the "Other Image 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 are following. If the message is sent successfully, the user will see it in their WeChat account on the phone. You will receive relevant sent 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#开发微信门户及应用-微信门户应用管理系统功能介绍

More C# development of WeChat portal and applications-WeChat portal application management system function introduction For related articles, please pay attention to 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