Initial commit
This commit is contained in:
153
developer-front/src/api/forum/post.js
Normal file
153
developer-front/src/api/forum/post.js
Normal file
@@ -0,0 +1,153 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询帖子列表
|
||||
export function listPosts(query) {
|
||||
return request({
|
||||
url: '/forum/post/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询帖子详细
|
||||
export function getPost(postId) {
|
||||
return request({
|
||||
url: '/forum/post/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增帖子
|
||||
export function addPost(data) {
|
||||
return request({
|
||||
url: '/forum/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改帖子
|
||||
export function updatePost(data) {
|
||||
return request({
|
||||
url: '/forum/post',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除帖子
|
||||
export function delPost(postId) {
|
||||
return request({
|
||||
url: '/forum/post/' + postId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询分类列表
|
||||
export function listCategories() {
|
||||
return request({
|
||||
url: '/forum/category/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 增加浏览量
|
||||
export function incrementViewCount(postId) {
|
||||
return request({
|
||||
url: '/forum/post/view/' + postId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 点赞/取消点赞
|
||||
export function toggleLike(postId) {
|
||||
return request({
|
||||
url: '/forum/post/like/' + postId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 收藏/取消收藏
|
||||
export function toggleFavorite(postId) {
|
||||
return request({
|
||||
url: '/forum/post/favorite/' + postId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 标记为已解决
|
||||
export function markSolved(postId) {
|
||||
return request({
|
||||
url: '/forum/post/solved/' + postId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 置顶/取消置顶
|
||||
export function toggleTop(postId) {
|
||||
return request({
|
||||
url: '/forum/post/top/' + postId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户统计数据
|
||||
export function getUserStats() {
|
||||
return request({
|
||||
url: '/forum/post/user/stats',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 检查用户是否已点赞
|
||||
export function checkLike(postId) {
|
||||
return request({
|
||||
url: '/forum/post/like/check/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 检查用户是否已收藏
|
||||
export function checkFavorite(postId) {
|
||||
return request({
|
||||
url: '/forum/post/favorite/check/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户点赞的帖子列表
|
||||
export function getUserLikedPosts(query) {
|
||||
return request({
|
||||
url: '/forum/post/user/liked',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户收藏的帖子列表
|
||||
export function getUserFavoritedPosts(query) {
|
||||
return request({
|
||||
url: '/forum/post/user/favorited',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户发布的帖子列表
|
||||
export function getUserPosts(query) {
|
||||
return request({
|
||||
url: '/forum/post/user/posts',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户回复的帖子列表
|
||||
export function getUserRepliedPosts(query) {
|
||||
return request({
|
||||
url: '/forum/post/user/replied',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
61
developer-front/src/api/forum/reply.js
Normal file
61
developer-front/src/api/forum/reply.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询回复列表
|
||||
export function listReplies(query) {
|
||||
return request({
|
||||
url: '/forum/reply/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据帖子ID查询回复列表(树形结构)
|
||||
export function listRepliesByPostId(postId) {
|
||||
return request({
|
||||
url: '/forum/reply/list/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询回复详细
|
||||
export function getReply(replyId) {
|
||||
return request({
|
||||
url: '/forum/reply/' + replyId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增回复
|
||||
export function addReply(data) {
|
||||
return request({
|
||||
url: '/forum/reply',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改回复
|
||||
export function updateReply(data) {
|
||||
return request({
|
||||
url: '/forum/reply',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除回复
|
||||
export function delReply(replyId) {
|
||||
return request({
|
||||
url: '/forum/reply/' + replyId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 点赞/取消点赞回复
|
||||
export function toggleLikeReply(replyId) {
|
||||
return request({
|
||||
url: '/forum/reply/like/' + replyId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
9
developer-front/src/api/jysystem/lens.js
Normal file
9
developer-front/src/api/jysystem/lens.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 通用镜片下拉选项
|
||||
export function listLensOptions() {
|
||||
return request({
|
||||
url: '/jysystem/lens/options',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
34
developer-front/src/api/jysystem/message.js
Normal file
34
developer-front/src/api/jysystem/message.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 门户消息列表
|
||||
export function listPortalMessage(query) {
|
||||
return request({
|
||||
url: '/jysystem/message/portal/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 未读消息数
|
||||
export function getPortalUnreadCount() {
|
||||
return request({
|
||||
url: '/jysystem/message/portal/unreadCount',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 标记单条已读
|
||||
export function markPortalMessageRead(id) {
|
||||
return request({
|
||||
url: '/jysystem/message/portal/read/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 全部标记已读
|
||||
export function markPortalMessageAllRead() {
|
||||
return request({
|
||||
url: '/jysystem/message/portal/readAll',
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
154
developer-front/src/api/jysystem/order.js
Normal file
154
developer-front/src/api/jysystem/order.js
Normal file
@@ -0,0 +1,154 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 门户订单列表
|
||||
export function listPortalOrder(query) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 门户订单上下文
|
||||
export function getPortalOrderContext() {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/context',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 门户配片单可选产品(当前租户已配置)
|
||||
export function listPortalProductOptions() {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/productOptions',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 门户订单详情
|
||||
export function getPortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增配片单
|
||||
export function addPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改配片单
|
||||
export function updatePortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除配片单
|
||||
export function delPortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单补充
|
||||
export function supplementPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/supplement',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单接单
|
||||
export function acceptPortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/accept/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单制作中
|
||||
export function producePortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/produce/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单撤单
|
||||
export function withdrawPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/withdraw',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 门户订单物流信息
|
||||
export function getPortalOrderLogistics(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/logistics/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单发货
|
||||
export function shipPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/ship',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单完成
|
||||
export function completePortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/complete/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 配片单换货申请
|
||||
export function exchangeApplyPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/exchangeApply',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 配片单接收(拒绝换货申请后确认完成)
|
||||
export function receivePortalOrder(id) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/receive/' + id,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 配片单重新提交
|
||||
export function resubmitPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/resubmit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 制片单驳回
|
||||
export function rejectPortalOrder(data) {
|
||||
return request({
|
||||
url: '/jysystem/order/portal/reject',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
10
developer-front/src/api/jysystem/product.js
Normal file
10
developer-front/src/api/jysystem/product.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询产品下拉选项
|
||||
export function listProductOptions(tenantId) {
|
||||
return request({
|
||||
url: '/jysystem/product/options',
|
||||
method: 'get',
|
||||
params: { tenantId }
|
||||
})
|
||||
}
|
||||
17
developer-front/src/api/jysystem/tenant.js
Normal file
17
developer-front/src/api/jysystem/tenant.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取当前登录用户关联租户
|
||||
export function getCurrentTenant() {
|
||||
return request({
|
||||
url: '/jysystem/tenant/current',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询镜片厂租户列表
|
||||
export function listLensFactoryTenant() {
|
||||
return request({
|
||||
url: '/jysystem/tenant/lensFactoryList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
154
developer-front/src/api/login.js
Normal file
154
developer-front/src/api/login.js
Normal file
@@ -0,0 +1,154 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid, directLogin) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
code,
|
||||
uuid,
|
||||
directLogin
|
||||
}
|
||||
return request({
|
||||
url: '/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/register',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 验证码注册方法(手机号或邮箱)
|
||||
export function registerByCode(data) {
|
||||
return request({
|
||||
url: '/register/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/getInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: '/captchaImage',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'get',
|
||||
timeout: 20000
|
||||
})
|
||||
}
|
||||
|
||||
// 发送短信验证码
|
||||
export function sendSmsCode(mobile) {
|
||||
return request({
|
||||
url: '/sms/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: { mobile }
|
||||
})
|
||||
}
|
||||
|
||||
// 发送邮箱验证码
|
||||
export function sendEmailCode(email) {
|
||||
return request({
|
||||
url: '/email/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: { email }
|
||||
})
|
||||
}
|
||||
|
||||
// 验证码登录(邮箱)
|
||||
export function emailLogin(email, emailCode, uuid, directLogin) {
|
||||
return request({
|
||||
url: '/email/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: { email, emailCode, uuid, directLogin }
|
||||
})
|
||||
}
|
||||
|
||||
// 验证码登录(手机号)
|
||||
export function smsLogin(mobile, smsCode, uuid, directLogin) {
|
||||
return request({
|
||||
url: '/sms/login',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: { mobile, smsCode, uuid, directLogin }
|
||||
})
|
||||
}
|
||||
|
||||
/** 短信验证码校验(手机号有效性校验) */
|
||||
export function checkSMSCode(mobile, smsCode, uuid) {
|
||||
return request({
|
||||
url: '/checkSMSCode',
|
||||
method: 'post',
|
||||
data: { mobile, code: smsCode, uuid }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据账号重置密码
|
||||
export function resetPasswordByAccount(data) {
|
||||
return request({
|
||||
url: '/resetPassword/account',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据验证码重置密码
|
||||
export function resetPasswordByCode(data) {
|
||||
return request({
|
||||
url: '/resetPassword/code',
|
||||
headers: {
|
||||
isToken: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
9
developer-front/src/api/menu.js
Normal file
9
developer-front/src/api/menu.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取路由
|
||||
export const getRouters = () => {
|
||||
return request({
|
||||
url: '/getRouters',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
57
developer-front/src/api/monitor/cache.js
Normal file
57
developer-front/src/api/monitor/cache.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询缓存详细
|
||||
export function getCache() {
|
||||
return request({
|
||||
url: '/monitor/cache',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存名称列表
|
||||
export function listCacheName() {
|
||||
return request({
|
||||
url: '/monitor/cache/getNames',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存键名列表
|
||||
export function listCacheKey(cacheName) {
|
||||
return request({
|
||||
url: '/monitor/cache/getKeys/' + cacheName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询缓存内容
|
||||
export function getCacheValue(cacheName, cacheKey) {
|
||||
return request({
|
||||
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理指定名称缓存
|
||||
export function clearCacheName(cacheName) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheName/' + cacheName,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理指定键名缓存
|
||||
export function clearCacheKey(cacheKey) {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheKey/' + cacheKey,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清理全部缓存
|
||||
export function clearCacheAll() {
|
||||
return request({
|
||||
url: '/monitor/cache/clearCacheAll',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
71
developer-front/src/api/monitor/job.js
Normal file
71
developer-front/src/api/monitor/job.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询定时任务调度列表
|
||||
export function listJob(query) {
|
||||
return request({
|
||||
url: '/monitor/job/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询定时任务调度详细
|
||||
export function getJob(jobId) {
|
||||
return request({
|
||||
url: '/monitor/job/' + jobId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增定时任务调度
|
||||
export function addJob(data) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改定时任务调度
|
||||
export function updateJob(data) {
|
||||
return request({
|
||||
url: '/monitor/job',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除定时任务调度
|
||||
export function delJob(jobId) {
|
||||
return request({
|
||||
url: '/monitor/job/' + jobId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export function changeJobStatus(jobId, status) {
|
||||
const data = {
|
||||
jobId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/monitor/job/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 定时任务立即执行一次
|
||||
export function runJob(jobId, jobGroup) {
|
||||
const data = {
|
||||
jobId,
|
||||
jobGroup
|
||||
}
|
||||
return request({
|
||||
url: '/monitor/job/run',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
26
developer-front/src/api/monitor/jobLog.js
Normal file
26
developer-front/src/api/monitor/jobLog.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询调度日志列表
|
||||
export function listJobLog(query) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除调度日志
|
||||
export function delJobLog(jobLogId) {
|
||||
return request({
|
||||
url: '/monitor/jobLog/' + jobLogId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空调度日志
|
||||
export function cleanJobLog() {
|
||||
return request({
|
||||
url: '/monitor/jobLog/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
34
developer-front/src/api/monitor/logininfor.js
Normal file
34
developer-front/src/api/monitor/logininfor.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询登录日志列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除登录日志
|
||||
export function delLogininfor(infoId) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/' + infoId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 解锁用户登录状态
|
||||
export function unlockLogininfor(userName) {
|
||||
return request({
|
||||
url: '/monitor/logininfor/unlock/' + userName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空登录日志
|
||||
export function cleanLogininfor() {
|
||||
return request({
|
||||
url: '/monitor/logininfor/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
18
developer-front/src/api/monitor/online.js
Normal file
18
developer-front/src/api/monitor/online.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询在线用户列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/online/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 强退用户
|
||||
export function forceLogout(tokenId) {
|
||||
return request({
|
||||
url: '/monitor/online/' + tokenId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
26
developer-front/src/api/monitor/operlog.js
Normal file
26
developer-front/src/api/monitor/operlog.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询操作日志列表
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/monitor/operlog/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除操作日志
|
||||
export function delOperlog(operId) {
|
||||
return request({
|
||||
url: '/monitor/operlog/' + operId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 清空操作日志
|
||||
export function cleanOperlog() {
|
||||
return request({
|
||||
url: '/monitor/operlog/clean',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
9
developer-front/src/api/monitor/server.js
Normal file
9
developer-front/src/api/monitor/server.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取服务信息
|
||||
export function getServer() {
|
||||
return request({
|
||||
url: '/monitor/server',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
88
developer-front/src/api/news.js
Normal file
88
developer-front/src/api/news.js
Normal file
@@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询新闻动态列表(公开接口)
|
||||
export function listNews(query) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
headers: {
|
||||
isToken: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻动态详细(公开接口)
|
||||
export function getNews(newsId) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/' + newsId,
|
||||
method: 'get',
|
||||
headers: {
|
||||
isToken: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 增加阅读量(公开接口)
|
||||
export function incrementViewCount(newsId) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/' + newsId + '/view',
|
||||
method: 'post',
|
||||
headers: {
|
||||
isToken: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻动态列表(管理接口)
|
||||
export function adminListNews(query) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/admin/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻动态详细(管理接口)
|
||||
export function adminGetNews(newsId) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/admin/' + newsId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增新闻动态
|
||||
export function addNews(data) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新闻动态
|
||||
export function updateNews(data) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新闻动态
|
||||
export function delNews(newsIds) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/' + newsIds,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出新闻动态
|
||||
export function exportNews(query) {
|
||||
return request({
|
||||
url: '/api/v1/jysystem/news/export',
|
||||
method: 'post',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
18
developer-front/src/api/shop/area.js
Normal file
18
developer-front/src/api/shop/area.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询地区列表(店铺前台用 /shop/api/area/list,无需 admin 权限)
|
||||
export function listArea(query) {
|
||||
return request({
|
||||
url: '/shop/api/area/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地区树形结构
|
||||
export function treeArea() {
|
||||
return request({
|
||||
url: '/shop/area/tree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
10
developer-front/src/api/shop/category.js
Normal file
10
developer-front/src/api/shop/category.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取分类信息列表
|
||||
export function getCategoryInfo(parentId = 0) {
|
||||
return request({
|
||||
url: '/shop/api/category/categoryInfo',
|
||||
method: 'get',
|
||||
params: { parentId }
|
||||
})
|
||||
}
|
||||
171
developer-front/src/api/shop/order.js
Normal file
171
developer-front/src/api/shop/order.js
Normal file
@@ -0,0 +1,171 @@
|
||||
import request from '@/utils/request'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
// 查询我的订单列表
|
||||
export function listMyOrder(query) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询当前用户某个订单的最新物流记录(从 shop_order_log 表获取)
|
||||
export function getOrderLogisticsInfo(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/logisticsInfo',
|
||||
method: 'get',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 查询订单详情
|
||||
export function getOrder(orderId) {
|
||||
return request({
|
||||
url: '/shop/order/' + orderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 取消订单(由调用方传入取消后的状态码)
|
||||
export function cancelOrder(orderNumber, cancelStatus) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/cancel',
|
||||
method: 'put',
|
||||
params: { orderNumber, cancelStatus }
|
||||
})
|
||||
}
|
||||
|
||||
// 确认收货(待收货订单更新为状态3-完成)
|
||||
export function confirmReceive(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/receipt',
|
||||
method: 'put',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 用户发起仅退款:待发货(2) -> 仅退款(60)
|
||||
export function applyRefundRequest(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/refundApply',
|
||||
method: 'put',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 用户申请退货退款:已收货(31) -> 退款退货(61)
|
||||
export function applyReturnRefundRequest(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/returnRefundApply',
|
||||
method: 'put',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 用户录入退货物流:同意退货(62) -> 退货中(63)
|
||||
export function submitReturnLogistics(data) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/returnLogistics',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 退货在途物流信息(状态 63 日志)
|
||||
export function getReturnLogisticsInfo(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/returnLogisticsInfo',
|
||||
method: 'get',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 删除订单
|
||||
export function deleteOrder(orderId) {
|
||||
return request({
|
||||
url: '/shop/order/' + orderId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 确认订单(会因地址加载等被多次调用,关闭防重复提交校验)
|
||||
export function confirmOrder(params) {
|
||||
return request({
|
||||
url: '/shop/api/order/confirm',
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: { repeatSubmit: false }
|
||||
})
|
||||
}
|
||||
|
||||
// 获取邀请码功能是否开启
|
||||
export function getInviteCodeConfig() {
|
||||
return request({
|
||||
url: '/shop/api/inviteCode/config',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 校验邀请码是否可用于下单(0-初始可用,1-已下单未支付,2-已支付,-1-不存在)
|
||||
export function validateInviteCode(code) {
|
||||
return request({
|
||||
url: '/shop/api/inviteCode/validate',
|
||||
method: 'get',
|
||||
params: { code }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据运费模板和地址计算运费(用于提交订单页展示/刷新运费)
|
||||
export function getTransfee(params) {
|
||||
return request({
|
||||
url: '/shop/api/order/transfee',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 提交订单(addrId/addId 用字符串传,避免大数后两位被截断)
|
||||
export function submitOrder(params) {
|
||||
const { addrId, addId, ...rest } = params || {}
|
||||
const idStr = addrId != null && addrId !== '' ? String(addrId) : (addId != null && addId !== '' ? String(addId) : null)
|
||||
const config = {
|
||||
url: '/shop/api/order/submit',
|
||||
method: 'post',
|
||||
data: params
|
||||
}
|
||||
if (idStr != null && idStr !== '' && Number(idStr) > 0) {
|
||||
const q = config.url.indexOf('?') >= 0 ? '&' : '?'
|
||||
config.url = config.url + q + 'addrId=' + encodeURIComponent(idStr) + '&addId=' + encodeURIComponent(idStr)
|
||||
}
|
||||
return request(config)
|
||||
}
|
||||
|
||||
// 查询订单详情
|
||||
export function getOrderDetail(orderNumber) {
|
||||
return request({
|
||||
url: '/shop/api/myOrder/orderDetail',
|
||||
method: 'get',
|
||||
params: { orderNumber }
|
||||
})
|
||||
}
|
||||
|
||||
// 支付订单
|
||||
export function payOrder(params) {
|
||||
return request({
|
||||
url: '/shop/api/pay/pay',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 分销提成:被推荐用户的商城订单列表(分页,含提成比例、提成金额)
|
||||
export function listDistributionCommissionOrders(params) {
|
||||
const token = getToken()
|
||||
return request({
|
||||
url: '/shop/api/distribution/orders',
|
||||
method: 'get',
|
||||
params: params,
|
||||
headers: token ? { Authorization: 'Bearer ' + token } : {}
|
||||
})
|
||||
}
|
||||
24
developer-front/src/api/shop/pay.js
Normal file
24
developer-front/src/api/shop/pay.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 微信支付 Native 预下单,获取用于生成二维码的 code_url
|
||||
* @param {Object} params
|
||||
* @param {string} params.outTradeNo 商户订单号(与订单 order_number 一致)
|
||||
* @param {string} params.description 商品描述
|
||||
* @param {number} params.totalFen 金额(分)
|
||||
* @param {string} [params.bizType] 业务类型,默认 ORDER
|
||||
* @param {string} [params.bizId] 业务主键
|
||||
*/
|
||||
export function wechatNativePrepay(params) {
|
||||
return request({
|
||||
url: '/pay/api/wechat/native/prepay',
|
||||
method: 'post',
|
||||
params: {
|
||||
outTradeNo: params.outTradeNo,
|
||||
description: params.description,
|
||||
totalFen: params.totalFen,
|
||||
bizType: params.bizType || 'ORDER',
|
||||
bizId: params.bizId || params.outTradeNo
|
||||
}
|
||||
})
|
||||
}
|
||||
30
developer-front/src/api/shop/product.js
Normal file
30
developer-front/src/api/shop/product.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 通过分类ID分页获取商品列表
|
||||
export function pageProd(categoryId, query) {
|
||||
return request({
|
||||
url: '/shop/api/prod/pageProd',
|
||||
method: 'get',
|
||||
params: {
|
||||
categoryId,
|
||||
...query
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品详情信息
|
||||
export function getProdInfo(prodId) {
|
||||
return request({
|
||||
url: `/shop/api/prod/product/info/${prodId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品SKU列表
|
||||
export function getSkuList(prodId) {
|
||||
return request({
|
||||
url: '/shop/api/sku/getSkuList',
|
||||
method: 'get',
|
||||
params: { prodId }
|
||||
})
|
||||
}
|
||||
51
developer-front/src/api/shop/userAddr.js
Normal file
51
developer-front/src/api/shop/userAddr.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询用户地址列表
|
||||
export function listUserAddr() {
|
||||
return request({
|
||||
url: '/shop/api/address/list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户地址详细
|
||||
export function getUserAddr(addrId) {
|
||||
return request({
|
||||
url: '/shop/api/address/addrInfo/' + addrId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户地址
|
||||
export function addUserAddr(data) {
|
||||
return request({
|
||||
url: '/shop/api/address/addAddr',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户地址
|
||||
export function updateUserAddr(data) {
|
||||
return request({
|
||||
url: '/shop/api/address/updateAddr',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户地址
|
||||
export function delUserAddr(addrId) {
|
||||
return request({
|
||||
url: '/shop/api/address/deleteAddr/' + addrId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 设置默认地址
|
||||
export function setDefaultAddr(addrId) {
|
||||
return request({
|
||||
url: '/shop/api/address/defaultAddr/' + addrId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
60
developer-front/src/api/system/config.js
Normal file
60
developer-front/src/api/system/config.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query) {
|
||||
return request({
|
||||
url: '/system/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询参数详细
|
||||
export function getConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据参数键名查询参数值
|
||||
export function getConfigKey(configKey) {
|
||||
return request({
|
||||
url: '/system/config/configKey/' + configKey,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增参数配置
|
||||
export function addConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改参数配置
|
||||
export function updateConfig(data) {
|
||||
return request({
|
||||
url: '/system/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除参数配置
|
||||
export function delConfig(configId) {
|
||||
return request({
|
||||
url: '/system/config/' + configId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新参数缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/config/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
52
developer-front/src/api/system/dept.js
Normal file
52
developer-front/src/api/system/dept.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询部门列表
|
||||
export function listDept(query) {
|
||||
return request({
|
||||
url: '/system/dept/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表(排除节点)
|
||||
export function listDeptExcludeChild(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/list/exclude/' + deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门详细
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export function addDept(data) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export function updateDept(data) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export function delDept(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/' + deptId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
52
developer-front/src/api/system/dict/data.js
Normal file
52
developer-front/src/api/system/dict/data.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
60
developer-front/src/api/system/dict/type.js
Normal file
60
developer-front/src/api/system/dict/type.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) {
|
||||
return request({
|
||||
url: '/system/dict/type/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典类型
|
||||
export function addType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新字典缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/dict/type/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect() {
|
||||
return request({
|
||||
url: '/system/dict/type/optionselect',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
60
developer-front/src/api/system/menu.js
Normal file
60
developer-front/src/api/system/menu.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询菜单列表
|
||||
export function listMenu(query) {
|
||||
return request({
|
||||
url: '/system/menu/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单详细
|
||||
export function getMenu(menuId) {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单下拉树结构
|
||||
export function treeselect() {
|
||||
return request({
|
||||
url: '/system/menu/treeselect',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据角色ID查询菜单下拉树结构
|
||||
export function roleMenuTreeselect(roleId) {
|
||||
return request({
|
||||
url: '/system/menu/roleMenuTreeselect/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增菜单
|
||||
export function addMenu(data) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改菜单
|
||||
export function updateMenu(data) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
export function delMenu(menuId) {
|
||||
return request({
|
||||
url: '/system/menu/' + menuId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
developer-front/src/api/system/notice.js
Normal file
44
developer-front/src/api/system/notice.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询公告列表
|
||||
export function listNotice(query) {
|
||||
return request({
|
||||
url: '/system/notice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询公告详细
|
||||
export function getNotice(noticeId) {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export function addNotice(data) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export function updateNotice(data) {
|
||||
return request({
|
||||
url: '/system/notice',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export function delNotice(noticeId) {
|
||||
return request({
|
||||
url: '/system/notice/' + noticeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
developer-front/src/api/system/post.js
Normal file
44
developer-front/src/api/system/post.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query) {
|
||||
return request({
|
||||
url: '/system/post/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询岗位详细
|
||||
export function getPost(postId) {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export function addPost(data) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export function updatePost(data) {
|
||||
return request({
|
||||
url: '/system/post',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export function delPost(postId) {
|
||||
return request({
|
||||
url: '/system/post/' + postId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
119
developer-front/src/api/system/role.js
Normal file
119
developer-front/src/api/system/role.js
Normal file
@@ -0,0 +1,119 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询角色列表
|
||||
export function listRole(query) {
|
||||
return request({
|
||||
url: '/system/role/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色详细
|
||||
export function getRole(roleId) {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export function addRole(data) {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改角色
|
||||
export function updateRole(data) {
|
||||
return request({
|
||||
url: '/system/role',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色数据权限
|
||||
export function dataScope(data) {
|
||||
return request({
|
||||
url: '/system/role/dataScope',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色状态修改
|
||||
export function changeRoleStatus(roleId, status) {
|
||||
const data = {
|
||||
roleId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/system/role/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export function delRole(roleId) {
|
||||
return request({
|
||||
url: '/system/role/' + roleId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色已授权用户列表
|
||||
export function allocatedUserList(query) {
|
||||
return request({
|
||||
url: '/system/role/authUser/allocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询角色未授权用户列表
|
||||
export function unallocatedUserList(query) {
|
||||
return request({
|
||||
url: '/system/role/authUser/unallocatedList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 取消用户授权角色
|
||||
export function authUserCancel(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量取消用户授权角色
|
||||
export function authUserCancelAll(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/cancelAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 授权用户选择
|
||||
export function authUserSelectAll(data) {
|
||||
return request({
|
||||
url: '/system/role/authUser/selectAll',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据角色ID查询部门树结构
|
||||
export function deptTreeSelect(roleId) {
|
||||
return request({
|
||||
url: '/system/role/deptTree/' + roleId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
53
developer-front/src/api/system/student.js
Normal file
53
developer-front/src/api/system/student.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询学生信息列表
|
||||
export function listStudent(query) {
|
||||
return request({
|
||||
url: '/system/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询学生信息详细
|
||||
export function getStudent(studentId) {
|
||||
return request({
|
||||
url: '/system/student/' + studentId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增学生信息
|
||||
export function addStudent(data) {
|
||||
return request({
|
||||
url: '/system/student',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改学生信息
|
||||
export function updateStudent(data) {
|
||||
return request({
|
||||
url: '/system/student',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除学生信息
|
||||
export function delStudent(studentId) {
|
||||
return request({
|
||||
url: '/system/student/' + studentId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出学生信息
|
||||
export function exportStudent(query) {
|
||||
return request({
|
||||
url: '/system/student/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
136
developer-front/src/api/system/user.js
Normal file
136
developer-front/src/api/system/user.js
Normal file
@@ -0,0 +1,136 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/ruoyi";
|
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + parseStrEmpty(userId),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export function addUser(data) {
|
||||
return request({
|
||||
url: '/system/user',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) {
|
||||
return request({
|
||||
url: '/system/user',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/resetPwd',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) {
|
||||
const data = {
|
||||
userId,
|
||||
status
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return request({
|
||||
url: '/system/user/profile/avatar',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId) {
|
||||
return request({
|
||||
url: '/system/user/authRole/' + userId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data) {
|
||||
return request({
|
||||
url: '/system/user/authRole',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门下拉树结构
|
||||
export function deptTreeSelect() {
|
||||
return request({
|
||||
url: '/system/user/deptTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
85
developer-front/src/api/tool/gen.js
Normal file
85
developer-front/src/api/tool/gen.js
Normal file
@@ -0,0 +1,85 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询生成表数据
|
||||
export function listTable(query) {
|
||||
return request({
|
||||
url: '/tool/gen/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询db数据库列表
|
||||
export function listDbTable(query) {
|
||||
return request({
|
||||
url: '/tool/gen/db/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询表详细信息
|
||||
export function getGenTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改代码生成信息
|
||||
export function updateGenTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导入表
|
||||
export function importTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建表
|
||||
export function createTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen/createTable',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export function previewTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/preview/' + tableId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除表数据
|
||||
export function delTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成代码(自定义路径)
|
||||
export function genCode(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/genCode/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 同步数据库
|
||||
export function synchDb(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/synchDb/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
18
developer-front/src/api/user/realNameAuth.js
Normal file
18
developer-front/src/api/user/realNameAuth.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/** 获取当前用户的实名认证记录 */
|
||||
export function getMyAuth() {
|
||||
return request({
|
||||
url: '/system/realNameAuth/my',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/** 提交实名认证 */
|
||||
export function submitAuth(data) {
|
||||
return request({
|
||||
url: '/system/realNameAuth/submit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user