salecategory.js 4.12 KB
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/add',
	method: 'GET',
	src: '/salecategory/edit',
	view: 'pages/salecategory/edit',
	data: {
		action: '/sale/salesCategory/addSC',
		data: {
			addRootCategory: true
		}
	}
}, {
	//新增子分类页面渲染
	route: '/sale/category/add/:categoryId',
	method: 'GET',
	src: '/salecategory/edit',
	url: '/salesCategory/querySCById',
	view: 'pages/salecategory/edit',
	data: {
		action: '/sale/salesCategory/addSC'
	},
	params: [{
		name: 'categoryId',
		type: 'number'
	}]
}, {
	//编辑分类页面渲染
	route: '/sale/category/edit/:categoryId',
	method: 'GET',
	src: '/salecategory/edit',
	url: '/salesCategory/querySCById',
	view: 'pages/salecategory/edit',
	data: {
		action: '/sale/salesCategory/updateSC'
	},
	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: 'parentId',
		type: 'string'
	}, {
		name: 'orderBy',
		type: 'string'
	}, {
		name: 'labelLevel',
		type: 'string'
	}, {
		name: 'status',
		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/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'
	}]
}]