Authored by 姜敏

yohoserach接口路径以及添加文章界面的缩略图

... ... @@ -365,7 +365,7 @@ var goodsgird = new common.grid({
else {
item.images_url = "";
}
return "<img width=120 height=60 src='" + item.images_url + "'/>";
return "<img width=120 height=60 src='" + item.images_url + "?imageView/2/w/100/h/100'/>";
}
}, {
display: "产品名称",
... ...
... ... @@ -12,22 +12,20 @@ var config = {
'development': {
redis: null,
apiKey: 'sd4H1ecAqlp',
//domain:'http://172.16.6.140:8088/platform', // Object
//domain: 'http://172.16.6.236:8088/platform',// 钱军
//domain:'http://172.16.6.140:8088/platform', // Object
//domain: 'http://172.16.6.236:8088/platform',// 钱军
// domain:'http://172.16.6.240:8088/platform',// 王书生
// domain:'http://192.168.102.216:8080/platform',
// domain: 'http://172.16.6.240:8088/platform',
// domain:'http://172.16.6.176:8088/platform',// 王书生
// domain: 'http://172.16.6.214:8088/platform',//陈超
//http://172.16.6.124:8088/platform/product/queryAllProductAttr
//domain: 'http://172.16.6.146:8088/platform', //玛丽
domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
//domain:'http://172.16.6.157:8080/yohobuy-platform-web',//葛超
domain: 'http://192.168.102.202:8088/platform',
//domain: 'http://172.16.6.239:8080', //孙杰翔
//domain:'http://172.16.6.189:8088/platform', //李健1
//domain:'http://192.168.102.216:8180/platform', //李健2
//domain: 'http://172.16.6.243:8088/platform', //谭玲
yohoSearch:'http://192.168.10.64:8080/yohosearch',
yohoSearch: 'http://192.168.102.208:8087/yohosearch',
loggers: {
api: {
level: 'verbose'
... ... @@ -47,7 +45,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8088/platform',
yohoSearch:'http://192.168.10.64:8080/yohosearch',
yohoSearch: 'http://192.168.102.208:8087/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ... @@ -68,7 +66,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.102.202:8081/platform',
yohoSearch:'http://192.168.10.64:8080/yohosearch',
yohoSearch: 'http://192.168.102.208:8087/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ... @@ -89,7 +87,7 @@ var config = {
},
apiKey: 'sd4H1ecAqlp',
domain: 'http://192.168.81.6:8189/yoho-admin-portal',
yohoSearch:'http://182.92.99.119:8080/yohosearch',
yohoSearch: 'http://192.168.102.208:8087/yohosearch',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
api: {
... ...
... ... @@ -4,8 +4,8 @@ var fs = require('fs');
var searchDomain = require('../../config/common.js').yohoSearch;
exports.brandlist = function (req, res) {
request.get("http://x.yohobuy.com/yohosearch/brand/list.json").pipe(res);
}
request.get(searchDomain+"/brand/list.json").pipe(res);
};
exports.search = function (req, res) {
var size = 10;//每页数据量
... ... @@ -14,8 +14,8 @@ exports.search = function (req, res) {
if (req.body.page) {
page = req.body.page;
}
var url = "http://x.yohobuy.com//yohosearch/search.json?viewNum=" + size + "&query=" + req.body.query + "&page=" + page+"&price="+price;
console.log(url);
var url = searchDomain+"/search.json?viewNum=" + size + "&query=" + req.body.query + "&page=" + page+"&price="+price;
console.log("请求url",url);
request({url: url}, function (error, response, body) {
var data = {};
data.list = [];
... ... @@ -36,7 +36,7 @@ exports.search = function (req, res) {
data.page = body.data.page;//页码
data.totalPage = body.data.page_total;
data.nums = data.list.length;//记录每一页数据量
console.log("最终data", data);
//console.log("最终data", data);
res.json({data: {data: data}});
});
};
... ...
... ... @@ -214,7 +214,7 @@
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[brand.brandIco]]">
<img src="[[brand.brandIco]]?imageView/2/w/100/h/100">
</a>
<i class="remove-item-btn remove1 glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
... ... @@ -268,13 +268,13 @@
<div class="con">[[module.data.text]]</div>
[[else if module.template_name=='singleImage']]
<div class="list">
<img src="[[module.data[0].src]]" title="[[module.data[0].title]]">
<img src="[[module.data[0].src]]?imageView/2/w/100/h/100" title="[[module.data[0].title]]">
</div>
[[else if module.template_name=='smallPic']]
<div class="small-pic">
<ul class="small-pic-list">
[[each module.data as item i]]
<img src="[[item.src]]" title="[[item.title]]">
<img src="[[item.src]]?imageView/2/w/100/h/100" title="[[item.title]]">
[[/each]]
</ul>
</div>
... ... @@ -282,7 +282,7 @@
<div class="small-pic">
<ul class="small-pic-list">
[[each module.data as item i]]
<img src="[[item.src]]" title="[[item.id]]">
<img src="[[item.src]]?imageView/2/w/100/h/100" title="[[item.id]]">
[[/each]]
</ul>
</div>
... ... @@ -295,13 +295,13 @@
<div class="small-pic-list2">
[[each module.data as items i]]
<img src="[[items.cover.cover]]" >
<img src="[[items.cover.cover]]?imageView/2/w/100/h/100" >
[[/each]]
</div>
<div class="small-pic-list">
[[each module.data[0].list as item index]]
<img src="[[item.src]]" title="[[item.id]]">
<img src="[[item.src]]?imageView/2/w/100/h/100" title="[[item.id]]">
[[/each]]
</ul>
... ... @@ -360,7 +360,7 @@
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[item.src]]">
<img src="[[item.src]]?imageView/2/w/100/h/100">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
... ... @@ -383,7 +383,7 @@
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[data.src]]">
<img src="[[data.src]]?imageView/2/w/100/h/100">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
... ... @@ -428,7 +428,7 @@
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[item.src]]">
<img src="[[item.src]]?imageView/2/w/100/h/100">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
... ... @@ -461,7 +461,7 @@
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="[[item.src]]">
<img src="[[item.src]]?imageView/2/w/100/h/100">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
... ...