同步6/16
This commit is contained in:
78
src/api/system/version/index.ts
Normal file
78
src/api/system/version/index.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { VersionVO, VersionForm, VersionQuery } from './type';
|
||||
|
||||
/**
|
||||
* 查询版本列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listVersion = (query?: VersionQuery): AxiosPromise<VersionVO[]> => {
|
||||
return request({
|
||||
url: '/api/app/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询版本详细
|
||||
* @param id
|
||||
*/
|
||||
export const getVersion = (id: string | number): AxiosPromise<VersionVO> => {
|
||||
return request({
|
||||
url: '/system/version/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增版本
|
||||
* @param data
|
||||
*/
|
||||
export const addVersion = (data: VersionForm) => {
|
||||
return request({
|
||||
url: '/api/app/release',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改版本
|
||||
* @param data
|
||||
*/
|
||||
export const updateVersion = (data: VersionForm) => {
|
||||
return request({
|
||||
url: '/system/version',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除版本
|
||||
* @param id
|
||||
*/
|
||||
export const delVersion = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/system/version/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
/** 获取过往版本 */
|
||||
export const getPastVersion = (platform: string, channel: string) => {
|
||||
return request({
|
||||
url: `/api/app/getPastVersion?platform=${platform}&channel=${channel}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
/** 切换版本启停 */
|
||||
export const switchVersion = (id: string, status: string) => {
|
||||
return request({
|
||||
url: `/api/app/switchStatus/${id}/${status}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user