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
biao
9 years ago
Commit
22dc8a13c7b96e323dcff61d103e2f7b448671e6
1 parent
59664427
update for unify content-code config
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
38 deletions
apps/channel/models/channel.js
apps/guang/models/star.js
apps/product/models/outlet.js
apps/product/models/sale.js
config/content-code.js
apps/channel/models/channel.js
View file @
22dc8a1
...
...
@@ -6,6 +6,7 @@
'use strict'
;
const
library
=
'../../../library'
;
const
utils
=
'../../../utils'
;
const
contentCodeConfig
=
require
(
'../../../config/content-code'
);
const
_
=
require
(
'lodash'
);
const
ServiceAPI
=
require
(
`
$
{
library
}
/api`
)
.ServiceAPI
;
const
sign
=
require
(
`
$
{
library
}
/sign`
)
;
...
...
@@ -15,6 +16,7 @@ const resourcesProcess = require(`${utils}/resources-process`);
const
api
=
new
ServiceAPI
();
/**
* 性别数据
* @type {Object}
...
...
@@ -28,22 +30,13 @@ const genderData = {
* 楼层资源的位置码
* @type {Object}
*/
const
contentCode
=
{
boys
:
'8512bf0755cc549ac323f852c9fd945d'
,
girls
:
'189b6686065dbd6755dd6906cf03c002'
,
kids
:
'b8c1bff53d4ea60f978926d538620636'
,
lifestyle
:
'61cd852c6afcf60660196154f66a3a62'
,
index
:
'7ba9118028f9b22090b57341487567eb'
};
const
contentCode
=
contentCodeConfig
.
channel
;
/**
* 频道底部 Banner 位置码
* @type {Object}
*/
const
bottomBannerCode
=
{
boys
:
'a2ec977c027d0cd9cdccb356ddf16b08'
,
girls
:
'8c8bd1b89a22e5895f05882e0825b493'
};
const
bottomBannerCode
=
contentCodeConfig
.
bottom
;
/**
* 频道选择页 默认数据
...
...
apps/guang/models/star.js
View file @
22dc8a1
...
...
@@ -6,6 +6,7 @@
'use strict'
;
const
library
=
'../../../library'
;
const
utils
=
'../../../utils'
;
const
contentCodeConfig
=
require
(
'../../../config/content-code'
);
const
resourcesProcess
=
require
(
`
$
{
utils
}
/resources-process`
)
;
const
ServiceAPI
=
require
(
`
$
{
library
}
/api`
)
.ServiceAPI
;
const
API
=
require
(
`
$
{
library
}
/api`
)
.API
;
...
...
@@ -17,10 +18,7 @@ const _ = require('lodash');
const
serviceAPI
=
new
ServiceAPI
();
const
api
=
new
API
();
const
contentCode
=
{
special
:
'89cc20483ee2cbc8a716dcfe2b6c7603'
};
const
contentCode
=
contentCodeConfig
.
guang
;
/**
* 获取资源位数据
* @param {[string]} page
...
...
apps/product/models/outlet.js
View file @
22dc8a1
...
...
@@ -7,6 +7,7 @@
const
library
=
'../../../library'
;
const
utils
=
'../../../utils'
;
const
contentCodeConfig
=
require
(
'../../../config/content-code'
);
const
_
=
require
(
'lodash'
);
const
ServiceAPI
=
require
(
`
$
{
library
}
/api`
)
.ServiceAPI
;
...
...
@@ -20,6 +21,7 @@ const log = require(`${library}/logger`);
const
serviceApi
=
new
ServiceAPI
();
const
api
=
new
API
();
const
dateFormate
=
(
str
)
=>
{
var
time
=
new
Date
(
str
*
1000
);
var
y
=
time
.
getFullYear
();
...
...
@@ -54,7 +56,7 @@ const _transDiscountToArr = (discount) => {
*/
const
_getOutletResource
=
(
channel
,
contentcode
)
=>
{
const
params
=
{
content_code
:
contentcode
||
'c19ffa03f053f4cac3690b22c8da26b7'
,
content_code
:
contentcode
||
contentCodeConfig
.
outlet
,
limit
:
25
,
yh_channel
:
channel
||
''
};
...
...
apps/product/models/sale.js
View file @
22dc8a1
...
...
@@ -6,6 +6,8 @@
'use strict'
;
const
library
=
'../../../library'
;
const
utils
=
'../../../utils'
;
const
contentCodeConfig
=
require
(
'../../../config/content-code'
);
const
API
=
require
(
`
$
{
library
}
/api`
)
.API
;
const
ServiceAPI
=
require
(
`
$
{
library
}
/api`
)
.ServiceAPI
;
const
sign
=
require
(
`
$
{
library
}
/sign`
)
;
...
...
@@ -46,28 +48,7 @@ const channelType = {
/**
* 资源位code码
*/
const
contentCode
=
{
boys
:
{
sale
:
'153180b9a88c0b565848850c523bb637'
,
breakCode
:
'd763e3f8d208cbed8f100253ea4f8946'
,
vip
:
'6b9810a442efe1e6252b134154d36769'
},
girls
:
{
sale
:
'0b2d133419a0f7c381306fd3522365e1'
,
breakCode
:
'77258d0b526c7b6e243c1419877ead4a'
,
vip
:
'e83f3582df32b6753eed49fda236a755'
},
kids
:
{
sale
:
'de23648d28ee1e8a3f087a9dbac506f8'
,
breakCode
:
'3f0898f1089b7bef5f3e071725c7a608'
,
vip
:
'664935745012db6e2a96a7d57f75512f'
},
lifeStyle
:
{
sale
:
'01269e498ff5b07756e0733ec0e88c75'
,
breakCode
:
'0020a5762771aa16902a666c9491394e'
,
vip
:
'647f1154d30b323ff46c787fc78aef65'
}
};
const
contentCode
=
contentCodeConfig
.
sale
;
/**
* 折扣专场列表页及详情页公共方法
...
...
config/content-code.js
0 → 100644
View file @
22dc8a1
/**
* 内容码配置文件
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2016/06/23
*/
'use strict'
;
const
saleContentCode
=
{
boys
:
{
sale
:
'153180b9a88c0b565848850c523bb637'
,
breakCode
:
'd763e3f8d208cbed8f100253ea4f8946'
,
vip
:
'6b9810a442efe1e6252b134154d36769'
},
girls
:
{
sale
:
'0b2d133419a0f7c381306fd3522365e1'
,
breakCode
:
'77258d0b526c7b6e243c1419877ead4a'
,
vip
:
'e83f3582df32b6753eed49fda236a755'
},
kids
:
{
sale
:
'de23648d28ee1e8a3f087a9dbac506f8'
,
breakCode
:
'3f0898f1089b7bef5f3e071725c7a608'
,
vip
:
'664935745012db6e2a96a7d57f75512f'
},
lifeStyle
:
{
sale
:
'01269e498ff5b07756e0733ec0e88c75'
,
breakCode
:
'0020a5762771aa16902a666c9491394e'
,
vip
:
'647f1154d30b323ff46c787fc78aef65'
}
};
const
guangContentCode
=
{
special
:
'89cc20483ee2cbc8a716dcfe2b6c7603'
};
const
channelContentCode
=
{
boys
:
'8512bf0755cc549ac323f852c9fd945d'
,
girls
:
'189b6686065dbd6755dd6906cf03c002'
,
kids
:
'b8c1bff53d4ea60f978926d538620636'
,
lifestyle
:
'61cd852c6afcf60660196154f66a3a62'
,
index
:
'7ba9118028f9b22090b57341487567eb'
}
const
bottomBannerContentCode
=
{
boys
:
'a2ec977c027d0cd9cdccb356ddf16b08'
,
girls
:
'8c8bd1b89a22e5895f05882e0825b493'
};
const
outletContentCode
=
'c19ffa03f053f4cac3690b22c8da26b7'
;
module
.
exports
=
{
sale
:
saleContentCode
,
outlet
:
outletContentCode
,
channel
:
channelContentCode
,
bottom
:
bottomBannerContentCode
,
guang
:
guangContentCode
}
...
...
Please
register
or
login
to post a comment