Hide buttons in the upper-right corner of a webpage
If you do not need to share a page, you can use JavaScript code to hide the buttons in the upper-right corner of the page.
Interface call code (JavaScript)
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {WeixinJSBridge.call('hideOptionMenu');});
Return description
No return value is returned in the bottom navigation bar. (Replace hideOptionMenu with showOptionMenu for display)
Hide the navigation bar at the bottom of a web page
When the public account is needed (for example, if you think that the browser is not used to move forward or backward on the page), you can use JavaScript code to hide the navigation bar at the bottom of the page.
Interface call code (JavaScript)
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {WeixinJSBridge.call('hideToolbar');});
Return description
No return value is returned in the bottom navigation bar. (To display the top navigation bar, replace hideToolbar with showToolbar)
Web page to get the user's network status
To help developers provide different quality services based on their network status, the public account can be called using JavaScript code on the webpage of the public account to obtain the network status.
Interface call code (JavaScript)
WeixinJSBridge.invoke('getNetworkType',{},function(e){ WeixinJSBridge.log(e.err_msg); });
Return description
The returned values for retrieving the user's network status are as follows:
Network_type: wifi network network_type: edge non-wifi, including 3G/2Gnetwork_type: fail network disconnected network_type: wwan (2g or 3G)
The test code comes from public platform development best practices.
Fanwe Studio
Effect display:
========================================================== ======================================
Follow-up methods for fanwe public platform accounts:
1. Address Book-Add friends-search for Public Accounts-search for "fangtimes Studio"
2. Address Book-add friend-search number-Enter "pondbaystudio"
3. Scan the following QR code