...
|
...
|
@@ -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 &&
|
...
|
...
|
|