Authored by weiqingting

提交

... ... @@ -6,5 +6,7 @@ module.exports=function(app) {
//品牌列表
app.get("/ajax/yohosearch","common_brandlist");
//商品列表
app.post("/yohosearch/search","common_search")
app.post("/yohosearch/search","common_search");
app.post("/yohosearch/aggStyle","common_aggStyle");
};
... ...
... ... @@ -10,6 +10,10 @@ module.exports = {
var result = request.get(yohoSearch + "/brands.json?status=1");
return callback(null, result);
},
aggStyle:function(req,callback){
var result = request.get(yohoSearch + "/yohosearch/productindex/aggStyle.json");
return callback(null, result);
},
search: function (req, callback) {
var size = 50;//每页数据量
var params = [];
... ...
... ... @@ -15,21 +15,23 @@ module.exports=function(app) {
});
/*添加*/
app.get("/guang/article/contentAdd","guang.info.Edit", function () {
app.get("/guang/article/contentAdd","guang.info.Edit", "common_aggStyle",function (style) {
this.$extend = {
action:"/guang/article/addArticle",
moduleName: "文章管理",
pageName: "添加文章"
};
return style.data;
});
/*编辑*/
app.get("/guang/article/contentEdit/:id","guang.info.Edit", function () {
app.get("/guang/article/contentEdit/:id","guang.info.Edit","common_aggStyle", function (style) {
this.$extend = {
action:"/guang/article/updateArticle",
moduleName: "文章管理",
pageName: "修改文章"
};
return style.data;
});
/*资讯管理列表数据*/
... ...
... ... @@ -6,5 +6,7 @@ module.exports=function(app) {
//品牌列表
app.get("/ajax/yohosearch","common_brandlist");
//商品列表
app.post("/yohosearch/search","common_search")
app.post("/yohosearch/search","common_search");
app.post("/yohosearch/aggStyle","common_aggStyle");
};
... ...
... ... @@ -15,21 +15,23 @@ module.exports=function(app) {
});
/*添加*/
app.get("/guang/article/contentAdd","guang.info.Edit", function () {
this.$extend = {
action:"/guang/article/addArticle",
moduleName: "文章管理",
pageName: "添加文章"
};
app.get("/guang/article/contentAdd","guang.info.Edit", "common_aggStyle",function (style) {
//this.$extend = {
// action:"/guang/article/addArticle",
// moduleName: "文章管理",
// pageName: "添加文章"
//};
return style;
});
/*编辑*/
app.get("/guang/article/contentEdit/:id","guang.info.Edit", function () {
app.get("/guang/article/contentEdit/:id","guang.info.Edit","common_aggStyle", function (style) {
this.$extend = {
action:"/guang/article/updateArticle",
moduleName: "文章管理",
pageName: "修改文章"
};
return style.data;
});
/*资讯管理列表数据*/
... ...
... ... @@ -42,8 +42,8 @@ var Iaccount = {
var apiCofig = {
//root:__dirname,
EnvConst:{
// domain:"http://192.168.102.210:8088/platform",
domain:"http://172.16.6.200:8080/platform",
domain:"http://192.168.102.210:8088/platform",
// domain:"http://172.16.6.200:8088/platform",
yohoSearch: 'http://192.168.102.216:8080/yohosearch',
system:Iaccount
},
... ... @@ -64,12 +64,12 @@ var apiCofig = {
views: path.resolve(__dirname,"apps", "0", "views/1")
},
useToEntry:function(app){
if(process.env.NODE_ENV!="coding"&&process.env.NODE_ENV!=="test"){
options.store=new Redis({
port: 6379,
host: 'localhost'
});
}
//if(process.env.NODE_ENV!="coding"&&process.env.NODE_ENV!=="test"){
// options.store=new Redis({
// port: 6379,
// host: 'localhost'
// });
//}
app.use(session(options));
},
useToOuter:function(app,controllers){
... ... @@ -84,7 +84,7 @@ if(process.env.NODE_ENV!=='development'){
}
/*服务器环境*/
if(process.env.NODE_ENV!="coding"){
//if(process.env.NODE_ENV!="coding"){
console.log("服务器环境");
apiCofig.MVC={
Interfacer:path.join(__dirname,"interfaces/0.js").replace(/0/g,'*'),
... ... @@ -92,7 +92,7 @@ if(process.env.NODE_ENV!="coding"){
filters: path.join(__dirname, "filters.js"),
views: path.resolve(__dirname,"views", "0", "1")
}
}
//}
/*线下测试环境*/
if(process.env.NODE_ENV==="test211"){
apiCofig.EnvConst.domain="http://192.168.102.202:8088/platform";
... ...
... ... @@ -7,8 +7,15 @@ module.exports = {
namespace: "common",
apis: {
brandlist: function (req, callback) {
var result = request.get(yohoSearch + "/brands.json?status=1");
return callback(null, result);
var result = request.get(yohoSearch + "/brands.json?status=1", function (error, response, body) {
return callback(null, body);
});
//return callback(null, result);
},
aggStyle:function(req,callback){
request.get(yohoSearch + "/productindex/aggStyle.json", function (error, response, body) {
return callback(null, body);
});
},
search: function (req, callback) {
var size = 50;//每页数据量
... ...
... ... @@ -130,15 +130,15 @@ module.exports={
saveNetSaleBaseInfo:{
title:'保存基本信息接口',
url: '/product/saveNetSaleBaseInfo',
params: [
{name: 'productSkn', type: 'number'},
{name: 'productName', type: 'string'},
{name: 'isNew', type: 'string'},
{name: 'sellChannels', type: 'string'},
{name: 'phrase', type: 'string'},
{name: 'outSaleTime', type: 'number'},
{name: 'shopIds', type: 'string'}
]
params: {
productSkn:{type:Number},
productName:{type:String,required:true},
isNew:{type:String},
sellChannels:{type:String},
phrase:{type:String},
outSaleTime:{type:Number},
shopIds:{type:String}
}
},
saveAfterSaleInfo:{
title:'保存上架后补全信息',
... ...
... ... @@ -56,6 +56,11 @@
<option value="" selected="">请选择</option>
<option value="1">首页</option>
<option value="2">个人中心</option>
<option value="3">社区首页</option>
<option value="4">复古市集会</option>
<option value="5">SNEAKER</option>
<option value="6">YOHO</option>
<option value="7">SHOW</option>
</select>
</div>
<div id="showchannel" class="col-sm-5">
... ... @@ -99,6 +104,11 @@
<option value="shortsize">断码页</option>
<option value="discountmarket">折扣专区</option>
<option value="discountmarketpro">折扣专区详情页</option>
<option value="comm.postdetail">社区帖子详情页</option>
<option value="comm.forum">社区版块首页</option>
<option value="comm.h5">社区H5</option>
<option value="comm.productDetail">社区商品详情页</option>
</select>
</div>
<div class="col-sm-4">
... ...