Authored by weiqingting

4.5+4.3

// exports.domain = "http://172.16.6.236:8080/platform";
exports.domain = require('../config/common.js').domain;
// exports.domain = 'http://localhost:30012';
exports.res = [
{
route:'/operations/helpcontent/index',
method:'GET',
view:'pages/help/helpContent',
src:'/help/helpContent'
},
{
route:'/operations/helpcontent/getAllHelpContent',
method:'POST',
url: '/HelpContentRest/getAllHelpContent',
params: [
{name: 'categoryId', type: 'Number'},
{name: 'platform', type: 'string'},
// {name: 'page', type: 'Number'},
// {name: 'size', type: 'Number', def:10}
]
},
{
route:'/operations/helpcontent/addHelpContent',
method:'POST',
url:'/HelpContentRest/addHelpContent',
params: [
{name: 'title', type: 'string'},
{name: 'categoryId', type: 'Number'},
{name: 'content', type: 'string'},
{name: 'platform', type: 'string'}
]
},
{
route:'/operations/helpcontent/updateHelpContent',
method:'POST',
url:'/HelpContentRest/updateHelpContent',
params: [
{name: 'id', type: 'Number'},
{name: 'title', type: 'string'},
{name: 'categoryId', type: 'Number'},
{name: 'content', type: 'string'},
{name: 'platform', type: 'string'}
]
},
{
route:'/operations/helpcontent/deleteHelpContent',
method:'POST',
url:'/HelpContentRest/deleteHelpContent',
params: [
{name: 'id', type: 'Number'}
]
},
{
route:'/operations/helpcontent/getHelpContentByCategoryId',
method:'POST',
url:'/HelpContentRest/getHelpContentByCategoryId',
params:[
{name: 'categoryId', type: 'Number'}
]
},
{
route:'/operations/helpcontent/getSecondCategoryList',
method:'POST',
url:'/HelpCategoryRest/getSecondCategoryList',
params:[]
},
{
route:'/operations/helpcontent/getAllHelpCategory',
method:'POST',
url:'/HelpCategoryRest/getAllHelpCategory',
params:[]
},
{
route:'/operations/helpcontent/getHelpCategory',
method:'POST',
url:'/HelpCategoryRest/getHelpCategory',
params:[]
}
];
\ No newline at end of file
// exports.domain = 'http://localhost:30012';
// exports.domain = "http://172.16.6.236:8080/platform";
exports.domain = require('../config/common.js').domain;
exports.res = [
{
route:'/operations/helpcategory/index',
method: 'GET',
view: 'pages/help/help',
src: '/help/helpCategory'
},{
route: '/operations/helpcategory/getAllHelpCategory',
method: 'POST',
url:'/HelpCategoryRest/getAllHelpCategory',
params: []
},{
route: '/operations/helpcategory/addCategory',
method: 'POST',
url: '/HelpCategoryRest/addCategory',
params: [
{name: 'categoryName', type: 'String'},
{name: 'parentId', type: 'Number'},
{name: 'platform', type: 'String'}
]
},{
route: '/operations/helpcategory/updateHelpCategory',
method: 'POST',
url: '/HelpCategoryRest/updateHelpCategory',
params: [
{name: 'id', type: 'Number'},
{name: 'categoryName', type: 'String'},
{name: 'parentId', type: 'Number'},
{name: 'platform', type: 'String'}
]
},{
route: '/operations/helpcategory/deleteHelpCategory',
method: 'POST',
url: '/HelpCategoryRest/deleteHelpCategory',
params: [
{name: 'id', type: 'Number'},
{name: 'parentId', type: 'Number'}
]
},{
route: '/operations/helpcategory/getCategoryListByPid',
method: 'POST',
url: '/HelpCategoryRest/getCategoryListByPid',
params: [
{name: 'parentId', type: 'Number'}
]
}]
\ No newline at end of file
/**
* Created by JiangMin on 2016/3/22.
* 测量尺码管理
*/
exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.189:8088/platform";
exports.res = [
//主界面
{
route: '/meterManage/meterSize/index',//访问路由
method: 'GET',//方法
view: 'pages/meterManage/meterSize',//视图
src: '/meterManage/meterSize'//控制层
},
//api请求数据
{
route: '/meterManage/productSize/queryProdSizeList',
method: 'POST',
url: '/productSize/queryProdSizeList',
params: [
{name: "page", type: "number"},
{name: "productSkn", type: "number"},
{name: "brandId", type: "number"},
{name: "productSku", type: "number"},
{name: "maxSortId", type: "number"},
{name: "arriveStartTime", type: "number"},
{name: "arriveEndTime", type: "number"},
{name: "isMeasure", type: "string"}
]
},
{
route: '/meterManage/productSize/saveProdSizeInfo',
method: 'POST',
url: '/productSize/saveProdSizeInfo',
params: [
{name: "productSkn", type: "number"},
{name: "sizeInfoList", type: "string"},
{name: "productSizeReferList", type: "string"},
{name: "noMeasureIds", type: "string"}
]
},
{
route: '/meterManage/brand/getSelectItems',
method: 'POST',
url: '/brand/getSelectItems',
params: []
},
{//添加页面
route: '/meterManage/meterSize/add',//访问路由
method: 'GET',//方法
view: 'pages/meterManage/addSizeInfo',//视图
src: '/meterManage/addSizeInfo'//控制层
}
];
\ No newline at end of file
/**
* Created by JiangMin on 2016/3/17.
* 模特管理
*/
exports.domain = require('../config/common.js').domain;
exports.res = [
//主界面
{
route: '/shotManage/model/index',//访问路由
method: 'GET',//方法
view: 'pages/shotManage/model',//视图
src: '/shotManage/model',//控制层
data:{
type:1,
typeName:'拍摄模特管理'
}
},
//api请求数据
{
route: '/shotManage/model/getAllModels',
method: 'POST',
url: '/model/queryModelList',
params: [
{name: 'englishName', type: 'string'},//英文名
{name: 'modelName', type: 'string'},//名称
{name: 'status', type: 'Number'},//模特状态:0 禁用 1 启用
{name: 'modelType', type: 'Number'},//模特类型:1拍摄模特 2试穿模特
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
//新增模特
{
route: '/shotManage/model/addModel',
method: 'POST',
url: '/model/addModel',
params: [
{name: 'englishName', type: 'string'},//英文名
{name: 'height', type: 'Number'},//身高
{name: 'dressSize', type: 'string'},//穿衣尺码
{name: 'modelName', type: 'string'},//名称
{name: 'modelType', type: 'Number'},//模特类型:1 拍摄模特 2 试穿模特
{name: 'nationality', type: 'string'},//国籍
{name: 'status', type: 'Number'},//模特状态:0 禁用 1 启用
{name: 'shoeSize', type: 'string'},//鞋尺码
{name: 'vitalStatistics', type: 'string'},//三围
{name: 'weight', type: 'Number'},//体重
{name: 'avatar', type: 'string'},//头像
{name: 'modelCard', type: 'string'}//模特卡
]
},
//修改模特
{
route: '/shotManage/model/updateModel',
method: 'POST',
url: '/model/updateModel',
params: [
{name: 'id', type: 'Number'},//主键
{name: 'englishName', type: 'string'},//英文名
{name: 'height', type: 'Number'},//身高
{name: 'dressSize', type: 'string'},//穿衣尺码
{name: 'modelName', type: 'string'},//名称
{name: 'modelType', type: 'Number'},//模特类型:1 拍摄模特 2 试穿模特
{name: 'nationality', type: 'string'},//国籍
{name: 'shoeSize', type: 'string'},//鞋尺码
{name: 'status', type: 'Number'},//模特状态:0 禁用 1 启用
{name: 'vitalStatistics', type: 'string'},//三围
{name: 'weight', type: 'Number'},//体重
{name: 'avatar', type: 'string'},//头像
{name: 'modelCard', type: 'string'}//模特卡
]
}
];
\ No newline at end of file
/**
* Created by JiangMin on 2016/3/22.
* 产品图片管理
*/
exports.domain = require('../config/common.js').domain;
exports.res = [
//主界面
{
route: '/shotManage/proPhoto/index',//访问路由
method: 'GET',//方法
view: 'pages/shotManage/proPhoto',//视图
src: '/shotManage/proPhoto'//控制层
},
//api请求数据
{
route: '/shotManage/proPhoto/index2',
method: 'POST',
url: '/productPhoto/queryProductPhotoList',
params: [
//查询参数
{name: 'productSkn', type: 'Number'},
{name: 'productSkc', type: 'Number'},
{name: 'productSku', type: 'Number'},
{name: 'startTime', type: 'Number'},
{name: 'endTime', type: 'Number'},
//分页参数
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number'}
]
},
//编辑图片
{
route: '/shotManage/proPhoto/add',
method: 'POST',
url: '/productPhoto/addProductBatchPhoto',
params: [
{name: 'productSkn', type: 'Number'},
{name: 'productSkc', type: 'Number'},
{name: 'productSku', type: 'Number'},
{name: 'ids', type: 'string'},
{name: 'productPhotoAddStrList', type: 'string'}
]
}
//编辑图片
//{
// route: '/shotManage/proPhoto/update',
// method: 'POST',
// url: '/productPhoto/updateProductPhoto',
// params: [
// {name: 'productSkn', type: 'Number'},
// {name: 'ids', type: 'string'}
// ]
//}
];
\ No newline at end of file
exports.domain = require('../config/common.js').domain;
exports.res = [
{
// 产品管理【颜色】页面渲染
route: '/erpproduct/color/index',
method: 'GET',
view: 'pages/product/color',
//url:'/productColor/queryProductColors'
src: '/product/color',
},{
// 获取颜色列表
route: '/erpproduct/product/colorList',
method: 'POST',
url: '/productColor/queryProductColors', //接口的url
},{
// 获取单个颜色
route: '/erpproduct/product/getColor',
method: 'POST',
url:"/productColor/queryProductColor",
params:[
{name: 'id', type: 'Number'}
]
},{
// 新增颜色页面渲染
route: '/erpproduct/product/addColor',
method: 'GET',
view:'pages/product/addColor',
src:'/product/color-add',
data:{
url:'/erpproduct/product/saveColor'
}
},{
// 新增颜色
route: '/erpproduct/product/saveColor',
method: 'POST',
url:"/productColor/addProductColor",
params:[
{name: 'colorName', type: 'String'},
{name: 'colorCode', type: 'String'},
{name: 'colorValue', type: 'String'}
]
},{
// 打开修改颜色页面
route: '/erpproduct/product/addColor/:param',
method: 'GET',
url:"/productColor/queryProductColor",
view:'pages/product/addColor',
params:[
{name:'param',type:'Number'}
],
data:{
url:'/erpproduct/product/updatColor'
},
src:'/product/color-add'
},{
// 修改颜色
route: '/erpproduct/product/updatColor',
method: 'POST',
url:"/productColor/updateProductColor",
params:[
{name: 'id', type: 'Number'},
{name: 'colorName', type: 'String'},
{name: 'colorCode', type: 'String'},
{name: 'colorValue', type: 'String'}
]
}
]
exports.domain = require('../config/common.js').domain;
exports.res = [
{
// 产品管理【尺寸】页面渲染
route: '/erpproduct/size/index',
method: 'GET',
view: 'pages/product/siezChart',
//url:'/prohejiaduct/querySizeList',
isJsonRaw:true,
//params: [
// {name: 'page', type: 'Number',def:1},
// {name: 'size', type: 'Number',def:10}
//],
src: '/product/sizeChart'
},{
// 产品管理【尺寸】页面分页渲染
route: '/erpproduct/sizeattribute/sizeList',
method: 'POST',
url:'/product/querySizeList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number',def:10}
],
src: '/product/sizeChart'
},{
// 获取单个尺码
route: '/erpproduct/size/getSize',
method: 'POST',
url:"/product/getSize",
params:[
{name: 'id', type: 'Number'}
]
},{
// 新增尺码
route: '/erpproduct/size/addSize',
method: 'POST',
url:"/product/addSize",
params:[
{name: 'sizeName', type: 'String'}
]
},{
// 修改尺码
route: '/erpproduct/size/updateSize',
method: 'POST',
url:"/product/updateSize",
params:[
{name: 'id', type: 'Number'},
{name: 'sizeName', type: 'String'}
]
}
]
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://localhost:30012';
//销售类目路由
exports.res = [{
//列表页渲染
'route': '/sale/category/index',
'method': 'GET',
'src': '/salecategory/index',
'view': 'pages/salecategory/index',
'data': {
gridurl: '/sale/salesCategory/querySCList'
}
}, {
//列表数据接口
route: '/sale/salesCategory/querySCList',
method: 'POST',
url: '/salesCategory/querySCList',
params: [{
name: 'state',
type: 'string'
}]
}, {
route: '/sale/salesCategory/querySCById',
method: 'POST',
url: '/salesCategory/querySCById',
params:[{
name: 'categoryId',
type: 'number'
}]
}, {
//标签管理页面渲染
route: '/sale/category/tag/:categoryId',
method: 'GET',
src: '/salecategory/tag-mgmt',
url: '/salesCategory/querySCById',
view: 'pages/salecategory/tag-mgmt',
data: {},
params: [{
name: 'categoryId',
type: 'number'
}]
}, {
//标签管理列表数据接口
route: '/sale/salesCategoryLabel/querySCLabelList',
method: 'POST',
url: '/salesCategoryLabel/querySCLabelList',
params: [{
name: 'categoryId',
type: 'string'
}, {
name: 'status',
type: 'string'
}]
}, {
//更新标签接口
route: '/sale/salesCategoryLabel/updateSCLabel',
method: 'POST',
url: '/salesCategoryLabel/updateSCLabel',
params: [{
name: 'labelId',
type: 'string'
}, {
name: 'labelName',
type: 'string'
}, {
name: 'categoryId',
type: 'string'
}, {
name: 'orderBy',
type: 'string'
}, {
name: 'status',
type: 'string'
}, {
name: 'id',
type: 'string'
}]
}, {
//添加销售类目接口
route: '/sale/salesCategory/addSC',
method: 'POST',
url: '/salesCategory/addSC',
params: [{
name: 'categoryName',
type: 'string'
}, {
name: 'relationParameter',
type: 'string'
}, {
name: 'relationUrl',
type: 'string'
}, {
name: 'parentId',
type: 'string'
}, {
name: 'orderBy',
type: 'string'
}, {
name: 'icon',
type: 'string'
}]
}, {
//更新销售类目接口
route: '/sale/salesCategory/updateSC',
method: 'POST',
url: '/salesCategory/updateSC',
params: [{
name: 'categoryId',
type: 'string'
}, {
name: 'categoryName',
type: 'string'
}, {
name: 'relationParameter',
type: 'string'
}, {
name: 'relationUrl',
type: 'string'
}, {
name: 'parentId',
type: 'string'
}, {
name: 'orderBy',
type: 'string'
}, {
name: 'icon',
type: 'string'
}, {
name: 'state',
type: 'string'
}]
}, {
//开关销售类目
route: '/sale/salesCategory/updateSCStatus',
method: 'POST',
url: '/salesCategory/updateSCStatus',
params: [{
name: 'categoryId',
type: 'string'
}, {
name: 'state',
type: 'string'
}]
},{
//批量添加标签接口
route: '/sale/salesCategoryLabel/addSCLabel',
method: 'POST',
url: '/salesCategoryLabel/addSCLabel',
params: [{
name: 'labelName',
type: 'string'
}, {
name: 'categoryId',
type: 'string'
}, {
name: 'parentId',
type: 'string'
}, {
name: 'orderBy',
type: 'string'
}, {
name: 'labelLevel',
type: 'string'
}, {
name: 'status',
type: 'string'
}]
}, {
//物理类目父类查询
route: '/sale/product/queryPSNotTreeWhenLevelAndStatus',
method: 'POST',
url: '/product/queryPSNotTreeWhenLevelAndStatus',
params: [{
name: 'status',
type: 'string'
}, {
name: 'sortLevel',
type: 'string'
}]
}, {
//物理类目子类查询
route: '/sale/product/queryPSListByParentIdWhenStatus',
method: 'POST',
url: '/product/queryPSListByParentIdWhenStatus',
params: [{
name: 'param',
type: 'number'
}]
}]
/**
* Created by wangqianjun on 16/2/3.
*/
exports.domain = require('../config/common.js').domain;
//路由配置
exports.res = [
{
//产品管理【品类列表】页面渲染
route: '/erpproduct/sizeattribute/index',
method: 'GET',
view: 'pages/product/size-property',
src: '/product/size-property',
}, {
route: '/erpproduct/sizeattribute/propertyList',
method: 'POST',
url: '/product/querySizeAttributeList', //接口的url
params:[
{name: 'page', type: 'Number', def: '1'}, //页码
{name: 'size', type: 'Number', def : '10'} //每页条数
]
}, {
route: '/erpproduct/sizeattribute/propertyAdd', // 添加尺码属性
method: 'POST',
url: '/product/addSizeAttribute', //接口的url
params:[
{name: 'attributeName', type: 'String'} //名称
]
}, {
route: '/erpproduct/sizeattribute/propertyModify', // 修改尺码属性
method: 'POST',
url: '/product/updateSizeAttribute', //接口的url
params:[
{name: 'id', type: 'Number'}, //id
{name: 'attributeName', type: 'String'} //名称
]
}
];
\ No newline at end of file
... ... @@ -59,22 +59,7 @@ module.exports = function(proxyRoute) {
}
logger.log('info','grayroute: request options: %j',options,{});
//发起代理请求
if(req.headers['accept'].indexOf('text/html')>-1||req.xhr) {
request(options,function(err,res,body) {
if(err) {
logger.log('error','grayroute: request error:',err);
ress.status(500).send('');
} else if(res&&res.statusCode === 302) {
//跳转
ress.redirect(res.caseless.get('location'));
}else {
request(options).pipe(ress);
}
});
} else {
request(options).pipe(ress);//如果是静态资源,直接管道传递结果
}
} else {
//当不是老系统的URL,需要访问老系统保持session
... ...
... ... @@ -5,18 +5,12 @@
// getAllResByWebsite: oldSerDomain + '/account/api/v1/resources/getAllResByWebsite'
// };
// var oldSerDomain = 'http://service.yohobuy.com';
// module.exports = {
// login: oldSerDomain + '/service/account/v1/Profile/login',
// getResourceByPid: oldSerDomain + '/service/account/v1/Profile/getMenuByPid',
// getAllResByWebsite: oldSerDomain + '/service/setting/v1/menu/getAllMenu',
// isUsedMenuAuth:oldSerDomain + '/service/account/v1/profile/authPath',
// allRight:oldSerDomain+'/service/setting/v1/action/getAllAction'
// };
var oldSerDomain = 'http://service.api.yohobuy.com';
var oldSerDomain = 'http://serve.yohobuy.com';
module.exports = {
login: oldSerDomain + '/account/api/v1/profile/login',
getResourceByPid: oldSerDomain + '/account/api/v1/profile/getResourceByPid',
getAllResByWebsite: oldSerDomain + '/account/api/v1/resources/getAllResByWebsite'
login: oldSerDomain + '/service/account/v1/Profile/login',
getResourceByPid: oldSerDomain + '/service/account/v1/Profile/getMenuByPid',
getAllResByWebsite: oldSerDomain + '/service/setting/v1/menu/getAllMenu',
isUsedMenuAuth:oldSerDomain + '/service/account/v1/profile/authPath',
allRight:oldSerDomain+'/service/setting/v1/action/getAllAction'
};
... ...