Commit 14f927c6 authored by xxx's avatar xxx

1

parent 84739a20
...@@ -67,19 +67,28 @@ export default { ...@@ -67,19 +67,28 @@ export default {
this.getCookie(); this.getCookie();
}, },
mounted() { mounted() {
plus.device.getInfo({ if (window.plus) {
success:function(e){ // 在这里调用5+ API
console.log('getDeviceInfo success: '+JSON.stringify(e)); this.plusReady();
}, } else {
fail:function(e){ // 兼容老版本的plusready事件
console.log('getDeviceInfo failed: '+JSON.stringify(e)); document.addEventListener('plusready', this.plusReady(), false);
} }
})
}, },
components: { components: {
Keyboard Keyboard
}, },
methods: { methods: {
plusReady(){
plus.device.getInfo({
success:function(e){
console.log('getDeviceInfo success: '+JSON.stringify(e));
},
fail:function(e){
console.log('getDeviceInfo failed: '+JSON.stringify(e));
}
})
},
getCode() { getCode() {
httpGet(code).then((res) => { httpGet(code).then((res) => {
//console.log(res); //console.log(res);
......
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