Skip to content

Commit

Permalink
fix(api): 缺少模块的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
白唯 committed Dec 2, 2020
1 parent 1259e43 commit 8170431
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
57 changes: 57 additions & 0 deletions src/api/cloudrole.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import Axios from './axios'
import { CloudRoleItem, HttpResponse } from '@/@types/index'
import { AddCloudRoleItem } from '../@types/index'

// 云角色相关的网络请求模块

export class CloudRoleService {
/**
* @description 查询所在团队的的云角色列表
* @param {number} teamId - 所要查询的团队ID
* @return {HttpResponse} result
*/
static list(teamId: number): Promise<HttpResponse> {
return Axios(`/bus/cloudRoleTeam/list`, {
method: 'get',
params: {
teamId
}
})
}
/**
* @description 给团队添加成员
* @param {AddCloudRoleItem} teamId - 团队 id 和云角色 id
* @return {HttpResponse} result
*/
static add(data: AddCloudRoleItem): Promise<HttpResponse> {
return Axios(`/bus/cloudRoleTeam`, {
method: 'post',
data
})
}

/**
* @description 删除团队的云角色
* @param {CloudRoleItem} ids - 云角色 id
* @return {HttpResponse} result
*/
static update(teamCloudRole: CloudRoleItem): Promise<HttpResponse> {
return Axios(`/bus/cloudRoleTeam/`, {
method: 'put',
data: {
teamCloudRole
}
})
}

/**
* @description 删除团队的云角色
* @param {string} ids - 云角色 id
* @return {HttpResponse} result
*/
static delete(ids: string): Promise<HttpResponse> {
return Axios(`/bus/cloudRoleTeam/${ids}`, {
method: 'delete'
})
}
}
1 change: 0 additions & 1 deletion src/api/team.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Axios from './axios'
import Store from '@/store'
import { AddTeamGroupMemberParams } from '@/@types/index'
import { StaticConfig } from '@/config/app'
import {
Expand Down

0 comments on commit 8170431

Please sign in to comment.