Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
lijing
9 years ago
Commit
23f744f94f623d12999659dae33d83d17cb48917
1 parent
033b94ad
市场推广
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
apps/activity/index.js
apps/activity/views/action/market/market.hbs
config/common.js
utils/helpers.js
apps/activity/index.js
View file @
23f744f
...
...
@@ -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
:
[
'./views/partial'
,
`
$
{
doraemon
}
/partial`]
,
helpers
:
global
.
yoho
.
helpers
helpers
:
Object
.
assign
({},
global
.
yoho
.
helpers
,
helpers
)
}));
// router
...
...
apps/activity/views/action/market/market.hbs
View file @
23f744f
...
...
@@ -18,7 +18,7 @@
</div>
{{#
floorAdListTitle
}}
<div
class=
"floor-top"
>
<img
src=
"
../img/activity/market/floor-top-1.jpg
"
/>
<img
src=
"
{{
imgSrc
'/img/activity/market/floor-top-1.jpg'
}}
"
/>
</div>
{{/
floorAdListTitle
}}
<ul
class=
"floor-ul"
>
...
...
@@ -33,7 +33,7 @@
</ul>
{{#
newsList
}}
<div
class=
"floor-top"
>
<img
src=
"../img/activity/market/floor-top-2.jpg
"
/>
<img
src=
"
{{
imgSrc
'/img/activity/market/floor-top-2.jpg'
}}
"
/>
</div>
<div
class=
"floor-c"
>
<a
href=
"
{{
url
}}
"
>
...
...
config/common.js
View file @
23f744f
...
...
@@ -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/'
...
...
@@ -88,6 +89,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/'
,
...
...
@@ -117,6 +119,7 @@ if (isProduction) {
}
else
if
(
isTest
)
{
Object
.
assign
(
module
.
exports
,
{
appName
:
'm.yohobuy.com for test'
,
assetUrl
:
'//cdn.yoho.cn/m-yohobuy-node/assets'
,
domains
:
{
api
:
'http://api-test3.yohops.com:9999/'
,
service
:
'http://service-test3.yohops.com:9999/'
,
...
...
utils/helpers.js
0 → 100644
View file @
23f744f
const
url
=
require
(
'url'
);
const
config
=
require
(
'../config/common'
);
const
assetUrl
=
config
.
assetUrl
;
module
.
exports
=
{
imgSrc
:
function
(
imgSrc
)
{
return
url
.
resolve
(
assetUrl
,
imgSrc
);
}
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment