智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/e8/e8e9e350bf13a57cd5def2ffbba...

23 lines
521 B

import {
APP_SERVICE_ID
} from '../constants'
import {
plusReady
} from 'uni-shared'
export function publishHandler (event, args = {}) {
plusReady(function () {
const pageId = plus.webview.currentWebview().id
if (process.env.NODE_ENV !== 'production') {
console.log(`[VIEW][${Date.now()}]:`, event, args, pageId)
}
plus.webview.postMessageToUniNView({
type: 'subscribeHandler',
args: {
type: event,
data: args,
pageId
}
}, APP_SERVICE_ID)
})
}