From 83bb450a221687160f84fa61899132b61308c53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E4=B8=BD=E5=90=9B?= <664953382@qq.com> Date: Tue, 10 Aug 2021 11:00:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E7=A6=BB=E5=88=97=E8=A1=A8=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=BA=E6=96=B0=E7=AA=97=E5=8F=A3=E5=B9=B6=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E7=BD=91=E7=AB=99=E8=BF=9B=E6=9D=A5=E6=97=B6=E7=9A=84?= =?UTF-8?q?loading=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 352 ++++++++++++++++++++-------------------- src/router/index.js | 5 + src/views/home/home.vue | 41 ++++- src/views/result.vue | 139 ++++++++++++++++ src/views/search.vue | 48 ++---- 5 files changed, 371 insertions(+), 214 deletions(-) create mode 100644 src/views/result.vue diff --git a/public/index.html b/public/index.html index 6d64bf9..448515b 100644 --- a/public/index.html +++ b/public/index.html @@ -1,207 +1,207 @@ - - - - - + + + + + <%= webpackConfig.name %> - + .no-js h1 { + color: #222222; + } + + #loader-wrapper .load_title { + font-family: 'Open Sans'; + color: #fff; + font-size: 19px; + width: 100%; + text-align: center; + z-index: 9999999999999; + position: absolute; + top: 60%; + opacity: 1; + line-height: 30px; + } + + #loader-wrapper .load_title span { + font-weight: normal; + font-style: italic; + font-size: 13px; + color: #fff; + opacity: 0.5; + } +
-
+ +
diff --git a/src/router/index.js b/src/router/index.js index 7971802..da44c97 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -116,6 +116,11 @@ export const constantRoutes = [ component: resolve => require(['@/views/search'], resolve), name: 'search' }, + { + path: '/result', + component: resolve => require(['@/views/result'], resolve), + name: 'result' + }, { path: '/404', component: resolve => require(['@/views/error/404'], resolve), diff --git a/src/views/home/home.vue b/src/views/home/home.vue index d2f41af..59c47ed 100644 --- a/src/views/home/home.vue +++ b/src/views/home/home.vue @@ -38,9 +38,20 @@ :key="item.id" > {{ index + 1 }} - {{ + + + + {{ item.title }} + + @@ -68,7 +79,18 @@
@@ -85,7 +107,18 @@
diff --git a/src/views/result.vue b/src/views/result.vue new file mode 100644 index 0000000..3958c51 --- /dev/null +++ b/src/views/result.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/search.vue b/src/views/search.vue index 216d796..04bcac0 100644 --- a/src/views/search.vue +++ b/src/views/search.vue @@ -13,13 +13,24 @@
-

- {{ item.title }} +

+ {{ item.title }}

来源:{{ item.source }}
发布:{{ item.listDate }}
+
+
发布:{{ parseTime(item.listDate, '{y}-{m}-{d}') }}
+
{ - this.formData = data; - }); - } else if (key == 'policyRead') { - // 政策解读 - getPolicyReadInfo({ readId: id }).then(({ data }) => { - this.formData = data; - }); - } else if (key == 'information') { - // 资讯快报 - getInfo({ id }).then(({ data }) => { - this.formData = data; - }); - } else if (key == 'companyNeed') { - // 企业需求 - getInfo2({ id }).then(({ data }) => { - this.formData = data; - }); - } else if (key == 'scienceResult') { - // 科学成功 - getInfo3({ id }).then(({ data }) => { - this.formData = data; - }); - } - } - }, + methods: {}, created() { let { val: param } = this.$route.query; search({ param }).then(({ data }) => {