fix: 修复代理生成卡密权限检查和参数问题
- 后端兼容application_id和app_id参数 - 添加卡类权限检查,确保代理只能生成有权限的卡类 - 前端使用application_id参数名 - 移除卡类显示中的billing_type原始值,改为显示价格 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,7 @@ async function handleGenerate() {
|
||||
saving.value = true
|
||||
try {
|
||||
const data = await api.post<{ codes: string[], cards: any[] }>('/agent/cards/generate', {
|
||||
app_id: Number(form.value.application_id),
|
||||
application_id: Number(form.value.application_id),
|
||||
card_type_id: Number(form.value.card_type_id),
|
||||
quantity: form.value.count,
|
||||
})
|
||||
@@ -178,7 +178,7 @@ onMounted(() => {
|
||||
</UiSelectTrigger>
|
||||
<UiSelectContent>
|
||||
<UiSelectItem v-for="type in cardTypes" :key="type.id" :value="String(type.id)">
|
||||
{{ type.name }}<template v-if="type.billing_type"> ({{ type.billing_type }})</template>
|
||||
{{ type.name }} - ¥{{ type.price }}
|
||||
</UiSelectItem>
|
||||
</UiSelectContent>
|
||||
</UiSelect>
|
||||
|
||||
Reference in New Issue
Block a user