Authored by htoooth

refactor

... ... @@ -107,6 +107,7 @@ const createConsult = (req, res, next) => {
if (content && uid) {
service.createConsultAsync(uid, pid, content)
.then(result => {
console.log(result);
res.json(result);
})
.catch(next);
... ... @@ -130,7 +131,6 @@ const createConsult = (req, res, next) => {
res.json({
code: 400,
message: '请输入咨询内容',
data: ''
});
}
... ...
... ... @@ -17,7 +17,7 @@ const indexAsync = (pid, page, size) => {
return co(function *() {
let commentList = yield api.indexAsync(pid, page, size);
if (!commentList.code && commentList.code === 200) {
if (!(commentList.code && commentList.code === 200)) {
return [];
}
... ...
... ... @@ -1345,6 +1345,7 @@ module.exports.showMainAsync = (data) => {
// 获取商品尺寸相关
let sizeInfo = getSizeInfo(productInfo.goodsInfo, productInfo.goodsInfo.maxSortId);
// 分类导航
let navs = requestData[0];
result.headerData = requestData[1];
... ...
... ... @@ -63,6 +63,7 @@
"ava": "^0.15.2",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"cross-env": "^1.0.8",
"eslint": "^2.12.0",
"eslint-config-yoho": "^1.0.1",
"gulp": "^3.9.1",
... ...
... ... @@ -1021,7 +1021,7 @@
.hot-point {
position: absolute;
background: #fff;
/*background: #fff;*/
/*
IE8 Hack
... ...