mall-order:修复 todo 提到的问题

This commit is contained in:
puhui999 2023-09-09 20:51:33 +08:00
parent a79f1452b3
commit 7e511d1e4f
4 changed files with 8 additions and 12 deletions

View File

@ -51,11 +51,10 @@ export interface OrderVO {
avatar?: string
}
// 订单操作日志
logs?: logs[]
logs?: OrderLogRespVO[]
}
// TODO @puhui999OrderLogRespVO 会不会更好哈。
export interface logs {
export interface OrderLogRespVO {
content?: string
createTime?: Date
userType?: number

View File

@ -191,11 +191,6 @@ service.interceptors.response.use(
}
return Promise.reject('error')
} else {
// TODO @puhui999这个先不用支持哈
// 前端处理 data 为 null 的情况,进行提示
if (data.msg !== '') {
ElNotification.error({ title: msg })
}
return data
}
},

View File

@ -195,7 +195,8 @@ const getDetail = async () => {
if (id) {
const res = await AfterSaleApi.getAfterSale(id)
//
if (res === null) {
if (res == null) {
message.notifyError('售后订单不存在')
close()
}
formData.value = res

View File

@ -245,9 +245,10 @@ const { params } = useRoute() // 查询参数
const getDetail = async () => {
const id = params.orderId as unknown as number
if (id) {
const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO
const res = (await TradeOrderApi.getOrder(66666)) as TradeOrderApi.OrderVO
//
if (res === null) {
if (res == null) {
message.error('交易订单不存在')
close()
}
formData.value = res
@ -259,7 +260,7 @@ const { delView } = useTagsViewStore() // 视图操作
const { push, currentRoute } = useRouter() //
const close = () => {
delView(unref(currentRoute))
push({ name: 'TradeAfterSale' })
push({ name: 'TradeOrder' })
}
/** 复制 */