我正在使用剑道手机,我是新手,我在谷歌搜索关于获取设备UUID我得到了它并且我试图使用它,它显示错误调用 未捕获的ReferenceError:设备未定义以下需要帮助是我的代码
当我在Android OS中安装而不是在模拟器中时它工作
const handler1 = (req, res) => res.json('hello');
const handler2 = (req, res) => res.json('bye');
app.use('/test', (req, res) => {
if(/* handler1 condition*/) return handler1(req, res);
return handler2(req, res);
}
答案 0 :(得分:0)
要获取设备ID,您需要在Deviceready功能中使用cli将org.apache.cordova.device插件安装到您的phonegap项目中,您需要将其放在代码下面。
device.uuid