Authored by yyq

safety intreface

... ... @@ -71,6 +71,13 @@ const yoho = {
return callback();
}
},
safetyInterface(callback) {
if (this.deviceready) {
return callback();
} else {
this.ready(callback);
}
},
/**
* 跳转至指定index的tab(从0开始)
... ... @@ -700,5 +707,8 @@ const yoho = {
},
};
yoho.ready(() => {
yoho.deviceready = true;
});
export default yoho;
... ...
... ... @@ -67,7 +67,9 @@ export default {
methods: {
onBack() {
if (this.yoho.homePage) {
this.$yoho.safetyInterface(() => {
this.$yoho.finishPage({});
});
} else {
this.$router.go(-1);
}
... ...