Authored by 郭成尧

hbs获取图片方法

... ... @@ -19,7 +19,7 @@ app.engine('.hbs', hbs({
defaultLayout: 'layout',
layoutsDir: doraemon,
partialsDir: [path.join(__dirname, 'views/partial'), `${doraemon}/partial`],
helpers: 'helpers'
helpers: require('../../library/helpers')
}));
// router
... ...
... ... @@ -5,7 +5,7 @@
{{# list}}
<li class="swiper-slide">
<a href="javascript:;">
<img src="{{img}}" alt="">
<img src="{{image img 450 600}}" alt="">
</a>
</li>
{{/ list}}
... ... @@ -22,7 +22,7 @@
{{^}}
<div class="banner-top-single">
<a href={{url}}>
<img class="img" src="{{img}}">
<img class="img" src="{{image img 450 600}}">
</a>
</div>
{{/if}}
\ No newline at end of file
... ...