parent
bef6b8433e
commit
830dfe5e4a
@ -0,0 +1,32 @@
|
|||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'return',
|
||||||
|
methods: {
|
||||||
|
gotohome() {
|
||||||
|
this.$router.push('/home');
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="return">
|
||||||
|
<button class="return-button" @click="gotohome()">返回</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style>.return-button {
|
||||||
|
/* 定义返回按钮的样式 */
|
||||||
|
position: fixed; /* 使按钮位置固定 */
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #ccc;
|
||||||
|
color: #333;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.return-button:hover {
|
||||||
|
background-color: #aaaaaa;
|
||||||
|
}
|
||||||
|
} </style>
|
@ -0,0 +1,58 @@
|
|||||||
|
import { createWebHistory, createRouter } from 'vue-router';
|
||||||
|
import Login from '../pages/Login.vue';
|
||||||
|
import Register from '../pages/Register.vue';
|
||||||
|
import Home from '../pages/HomePage.vue';
|
||||||
|
import Mine from '../pages/mine.vue';
|
||||||
|
import SearchPage from '../pages/searchPage.vue';
|
||||||
|
import Test from '../pages/test.vue'
|
||||||
|
import Communication from '../pages/Communication.vue'
|
||||||
|
import Pay from '../pages/Pay.vue';
|
||||||
|
import AddDemand from '../pages/addDemand.vue';
|
||||||
|
import DemandList from '../pages/DemandList.vue';
|
||||||
|
import Evaluation from '../pages/Evaluation.vue';
|
||||||
|
import SecurityVerification from '../pages/SecurityVerification.vue';
|
||||||
|
import RegisterGuide from '../pages/registerGuide.vue';
|
||||||
|
import AddServe from '../pages/addServe.vue';
|
||||||
|
import EvaluationList from '../pages/EvaluationList.vue';
|
||||||
|
import Order from '../pages/order.vue';
|
||||||
|
import MatchDetail from'../pages/DemandMatch.vue'
|
||||||
|
import ChangeInformation from'../pages/changeInformation.vue'
|
||||||
|
import ServerList from'../pages/serverList.vue'
|
||||||
|
import ServerDetail from'../pages/serverDetail.vue'
|
||||||
|
import ServerMatch from'../pages/serverMatch.vue'
|
||||||
|
import DemandMatched from'../pages/demandMatched.vue'
|
||||||
|
import ServerMatched from'../pages/serverMatched.vue'
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{ path: '/', redirect: '/login' }, // 重定向到/login路径
|
||||||
|
{ path: '/login', component: Login },
|
||||||
|
{ path: '/register', component: Register },
|
||||||
|
{ path: '/home', component: Home },
|
||||||
|
{ path: '/mine', component: Mine },
|
||||||
|
{ path: '/searchPage', component: SearchPage },
|
||||||
|
{ path: '/addDemandPage', component: AddDemand },
|
||||||
|
{ path: '/test', component: Test },
|
||||||
|
{ path: '/message', component: Communication },
|
||||||
|
{ path: '/pay', component:Pay},
|
||||||
|
{ path: '/demandlist', name: 'DemandList', component:DemandList},
|
||||||
|
{ path: '/evaluation/:orderId',name: 'Evaluation', component:Evaluation,props: (route) => ({ orderId: route.params.orderId })},
|
||||||
|
{ path: '/SecurityVerification', component:SecurityVerification},
|
||||||
|
{ path: '/registerGuide', component:RegisterGuide},
|
||||||
|
{ path:'/addServe', component:AddServe},
|
||||||
|
{ path: '/evaluationList', component:EvaluationList},
|
||||||
|
{ path: '/order/:orderId', name: 'OrderDetails', component: Order, props: (route) => ({ orderId: route.params.orderId })},
|
||||||
|
{ path: '/MatchDetail/:orderId', name: 'MatchDetail',component: MatchDetail,props: (route) => ({ orderId: route.params.orderId })},
|
||||||
|
{ path: '/changeInformation', component:ChangeInformation},
|
||||||
|
{ path: '/serverList', component:ServerList},
|
||||||
|
{ path: '/serverDetail/:serverId', name: 'ServerDetail',component: ServerDetail,props: (route) => ({ serverId: route.params.serverId })},
|
||||||
|
{ path: '/serverMatch/:serverId', name: 'ServerMatch',component: ServerMatch,props: (route) => ({ serverId: route.params.serverId })},
|
||||||
|
{ path: '/DemandMatched/:orderId', name: 'DemandMatched',component: DemandMatched,props: (route) => ({ orderId: route.params.orderId })},
|
||||||
|
{ path: '/ServerMatched/:serverId', name: 'ServerMatched',component: ServerMatched,props: (route) => ({ serverId: route.params.serverId })},
|
||||||
|
];
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHistory(),
|
||||||
|
routes
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
Loading…
Reference in new issue