How to realize WeChat Mini Programs's sharing function asynchronously

for example, now the requirement is to share the product tracking order
, so to call WeChat Mini Programs"s onShareAppMessage function
now you need to generate a uid to track the order before return, but this uid is generated asynchronously, so you don"t know how to handle it

.
Feb.14,2022
Click the button in the

callback function
the return result of Mini Program's receiving asynchronous method
callBack to initiate sharing


Brother, is there a solution


add a judgment to the onShareAppMessage () function to determine whether the sharing is triggered by the button. You can bind some order data with data-* on the button.

  

it seems that no one has a solution to the problem that has been around for a long time. How to close this question.

Menu