1
This commit is contained in:
54
admin/src/api/system/pricing_plans_server.js
Normal file
54
admin/src/api/system/pricing_plans_server.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* 价格套餐 API 服务
|
||||
*/
|
||||
|
||||
class PricingPlansServer {
|
||||
/**
|
||||
* 分页查询价格套餐
|
||||
* @param {Object} param - 查询参数
|
||||
* @param {Object} param.seachOption - 搜索条件
|
||||
* @param {Object} param.pageOption - 分页选项
|
||||
* @returns {Promise}
|
||||
*/
|
||||
page(param) {
|
||||
return window.framework.http.post('/pricing_plans/list', param)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取价格套餐详情
|
||||
* @param {Number|String} id - 价格套餐ID
|
||||
* @returns {Promise}
|
||||
*/
|
||||
getById(id) {
|
||||
return window.framework.http.get('/pricing_plans/detail', { id })
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增价格套餐
|
||||
* @param {Object} row - 价格套餐数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
add(row) {
|
||||
return window.framework.http.post('/pricing_plans/create', row)
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新价格套餐信息
|
||||
* @param {Object} row - 价格套餐数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
update(row) {
|
||||
return window.framework.http.post('/pricing_plans/update', row)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除价格套餐
|
||||
* @param {Object} row - 价格套餐数据(包含id)
|
||||
* @returns {Promise}
|
||||
*/
|
||||
del(row) {
|
||||
return window.framework.http.post('/pricing_plans/delete', { id: row.id })
|
||||
}
|
||||
}
|
||||
|
||||
export default new PricingPlansServer()
|
||||
Reference in New Issue
Block a user