uniapp news subscription, news push

uniapp news subscription, news push

uni.requestSubscribeMessage({})

Insert picture description here

Because it is an online project, no code will be posted

Remember that N versions of the previous message push were handled by fromId, now it is much more convenient to use the API

Note for parameter tmplIds

1 First, the type is Array

2 A collection of IDs of message templates that need to be subscribed. Up to 3 messages can be subscribed in one call

3 After the user clicks or initiates a payment callback, the subscription message interface can be called up, which means that the user must trigger it first

4'accept' means that the user agrees to subscribe to the template message corresponding to the id. Remember this is enough. Others do not agree.

5 Generally, the back-end development will provide tmplIds to the front-end because the push service template sent by the back-end is generally selected by the back-end development.

6 Of course you can also use permanent tmplIds

Guess you like

Origin blog.csdn.net/hu1628299958/article/details/114681102