mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
type: 定义全局返回值类型
This commit is contained in:
@@ -24,10 +24,10 @@ export const useDataListInit = () => {
|
||||
// 数据请求
|
||||
const fetchList = async () => {
|
||||
loading.value = true
|
||||
const res: any = await projectListApi({
|
||||
const res = await projectListApi({
|
||||
page: paginat.page,
|
||||
limit: paginat.limit
|
||||
})
|
||||
}) as unknown as MyResponseType
|
||||
if (res.data) {
|
||||
const { count } = res
|
||||
paginat.count = count
|
||||
@@ -86,11 +86,11 @@ export const useDataListInit = () => {
|
||||
// 发布处理
|
||||
const releaseHandle = async (cardData: Chartype, index: number) => {
|
||||
const { id, release } = cardData
|
||||
const res: any = await changeProjectReleaseApi({
|
||||
const res = await changeProjectReleaseApi({
|
||||
id: id,
|
||||
// [-1未发布, 1发布]
|
||||
state: !release ? 1 : -1
|
||||
})
|
||||
}) as unknown as MyResponseType
|
||||
if (res.code === ResultEnum.SUCCESS) {
|
||||
list.value = []
|
||||
fetchList()
|
||||
|
||||
Reference in New Issue
Block a user