...
|
...
|
@@ -5,16 +5,23 @@ |
|
|
*/
|
|
|
|
|
|
'use strict';
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
module.exports = () => {
|
|
|
return (req, res, next) => {
|
|
|
if (!req.xhr) {
|
|
|
const arr = req.path.substring(1).split('/');
|
|
|
let arr = req.path.substring(1).split('/');
|
|
|
|
|
|
Object.assign(res.locals, {
|
|
|
module: arr[0],
|
|
|
page: arr[1],
|
|
|
miniPath: `//m.yohobuy.com/api/wechat/miniapp.jpg?miniapp_type=0¶m={"union_type":${req.query.union_type || req.cookies.unionTypeYas || ''}}&miniQrType=0` // eslint-disable-line
|
|
|
miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', {
|
|
|
miniapp_type: 0,
|
|
|
param: JSON.stringify({
|
|
|
union_type: req.query.union_type || req.cookies.unionTypeYas || '',
|
|
|
}),
|
|
|
miniQrType: 0
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|