feat: add mp vue3

This commit is contained in:
xingyuv 2023-02-09 10:43:29 +08:00
parent fe5f1c74a4
commit 447313cb05
19 changed files with 341 additions and 0 deletions

View File

@ -0,0 +1,41 @@
import request from '@/config/axios'
// 创建公众号账号
export const createAccount = async (data) => {
return await request.post({ url: '/mp/account/create', data })
}
// 更新公众号账号
export const updateAccount = async (data) => {
return request.put({ url: '/mp/account/update', data: data })
}
// 删除公众号账号
export const deleteAccount = async (id) => {
return request.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' })
}
// 获得公众号账号
export const getAccount = async (id) => {
return request.get({ url: '/mp/account/get?id=' + id })
}
// 获得公众号账号分页
export const getAccountPage = async (query) => {
return request.get({ url: '/mp/account/page', params: query })
}
// 获取公众号账号精简信息列表
export const getSimpleAccounts = async () => {
return request.get({ url: '/mp/account/list-all-simple' })
}
// 生成公众号二维码
export const generateAccountQrCode = async (id) => {
return request.put({ url: '/mp/account/generate-qr-code?id=' + id })
}
// 清空公众号 API 配额
export const clearAccountQuota = async (id) => {
return request.put({ url: '/mp/account/clear-quota?id=' + id })
}

View File

@ -0,0 +1,39 @@
import request from '@/config/axios'
// 创建公众号的自动回复
export function createAutoReply(data) {
return request.post({
url: '/mp/auto-reply/create',
data: data
})
}
// 更新公众号的自动回复
export function updateAutoReply(data) {
return request.put({
url: '/mp/auto-reply/update',
data: data
})
}
// 删除公众号的自动回复
export function deleteAutoReply(id) {
return request.delete({
url: '/mp/auto-reply/delete?id=' + id
})
}
// 获得公众号的自动回复
export function getAutoReply(id) {
return request.get({
url: '/mp/auto-reply/get?id=' + id
})
}
// 获得公众号的自动回复分页
export function getAutoReplyPage(query) {
return request.get({
url: '/mp/auto-reply/page',
params: query
})
}

View File

@ -0,0 +1,35 @@
import request from '@/config/axios'
// 获得公众号草稿分页
export function getDraftPage(query) {
return request.get({
url: '/mp/draft/page',
params: query
})
}
// 创建公众号草稿
export function createDraft(accountId, articles) {
return request.post({
url: '/mp/draft/create?accountId=' + accountId,
data: {
articles
}
})
}
// 更新公众号草稿
export function updateDraft(accountId, mediaId, articles) {
return request.put({
url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId,
method: 'put',
data: articles
})
}
// 删除公众号草稿
export function deleteDraft(accountId, mediaId) {
return request.delete({
url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId
})
}

View File

@ -0,0 +1,23 @@
import request from '@/config/axios'
// 获得公众号素材分页
export function getFreePublishPage(query) {
return request.get({
url: '/mp/free-publish/page',
params: query
})
}
// 删除公众号素材
export function deleteFreePublish(accountId, articleId) {
return request.delete({
url: '/mp/free-publish/delete?accountId=' + accountId + '&articleId=' + articleId
})
}
// 发布公众号素材
export function submitFreePublish(accountId, mediaId) {
return request.post({
url: '/mp/free-publish/submit?accountId=' + accountId + '&mediaId=' + mediaId
})
}

View File

@ -0,0 +1,16 @@
import request from '@/config/axios'
// 获得公众号素材分页
export function getMaterialPage(query) {
return request.get({
url: '/mp/material/page',
params: query
})
}
// 删除公众号永久素材
export function deletePermanentMaterial(id) {
return request.delete({
url: '/mp/material/delete-permanent?id=' + id
})
}

View File

@ -0,0 +1,26 @@
import request from '@/config/axios'
// 获得公众号菜单列表
export function getMenuList(accountId) {
return request.get({
url: '/mp/menu/list?accountId=' + accountId
})
}
// 保存公众号菜单
export function saveMenu(accountId, menus) {
return request.post({
url: '/mp/menu/save',
data: {
accountId,
menus
}
})
}
// 删除公众号菜单
export function deleteMenu(accountId) {
return request.delete({
url: '/mp/menu/delete?accountId=' + accountId
})
}

View File

@ -0,0 +1,17 @@
import request from '@/config/axios'
// 获得公众号消息分页
export function getMessagePage(query) {
return request.get({
url: '/mp/message/page',
params: query
})
}
// 给粉丝发送消息
export function sendMessage(data) {
return request.post({
url: '/mp/message/send',
data: data
})
}

View File

@ -0,0 +1,31 @@
import request from '@/config/axios'
// 更新公众号粉丝
export function updateUser(data) {
return request.put({
url: '/mp/user/update',
data: data
})
}
// 获得公众号粉丝
export function getUser(id) {
return request.get({
url: '/mp/user/get?id=' + id
})
}
// 获得公众号粉丝分页
export function getUserPage(query) {
return request.get({
url: '/mp/user/page',
params: query
})
}
// 同步公众号粉丝
export function syncUser(accountId) {
return request.post({
url: '/mp/tag/sync?accountId=' + accountId
})
}

View File

@ -0,0 +1,33 @@
import request from '@/config/axios'
// 获取消息发送概况数据
export function getUpstreamMessage(query) {
return request.get({
url: '/mp/statistics/upstream-message',
params: query
})
}
// 用户增减数据
export function getUserSummary(query) {
return request.get({
url: '/mp/statistics/user-summary',
params: query
})
}
// 获得用户累计数据
export function getUserCumulate(query) {
return request.get({
url: '/mp/statistics/user-cumulate',
params: query
})
}
// 获得接口分析数据
export function getInterfaceSummary(query) {
return request.get({
url: '/mp/statistics/interface-summary',
params: query
})
}

View File

@ -0,0 +1,53 @@
import request from '@/config/axios'
// 创建公众号标签
export function createTag(data) {
return request.post({
url: '/mp/tag/create',
data: data
})
}
// 更新公众号标签
export function updateTag(data) {
return request.put({
url: '/mp/tag/update',
data: data
})
}
// 删除公众号标签
export function deleteTag(id) {
return request.delete({
url: '/mp/tag/delete?id=' + id
})
}
// 获得公众号标签
export function getTag(id) {
return request.get({
url: '/mp/tag/get?id=' + id
})
}
// 获得公众号标签分页
export function getTagPage(query) {
return request.get({
url: '/mp/tag/page',
params: query
})
}
// 获取公众号标签精简信息列表
export function getSimpleTags() {
return request.get({
url: '/mp/tag/list-all-simple'
})
}
// 同步公众号标签
export function syncTag(accountId) {
return request.post({
url: '/mp/tag/sync?accountId=' + accountId
})
}

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>

View File

@ -0,0 +1,3 @@
<template>
<span>开发中</span>
</template>