杂务:更新 YumiNail 工作区
This commit is contained in:
@@ -84,13 +84,51 @@ function normalizeActionPath(value) {
|
||||
if (!rawPath || !rawPath.startsWith('/') || rawPath.startsWith('//')) {
|
||||
return ''
|
||||
}
|
||||
const queryIndex = rawPath.indexOf('?')
|
||||
const pathOnly = queryIndex >= 0 ? rawPath.slice(0, queryIndex) : rawPath
|
||||
const query = queryIndex >= 0 ? rawPath.slice(queryIndex) : ''
|
||||
|
||||
if (rawPath.startsWith('/orders')) {
|
||||
const queryIndex = rawPath.indexOf('?')
|
||||
const query = queryIndex >= 0 ? rawPath.slice(queryIndex) : ''
|
||||
if (pathOnly.startsWith('/orders/')) {
|
||||
const id = pathOnly.split('/')[2] || ''
|
||||
return buildUrl('/pages/order-detail/index', { id })
|
||||
}
|
||||
|
||||
if (pathOnly === '/orders') {
|
||||
return `/pages/orders/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/after-sales') {
|
||||
return `/pages/after-sales/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/after-sale/apply') {
|
||||
return `/pages/after-sale-apply/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/service-progress') {
|
||||
return `/pages/service-progress/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/help') {
|
||||
return `/pages/help/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/artist-orders') {
|
||||
return `/pages/artist-orders/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/artist-calendar') {
|
||||
return `/pages/artist-calendar/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/settings/account') {
|
||||
return `/pages/account-settings/index${query}`
|
||||
}
|
||||
|
||||
if (pathOnly === '/settings/password') {
|
||||
return `/pages/password-settings/index${query}`
|
||||
}
|
||||
|
||||
if (rawPath.startsWith('/product/')) {
|
||||
const id = rawPath.split('/')[2] || ''
|
||||
return buildUrl('/pages/product-detail/index', { id })
|
||||
@@ -135,9 +173,18 @@ function buildMessageActionPath(message) {
|
||||
|
||||
const businessType = String(message.businessType || '').toUpperCase()
|
||||
const businessId = message.businessId || ''
|
||||
if (businessType === 'ORDER' && businessId) {
|
||||
return buildUrl('/pages/order-detail/index', { id: businessId })
|
||||
}
|
||||
if (businessType === 'ORDER_ARTIST_CHANGE' && businessId) {
|
||||
return buildUrl('/pages/service-progress/index', { orderId: businessId })
|
||||
}
|
||||
if (businessType === 'ORDER_ARTIST_REVIEW' || businessType === 'ORDER_ARTIST_CHANGE' || businessType === 'ORDER') {
|
||||
return buildUrl('/pages/orders/index', businessId ? { orderId: businessId } : {})
|
||||
}
|
||||
if (businessType === 'AFTER_SALE') {
|
||||
return buildUrl('/pages/after-sales/index', businessId ? { orderId: businessId } : {})
|
||||
}
|
||||
if (businessType === 'PRODUCT') {
|
||||
return buildUrl('/pages/product-detail/index', businessId ? { id: businessId } : {})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user