20 changed files with 248 additions and 29 deletions
@ -0,0 +1,41 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 创建公众号账号
|
||||
export const createAccount = async (data) => { |
||||
return await defHttp.post({ url: '/mp/account/create', data }) |
||||
} |
||||
|
||||
// 更新公众号账号
|
||||
export const updateAccount = async (data) => { |
||||
return defHttp.put({ url: '/mp/account/update', data }) |
||||
} |
||||
|
||||
// 删除公众号账号
|
||||
export const deleteAccount = async (id) => { |
||||
return defHttp.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' }) |
||||
} |
||||
|
||||
// 获得公众号账号
|
||||
export const getAccount = async (id) => { |
||||
return defHttp.get({ url: '/mp/account/get?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号账号分页
|
||||
export const getAccountPage = async (params) => { |
||||
return defHttp.get({ url: '/mp/account/page', params }) |
||||
} |
||||
|
||||
// 获取公众号账号精简信息列表
|
||||
export const getSimpleAccounts = async () => { |
||||
return defHttp.get({ url: '/mp/account/list-all-simple' }) |
||||
} |
||||
|
||||
// 生成公众号二维码
|
||||
export const generateAccountQrCode = async (id) => { |
||||
return defHttp.put({ url: '/mp/account/generate-qr-code?id=' + id }) |
||||
} |
||||
|
||||
// 清空公众号 API 配额
|
||||
export const clearAccountQuota = async (id) => { |
||||
return defHttp.put({ url: '/mp/account/clear-quota?id=' + id }) |
||||
} |
@ -0,0 +1,26 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 创建公众号的自动回复
|
||||
export const createAutoReply = (data) => { |
||||
return defHttp.post({ url: '/mp/auto-reply/create', data }) |
||||
} |
||||
|
||||
// 更新公众号的自动回复
|
||||
export const updateAutoReply = (data) => { |
||||
return defHttp.put({ url: '/mp/auto-reply/update', data }) |
||||
} |
||||
|
||||
// 删除公众号的自动回复
|
||||
export const deleteAutoReply = (id) => { |
||||
return defHttp.delete({ url: '/mp/auto-reply/delete?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号的自动回复
|
||||
export const getAutoReply = (id) => { |
||||
return defHttp.get({ url: '/mp/auto-reply/get?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号的自动回复分页
|
||||
export const getAutoReplyPage = (params) => { |
||||
return defHttp.get({ url: '/mp/auto-reply/page', params }) |
||||
} |
@ -0,0 +1,26 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获得公众号草稿分页
|
||||
export const getDraftPage = (params) => { |
||||
return defHttp.get({ url: '/mp/draft/page', params }) |
||||
} |
||||
|
||||
// 创建公众号草稿
|
||||
export const createDraft = (accountId, articles) => { |
||||
return defHttp.post({ |
||||
url: '/mp/draft/create?accountId=' + accountId, |
||||
data: { |
||||
articles |
||||
} |
||||
}) |
||||
} |
||||
|
||||
// 更新公众号草稿
|
||||
export const updateDraft = (accountId, mediaId, articles) => { |
||||
return defHttp.put({ url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId, data: articles }) |
||||
} |
||||
|
||||
// 删除公众号草稿
|
||||
export const deleteDraft = (accountId, mediaId) => { |
||||
return defHttp.delete({ url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId }) |
||||
} |
@ -0,0 +1,16 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获得公众号素材分页
|
||||
export const getFreePublishPage = (params) => { |
||||
return defHttp.get({ url: '/mp/free-publish/page', params }) |
||||
} |
||||
|
||||
// 删除公众号素材
|
||||
export const deleteFreePublish = (accountId, articleId) => { |
||||
return defHttp.delete({ url: '/mp/free-publish/delete?accountId=' + accountId + '&&articleId=' + articleId }) |
||||
} |
||||
|
||||
// 发布公众号素材
|
||||
export const submitFreePublish = (accountId, mediaId) => { |
||||
return defHttp.post({ url: '/mp/free-publish/submit?accountId=' + accountId + '&&mediaId=' + mediaId }) |
||||
} |
@ -0,0 +1,11 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获得公众号素材分页
|
||||
export const getMaterialPage = (params) => { |
||||
return defHttp.get({ url: '/mp/material/page', params }) |
||||
} |
||||
|
||||
// 删除公众号永久素材
|
||||
export const deletePermanentMaterial = (id) => { |
||||
return defHttp.delete({ url: '/mp/material/delete-permanent?id=' + id }) |
||||
} |
@ -0,0 +1,22 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获得公众号菜单列表
|
||||
export const getMenuList = (accountId) => { |
||||
return defHttp.get({ url: '/mp/menu/list?accountId=' + accountId }) |
||||
} |
||||
|
||||
// 保存公众号菜单
|
||||
export const saveMenu = (accountId, menus) => { |
||||
return defHttp.post({ |
||||
url: '/mp/menu/save', |
||||
data: { |
||||
accountId, |
||||
menus |
||||
} |
||||
}) |
||||
} |
||||
|
||||
// 删除公众号菜单
|
||||
export const deleteMenu = (accountId) => { |
||||
return defHttp.delete({ url: '/mp/menu/delete?accountId=' + accountId }) |
||||
} |
@ -0,0 +1,11 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获得公众号消息分页
|
||||
export const getMessagePage = (params) => { |
||||
return defHttp.get({ url: '/mp/message/page', params }) |
||||
} |
||||
|
||||
// 给粉丝发送消息
|
||||
export const sendMessage = (data) => { |
||||
return defHttp.post({ url: '/mp/message/send', data }) |
||||
} |
@ -0,0 +1,21 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 更新公众号粉丝
|
||||
export const updateUser = (data) => { |
||||
return defHttp.put({ url: '/mp/user/update', data }) |
||||
} |
||||
|
||||
// 获得公众号粉丝
|
||||
export const getUser = (id) => { |
||||
return defHttp.get({ url: '/mp/user/get?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号粉丝分页
|
||||
export const getUserPage = (params) => { |
||||
return defHttp.get({ url: '/mp/user/page', params }) |
||||
} |
||||
|
||||
// 同步公众号粉丝
|
||||
export const syncUser = (accountId) => { |
||||
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId }) |
||||
} |
@ -0,0 +1,21 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 获取消息发送概况数据
|
||||
export const getUpstreamMessage = (params) => { |
||||
return defHttp.get({ url: '/mp/statistics/upstream-message', params }) |
||||
} |
||||
|
||||
// 用户增减数据
|
||||
export const getUserSummary = (params) => { |
||||
return defHttp.get({ url: '/mp/statistics/user-summary', params }) |
||||
} |
||||
|
||||
// 获得用户累计数据
|
||||
export const getUserCumulate = (params) => { |
||||
return defHttp.get({ url: '/mp/statistics/user-cumulate', params }) |
||||
} |
||||
|
||||
// 获得接口分析数据
|
||||
export const getInterfaceSummary = (params) => { |
||||
return defHttp.get({ url: '/mp/statistics/interface-summary', params }) |
||||
} |
@ -0,0 +1,36 @@
|
||||
import { defHttp } from '@/utils/http/axios' |
||||
|
||||
// 创建公众号标签
|
||||
export const createTag = (data) => { |
||||
return defHttp.post({ url: '/mp/tag/create', data }) |
||||
} |
||||
|
||||
// 更新公众号标签
|
||||
export const updateTag = (data) => { |
||||
return defHttp.put({ url: '/mp/tag/update', data }) |
||||
} |
||||
|
||||
// 删除公众号标签
|
||||
export const deleteTag = (id) => { |
||||
return defHttp.delete({ url: '/mp/tag/delete?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号标签
|
||||
export const getTag = (id) => { |
||||
return defHttp.get({ url: '/mp/tag/get?id=' + id }) |
||||
} |
||||
|
||||
// 获得公众号标签分页
|
||||
export const getTagPage = (params) => { |
||||
return defHttp.get({ url: '/mp/tag/page', params }) |
||||
} |
||||
|
||||
// 获取公众号标签精简信息列表
|
||||
export const getSimpleTags = () => { |
||||
return defHttp.get({ url: '/mp/tag/list-all-simple' }) |
||||
} |
||||
|
||||
// 同步公众号标签
|
||||
export const syncTag = (accountId) => { |
||||
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId }) |
||||
} |
Reference in new issue