diff --git a/elmclient/src/main.js b/elmclient/src/main.js index 0d16212..ff03842 100644 --- a/elmclient/src/main.js +++ b/elmclient/src/main.js @@ -46,7 +46,7 @@ router.beforeEach(function (to, from, next) { let user = sessionStorage.getItem('user'); //除了登录、注册、首页、商家列表、商家信息之外,都需要判断是否登录 if (!(to.path == '/' || to.path == '/index' || to.path == '/businessList' || to.path == '/businessInfo' || - to.path == '/login' || to.path == '/register' || to.path == '/my' || to.path == '/error403')) { + to.path == '/login' || to.path == '/register' || to.path == '/my' || to.path == '/error403' || to.path == '/searchResults')) { if (user == null) { router.push('/login'); // location.reload(); diff --git a/elmclient/src/router/index.js b/elmclient/src/router/index.js index 51a5d0e..eeee01c 100644 --- a/elmclient/src/router/index.js +++ b/elmclient/src/router/index.js @@ -17,6 +17,7 @@ import My from '../views/My.vue'; import PointsDetails from '../views/PointsDetails.vue'; import Wallet from '../views/Wallet.vue'; import Error403 from '../components/Error403'; +import SearchResults from "../views/SearchResults"; const routes = [{ @@ -83,6 +84,10 @@ const routes = [{ path: '/error403', name: 'Error403', component: Error403 + }, { + path: '/searchResults', + name: 'SearchResults', + component: SearchResults } ]; diff --git a/elmclient/src/views/Index.vue b/elmclient/src/views/Index.vue index c9b3000..d0e60c6 100644 --- a/elmclient/src/views/Index.vue +++ b/elmclient/src/views/Index.vue @@ -8,19 +8,19 @@
天津大学北洋园校区
- - +