Skip to content

Commit

Permalink
feat: add base_url
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Jan 18, 2023
1 parent 624d1e9 commit bb40c41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/components/Header/index.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<script setup>
const runtimeConfig = useRuntimeConfig()
</script>

<template>
<main>
<h1>这里是头部</h1>
<div>当前环境:{{ runtimeConfig.public.mode }}</div>
<div class="block">
<DarkToggle />
</div>
Expand Down
2 changes: 2 additions & 0 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default defineNuxtConfig({
language: 'zh-CN',
titleSeparator: '·',
trailingSlash: true,
mode: process.env.NODE_ENV,
base_url: process.env.NODE_ENV === 'development' ? 'http://localhost:1337' : 'https://cms.bytedream.top',
},
indexable: true,
siteUrl: 'https://bytedream.top',
Expand Down

0 comments on commit bb40c41

Please sign in to comment.