From 143f419020e96dab0927097bc43907c6b3aa93d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=E5=98=89=E9=98=B3?= Date: Fri, 23 Feb 2018 16:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4js=E5=AF=B9=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E7=9A=84=E4=BE=9D=E8=B5=96=EF=BC=8C=E4=B8=BA?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0=E6=8E=92=E5=BA=8F=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/js/admin.js | 6 +++--- src/main/resources/static/js/homePage.js | 6 +++--- src/main/resources/static/js/homework.js | 8 ++++---- src/main/resources/static/js/managecourse.js | 8 ++++---- src/main/resources/static/js/manageuser.js | 4 ++-- src/main/resources/static/js/user.js | 6 +++--- src/main/resources/templates/home/about.html | 10 +++++----- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/resources/static/js/admin.js b/src/main/resources/static/js/admin.js index bd70ab0..b92ce8b 100644 --- a/src/main/resources/static/js/admin.js +++ b/src/main/resources/static/js/admin.js @@ -40,7 +40,7 @@ var Main = { mounted() { this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/findvlog') + axios.get(getRootPath_web()+'/home/findvlog') .then(function (response) { console.log(response.data); that.logData = response.data; @@ -48,7 +48,7 @@ var Main = { .catch(function (error) { console.log(error); }); - axios.get('http://localhost:8080/cms/home/findvfeedback') + axios.get(getRootPath_web()+'/home/findvfeedback') .then(function (response) { console.log(response.data); that.feedbackData = response.data; @@ -61,7 +61,7 @@ var Main = { }, methods: { ClickToJump(targe){ - window.location.href="http://localhost:8080/cms/home/" + targe; + window.location.href=getRootPath_web()+"/" + targe; }, handleSelect(key, keyPath) { console.log(key, keyPath); diff --git a/src/main/resources/static/js/homePage.js b/src/main/resources/static/js/homePage.js index 44a6d8e..284587b 100644 --- a/src/main/resources/static/js/homePage.js +++ b/src/main/resources/static/js/homePage.js @@ -378,15 +378,15 @@ var Main = { console.log(file, fileList); }, ClickToJump(targe) { - window.location.href = "http://localhost:8080/cms/" + targe; + window.location.href = getRootPath_web()+"/" + targe; }, handleDownload(row) { /*var url = window.location.protocol+"://"+window.location.host+":"+window.location.port+"/"*/ - window.open("http://localhost:8080/cms/download/dodownload?fileId=" + row.colfileid); + window.open(getRootPath_web()+"/download/dodownload?fileId=" + row.colfileid); }, handleDelete(row) { axios({ - url: 'http://localhost:8080/cms/home/filedelete', + url: getRootPath_web()+'/home/filedelete', method: 'post', data: { fileid: row.colfileid diff --git a/src/main/resources/static/js/homework.js b/src/main/resources/static/js/homework.js index 08100ea..31e476f 100644 --- a/src/main/resources/static/js/homework.js +++ b/src/main/resources/static/js/homework.js @@ -34,7 +34,7 @@ var Main = { mounted() { this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/findallvhomework') + axios.get(getRootPath_web()+'/home/findallvhomework') .then(function (response) { console.log(response.data); that.homeworkData = response.data; @@ -42,7 +42,7 @@ var Main = { .catch(function (error) { console.log(error); }); - axios.get('http://localhost:8080/cms/home/findallvhomework') + axios.get(getRootPath_web()+'/home/findallvhomework') .then(function (response) { console.log(response.data); that.homeworkData = response.data; @@ -55,7 +55,7 @@ var Main = { methods: { togglePost(url){ axios({ - url: 'http://localhost:8080/cms/'+url, + url: getRootPath_web()+url, method: 'post', data: { id:this.multipleSelection @@ -77,7 +77,7 @@ var Main = { console.log(key, keyPath); }, ClickToJump(targe){ - window.location.href="http://localhost:8080/cms/" + targe; + window.location.href=getRootPath_web()+ "/" + targe; }, toggleSelection(rows) { if (rows) { diff --git a/src/main/resources/static/js/managecourse.js b/src/main/resources/static/js/managecourse.js index c8ae308..be07062 100644 --- a/src/main/resources/static/js/managecourse.js +++ b/src/main/resources/static/js/managecourse.js @@ -24,7 +24,7 @@ var Main = { mounted() { this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/findvcourse') + axios.get(getRootPath_web()+'/home/findvcourse') .then(function (response) { console.log(response.data); that.tableData3 = response.data; @@ -46,7 +46,7 @@ var Main = { methods: { togglePost(url){ axios({ - url: 'http://localhost:8080/cms/'+url, + url: getRootPath_web()+'/'+url, method: 'post', data: { id:this.multipleSelection @@ -100,7 +100,7 @@ var Main = { console.log(item); }, ClickToJump(targe){ - window.location.href="http://localhost:8080/cms/home/" + targe; + window.location.href=getRootPath_web()+"/"+ targe; }, toggleSelection(rows) { if (rows) { @@ -123,7 +123,7 @@ var Main = { /*this.restaurants = this.loadAll();*/ this.restaurants=this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/findvcourse') + axios.get(getRootPath_web()+'/home/findvcourse') .then(function (response) { console.log(response.data); that.logData = response.data; diff --git a/src/main/resources/static/js/manageuser.js b/src/main/resources/static/js/manageuser.js index 93d8f28..4217f44 100644 --- a/src/main/resources/static/js/manageuser.js +++ b/src/main/resources/static/js/manageuser.js @@ -18,7 +18,7 @@ var Main = { mounted() { this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/findalluser') + axios.get(getRootPath_web()+'/home/findalluser') .then(function (response) { console.log(response.data); that.userData = response.data; @@ -64,7 +64,7 @@ var Main = { console.log(key, keyPath); }, ClickToJump(targe){ - window.location.href="http://localhost:8080/cms/" + targe; + window.location.href=getRootPath_web()+"/" + targe; }, toggleSelection(rows) { if (rows) { diff --git a/src/main/resources/static/js/user.js b/src/main/resources/static/js/user.js index 9b59769..2e05089 100644 --- a/src/main/resources/static/js/user.js +++ b/src/main/resources/static/js/user.js @@ -123,7 +123,7 @@ var Main = { this.$refs[formName].validate((valid) => { if (true) {//此处暂时去除校验 axios({ - url: 'http://localhost:8080/cms/' + url, + url: getRootPath_web()+'/' + url, method: 'post', data: { content: this.$refs.content.value @@ -157,7 +157,7 @@ var Main = { console.log(tab, event); }, ClickToJump(targe) { - window.location.href = "http://localhost:8080/cms/" + targe; + window.location.href = getRootPath_web()+"/" + targe; }, handleSelect(key, keyPath) { console.log(key, keyPath); @@ -169,7 +169,7 @@ var Main = { mounted() { this.$nextTick(() => { var that = this; - axios.get('http://localhost:8080/cms/home/userinfo') + axios.get(getRootPath_web()+'/home/userinfo') .then(function (response) { console.log(response.data); that.ruleForm2 = response.data; diff --git a/src/main/resources/templates/home/about.html b/src/main/resources/templates/home/about.html index 2205bd6..421a7c8 100644 --- a/src/main/resources/templates/home/about.html +++ b/src/main/resources/templates/home/about.html @@ -43,11 +43,11 @@ 查看更新日志 - - - - - + + + + +