Commit 8651969f authored by 吴冠's avatar 吴冠

搜索功能优化

parent 8f1a2426
......@@ -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>
......@@ -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
}
},
}
......
......@@ -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;
}
}
},
......
......@@ -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(){
......
......@@ -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
message.title = b
this.industryList()
this.getAllList(message)
this.getNoticeType()
sessionStorage.removeItem("content")
},
data() {
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment