Authored by 毕凯

频道页面样式优化

... ... @@ -42,7 +42,8 @@ exports.switchChannel = (req, res, next) => {
*/
exports.boys = (req, res) => {
channelModel.getChannelDate({
gender: 'boys'
gender: 'boys',
uid: 123
}).then(result => {
res.render('channel', Object.assign({
module: mod,
... ...
... ... @@ -114,16 +114,20 @@ const processFloor = (list) => {
* @param {[object]} gender
* @return {[type]}
*/
const getChannelResource = (gender) => {
gender = gender || 'boys';
const getChannelResource = (params) => {
params.gender = params.gender || 'boys';
return api.get('operations/api/v5/resource/home', sign.apiSign({
new_device: true, // eslint-disable-line
gender: genderData[gender],
content_code: contentCode[gender], // eslint-disable-line
params = Object.assign({
gender: genderData[params.gender],
content_code: contentCode[params.gender], // eslint-disable-line
page: 1,
limit: 30
})).then(result => {
}, params);
if (!params.uid) {
params.new_device = true; // eslint-disable-line
}
return api.get('operations/api/v5/resource/home', sign.apiSign(params)).then(result => {
if (result.code === 200) {
return processFloor(result.data.list);
} else {
... ... @@ -157,7 +161,7 @@ const getLeftNav = (choosed) => {
exports.getChannelDate = (params) => {
var channelData = {};
return Promise.all([getChannelResource(params.gender), getLeftNav(params.gender)]).then((data) => {
return Promise.all([getChannelResource(params), getLeftNav(params.gender)]).then((data) => {
channelData.content = data[0]; // 资源位数据
channelData.sideNav = data[1]; // 侧边栏数据
... ...
... ... @@ -37,7 +37,7 @@ class API {
ret.then((body)=>{
let duration = timer.put('getApi');// 接口返回
log.info('API GET: %s, parms: %j , durationMs: %d ms , body: %s', options.url, options.qs, duration, body);
// log.info('API GET: %s, parms: %j , durationMs: %d ms , body: %s', options.url, options.qs, duration, body);
}).catch((error)=>{
let duration = timer.put('getApi');// 接口返回
log.error('API GET: %s, parms: %j , durationMs: %d ms error: %s , statusCode: %d', options.url, options.qs, duration, error.message, error.statusCode);
... ...
.footer-tab {
position: fixed;
left: 0;
left: 50%;
bottom: 0;
margin-left: -320px;
width: 100%;
height: 100px;
max-width: 640px;
padding-top: 20px;
box-sizing: border-box;
background: #fff;
... ...
... ... @@ -23,7 +23,10 @@
@import "coupon";
.mobile-container {
margin-left: auto;
margin-right: auto;
width: 100%;
max-width: 640px;
overflow: hidden;
}
... ...