diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts index cbdb1422..d641ef3c 100644 --- a/src/api/mp/account/index.ts +++ b/src/api/mp/account/index.ts @@ -1,5 +1,10 @@ import request from '@/config/axios' +export interface AccountVO { + id?: number + name: string +} + // 创建公众号账号 export const createAccount = async (data) => { return await request.post({ url: '/mp/account/create', data }) @@ -26,7 +31,7 @@ export const getAccountPage = async (query) => { } // 获取公众号账号精简信息列表 -export const getSimpleAccounts = async () => { +export const getSimpleAccountList = async () => { return request.get({ url: '/mp/account/list-all-simple' }) } diff --git a/src/api/mp/tag/index.ts b/src/api/mp/tag/index.ts index e681e2e1..50183a51 100644 --- a/src/api/mp/tag/index.ts +++ b/src/api/mp/tag/index.ts @@ -1,7 +1,14 @@ import request from '@/config/axios' +export interface TagVO { + id?: number + name: string + accountId: number + createTime: Date +} + // 创建公众号标签 -export const createTag = (data) => { +export const createTag = (data: TagVO) => { return request.post({ url: '/mp/tag/create', data: data @@ -9,7 +16,7 @@ export const createTag = (data) => { } // 更新公众号标签 -export const updateTag = (data) => { +export const updateTag = (data: TagVO) => { return request.put({ url: '/mp/tag/update', data: data @@ -17,21 +24,21 @@ export const updateTag = (data) => { } // 删除公众号标签 -export const deleteTag = (id) => { +export const deleteTag = (id: number) => { return request.delete({ url: '/mp/tag/delete?id=' + id }) } // 获得公众号标签 -export const getTag = (id) => { +export const getTag = (id: number) => { return request.get({ url: '/mp/tag/get?id=' + id }) } // 获得公众号标签分页 -export const getTagPage = (query) => { +export const getTagPage = (query: PageParam) => { return request.get({ url: '/mp/tag/page', params: query @@ -39,14 +46,14 @@ export const getTagPage = (query) => { } // 获取公众号标签精简信息列表 -export const getSimpleTags = () => { +export const getSimpleTagList = () => { return request.get({ url: '/mp/tag/list-all-simple' }) } // 同步公众号标签 -export const syncTag = (accountId) => { +export const syncTag = (accountId: number) => { return request.post({ url: '/mp/tag/sync?accountId=' + accountId }) diff --git a/src/views/mp/tag/form.vue b/src/views/mp/tag/TagForm.vue similarity index 86% rename from src/views/mp/tag/form.vue rename to src/views/mp/tag/TagForm.vue index 331d2c33..db251cdf 100644 --- a/src/views/mp/tag/form.vue +++ b/src/views/mp/tag/TagForm.vue @@ -19,7 +19,6 @@