Authored by 郝肖肖

Merge branch 'release/5.2' into feature/homeOptimization

... ... @@ -170,7 +170,7 @@ const _getLeftNav = (choosed) => {
* 获取热门搜索
**/
const _getSearchIndex = () => {
return api.get('', {
return API.get('', {
method: 'app.search.getTerms'
}, {
cache: true
... ...
... ... @@ -17,7 +17,7 @@
<link><![CDATA[{{{url}}}&ref=rss]]></link>
<description><![CDATA[{{{intro}}}]]></description>
<pubDate><![CDATA[{{publishTime}}]]></pubDate>
<source url="{{{url}}}&ref=rss"><![CDATA[有货逛]]></source>
<source><![CDATA[有货逛]]></source>
<author>有货</author>
</item>
{{/items}}
... ...
... ... @@ -527,18 +527,22 @@ const getShopCouponsList = (req, res, next) => {
res.setHeader('Access-Control-Allow-Credentials', 'true');
let uid = req.query.uid || req.user.uid;
let shopId = req.query.shopId;
let shopId = parseInt(req.query.shopId, 10);
let param = {};
if (uid) {
param.uid = uid;
}
if (shopId) {
if (uid) {
param.uid = uid;
}
param.shop_id = shopId;
param.shop_id = shopId;
listModel.shopCouponsList(param).then(result => {
res.json(result);
}).catch(next);
listModel.shopCouponsList(param).then(result => {
res.json(result);
}).catch(next);
} else {
res.json([]);
}
};
/**
... ... @@ -555,18 +559,22 @@ const getBrandCouponsList = (req, res, next) => {
res.setHeader('Access-Control-Allow-Credentials', 'true');
let uid = req.query.uid || req.user.uid;
let brandId = req.query.brandId;
let brandId = parseInt(req.query.brandId, 10);
let param = {};
if (uid) {
param.uid = uid;
}
if (brandId) {
if (uid) {
param.uid = uid;
}
param.brand_id = brandId;
param.brand_id = brandId;
listModel.brandCouponsList(param).then(result => {
res.json(result);
}).catch(next);
listModel.brandCouponsList(param).then(result => {
res.json(result);
}).catch(next);
} else {
res.json([]);
}
};
module.exports = {
... ...
... ... @@ -833,7 +833,7 @@ $newList.on('touchstart', 'li', function(e) {
default:
break;
}
$pre = $firstLiDom;
search();
});
... ...
... ... @@ -87,7 +87,6 @@
width: 150px;
height: 50px;
line-height: 24px;
padding-top: 2px;
overflow: hidden;
word-break: break-all;
display: -webkit-box;
... ...