Small micro-channel application development on a small number of programs to try public concern

Man of few words said, directly.

A, web-view component jump to the target public number [unsuccessful]

Relevant official documents: Web-View official documents

Requirements: Personal type, type is not supported overseas

Problem: When testing, iOS can display the number of public information (later to die);

  Android and some can not be displayed, but prompt: illegal business domain https://mp.weixin.qq.com, this server verification problems.

Code:

<web-view src="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU*****ODk0Mg==#wechat_redirect"></web-view>

Description:

① wherein __biz = string behind (i.e., portions marked red, when the display portion of the character is replaced *) is obtained as Base64 encryption unique ID number associated with the public.

② there is one point on  #wechat_redirect   explained: web-view if the address itself using the # xxx / xxx routing points, behind plus #wechat_redirect, ios will appear blank, open phenomenon. Bug micro-channel applet.

The process of obtaining public unique ID number as follows:

One way: micro-channel public platform Home avatar name upper right corner of the public information number down menu, click on "Account Details" and enter "No. No public settings - Account Details" page.

Second way: public platform Home - left menu - Settings - No public settings, go to "Account Details" page.

 

 In the "Account Details" page to view the page source code, find uin property window.wx object. uin attribute string before the logical operator or the unique ID is what we want. It will be Base64 transcoding that is what we need.

 

Second, the number of components of interest of the public official-account [successful, but limited]

Official documentation: public attention Components No.

Limitations: limited scenarios can (detailed scene to see the official documentation).

Requirements: Before using components, need to go to the applet background, in the "Settings" -> "public concern number" is set to show the public number. Note: The number to be consistent with the public and the small body of the program settings.

Sample code (in the public need to be displayed within the page to add numbers, each page can have only one):

<! - public concern number of the components -> 
< Official-the Account > </ Official-the Account > 

<! - omitting other business code ->

The results show:

 

 Click the "Follow Button" can be realized number of public concern.

Measured effective, the only problem is the limited scenario, it is difficult to meet the business needs.

 

Third, the use of "Service News" way

Yet try to be perfect. However, there are many success stories to reference.

 

Write behind [important]:

  It should be noted that, according to "micro-channel platform operators applet norms", the services provided micro letter applet, there is not induced by such acts . In other words, Tencent without the permission or authorization, to induce users concerned about the public behavior of a small number of programs. There may be pushed Service News capacity micro envelope ban. Seriously could shut down small program. Therefore, prudent use of this feature.

No public attention by the public attention page number links the way in the development of micro-channel document, and did not find relevant records.

Even public concern number of components of this real daughter will have a lot of restrictions, other ways can imagine.

Guess you like

Origin www.cnblogs.com/dyhao/p/11698691.html