salecategory.js 3.48 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/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'
	}]
}]