From 03d2d0b61c45c23ffbaf04bcf014ae668c355436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=AD=A6=E5=9D=A4?= <1107410514@qq.com> Date: Fri, 11 Oct 2019 16:59:03 +0800 Subject: [PATCH] kun 19/10/11 17 --- src/components/HeaderNav.vue | 6 +- src/components/PagingDevice.vue | 109 ++++++++++++ src/http.js | 36 ++-- src/router.js | 11 +- src/views/InformationQuery.vue | 64 +++---- src/views/Login.vue | 11 +- src/views/Registered.vue | 46 ++++- src/views/home/ApplyFor.vue | 2 +- src/views/home/HomePage.vue | 21 ++- src/views/home/NewsDetails.vue | 21 ++- src/views/home/NewsList.vue | 20 ++- src/views/personal/Apply.vue | 258 ++++++++++++++++++++++++----- src/views/personal/Declare.vue | 21 ++- src/views/personal/Modify.vue | 7 +- src/views/personal/PersonalZte.vue | 9 +- src/views/project/Application.vue | 146 +++++++++++++--- src/views/project/Project.vue | 90 ++++++++-- static/img/apple.png | Bin 0 -> 7081 bytes static/img/bg0.png | Bin 694 -> 345 bytes static/img/bg1.png | Bin 719 -> 345 bytes static/img/btg.png | Bin 8645 -> 3295 bytes static/img/d0.png | Bin 381 -> 344 bytes static/img/d1.png | Bin 712 -> 517 bytes static/img/default.jpg | Bin 45020 -> 38307 bytes static/img/dh.png | Bin 1387 -> 644 bytes static/img/dsh.png | Bin 8305 -> 3265 bytes static/img/foot.png | Bin 310522 -> 105727 bytes static/img/foot1.png | Bin 481602 -> 192131 bytes static/img/gq.png | Bin 576 -> 367 bytes static/img/home.png | Bin 560316 -> 225250 bytes static/img/home1.png | Bin 465305 -> 235380 bytes static/img/img0.png | Bin 109037 -> 27644 bytes static/img/img1.png | Bin 137071 -> 38209 bytes static/img/img2.png | Bin 109602 -> 31864 bytes static/img/img3.png | Bin 52273 -> 15893 bytes static/img/img4.png | Bin 73112 -> 21808 bytes static/img/img5.png | Bin 578817 -> 161228 bytes static/img/mm.png | Bin 412 -> 329 bytes static/img/tg.png | Bin 8695 -> 3447 bytes static/img/wjx.png | Bin 327 -> 297 bytes static/img/ws.png | Bin 1109 -> 591 bytes static/img/wxz.png | Bin 768 -> 489 bytes static/img/xian.png | Bin 253 -> 197 bytes static/img/xlb.png | Bin 581 -> 449 bytes static/js/tool.js | 28 ---- 45 files changed, 695 insertions(+), 211 deletions(-) create mode 100644 src/components/PagingDevice.vue create mode 100644 static/img/apple.png diff --git a/src/components/HeaderNav.vue b/src/components/HeaderNav.vue index 1fe08a0..a33b5f5 100644 --- a/src/components/HeaderNav.vue +++ b/src/components/HeaderNav.vue @@ -41,12 +41,16 @@ export default { watch: {}, methods: { judge () { - if (sessionStorage.token) { + if (sessionStorage.id) { this.name = sessionStorage.name this.enter = false } }, quit () { + this.$router.push({ + name: 'homePage' + }) + this.$message.success('退出成功!') sessionStorage.clear() this.enter = true } diff --git a/src/components/PagingDevice.vue b/src/components/PagingDevice.vue new file mode 100644 index 0000000..069c495 --- /dev/null +++ b/src/components/PagingDevice.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/http.js b/src/http.js index 2a0c2e8..1b597f8 100644 --- a/src/http.js +++ b/src/http.js @@ -12,9 +12,9 @@ axios.interceptors.request.use(config => { ) { // 如果是登录和注册操作,则不需要携带header里面的token } else { - if (sessionStorage.token) { + if (sessionStorage.id) { config.headers = { - Authorization: sessionStorage.token + Authorization: sessionStorage.id } } } @@ -37,23 +37,25 @@ axios.interceptors.response.use( router.beforeEach((to, from, next) => { if (to.meta.requireAuth) { // 判断该路由是否需要登录权限 - if (sessionStorage.token) { + if (sessionStorage.id) { // 获取当前的token是否存在 console.log('token存在') - if (to.name !== 'application') { - next() - } else { - if ( - sessionStorage.party_id !== 'null') { - next() - } else { - alert('请先成为党组织!') - next({ - path: '/', // 将跳转的路由path作为参数,登录成功后跳转到该路由 - query: { redirect: to.fullPath } - }) - } - } + next() + + // if (to.name !== 'application') { + // next() + // } else { + // if ( + // sessionStorage.party_id !== 'null') { + // next() + // } else { + // alert('请先成为党组织!') + // next({ + // path: '/', // 将跳转的路由path作为参数,登录成功后跳转到该路由 + // query: { redirect: to.fullPath } + // }) + // } + // } } else { alert('请先登录!') next({ diff --git a/src/router.js b/src/router.js index 50b2fc5..92342ea 100644 --- a/src/router.js +++ b/src/router.js @@ -5,6 +5,8 @@ import Router from 'vue-router' import HeaderNav from './components/HeaderNav' /** 尾部导航 */ import FooterNav from './components/FooterNav' +/** 分页器 */ +import PagingDevice from './components/PagingDevice' /** 首页 */ import HomePage from './views/home/HomePage' @@ -55,13 +57,16 @@ export default new Router({ name: 'footerNav', component: FooterNav }, + /** 分页器 */ + { + path: '/pagingDevice', + name: 'pagingDevice', + component: PagingDevice + }, /** 信息查询 */ { path: '/informationQuery', name: 'informationQuery', - meta: { - requireAuth: true - }, component: InformationQuery }, /** 修改密码 */ diff --git a/src/views/InformationQuery.vue b/src/views/InformationQuery.vue index 66707d2..5c751f5 100644 --- a/src/views/InformationQuery.vue +++ b/src/views/InformationQuery.vue @@ -14,25 +14,25 @@
- @@ -56,12 +57,12 @@ export default { this.$message.success('登陆成功') this.$router.push('/') // 全局存储token - window.sessionStorage['token'] = res.data.data.data.id + window.sessionStorage['id'] = res.data.data.data.id window.sessionStorage['name'] = res.data.data.data.name window.sessionStorage['party_id'] = res.data.data.data.party_id window.sessionStorage['party_name'] = res.data.data.data.party_name } else { - alert('登入失败!') + alert(res.data.data.msg) } }) // eslint-disable-next-line handle-callback-err @@ -199,7 +200,9 @@ export default { } h3 { - font-family: "HanWangKaiBold-Gb5"; + // font-family: "HanWangKaiBold-Gb5"; + font-family: "MicrosoftYaHei"; + font-size: 26px; font-weight: normal; font-stretch: normal; diff --git a/src/views/Registered.vue b/src/views/Registered.vue index e6d9b0f..1b92437 100644 --- a/src/views/Registered.vue +++ b/src/views/Registered.vue @@ -3,11 +3,7 @@

立 即 注 冊

-
+ -