Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
2019-06-17 14:41:15 +0800
Commit
d32f4079786f33fe6c48efab29f293395dc9d506
1 parent
dcb80d64
safety intreface
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
apps/common/yoho.js
apps/components/layouts/layout-header.vue
apps/common/yoho.js
View file @
d32f407
...
...
@@ -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
;
...
...
apps/components/layouts/layout-header.vue
View file @
d32f407
...
...
@@ -67,7 +67,9 @@ export default {
methods: {
onBack() {
if (this.yoho.homePage) {
this.$yoho.finishPage({});
this.$yoho.safetyInterface(() => {
this.$yoho.finishPage({});
});
} else {
this.$router.go(-1);
}
...
...
Please
register
or
login
to post a comment