Skip to content

Commit

Permalink
fix: base_url
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Jan 19, 2023
1 parent 83fcc22 commit 452254d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2023-01-18T16:10:56.728Z"
"x-generation-date": "2023-01-19T10:08:50.947Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/Nav/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script setup>
const { data: NavList } = await useFetch('http://127.0.0.1:1337/api/navs')
const runtimeConfig = useRuntimeConfig()
const { data: NavList } = await useFetch(`${runtimeConfig.public.strapi_base_url}/api/navs`)
</script>

<template>
<div class="view-nav">
11{{ NavList }}
<div class="nav-list">
<li v-for="item in NavList.data" :key="item.url">
<NuxtLink :to="item.url">
Expand Down
3 changes: 1 addition & 2 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ export default defineNuxtConfig({
titleSeparator: '·',
trailingSlash: true,
mode: process.env.NODE_ENV,
base_url: process.env.NODE_ENV === 'development' ? 'http://localhost:1337' : 'https://cms.bytedream.top',
strapi_base_url: process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:1337' : 'https://cms.bytedream.top',
},
indexable: true,
siteUrl: 'https://bytedream.top',
url: process.env.STRAPI_API_URL || 'http://localhost:1337',
},
sitemap: {
hostname: 'https://bytedream.top',
Expand Down

0 comments on commit 452254d

Please sign in to comment.