Authored by 陈峰

fix issue

... ... @@ -46,9 +46,9 @@ export default function() {
let topath;
try {
topath = decodeURIComponent(to.fullPath);
topath = decodeURIComponent(to.path);
} catch (error) {
topath = to.fullPath;
topath = to.path;
}
if (state.historys.length >= 2 && state.historys[state.historys.length - 2].path === topath) {
... ...
... ... @@ -133,17 +133,19 @@ const render = (route) => {
}
let styles = context.renderStyles();
let scripts = context.renderScripts();
const resources = context.renderResourceHints();
let resources = context.renderResourceHints();
const states = context.renderState();
let asyncScripts;
let zk = {};
if (process.env.NODE_ENV === 'production') {
zk.webperf = _.get(req.app.locals.wap, 'open.webperf', false);
zk.asyncJs = _.get(req.app.locals.wap, 'webapp.ios-async-js', true);
}
if (req.yoho.isiOS) {
if (req.yoho.isiOS && zk.asyncJs) {
asyncScripts = asyncLoadScripts(scripts);
resources = resources.replace(/<link rel="preload" href="[^"]+" as="style">/g, '');
}
if (req.get('User-Agent').indexOf('yoho-protocol') >= 0 &&
route.cacheKey &&
... ...
... ... @@ -5,6 +5,7 @@
<title>{{title}}</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="Content-Security-Policy" content="style-src 'self' 'unsafe-inline' http: https: yoho-protocol:">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="yes" name="apple-mobile-web-app-capable">
... ...