Hide the upper right corner menu interface- wx.hideOptionMenu();
Display the upper right corner menu interface- wx.showOptionMenu();
Close the current web page window interface- wx.closeWindow();
Batch hiding function button interface- wx.hideMenuItems({
- menuList: [] // Menu items to be hidden. Only the "Dissemination" and "Protection" buttons can be hidden. For all menu items, see Appendix 3
- });
Batch display function button interface- wx.showMenuItems({
- menuList: [] // Menu items to be displayed. For all menu items, see Appendix 3
- });
Hide all non-basic button interfaces- wx.hideAllNonBaseMenuItem();
- // "Basic Class" button, see Appendix 3
Display all function button interfaces- wx.showAllNonBaseMenuItem();
WeChat Scan Call up the WeChat scan interface- wx.scanQRCode({
- needResult: 0, // The default value is 0, the scan result is processed by WeChat, 1 directly returns the scan result,
- scanType: ["qrCode","barCode"], // You can specify whether to scan a QR code or a 1D code. The default is to scan both.
- success: function (res) {
- var res result = res.resultStr; // When needResult is 1, the result returned by scanning the code
- }
- });
WeChat Store Jump to WeChat product page interface- wx.openProductSpecificView({
- productId: '', // product id
- viewType: '' // 0. Default value, ordinary product details page 1. Scan product details page 2. Store product details page
- });
WeChat Cards Call up the list of cards and coupons applicable to the store and obtain the user's selection list- wx.chooseCard({
- shopId: '', // store ID
- cardType: '', // Card type
- cardId: '', // Card ID
- timestamp: 0, // Card signature timestamp
- nonceStr: '', // Card coupon signature random string
- signType: '', // Signature method, default is 'SHA1'
- cardSign: '', // Card signature, see Appendix 4 for details
- success: function (res) {
- var cardList = res .cardList; // Card list information selected by the user
- }
- });
Batch add card and coupon interface- wx.addCard({
- cardList: [{
- cardId: '',
- cardExt: ''
- }], // Cards and coupons list to be added
- success: function (res) {
- var cardList = res .cardList; // Added card list information
- }
- });
View the card and coupon interface in WeChat card wallet- wx.openCard({
- cardList: [{
- cardId: '',
- code: ''
- }] // List of cards and coupons that need to be opened
- });
WeChat Pay Initiate a WeChat payment request- wx.chooseWXPay({
- timestamp: 0, // Payment signature timestamp. Note that all timestamp fields used in WeChat jssdk are lowercase. However, the timestamp field name used in the signature generated by the *** version of the payment backend needs to be capitalized with the S character in it
- nonceStr: '', // Payment signature random string, no longer than 32 bits
- package: '', // The prepay_id parameter value returned by the unified payment interface, the submission format is as follows: prepay_id =***)
- signType: '', // Signature method, default is 'SHA1', use the new version of payment to pass in 'MD5'
- paySign: '', // payment signature
- success: function (res) {
- //Callback function after successful payment
- }
- });
|