How to receive native push messages in a mixed development app and instantly update them to the vue project view

use vue-cli to build the project, the project requirement is to have a message push function, the native developer can do a function, when the message is pushed, execute a piece of js code.
it is not clear how to write this code so that the view can be updated instantly. For example, in home.vue, there is a data.message. To receive a message to change this value, and update the view.
do not use socket.

Jul.08,2022

message push. If the native developer perceives that a message is being pushed, the native developer notifies the front end vue to do some operations on the page;
the front end writes a public method to modify the page data after the message is pushed;
, however, the original side needs to call this method when it senses that a message is pushed.
when a message is pushed, the message changes and the view is updated.


I don't know which intermediate bridge you used for mixed development. We use dsBridge , which is simply called by registering a method ios / Android under window on the js side. And pass parameters to each other. (Baidu search will probably understand, the workload is mainly native)

https://github.com/wendux/DSB...

Menu