fix(ui): 修复兑换码状态显示和API路径问题
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

- 修复兑换码状态选项和标签显示不一致的问题,调整状态值对应关系
- 修复兑换码生成表单中的API路径,移除多余的管理前缀
- 统一兑换码状态显示逻辑:0=禁用,1=未使用,2=已用完
This commit is contained in:
2026-03-27 23:55:46 +08:00
parent 6975091c9a
commit 7b0006dda2
2 changed files with 8 additions and 9 deletions

View File

@@ -139,7 +139,7 @@ const open = async () => {
/** 获取兑换比例 */
const getExchangeRate = async () => {
try {
const data = await request.get({ url: '/admin-api/muye/point-exchange-config/get' })
const data = await request.get({ url: '/muye/point-exchange-config/get' })
if (data && data.exchangeRate) {
exchangeRate.value = data.exchangeRate
}

View File

@@ -24,10 +24,9 @@
clearable
class="!w-240px"
>
<el-option label="未使用" :value="0" />
<el-option label="使用" :value="1" />
<el-option label="已过期" :value="2" />
<el-option label="已禁用" :value="3" />
<el-option label="用" :value="0" />
<el-option label="使用" :value="1" />
<el-option label="已用完" :value="2" />
</el-select>
</el-form-item>
<el-form-item label="批次号" prop="batchNo">
@@ -114,10 +113,10 @@
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="scope">
<el-tag v-if="scope.row.status === 0" type="success">未使</el-tag>
<el-tag v-else-if="scope.row.status === 1" type="info">使用</el-tag>
<el-tag v-else-if="scope.row.status === 2" type="danger">过期</el-tag>
<el-tag v-else type="warning">已禁用</el-tag>
<el-tag v-if="scope.row.status === 0" type="danger"></el-tag>
<el-tag v-else-if="scope.row.status === 1" type="success">使用</el-tag>
<el-tag v-else-if="scope.row.status === 2" type="info">用完</el-tag>
<el-tag v-else type="warning">未知</el-tag>
</template>
</el-table-column>
<el-table-column label="批次号" align="center" prop="batchNo" width="160" />