feat: 优化发货凭证与字段兼容,隐藏内部积分展示并增强DLC角色解析
This commit is contained in:
@@ -113,6 +113,7 @@ func Setup(h *Handlers) *gin.Engine {
|
||||
delivery.POST("/orders/:order_no/bind", h.Delivery.Bind)
|
||||
delivery.POST("/orders/:order_no/submit", h.Delivery.Submit)
|
||||
delivery.GET("/image-proxy", h.Delivery.ImageProxy)
|
||||
delivery.HEAD("/image-proxy", h.Delivery.ImageProxy)
|
||||
}
|
||||
|
||||
// 源头侧接口:上游发货平台查询订单并回传发货结果。
|
||||
|
||||
@@ -138,12 +138,16 @@ func extractGameFields(raw string, out *OpenOrderQuery) {
|
||||
}
|
||||
}
|
||||
if out.GameUID == "" {
|
||||
if v, ok := m["game_uid"].(string); ok {
|
||||
if v, ok := m["game_uid"].(string); ok && v != "" {
|
||||
out.GameUID = v
|
||||
} else if v, ok := m["game_account"].(string); ok && v != "" {
|
||||
out.GameUID = v
|
||||
}
|
||||
}
|
||||
if out.RoleName == "" {
|
||||
if v, ok := m["role_name"].(string); ok {
|
||||
if v, ok := m["role_name"].(string); ok && v != "" {
|
||||
out.RoleName = v
|
||||
} else if v, ok := m["game_account_role_name"].(string); ok && v != "" {
|
||||
out.RoleName = v
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +379,6 @@ export default function Delivery() {
|
||||
<Tag color="blue">{order.product?.sku || '-'}</Tag>
|
||||
{order.product?.game && <Tag color="cyan">{order.product.game}</Tag>}
|
||||
<Tag color="green">已发放 1 件</Tag>
|
||||
<Tag color="purple">{order.amount} 积分</Tag>
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -123,10 +123,10 @@ export async function generateDeliveryVoucher(order: DeliveryOrderInfo): Promise
|
||||
const gameText = order.product?.game ? ` · ${order.product.game}` : ''
|
||||
ctx.fillText(skuText + gameText, textLeft, prodCardY + 120)
|
||||
|
||||
// 金额与数量
|
||||
// 交付状态与数量
|
||||
ctx.fillStyle = '#16a34a'
|
||||
ctx.font = 'bold 28px -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif'
|
||||
ctx.fillText(`已发放: 1 件 | 价值: ${order.amount} 积分`, textLeft, prodCardY + 168)
|
||||
ctx.fillText('已发放: 1 件', textLeft, prodCardY + 168)
|
||||
|
||||
// 6. 核心凭证字段明细表
|
||||
const tableY = prodCardY + prodCardH + 32
|
||||
|
||||
Reference in New Issue
Block a user