From 448dab48dc26d10d06a12b1f144c259bc60daf78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com>
Date: Wed, 16 Jun 2021 13:39:28 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=99=BB=E5=BD=9539=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/axios/index.js | 13 +--
.../components/conferenceMaterials/index.vue | 80 +++++++++++++++++++
.../components/noticeOfMeeting/index.vue | 23 ++++++
src/pages/home1/index.vue | 12 ++-
src/pages/login/index.vue | 14 +++-
.../domesticStandardsAndRegulations/index.vue | 3 +-
vue.config.js | 7 ++
7 files changed, 141 insertions(+), 11 deletions(-)
create mode 100644 src/pages/home1/components/conferenceMaterials/index.vue
create mode 100644 src/pages/home1/components/noticeOfMeeting/index.vue
diff --git a/src/common/axios/index.js b/src/common/axios/index.js
index bd1faa601..47a084bf8 100644
--- a/src/common/axios/index.js
+++ b/src/common/axios/index.js
@@ -89,7 +89,8 @@ export default {
if (_this) {
_this[loading] = true
}
- _axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
+ const prefix = config.prefix || '/api/'
+ _axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
if (_this && loading) { _this[loading] = false }
if (res.data.ok !== undefined && showTips) {
let type = res.data.ok ? 'success' : 'warning'
@@ -131,7 +132,8 @@ export default {
if (_this) {
_this[loading] = true
}
- _axios.post(api() + url + '?' + new Date().getTime(), param).then(res => {
+ const prefix = config.prefix || '/api/'
+ _axios.post(prefix + '/' + url + '?' + new Date().getTime(), param).then(res => {
if (_this && loading) { _this[loading] = false }
if (res.data.ok !== undefined && showTips) {
let type = res.data.ok ? 'success' : 'warning'
@@ -170,7 +172,8 @@ export default {
if (_this) {
_this[loading] = true
}
- _axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
+ const prefix = config.prefix || '/api/'
+ _axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
if (_this && loading) { _this[loading] = false }
thenFun.call(this, res.data)
}).catch(err => {
@@ -202,8 +205,8 @@ export default {
if (_this) {
_this[loading] = true
}
-
- _axios.get(api() + url + '?_t=' + new Date().getTime(), { params: param, cancelToken: config.cancelToken }).then(res => {
+ const prefix = config.prefix || '/api/'
+ _axios.get(prefix + '/' + url + '?_t=' + new Date().getTime(), { params: param, cancelToken: config.cancelToken }).then(res => {
if (_this && loading) { _this[loading] = false }
// 返回data对象
if (res.ok !== undefined) {
diff --git a/src/pages/home1/components/conferenceMaterials/index.vue b/src/pages/home1/components/conferenceMaterials/index.vue
new file mode 100644
index 000000000..6b19ee5b2
--- /dev/null
+++ b/src/pages/home1/components/conferenceMaterials/index.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
diff --git a/src/pages/home1/components/noticeOfMeeting/index.vue b/src/pages/home1/components/noticeOfMeeting/index.vue
new file mode 100644
index 000000000..9010bcc2d
--- /dev/null
+++ b/src/pages/home1/components/noticeOfMeeting/index.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/home1/index.vue b/src/pages/home1/index.vue
index e0612529d..e7aa380ab 100644
--- a/src/pages/home1/index.vue
+++ b/src/pages/home1/index.vue
@@ -21,13 +21,19 @@
class="home-tabs"
@tab-click="handleTabClick"
>
+
+
+
+
+
+
-
+
@@ -55,6 +61,8 @@ import navMenu from './components/navMenu'
import solicitOpinions from './components/solicitopinions'
import todoList from './components/todoList'
import Empennage from "./components/empennage"
+import noticeOfMeeting from "./components/noticeOfMeeting"
+import conferenceMaterials from "./components/conferenceMaterials"
export default {
name: 'Home',
@@ -66,6 +74,8 @@ export default {
release,
navMenu,
todoList,
+ noticeOfMeeting,
+ conferenceMaterials,
},
mixins: [],
data() {
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 53de8eff5..16cf584c9 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -75,7 +75,8 @@ export default {
password: PWD
}, {
_this: this,
- loading: 'loading'
+ loading: 'loading',
+ prefix: '/foton'
}, res => {
if (res.ok) {
const JSESSIONID = document.cookie
@@ -240,7 +241,8 @@ export default {
return new Promise((resolve, reject) => {
this.$http.get('person/userInfo/getByUserInfoCode', {
}, {
- _this: this
+ _this: this,
+ prefix: '/foton'
}, res => {
if (true) {
resolve(res.data)
@@ -255,7 +257,10 @@ export default {
// 获取用户头像
getUserPic (attId) {
return new Promise((resolve, reject) => {
- this.$http.get('/att/attFile/' + attId, {}, {_this: this}, res => {
+ this.$http.get('/att/attFile/' + attId, {}, {
+ _this: this,
+ prefix: '/foton'
+ }, res => {
resolve(res.data)
}, e => {
reject(e)
@@ -270,7 +275,8 @@ export default {
getMenu () {
return new Promise((resolve, reject) => {
this.$http.get('userMenu', {}, {
- _this: this
+ _this: this,
+ prefix: '/foton'
}, res => {
if (res.ok) {
resolve(res.data)
diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
index bda33b3c6..644b79a8e 100644
--- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
+++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue
@@ -1878,7 +1878,8 @@ export default {
this.sarMenu.parentIds = this.selectSarMenu.id
}
this.$http.post('lawss/sarMenu/addSarMenu', this.sarMenu, {
- _this: this
+ _this: this,
+ prefix: '/foton'
}, res => {
this.selectMenu() // 新增成功后,更新二级菜单
this.menuModalFlag = false
diff --git a/vue.config.js b/vue.config.js
index 40b40d896..762e30e77 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -91,6 +91,13 @@ module.exports = {
pathRewrite: {
'^/onlyOffice': '/api'
}
+ },
+ '/foton': {
+ target: 'http://39.98.140.126:10005',
+ changeOrigin: true,
+ pathRewrite: {
+ '^/foton': '/api'
+ }
}
}
}