• This project
    • Loading...
  • Sign in

fe / yohoblk-wap · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohoblk-wap
  • public
  • js
  • common
  • intercept-click.js
  • 拦截跳转
    bb96e00b
    by ccbikai
    2016-07-27 12:10:41 +0800  
    Browse Files
intercept-click.js 317 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/**
 * 拦截跳转, 在这里给将要打开的页面设置一下 header 样式
 * @return {[type]}
 */
const yoho = require('yoho');

module.exports = (url) => {
    console.log(url);
    if (yoho.isApp) {
        yoho.goNewPage({
            url: url
        });
    } else {
        location.href = url;
    }
};