修复:全局治理雪花ID精度问题
This commit is contained in:
@@ -48,6 +48,7 @@ import { LeftOutlined } from '@ant-design/icons-vue'
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { fileApi } from '../api/index'
|
||||
import { orderApi } from '../api/order'
|
||||
import type { IdType } from '@/utils/id'
|
||||
|
||||
const router = useRouter()
|
||||
const orders = ref<any[]>([])
|
||||
@@ -68,7 +69,7 @@ const loadOrders = async () => {
|
||||
if (!match?.[1]) continue
|
||||
const imageId = match[1]
|
||||
try {
|
||||
if (!imageIdCache.value[imageId]) imageIdCache.value[imageId] = await fileApi.getSignedUrl(Number(imageId)) as any
|
||||
if (!imageIdCache.value[imageId]) imageIdCache.value[imageId] = await fileApi.getSignedUrl(imageId) as any
|
||||
item.productImage = imageIdCache.value[imageId]
|
||||
} catch {
|
||||
item.productImage = ''
|
||||
@@ -80,7 +81,7 @@ const loadOrders = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const cancelOrder = (orderId: number) => {
|
||||
const cancelOrder = (orderId: IdType) => {
|
||||
Modal.confirm({
|
||||
title: '确认取消订单',
|
||||
content: '确定要取消这个订单吗?',
|
||||
|
||||
Reference in New Issue
Block a user