fix api
parent
5a93b48c90
commit
deb3028101
@ -1,8 +0,0 @@
|
|||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
export const getActivityList = async (params) => {
|
|
||||||
return await request.get({
|
|
||||||
url: '/bpm/activity/list',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
|
||||||
|
export const updateBpmSimpleModel = async (data) => {
|
||||||
|
return await request.post({
|
||||||
|
url: '/bpm/model/simple/update',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getBpmSimpleModel = async (id) => {
|
||||||
|
return await request.get({
|
||||||
|
url: '/bpm/model/simple/get?id=' + id
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得商品浏览记录分页
|
||||||
|
*
|
||||||
|
* @param params 请求参数
|
||||||
|
*/
|
||||||
|
export const getBrowseHistoryPage = (params: any) => {
|
||||||
|
return request.get({ url: '/product/browse-history/page', params })
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export interface KeFuConversationRespVO {
|
||||||
|
id: number // 编号
|
||||||
|
userId: number // 会话所属用户
|
||||||
|
userAvatar: string // 会话所属用户头像
|
||||||
|
userNickname: string // 会话所属用户昵称
|
||||||
|
lastMessageTime: Date // 最后聊天时间
|
||||||
|
lastMessageContent: string // 最后聊天内容
|
||||||
|
lastMessageContentType: number // 最后发送的消息类型
|
||||||
|
adminPinned: boolean // 管理端置顶
|
||||||
|
userDeleted: boolean // 用户是否可见
|
||||||
|
adminDeleted: boolean // 管理员是否可见
|
||||||
|
adminUnreadMessageCount: number // 管理员未读消息数
|
||||||
|
createTime?: string // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客服会话 API
|
||||||
|
export const KeFuConversationApi = {
|
||||||
|
// 获得客服会话列表
|
||||||
|
getConversationList: async () => {
|
||||||
|
return await request.get({ url: '/promotion/kefu-conversation/list' })
|
||||||
|
},
|
||||||
|
// 获得客服会话
|
||||||
|
getConversation: async (id: number) => {
|
||||||
|
return await request.get({ url: `/promotion/kefu-conversation/get?id=` + id })
|
||||||
|
},
|
||||||
|
// 客服会话置顶
|
||||||
|
updateConversationPinned: async (data: any) => {
|
||||||
|
return await request.put({
|
||||||
|
url: '/promotion/kefu-conversation/update-conversation-pinned',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除客服会话
|
||||||
|
deleteConversation: async (id: number) => {
|
||||||
|
return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}` })
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export interface KeFuMessageRespVO {
|
||||||
|
id: number // 编号
|
||||||
|
conversationId: number // 会话编号
|
||||||
|
senderId: number // 发送人编号
|
||||||
|
senderAvatar: string // 发送人头像
|
||||||
|
senderType: number // 发送人类型
|
||||||
|
receiverId: number // 接收人编号
|
||||||
|
receiverType: number // 接收人类型
|
||||||
|
contentType: number // 消息类型
|
||||||
|
content: string // 消息
|
||||||
|
readStatus: boolean // 是否已读
|
||||||
|
createTime: Date // 创建时间
|
||||||
|
}
|
||||||
|
|
||||||
|
// 客服会话 API
|
||||||
|
export const KeFuMessageApi = {
|
||||||
|
// 发送客服消息
|
||||||
|
sendKeFuMessage: async (data: any) => {
|
||||||
|
return await request.post({
|
||||||
|
url: '/promotion/kefu-message/send',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 更新客服消息已读状态
|
||||||
|
updateKeFuMessageReadStatus: async (conversationId: number) => {
|
||||||
|
return await request.put({
|
||||||
|
url: '/promotion/kefu-message/update-read-status?conversationId=' + conversationId
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获得消息列表(流式加载)
|
||||||
|
getKeFuMessageList: async (params: any) => {
|
||||||
|
return await request.get({ url: '/promotion/kefu-message/list', params })
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO
|
||||||
|
|
||||||
|
// 积分商城活动 VO
|
||||||
|
export interface PointActivityVO {
|
||||||
|
id: number // 积分商城活动编号
|
||||||
|
spuId: number // 积分商城活动商品
|
||||||
|
status: number // 活动状态
|
||||||
|
stock: number // 积分商城活动库存
|
||||||
|
totalStock: number // 积分商城活动总库存
|
||||||
|
remark?: string // 备注
|
||||||
|
sort: number // 排序
|
||||||
|
createTime: string // 创建时间
|
||||||
|
products: PointProductVO[] // 积分商城商品
|
||||||
|
|
||||||
|
// ========== 商品字段 ==========
|
||||||
|
spuName: string // 商品名称
|
||||||
|
picUrl: string // 商品主图
|
||||||
|
marketPrice: number // 商品市场价,单位:分
|
||||||
|
|
||||||
|
//======================= 显示所需兑换积分最少的 sku 信息 =======================
|
||||||
|
point: number // 兑换积分
|
||||||
|
price: number // 兑换金额,单位:分
|
||||||
|
}
|
||||||
|
|
||||||
|
// 秒杀活动所需属性
|
||||||
|
export interface PointProductVO {
|
||||||
|
id?: number // 积分商城商品编号
|
||||||
|
activityId?: number // 积分商城活动 id
|
||||||
|
spuId?: number // 商品 SPU 编号
|
||||||
|
skuId: number // 商品 SKU 编号
|
||||||
|
count: number // 可兑换数量
|
||||||
|
point: number // 兑换积分
|
||||||
|
price: number // 兑换金额,单位:分
|
||||||
|
stock: number // 积分商城商品库存
|
||||||
|
activityStatus?: number // 积分商城商品状态
|
||||||
|
}
|
||||||
|
|
||||||
|
// 扩展 Sku 配置
|
||||||
|
export type SkuExtension = Sku & {
|
||||||
|
productConfig: PointProductVO
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SpuExtension extends Spu {
|
||||||
|
skus: SkuExtension[] // 重写类型
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SpuExtension0 extends Spu {
|
||||||
|
pointStock: number // 积分商城活动库存
|
||||||
|
pointTotalStock: number // 积分商城活动总库存
|
||||||
|
point: number // 兑换积分
|
||||||
|
pointPrice: number // 兑换金额,单位:分
|
||||||
|
}
|
||||||
|
|
||||||
|
// 积分商城活动 API
|
||||||
|
export const PointActivityApi = {
|
||||||
|
// 查询积分商城活动分页
|
||||||
|
getPointActivityPage: async (params: any) => {
|
||||||
|
return await request.get({ url: `/promotion/point-activity/page`, params })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询积分商城活动详情
|
||||||
|
getPointActivity: async (id: number) => {
|
||||||
|
return await request.get({ url: `/promotion/point-activity/get?id=` + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询积分商城活动列表,基于活动编号数组
|
||||||
|
getPointActivityListByIds: async (ids: number[]) => {
|
||||||
|
return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增积分商城活动
|
||||||
|
createPointActivity: async (data: PointActivityVO) => {
|
||||||
|
return await request.post({ url: `/promotion/point-activity/create`, data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改积分商城活动
|
||||||
|
updatePointActivity: async (data: PointActivityVO) => {
|
||||||
|
return await request.put({ url: `/promotion/point-activity/update`, data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除积分商城活动
|
||||||
|
deletePointActivity: async (id: number) => {
|
||||||
|
return await request.delete({ url: `/promotion/point-activity/delete?id=` + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 关闭秒杀活动
|
||||||
|
closePointActivity: async (id: number) => {
|
||||||
|
return await request.put({ url: '/promotion/point-activity/close?id=' + id })
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue