From abbb22c560782c6e7cef42060e2b47738dc45a96 Mon Sep 17 00:00:00 2001 From: unknown <2569982966@qq.com> Date: Tue, 7 Jun 2022 17:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BA=E5=9D=9B=E4=BA=A4=E6=B5=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F=E5=AE=8C=E5=96=84=20=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=20=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/common.css | 20 ++++++--- src/components/Header.vue | 11 ++++- src/pages/Chat/Chat.vue | 88 ++++++++++++++++++++++++++++++++----- src/pages/Chat/ChatEdit.vue | 46 +++++++++++++++++++ src/pages/Home/Home.vue | 3 +- src/pages/Home/HomeEdit.vue | 62 +++++++++++++------------- src/utils/http/interface.js | 10 ++++- 7 files changed, 187 insertions(+), 53 deletions(-) diff --git a/src/assets/css/common.css b/src/assets/css/common.css index fef2469..b56ea9e 100644 --- a/src/assets/css/common.css +++ b/src/assets/css/common.css @@ -7,8 +7,15 @@ .breadcrumb { margin: 2vw 0; font-size: 1.1rem; -} +} +.edit-content{ + display: flex; + flex-direction: column; + justify-content: center; + margin: 0 17vw 3vw; + text-align: center; +} /* 面板 */ .content { display: flex; @@ -34,6 +41,13 @@ float: left; margin: 2vw; } +.card-content-left { + text-align: left; + display: block; + position: relative; + float: left; + margin: 1vw 1.5vw; +} .card-img { position: relative; float: left; @@ -41,10 +55,6 @@ height: auto; } -.content-button{ - margin: 2vw 24vw 15px; - text-align: right; -} /* 分割线 */ .el-divider { width: 95%; diff --git a/src/components/Header.vue b/src/components/Header.vue index 3fecab1..f2d199f 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -50,7 +50,7 @@ export default { return { banner: require("@/assets/logo/banner.jpg"), osredmLogo: require("@/assets/logo/osredmLogo.svg"), - activeIndex: "home", /* 启动默认显示页 */ + activeIndex: "", /* 启动默认显示页 */ userName: "", userPass: "", @@ -119,6 +119,13 @@ export default { // 返回红山开源 backOsredm(){ window.location.href='https://www.osredm.com' + }, + + // 获取路由path 得到当前页 + getPath(){ + + var path = this.$route.path + this.activeIndex = path.split("/")[2] } }, @@ -127,7 +134,7 @@ export default { this.userName = sessionStorage.getItem("name"); this.userPass = sessionStorage.getItem("pass"); this.userAvatar = require("@/assets/logo/user.jpg"); - + this.getPath() /* var userRank = sessionStorage.getItem("rank"); if (userRank == 1) { this.rankIf = true; diff --git a/src/pages/Chat/Chat.vue b/src/pages/Chat/Chat.vue index 3b6f5a3..6e41fb5 100644 --- a/src/pages/Chat/Chat.vue +++ b/src/pages/Chat/Chat.vue @@ -1,15 +1,18 @@ diff --git a/src/pages/Chat/ChatEdit.vue b/src/pages/Chat/ChatEdit.vue index e69de29..0532a70 100644 --- a/src/pages/Chat/ChatEdit.vue +++ b/src/pages/Chat/ChatEdit.vue @@ -0,0 +1,46 @@ + + + + + + \ No newline at end of file diff --git a/src/pages/Home/Home.vue b/src/pages/Home/Home.vue index 5d20d49..b5c2d12 100644 --- a/src/pages/Home/Home.vue +++ b/src/pages/Home/Home.vue @@ -2,7 +2,7 @@
- 编辑 + 编辑
@@ -65,4 +65,3 @@ export default { \ No newline at end of file diff --git a/src/utils/http/interface.js b/src/utils/http/interface.js index aaf633b..47cde4d 100644 --- a/src/utils/http/interface.js +++ b/src/utils/http/interface.js @@ -32,10 +32,18 @@ export const getComp = data => { }) }; +export const getPageData = (compId,page) => { + return axios({ + url: '/comp/getPageData/'+ compId + '/' + page, + method: 'get', + }) +}; + // 默认全部倒出 // 根据需要进行 export default { query, mock, - getComp + getComp, + getPageData } \ No newline at end of file