Authored by 陈轩

save

Signed-off-by: 陈轩 <xuan.chen@yoho.cn>
... ... @@ -6,7 +6,8 @@
var express = require('express'),
path = require('path'),
hbs = require('express-handlebars');
hbs = require('express-handlebars'),
helpers = require(path.join(global.utils, 'helpers'));
var app = express();
... ... @@ -23,7 +24,7 @@ app.engine('.hbs', hbs({
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: [path.join(__dirname, 'views/partial'), `${doraemon}/partial`],
helpers: global.yoho.helpers
helpers: Object.assign({}, global.yoho.helpers, helpers)
}));
// router
... ...
<div class="invite-page invite-page-bg">
<div class="invite-content-page">
<img src="//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/invite/title_new.png" />
{{img '/img/activity/invite/title_new.png'}}
<h2 class="bold fz16">YoHo!Buy有货福利来袭,即领即用!</h2>
<p>全球1000+潮流品牌每日上新!</p>
<div class='invite-group relative'>
... ...
... ... @@ -13,6 +13,7 @@ module.exports = {
app: 'h5',
port: 6001,
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
... ... @@ -78,6 +79,7 @@ module.exports = {
if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com',
assetUrl: '//cdn.yoho.cn/m-yohobuy-node/assets',
domains: {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
... ...
const url = require('url');
const config = require('../config/common');
const assetUrl = config.assetUrl;
module.exports = {
img: function(imgSrc) {
return url.resolve(assetUrl, imgSrc);
}
};
... ...