Js reconstructs Mini Program's sharing method onShareAppMessage

define a method as follows:

function e(t, n, o) {
  if (t[n]) {
    var e = t[n];
    t[n] = function(t) {
      return o.call(this, t, n), e.call(this, t)
    }
  } else
    t[n] = function(t) {
      return o.call(this, t, n)
    }
}

ReFactor the method in Mini Program page:

var v = Page;
Page = function(t) {
  c(t, "onLoad", pageOnload);
  c(t, "onUnload", pageOnunload);
  c(t, "onShow", pageOnshow);
  c(t, "onHide", pageOnunload);
  c(t, "onShareAppMessage", pageShare);
  v(t);
}

where onShareAppMessage

function pageShare(t, n) {
  var router = typeof this["__route__"] === "string" ? this["__route__"] : "";

  return {
    title: "age",
    path: router,
    success: function(t) {

      // console.log(1111);

      console.log("sdk:" + t.shareTickets[0]);


    },
    fail: function(res) {
      // 
      console.log(res);
    }
  }


};

however, the return successful callback method has never been adopted.
expect the result: successfully implement the method in the shared successful success and print out the console.log ("sdk forward:" + t.shareTickets [0]);

do you have any suggestions, Daniel?

Mar.11,2021
Menu