need fix rout spa and set api on URL

This commit is contained in:
valitovgaziz
2024-12-06 01:55:00 +05:00
parent 47a9e724ab
commit b87c3aa1ae
4 changed files with 19 additions and 6 deletions
+1
View File
@@ -5,6 +5,7 @@ FROM node:lts-alpine as builder
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
RUN npm install axios
# Копируем исходный код # Копируем исходный код
COPY . . COPY . .
+7 -6
View File
@@ -1,20 +1,21 @@
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue' import HomeView from '../views/HomeView.vue'
import SignUpView from '../views/SingUpV.vue'
const router = createRouter({ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
routes: [ routes: [
{
path: '/signup',
name: 'signup',
component: SignUpView,
},
{ {
path: '/', path: '/',
name: 'home', name: 'home',
component: HomeView, component: HomeView,
}, },
{
path: '/signin',
name: 'signin',
component: SingIn,
}
], ],
}) });
export default router export default router
+11
View File
@@ -0,0 +1,11 @@
<script setup>
import Header from '../components/Header.vue'
import Footer from '../components/Footer.vue'
import SignUpC from '../components/SignUpC.vue'
</script>
<template>
<Header />
<SignUpC />
<Footer />
</template>