智能照明系统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/43/43f794a070f1bcc593c7cc40d34...

31 lines
732 B

/**
* 选择位置
* @param {*} callbackId
*/
export function chooseLocation (options, callbackId) {
const {
invokeCallbackHandler: invoke
} = UniServiceJSBridge
getApp().$router.push({
type: 'navigateTo',
path: '/choose-location'
}, function () {
var fn = data => {
UniServiceJSBridge.unsubscribe('onChooseLocation', fn)
if (data) {
invoke(callbackId, Object.assign(data, {
errMsg: 'chooseLocation:ok'
}))
} else {
invoke(callbackId, {
errMsg: 'chooseLocation:fail'
})
}
}
UniServiceJSBridge.subscribe('onChooseLocation', fn)
}, function () {
invoke(callbackId, {
errMsg: 'chooseLocation:fail'
})
})
}