Authored by 李奇

fixed:404页面goback和返回滑块

... ... @@ -12,6 +12,10 @@ yoho.ready(() => {
yoho.showLoading(false);
$('.home').on('click', () => {
yoho.goBack();
if(yoho.isYohoBuy) {
yoho.goNewBack();
} else {
yoho.goBack();
}
});
});
... ...
... ... @@ -299,6 +299,23 @@ const yoho = {
},
/**
* 新的返回上一级页面
* @param args {""}
* @param success
* @param fail
*/
goNewBack(args, success, fail) {
if (this.isYohoBuy && window.yohoInterface) {
window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, {
method: 'go.newback',
arguments: args
});
} else {
history.go(-1);
}
},
/**
* 联系电话
* @param args {""}
* @param success
... ...
... ... @@ -40,6 +40,13 @@ export default {
computed: {
...mapState(['channel']),
},
beforeRouteEnter (to, from, next) {
next(vm => {
if (vm.$yoho && vm.$yoho.isAndroid) {
vm.$yoho.blkBackStatus(true);
}
});
},
asyncData({store}) {
return store.dispatch(FETCH_ABOUT_REQUEST);
},
... ...
... ... @@ -67,6 +67,11 @@
return this.$store.state.channel[this.gender].floors;
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.$yoho && vm.$yoho.blkBackStatus(true);
});
},
asyncData({store, router: to}) {
const gender = /\/channel\/men/.test(to.path) ? 'men' : 'women';
return store.dispatch(FETCH_CHANNEL_REQUEST, {gender});
... ...