In this paper, we describe the interface usage of micro-JS-SDK interface. Share to everyone for your reference, specific as follows:
Prerequisite already obtains the permission to the interface in Wx.config (), takes the official document as the standard
Description
1. The interface and the use of interfaces currently provided are relatively simple
2. Some seem to be a little repetitive.
3. "Adjust the font", "complaints" These two tests can not be hidden, belong to the basic class
First, close the micro-mail browser window
Window.close () off the micro-mail browser is not valid, the current method is blocked, and is not available in Cordova WebView
Show or hide part of the button interface
Description, the underlying class cannot control hidden and displayed
Hides the specified menu item, the menu item to hide/
/can only hide the propagate class and Protection class button
Wx.hidemenuitems ({
menulist:[
' menuitem:exposearticle ',/ /Basic Class Menu cannot hide
' Menuitem:setfont '
]
};
' menuItem:share:weiboApp ',//share to Weibo, not available (belongs to propagate Class)
//' Menuitem:refresh '// refresh button not available (belongs to base class)
//Show specified menu item
//can only display part of the propagate class and protection class
Wx.showmenuitems ({
menulist:[
' menuItem:share:qq ',
' MenuItem: Copyurl ',
]
});
Show or hide non-basic button interfaces
Hide non-base button
Wx.hideallnonbasemenuitem ();
Show non-base button
Wx.showallnonbasemenuitem ();
four, show or hide menu , test Invalid, test results and non-basic button function the same
Hide upper right corner menu
wx.hideoptionmenu ();
Hide upper right corner menu
wx.showoptionmenu ();
Appendix 3-All menu items list
Basic class
Report: "Menuitem:exposearticle"
Adjust font: "Menuitem:setfont"
Daytime mode: "Menuitem:daymode"
Night mode: "Menuitem:nightmode"
Refresh: "Menuitem:refresh"
View public number (added): "Menuitem:profile"
View public number (not added): "Menuitem:addcontact"
Propagation class
Send to Friend: "MenuItem:share:appMessage"
Share to the circle of Friends: "MenuItem:share:timeline"
Share to QQ: "MENUITEM:SHARE:QQ"
Share to Weibo: "MenuItem:share:weiboApp"
Collection: "Menuitem:favorite"
Share to FB: "MenuItem:share:facebook"
Share to QQ space/menuitem:share:qzone
Protection class
Edit tag: "Menuitem:edittag"
Delete: "Menuitem:delete"
Copy link: "Menuitem:copyurl"
Original page: "Menuitem:originpage"
Reading mode: "Menuitem:readmode"
Open in QQ browser: "Menuitem:openwithqqbrowser"
Open in Safari: "Menuitem:openwithsafari"
Mail: "MenuItem:share:email"
Some special public numbers: "MenuItem:share:brand"
More readers interested in JavaScript-related content can view this site: "JavaScript in the JSON Operation tips Summary", "JavaScript switching effects and techniques summary", "JavaScript Search Algorithm Skills summary", " JavaScript animation effects and tips Summary, "JavaScript Error and debugging skills Summary", "JavaScript data structure and algorithm skills summary", "JavaScript traversal algorithm and Skills summary" and "JavaScript Mathematical operation Usage Summary"
I hope this article will help you with JavaScript programming.