The SDK (TP3.2.2) for the WeChat public platform with multiple accounts contains demo examples.

Source: Internet
Author: User
Provides various official and user-released code examples. For code reference, you are welcome to exchange and learn how to use the demo in the SDK (TP3.2.2) of the Multi-account public platform.
Addresses: http://git.oschina.net/yansongda/WeixinSystem_BasedOnTP

I. Description

Developed based on the latest Thinkphp3.2.2.
This program is developed because you manage several public accounts and want to develop the previous programs that are simple, structured, and easy to manage.

I am a student. If the code is poor, I hope you can point it out.

Thank you!

Ii. Usage

1. Enable the "Developer Center" of the "public platform ".
Fill in the URL with: http: // serverName/index. php/Index/A public code method (for example: http://wx.abc.com/index.php/Index/index ).
Enter "TOKEN" in ysdweixin. You can also configure it in Common/Conf/config. php.

2. code the logic of this method in the IndexController controller.
The sample code shows a subscription number and a service number.

3. code the logic of this method in EventWidget.
The sample code shows a subscription number and a service number.

4. code the logic of this method in TextWidget.
The sample code shows a subscription number and a service number.

5. Pick up your phone and start testing ~

Iii. Instructions for use

1. A public account corresponds to a controller method, an EventWidget, and a TextWidget. Therefore, you can manage multiple public accounts. There are instances in the code

2. Weixin. class. php is located in the Common \ Lib \ Weixin folder. It can be used independently.
If it is not in the TP system, you should rewrite the getValue (), setValue (), and getToken () methods, because these methods apply the built-in S function of TP. Due to the time relationship, the existence or absence of the function is not determined, and no alternative solution is provided.

3. the Api. class. php contains common API functions, such as express delivery query and weather query. It can also be used independently.

4. Note

The project is currently under improvement ...... Follow oschina updates at any time

AD: truly free, domain name + VM + enterprise mailbox = 0 RMB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.