How to associate openid with WeChat table

WBOY
Release: 2016-08-04 09:21:34
Original
1376 people have browsed it

To add a corresponding openid to the employee table, how to associate it? Do you need to follow it after creating a new employee? Or what?

Reply content:

To add a corresponding openid to the employee table, how to associate it? Do you need to follow it after creating a new employee? Or what?

The way you asked is that there is already an employee table. Two situations.

The employee has registered, let the employee log in, and update the employee's openid.

Employees are not registered, please register and bring openid.
Do you have any questions? Or am I not understanding the question clearly?

The description of this business scenario is too vague

Is creating a new employee similar to self-registration?

If so, then you can get the open_id by logging in to WeChat before registration (scan QR code on PC, authorized login in WeChat), then fill in the new employee form, and then insert openid and employee data into the employee table

It is recommended to have an employee table and a following table, and use the backend to manage the relationship between employees and following users, which is to manually set which following user is an employee of which company.

From what you mean, there is already an employee table before. But now that WeChat is connected, WeChat users need to be associated with the previous employee table. To associate user tables generated by two different systems, you first need to have a unified and unique association identifier, such as a mobile phone number. For example, in the previous employee table, each employee filled in a mobile phone number. Then after the user follows the WeChat official account, the user is forced to bind the mobile phone number first. At this time, go to the employee table to query. If the mobile phone number already exists, then bind the employee to the openid. If it does not exist, write the employee directly. Table

WeChat users can get openid by sending messages to the official account or following it

To determine whether an employee is following or not,

If the employee is following, use the plug-in to update the employee's openid,

If the employee is not following, bind the openid when following

Related labels:
php
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!