When the Cabloy-企业微信
module is completed, plus the previously completed Cabloy-微信
module, 微信/企业微信
the task of docking in CabloyJS has been completed. The goal of these modules is to simply fill in the parameters of various services, you can directly enter the specific business development, so as to achieve 开箱即用
the effect
微信/企业微信
Development, there are many pit, and the pit is the largest of 账户体系
the
微信
and 企业微信
is a different account system微信
, openid is a unique identifier to identify a user. If 微信开放平台
it is activated, then openids scattered in different services such as 微信公共号
, 微信小程序
etc. can be associated through unionid to identify the same user. So, how to connect openid with the user system in the system? If unionid is activated, how to connect? Can the old accounts before unionid be opened smoothly?企业微信
, each company member is identified by userid. The 微信
difference is that 企业微信
through the 部门树
management of members, so as to 资源授权和分配
provide organizational basis. Then, the first step in our system initialization is to 部门和成员
synchronize the company's system to the system and implement 双向查找
functionsIn addition to the complicated and complicated account system docking tasks, we also have to face some small problems that we encounter at any time during development. Because there are many scenarios, concepts and terms involved in WeChat/Enterprise WeChat development, it is often necessary to read through official documents. However, the official documents did not specify the expressions of some concepts, so I had to write code to verify some guesses, and then review the documents again. After the project is completed this time, if there is a new project, it is likely to have to go again. Here are just a few frequently-occurring problems:
openid/unionid
, while the applet returns openId/unionId
. If you don’t pay attention, you will fall into the pit企业微信
Support different applications: built-in applications, third-party applications, self-built applications, associated applets, etc. How to structure these applications to provide a unified and convenient API call model企业微信小程序
The ontology is 微信小程序
, and then linked to 企业微信
become an enterprise WeChat application. Only when you understand these concepts and relationships can you accurately connectYou can find the corresponding WeChat API SDK for different development languages. However, these WeChat API SDKs often encapsulate the official http api at a language level, and rarely go further. For example, through the WeChat API SDK, we can easily obtain AccessToken and user information, but how to connect the obtained User to the system and how to deal with the association between openid and unionid still requires our own design and development.
For another example, you can easily obtain the departments and members of the enterprise WeChat through the WeChat API SDK. But how to interface with the roles and users in the system, and support different scenarios and login methods, still has a lot of work to be done
The CabloyJS 微信/企业微信
module 核心目标
provides 开箱即用
the effect. Only need to configure the parameters, all the docking work is automatically completed, so that we can step through the complicated details in one step and directly enter the specific business development. Of course, CabloyJS's 微信/企业微信
module is complete 开源
, and we can still clearly see these details and the processing method from it.
Why can CabloyJS achieve 开箱即用
the effect? Since the whole stack is CabloyJS NodeJS frame, can be 前端组件
, 后端服务
, 数据存储与访问
, etc., organic combination
For example, the CabloyJS module directly realizes the synchronization between the department and users in the enterprise WeChat through the cooperation of these front and back ends, and even SocketIO
realizes the real-time display of the front-end synchronization progress through the mechanism provided by the bottom layer of CabloyJS
Based on the features provided by the CabloyJS full-stack business development framework itself, the Cabloy-企业微信
module has the following two notable highlights:
Many enterprise WeChat applications have such a problem: only a part of the functions can be used on the Mobile side, and other more functions need to be logged in to the PC system for operation
The CabloyJS framework Cabloy-企业微信
allows all business functions to support PC and Mobile at the same time. At the same time, the following two points can be guaranteed:
Companies purchasing different corporate WeChat applications from different service providers will inevitably lead to 数据孤岛
the emergence, and these data are scattered in the backends of different service providers, lacking data linkage and sharing mechanisms
The CabloyJS framework itself is based on 业务模块
construction. The modules built by the enterprise or the third-party modules are all integrated into a CabloyJS project and deployed privately. This fundamentally solves the 数据孤岛
problem, not only can realize data linkage and sharing, but also can carry out data more flexibly Acquisition, processing and analysis
In the final analysis, data and procedures are in your own hands
Based on the convenience and flexibility provided by the CabloyJS full-stack framework, the Cabloy-企业微信
main features are as follows:
The interfaces of 企业微信自建应用
and 企业微信小程序
are currently integrated , as follows:
Scenes | name | Description |
---|---|---|
Self-built application | Message Push System | Automatically complete interface docking and authenticate users |
Self-built application | Web login | Automatically jump to WeChat login and authenticate users |
Self-built application | Web JSSDK | Automatically inject JSSDK and automatically complete the configuration |
Applets | Background login interface | Automatically complete interface docking and authenticate users |
Applets | Frontend SDK | Provide SDK, which is convenient for the front end of enterprise WeChat applet to directly access CabloyJS back end API |
Only need to configure the company WeChat account parameters, all interfaces automatically complete the docking
企业微信
Can be associated with multiple 企业微信小程序
, therefore, the module also provides support for multiple applets
Through the features provided by CabloyJS 多实例
, it can be realized 多站点支持
, such as providing enterprise WeChat services for different enterprises. See: EggBornJS: Multiple instances