Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
matmon12 committed Oct 16, 2024
1 parent ef25082 commit 30e5e4e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"local-preview": "serve -s dist",
"server": "json-server -w src/server/db.json -p 3001"
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const getWeatherData = async () => {
searchStore.lastSearch = searchStore.curWeather.location.name;
})
.catch((err) => {
console.log(err);
console.error(err);
})
.finally(() => {
searchStore.loading = false;
Expand All @@ -72,7 +72,7 @@ const fetchAstroData = async () => {
searchStore.astroInfo = res.data;
})
.catch((err) => {
console.log(err);
console.error(err);
})
.finally(() => {
searchStore.astroLoading = false;
Expand All @@ -93,7 +93,7 @@ const getHistoryDay = async () => {
searchStore.minTemp = res.data.forecast.forecastday[0].day.mintemp_c;
})
.catch((err) => {
console.log(err);
console.error(err);
})
.finally(() => {});
};
Expand Down
12 changes: 6 additions & 6 deletions src/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import Dashboard from "@/pages/Dashboard.vue";
import Post from "@/pages/Post.vue";

const routes = [
{ path: "/forecast/", name: "Home", component: Home },
{ path: "/forecast/error", name: "Error", component: Error },
{ path: "/forecast/tomorrow", name: "Tomorrow", component: Tomorrow },
{ path: "/forecast/history", name: "History", component: History },
{ path: "/forecast/dashboard", name: "Dashboard", component: Dashboard },
{ path: "/", name: "Home", component: Home },
{ path: "/error", name: "Error", component: Error },
{ path: "/tomorrow", name: "Tomorrow", component: Tomorrow },
{ path: "/history", name: "History", component: History },
{ path: "/dashboard", name: "Dashboard", component: Dashboard },
{
path: "/forecast/news",
path: "/news",
name: "News",
component: News,
children: [
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PrimeVueResolver } from "unplugin-vue-components/resolvers";

// https://vitejs.dev/config/
export default defineConfig({
base: "/forecast/",
base: process.env.NODE_ENV === "production" ? "/forecast/" : "/",
plugins: [
vue(),
ViteImageOptimizer({
Expand Down

0 comments on commit 30e5e4e

Please sign in to comment.