fix: 套装方案对比仅商业认证用户可用,美化入口按钮
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 23:15:56 +00:00
parent 981765e4bb
commit 750b247b5b
2 changed files with 34 additions and 1 deletions

View File

@@ -109,11 +109,15 @@
<script setup>
import { ref, computed, onMounted, watch } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthStore } from '../stores/auth'
import { useOilsStore } from '../stores/oils'
import { useRecipesStore } from '../stores/recipes'
import { useUiStore } from '../stores/ui'
import { useKitCost } from '../composables/useKitCost'
const router = useRouter()
const auth = useAuthStore()
const oils = useOilsStore()
const recipeStore = useRecipesStore()
const ui = useUiStore()
@@ -125,6 +129,10 @@ const sellingPrices = ref({})
const activeKitData = computed(() => kitAnalysis.value.find(k => k.id === activeKit.value))
onMounted(async () => {
if (!auth.isBusiness && !auth.isAdmin) {
router.replace('/projects')
return
}
if (!oils.oilNames.length) await oils.loadOils()
if (!recipeStore.recipes.length) await recipeStore.loadRecipes()
loadSellingPrices()