Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-site
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张冬
web-site
Commits
8651969f
Commit
8651969f
authored
Oct 10, 2020
by
吴冠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索功能优化
parent
8f1a2426
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
57 deletions
+60
-57
header.vue
components/header.vue
+8
-4
homeinput.vue
components/homeinput.vue
+11
-11
nav.vue
components/nav.vue
+32
-35
index.vue
pages/index/index.vue
+3
-4
all.vue
pages/index/notice/all.vue
+6
-3
No files found.
components/header.vue
View file @
8651969f
...
...
@@ -9,15 +9,15 @@
</div>
<div
class=
"welcome t1"
>
<el-dropdown
size=
"mini"
>
<span>
{{
userName
}}
<i
class=
"el-icon-arrow-down el-icon--right"
v-if=
"isicon"
></i>
</span>
<span
class=
"text"
>
{{
userName
}}
<i
class=
"el-icon-arrow-down el-icon--right"
v-if=
"isicon"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<div
v-if=
"isicon"
size=
"mini"
class=
"checkButton"
@
click=
"out"
>
退出
</div>
</el-dropdown-menu>
</el-dropdown>
<!--
<div
class=
"checkout"
v-show =
"showButton"
@
mouseover=
"hover()"
>
退出
</div>
-->
<nuxt-link
to=
"/login/user"
class=
"login"
v-show=
"showDefault"
>
请登录
</nuxt-link>
<span
style=
"color:blue;margin-left:30px"
class=
"other"
@
click=
"loginOther"
>
商家免费入住
</span>
<button
@
click=
"jump"
v-show=
"!showDefault"
class=
"right-pos"
>
跳转
后台
</button>
<span
style=
"color:blue;margin-left:30px"
class=
"other"
@
click=
"loginOther"
v-show=
"showDefault"
>
商家免费入住
</span>
<button
@
click=
"jump"
v-show=
"!showDefault"
class=
"right-pos"
>
商家管理
后台
</button>
</div>
</div>
<div
class=
"flex-item t1 collection"
>
...
...
@@ -101,7 +101,8 @@ import {getSecond} from '@/common/list.js'
<
style
scoped
>
.right-pos
{
position
:
absolute
;
left
:
1050px
;
top
:
12px
;
left
:
1000px
;
cursor
:
pointer
;
font-size
:
10px
;
}
...
...
@@ -167,4 +168,7 @@ import {getSecond} from '@/common/list.js'
text-align
:
center
;
cursor
:
pointer
}
.text
{
font-size
:
10px
;
}
</
style
>
components/homeinput.vue
View file @
8651969f
...
...
@@ -27,23 +27,23 @@ import {getAllList} from '@/common/list.js'
export
default
{
methods
:{
toSearch
(){
this
.
$router
.
push
(
'notice/all'
)
window
.
sessionStorage
.
setItem
(
"content"
,
this
.
input
)
window
.
sessionStorage
.
setItem
(
"text"
,
this
.
active
)
/* inDex.$emit("send",this.active) */
sessionStorage
.
setItem
(
"content"
,
this
.
input
)
if
(
window
.
location
.
pathname
!==
"/notice/all"
){
this
.
$router
.
push
(
'/notice/all'
)
this
.
input
=
null
}
else
{
location
.
reload
()
console
.
log
(
"请在下面进行查询"
)
this
.
input
=
null
}
}
},
/* mounted(){
let tokenStr = window.sessionStorage.getItem("token")
if(tokenStr){
this.showdefault = false
}
}, */
mounted
(){
},
data
()
{
return
{
showdefault
:
false
,
input
:
""
,
active
:
4
}
},
}
...
...
components/nav.vue
View file @
8651969f
...
...
@@ -46,13 +46,10 @@ import inDex from '@/pages/index.vue'
}
},
mounted
(){
/* inDex.$on("send",(message)=>{
this.nav = message
}) */
if
(
window
.
location
.
href
===
"/notice/all"
){
console
.
log
(
window
.
location
.
href
+
'+++++++++++++-----------------'
)
this
.
nav
=
window
.
sessionStorage
.
getItem
(
"text"
)
}
console
.
log
(
"1"
)
/* if(window.location.pathname =="/notice/all"){
this.nav = "4"
} */
},
methods
:
{
change
(
index
,
path
)
{
...
...
@@ -61,34 +58,34 @@ import inDex from '@/pages/index.vue'
},
getindex
()
{
//
let path = this.$route.path;
//
if(path=="/"){
//
this.nav = "0";
//
}else if(path.indexOf("/message")==0){
//
this.nav = "5";
//
}else if(path.indexOf("/notice")==0){
//
this.nav = "4";
// }
//
switch (path) {
//
case '/':
//
this.nav = "0";
//
break;
//
case '/notice/inquiry':
//
this.nav = "1";
//
break;
//
case "/notice/bid":
//
this.nav = "2";
//
break;
//
case "/notice/biding":
//
this.nav = "3";
//
break;
//
case "/notice/all":
//
this.nav = "4";
//
break;
//
case "/message/news":
//
this.nav = "5";
//
break;
//
}
let
path
=
this
.
$route
.
path
;
/*
if(path=="/"){
this.nav = "0";
}else if(path.indexOf("/message")==0){
this.nav = "5";
}else if(path.indexOf("/notice")==0){
this.nav = "4";
} */
switch
(
path
)
{
case
'/'
:
this
.
nav
=
"0"
;
break
;
case
'/notice/inquiry'
:
this
.
nav
=
"1"
;
break
;
case
"/notice/bid"
:
this
.
nav
=
"2"
;
break
;
case
"/notice/biding"
:
this
.
nav
=
"3"
;
break
;
case
"/notice/all"
:
this
.
nav
=
"4"
;
break
;
case
"/message/news"
:
this
.
nav
=
"5"
;
break
;
}
}
},
...
...
pages/index/index.vue
View file @
8651969f
...
...
@@ -90,10 +90,9 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js'
this
.
getListSite
()
this
.
getListSite1
()
this
.
getListSite2
()
/* let tokenStr = window.sessionStorage.getItem("token")
if(tokenStr){
this.showdefault = false
} */
if
(
window
.
location
.
pathname
==
"/notice/all"
){
this
.
nav
=
"4"
}
},
methods
:{
latformDynamics
(){
...
...
pages/index/notice/all.vue
View file @
8651969f
...
...
@@ -64,12 +64,15 @@ import {getAllList,getNoticeType} from '@/common/list.js'
citySelect
},
mounted
(){
let
b
=
sessionStorage
.
getItem
(
"content"
)
let
message
=
{}
message
.
size
=
10
message
.
currentPage
=
1
this
.
industryList
()
this
.
getAllList
(
message
)
this
.
getNoticeType
()
message
.
title
=
b
this
.
industryList
()
this
.
getAllList
(
message
)
this
.
getNoticeType
()
sessionStorage
.
removeItem
(
"content"
)
},
data
()
{
return
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment