Commit cf2202d2 authored by xxx's avatar xxx

1

parent da3dce5e
...@@ -58,6 +58,8 @@ export default { ...@@ -58,6 +58,8 @@ export default {
loading: false, loading: false,
keyboardShow:false, keyboardShow:false,
keyboardShowType:'', keyboardShowType:'',
//设备OAID
deviceOAID:'',
}; };
}, },
created() { created() {
...@@ -68,12 +70,8 @@ export default { ...@@ -68,12 +70,8 @@ export default {
}, },
mounted() { mounted() {
if (window.plus) { if (window.plus) {
console.log('存在window.plus');
// 在这里调用5+ API
this.plusReady(); this.plusReady();
} else { } else {
console.log('不存在window.plus');
// 兼容老版本的plusready事件
document.addEventListener('plusready', this.plusReady, false); document.addEventListener('plusready', this.plusReady, false);
} }
}, },
...@@ -84,10 +82,16 @@ export default { ...@@ -84,10 +82,16 @@ export default {
plusReady(){ plusReady(){
plus.device.getOAID({ plus.device.getOAID({
success:function(e){ success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e)); console.log(e.oaid);
this.deviceOAID = e.oaid;
}, },
fail:function(e){ fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e)); console.log('getDeviceInfo failed: '+JSON.stringify(e));
this.$message({
message: "获取设备信息失败,请退出系统并且开启权限后重试!",
type: 'error'
});
} }
}) })
}, },
......
...@@ -49,7 +49,7 @@ module.exports = { ...@@ -49,7 +49,7 @@ module.exports = {
// }, // },
}, },
//https: true, https: true,
}, },
configureWebpack: { configureWebpack: {
plugins: [ plugins: [
......
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