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

搜索功能优化

parent 8f1a2426
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
</div> </div>
<div class="welcome t1"> <div class="welcome t1">
<el-dropdown size="mini"> <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"> <el-dropdown-menu slot="dropdown">
<div v-if="isicon" size="mini" class="checkButton" @click="out">退出</div> <div v-if="isicon" size="mini" class="checkButton" @click="out">退出</div>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<!-- <div class="checkout" v-show = "showButton" @mouseover="hover()">退出</div> --> <!-- <div class="checkout" v-show = "showButton" @mouseover="hover()">退出</div> -->
<nuxt-link to="/login/user" class="login" v-show="showDefault">请登录</nuxt-link> <nuxt-link to="/login/user" class="login" v-show="showDefault">请登录</nuxt-link>
<span style="color:blue;margin-left:30px" class="other" @click="loginOther">商家免费入住</span> <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> <button @click="jump" v-show="!showDefault" class="right-pos">商家管理后台</button>
</div> </div>
</div> </div>
<div class="flex-item t1 collection"> <div class="flex-item t1 collection">
...@@ -101,7 +101,8 @@ import {getSecond} from '@/common/list.js' ...@@ -101,7 +101,8 @@ import {getSecond} from '@/common/list.js'
<style scoped> <style scoped>
.right-pos{ .right-pos{
position: absolute; position: absolute;
left:1050px; top:12px;
left:1000px;
cursor:pointer; cursor:pointer;
font-size: 10px; font-size: 10px;
} }
...@@ -167,4 +168,7 @@ import {getSecond} from '@/common/list.js' ...@@ -167,4 +168,7 @@ import {getSecond} from '@/common/list.js'
text-align: center; text-align: center;
cursor:pointer cursor:pointer
} }
.text{
font-size: 10px;
}
</style> </style>
...@@ -27,23 +27,23 @@ import {getAllList} from '@/common/list.js' ...@@ -27,23 +27,23 @@ import {getAllList} from '@/common/list.js'
export default { export default {
methods:{ methods:{
toSearch(){ toSearch(){
this.$router.push('notice/all') sessionStorage.setItem("content",this.input)
window.sessionStorage.setItem("content",this.input) if(window.location.pathname !=="/notice/all"){
window.sessionStorage.setItem("text",this.active) this.$router.push('/notice/all')
/* inDex.$emit("send",this.active) */ 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() { data() {
return { return {
showdefault:false, showdefault:false,
input:"", input:"",
active:4
} }
}, },
} }
......
...@@ -46,13 +46,10 @@ import inDex from '@/pages/index.vue' ...@@ -46,13 +46,10 @@ import inDex from '@/pages/index.vue'
} }
}, },
mounted(){ mounted(){
/* inDex.$on("send",(message)=>{ console.log("1")
this.nav = message /* if(window.location.pathname =="/notice/all"){
}) */ this.nav = "4"
if(window.location.href==="/notice/all"){ } */
console.log(window.location.href+'+++++++++++++-----------------')
this.nav = window.sessionStorage.getItem("text")
}
}, },
methods: { methods: {
change(index, path) { change(index, path) {
...@@ -61,34 +58,34 @@ import inDex from '@/pages/index.vue' ...@@ -61,34 +58,34 @@ import inDex from '@/pages/index.vue'
}, },
getindex() { getindex() {
// let path = this.$route.path; let path = this.$route.path;
// if(path=="/"){ /* if(path=="/"){
// this.nav = "0"; this.nav = "0";
// }else if(path.indexOf("/message")==0){ }else if(path.indexOf("/message")==0){
// this.nav = "5"; this.nav = "5";
// }else if(path.indexOf("/notice")==0){ }else if(path.indexOf("/notice")==0){
// this.nav = "4"; this.nav = "4";
// } } */
// switch (path) { switch (path) {
// case '/': case '/':
// this.nav = "0"; this.nav = "0";
// break; break;
// case '/notice/inquiry': case '/notice/inquiry':
// this.nav = "1"; this.nav = "1";
// break; break;
// case "/notice/bid": case "/notice/bid":
// this.nav = "2"; this.nav = "2";
// break; break;
// case "/notice/biding": case "/notice/biding":
// this.nav = "3"; this.nav = "3";
// break; break;
// case "/notice/all": case "/notice/all":
// this.nav = "4"; this.nav = "4";
// break; break;
// case "/message/news": case "/message/news":
// this.nav = "5"; this.nav = "5";
// break; break;
// } }
} }
}, },
......
...@@ -90,10 +90,9 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js' ...@@ -90,10 +90,9 @@ import {getSecond,getListSite,getListSite1,getListSite2} from '@/common/list.js'
this.getListSite() this.getListSite()
this.getListSite1() this.getListSite1()
this.getListSite2() this.getListSite2()
/* let tokenStr = window.sessionStorage.getItem("token") if(window.location.pathname =="/notice/all"){
if(tokenStr){ this.nav = "4"
this.showdefault = false }
} */
}, },
methods:{ methods:{
latformDynamics(){ latformDynamics(){
......
...@@ -64,12 +64,15 @@ import {getAllList,getNoticeType} from '@/common/list.js' ...@@ -64,12 +64,15 @@ import {getAllList,getNoticeType} from '@/common/list.js'
citySelect citySelect
}, },
mounted(){ mounted(){
let b = sessionStorage.getItem("content")
let message = {} let message = {}
message.size = 10 message.size = 10
message.currentPage = 1 message.currentPage = 1
message.title = b
this.industryList() this.industryList()
this.getAllList(message) this.getAllList(message)
this.getNoticeType() this.getNoticeType()
sessionStorage.removeItem("content")
}, },
data() { data() {
return { 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