Loading…

Partner/Team Leader Secondary Distribution Plug-in Usage Tutorial

![](https://dcdn.it120.cc/yuque/0/2021/png/572726/1611394969316-3cacb470-7e7c-4609-acd7-18fa1f08bb37.png) + After membership 1...n consumption, team leaders and partners will receive commission rebates + After team leader 1...n consumption, partners will receive commission rebates # Distribution settings ![](https://dcdn.it120.cc/yuque/0/2021/png/572726/1611398003576-abe84773-92e8-4da5-8e17-87dd073022c3.png) Here, set the rebate ratio for partners and team leaders, the purchase price for team leaders, and the membership level automatically bound to team leaders and team members (you can enjoy the membership price of your level to purchase goods) # Add/manage partners Partners can only be added in the backend. Currently, partners with individual/corporate identity types are supported. After being added in the backend, users can obtain partner permissions. # Related interfaces + Read the distribution setting interface, read the setting information, and the front end will display it according to its own needs; + Bind the team leader interface. After binding, the user can become a team member of the team leader. After subsequent consumption, the team leader and partners can receive commissions; + Just purchase an upgrade to become a team leader. Team members can upgrade to become a team leader on their own and earn commissions; + Read the statistical interface for the number of team members under your name (read the number of team leaders and team members under your name); + Read team list interface (team leader, team number); # apifm-wxapi SDK [https://gitee.com/javazj/apifm-wxapi/blob/master/instructions.md](https://gitee.com/javazj/apifm-wxapi/blob/master/instructions.md) ### Read partner distribution settings WXAPI.partnerSetting() + isOpen function is turned on + pPartner partner rebate ratio + pLeader team leader commission ratio + priceLeader team leader purchase fee, you can purchase upgrades + leaderUserLevelId upgrade to team leader to automatically bind membership level + memberUserLevelId upgrade to automatically bind membership level to team members ### User binds the team leader to become a team member WXAPI.partnerBindTeamLeader(token, uid) + uid is the user number of the team leader After binding, you can join the team leader's team. ### Team members purchase and upgrade to team leader WXAPI.partnerBuyTeamLeader(token) After the purchase is successful, you will immediately become the team leader; This interface uses the user balance to purchase the team leader. If you want to use WeChat payment to purchase, please refer to the WeChat payment interface and set nextAction to achieve online payment and purchase of the team leader. ### Team member statistics WXAPI.partnerMembersStatistics(token) This interface will return: + Number of team leaders under leaders’ name (for partner status) + members The number of team members under the name Return example: ```json { "code": 0, "data": { "members": 0, "leaders": 0 }, "msg": "success" } ``` ### Team member list interface WXAPI.partnerMembers(Objectobject) Return data example: ```json { "code": 0, "data": { "result": [ { "nick": "Liu Bei", "uid": 1811002, "avatarUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eo0wTd9Ys8tQG6PMrYuPkQ8cYAH8mDiaEyEygpStdABiaSicUM5y8VQicMwHkB8qKj5dJ1PI8O6ia8dWBA/132" } ], "totalRow": 1, "statisticsCommisionMap": { "1811002": { "amount": 999, "day": "2021", "id": 25883, "number": 888, "saleroom": 0, } }, "totalPage": 1 }, "msg": "success" } ```