# wx.onCopyUrl(function callback)
Start from base library version 2.14.3. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Not supported
Listen to the user click on the upper right menuCopy linkButton when the. This interface is Beta Version, for the time being Android Platform support.
# parameter
# function callback
The user clicks on the top right menuCopy linkCallback function for events triggered when on
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
query | string | The query string carried by the current page when the Mini Program is opened with a short chain. When used in Mini Programs, call the wx.onCopyUrl custom query Called when exiting the page wx.offCopyUrl To prevent impact on other pages. |
# sample code
// Binding sharing parameter
wx.onCopyUrl(() => {
return { query: 'a=1&b=2' }
})
// Unbind Share Parameter
wx.offCopyUrl()