diff --git a/projects/WebMVC/wwwroot/js/axios.js b/projects/WebMVC/wwwroot/js/axios.js index f0f7ef7d..cb711ded 100644 --- a/projects/WebMVC/wwwroot/js/axios.js +++ b/projects/WebMVC/wwwroot/js/axios.js @@ -35,7 +35,7 @@ axios.interceptors.response.use(function (response) { .catch(function (error) { if (error.response.status === 401) { console.log('refreshToken 已过期'); - router.push('/router/login'); + router.push('/routes/login.html'); } else { console.error(error); diff --git a/projects/WebMVC/wwwroot/js/components.js b/projects/WebMVC/wwwroot/js/components.js index 03f1bfe1..1b8aa852 100644 --- a/projects/WebMVC/wwwroot/js/components.js +++ b/projects/WebMVC/wwwroot/js/components.js @@ -1,25 +1,25 @@ Vue.component('pagination', function (resolve, reject) { - axios.get("/router/shared/pagination.html").then(function (response) { + axios.get("/routes/shared/pagination.html").then(function (response) { resolve(parseModel(response)); }); }); Vue.component('layout', function (resolve, reject) { - axios.get("/router/shared/layout.html").then(function (response) { + axios.get("/routes/shared/layout.html").then(function (response) { resolve(parseModel(response)); }); }); Vue.component('list', function (resolve, reject) { - axios.get("/router/shared/list.html").then(function (response) { + axios.get("/routes/shared/list.html").then(function (response) { resolve(parseModel(response)); }); }); Vue.component('display', function (resolve, reject) { - axios.get("/router/shared/display.html").then(function (response) { + axios.get("/routes/shared/display.html").then(function (response) { resolve(parseModel(response)); }); }); Vue.component('update', function (resolve, reject) { - axios.get("/router/shared/update.html").then(function (response) { + axios.get("/routes/shared/update.html").then(function (response) { resolve(parseModel(response)); }); }); \ No newline at end of file diff --git a/projects/WebMVC/wwwroot/js/form.js b/projects/WebMVC/wwwroot/js/form.js index 848490c1..aff94c2f 100644 --- a/projects/WebMVC/wwwroot/js/form.js +++ b/projects/WebMVC/wwwroot/js/form.js @@ -21,6 +21,6 @@ ]; for (var i = 0; i < formComponents.length; i++) { var name = formComponents[i]; - var url = "/router/shared/" + name.replace('-', '/') + ".html"; + var url = "/routes/shared/" + name.replace('-', '/') + ".html"; vueComponent(name, url); } \ No newline at end of file diff --git a/projects/WebMVC/wwwroot/js/route.js b/projects/WebMVC/wwwroot/js/route.js index 22551892..278762e5 100644 --- a/projects/WebMVC/wwwroot/js/route.js +++ b/projects/WebMVC/wwwroot/js/route.js @@ -1,7 +1,7 @@ var routes = []; const router = new VueRouter(); router.beforeEach((to, from, next) => { - if (to.path !== '/router/login.html') { + if (to.path !== '/routes/login.html') { var isAuthenticated = false; if (store.state.token.accessToken) { var jwt = jwt_decode(store.state.token.accessToken); @@ -10,12 +10,12 @@ router.beforeEach((to, from, next) => { if (!isAuthenticated) { store.commit('logout'); setTimeout(function () { - router.push('/router/login.html'); + router.push('/routes/login.html'); }, 1000); return; } } - var url = to.path === '/' ? '/router/home.html' : to.path; + var url = to.path === '/' ? '/routes/home.html' : to.path; var name = url.replace(/\//g, "-").replace(/\./g, "-").substring(1); var route = routes[name]; if (!route) { @@ -34,7 +34,7 @@ router.beforeEach((to, from, next) => { } else { if (to.path === from.path) { - router.push({ path: '/router/shared/redirect.html', query: { url: to.fullPath } }) + router.push({ path: '/routes/shared/redirect.html', query: { url: to.fullPath } }) } else { next(); diff --git a/projects/WebMVC/wwwroot/router/admin/command/detail.html b/projects/WebMVC/wwwroot/routes/admin/command/detail.html similarity index 100% rename from projects/WebMVC/wwwroot/router/admin/command/detail.html rename to projects/WebMVC/wwwroot/routes/admin/command/detail.html diff --git a/projects/WebMVC/wwwroot/router/admin/command/edit.html b/projects/WebMVC/wwwroot/routes/admin/command/edit.html similarity index 100% rename from projects/WebMVC/wwwroot/router/admin/command/edit.html rename to projects/WebMVC/wwwroot/routes/admin/command/edit.html diff --git a/projects/WebMVC/wwwroot/router/admin/command/index.html b/projects/WebMVC/wwwroot/routes/admin/command/index.html similarity index 100% rename from projects/WebMVC/wwwroot/router/admin/command/index.html rename to projects/WebMVC/wwwroot/routes/admin/command/index.html diff --git a/projects/WebMVC/wwwroot/router/admin/index.html b/projects/WebMVC/wwwroot/routes/admin/index.html similarity index 95% rename from projects/WebMVC/wwwroot/router/admin/index.html rename to projects/WebMVC/wwwroot/routes/admin/index.html index 6a8d9862..7aa248fb 100644 --- a/projects/WebMVC/wwwroot/router/admin/index.html +++ b/projects/WebMVC/wwwroot/routes/admin/index.html @@ -9,7 +9,7 @@

{{item.name}}

{{item.deviceCount}}
- + @item.Name @@ -23,7 +23,7 @@

{{item.name}}

{{item.deviceCount}}
- + @item.Name - + diff --git a/projects/WebMVC/wwwroot/router/login.html b/projects/WebMVC/wwwroot/routes/login.html similarity index 100% rename from projects/WebMVC/wwwroot/router/login.html rename to projects/WebMVC/wwwroot/routes/login.html diff --git a/projects/WebMVC/wwwroot/router/node.html b/projects/WebMVC/wwwroot/routes/node.html similarity index 99% rename from projects/WebMVC/wwwroot/router/node.html rename to projects/WebMVC/wwwroot/routes/node.html index b08e9249..efeb1a17 100644 --- a/projects/WebMVC/wwwroot/router/node.html +++ b/projects/WebMVC/wwwroot/routes/node.html @@ -158,7 +158,7 @@ if (vm.node.id === item.id) { if (method.indexOf('Deleted') >= 0) { console.log('node has deleted'); - router.push('/router/nodes.html'); + router.push('/routes/nodes.html'); } else { vm.load(); diff --git a/projects/WebMVC/wwwroot/router/nodes.html b/projects/WebMVC/wwwroot/routes/nodes.html similarity index 98% rename from projects/WebMVC/wwwroot/router/nodes.html rename to projects/WebMVC/wwwroot/routes/nodes.html index 77bfad41..1c702255 100644 --- a/projects/WebMVC/wwwroot/router/nodes.html +++ b/projects/WebMVC/wwwroot/routes/nodes.html @@ -26,7 +26,7 @@
{{item.count}}
- + diff --git a/projects/WebMVC/wwwroot/router/product.html b/projects/WebMVC/wwwroot/routes/product.html similarity index 99% rename from projects/WebMVC/wwwroot/router/product.html rename to projects/WebMVC/wwwroot/routes/product.html index 6603dc47..93ac378b 100644 --- a/projects/WebMVC/wwwroot/router/product.html +++ b/projects/WebMVC/wwwroot/routes/product.html @@ -40,7 +40,7 @@ - +