diff --git a/frontend/src/stores/oils.js b/frontend/src/stores/oils.js index 1509776..b64f6a0 100644 --- a/frontend/src/stores/oils.js +++ b/frontend/src/stores/oils.js @@ -68,7 +68,7 @@ export const useOilsStore = defineStore('oils', () => { bottlePrice: oil.bottle_price, dropCount: oil.drop_count, retailPrice: oil.retail_price ?? null, - isActive: oil.is_active ?? true, + isActive: oil.is_active !== 0, enName: oil.en_name ?? null, } } diff --git a/frontend/src/views/OilReference.vue b/frontend/src/views/OilReference.vue index 5552c76..277b861 100644 --- a/frontend/src/views/OilReference.vue +++ b/frontend/src/views/OilReference.vue @@ -330,9 +330,11 @@
+ >{{ getMeta(editingOilName)?.isActive === false ? '✓ 已下架 · 点击重新上架' : '下架' }}
@@ -702,7 +704,6 @@ async function toggleOilActive() { await oils.loadOils() cardVersion.value++ ui.showToast(newActive ? '已重新上架' : '已下架') - editingOilName.value = null } catch (e) { ui.showToast('网络错误: ' + e.message) }