Js gets attribute value

as follows, a function defined by Mini Program:

    wx.showShareMenu({
      withShareTicket: true
    });

question: how does js get the value of withShareTicket for this method?

Mar.11,2021

can be changed. WithShareTicket is defined in the global data, and then withShareTicket is assigned to true, when wx.showShareMenu, so that you can use this


var data = {
   withShareTicket: true
}
wx.showShareMenu(data);
console.log(data.withShareTicket)
.
Menu