Commit da3dce5e authored by xxx's avatar xxx

111

parent 14f927c6
...@@ -68,11 +68,13 @@ export default { ...@@ -68,11 +68,13 @@ export default {
}, },
mounted() { mounted() {
if (window.plus) { if (window.plus) {
// 在这里调用5+ API console.log('存在window.plus');
this.plusReady(); // 在这里调用5+ API
this.plusReady();
} else { } else {
// 兼容老版本的plusready事件 console.log('不存在window.plus');
document.addEventListener('plusready', this.plusReady(), false); // 兼容老版本的plusready事件
document.addEventListener('plusready', this.plusReady, false);
} }
}, },
components: { components: {
...@@ -80,7 +82,7 @@ export default { ...@@ -80,7 +82,7 @@ export default {
}, },
methods: { methods: {
plusReady(){ plusReady(){
plus.device.getInfo({ plus.device.getOAID({
success:function(e){ success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e)); console.log('getDeviceInfo success: '+JSON.stringify(e));
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment